mirror of https://github.com/abpframework/abp
				
				
				
			
							parent
							
								
									d21c882d52
								
							
						
					
					
						commit
						fc16050064
					
				| @ -0,0 +1,27 @@ | ||||
| { | ||||
|   "iisSettings": { | ||||
|     "windowsAuthentication": false, | ||||
|     "anonymousAuthentication": true, | ||||
|     "iisExpress": { | ||||
|       "applicationUrl": "http://localhost:57333/", | ||||
|       "sslPort": 0 | ||||
|     } | ||||
|   }, | ||||
|   "profiles": { | ||||
|     "IIS Express": { | ||||
|       "commandName": "IISExpress", | ||||
|       "launchBrowser": true, | ||||
|       "environmentVariables": { | ||||
|         "ASPNETCORE_ENVIRONMENT": "Development" | ||||
|       } | ||||
|     }, | ||||
|     "Volo.Abp.AspNetCore.Mvc.UI.Dashboards": { | ||||
|       "commandName": "Project", | ||||
|       "launchBrowser": true, | ||||
|       "environmentVariables": { | ||||
|         "ASPNETCORE_ENVIRONMENT": "Development" | ||||
|       }, | ||||
|       "applicationUrl": "http://localhost:57343/" | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,17 @@ | ||||
| using Microsoft.AspNetCore.Mvc; | ||||
| using Microsoft.Extensions.Options; | ||||
| using System.Linq; | ||||
| using System.Threading.Tasks; | ||||
| using Volo.Abp.AspNetCore.Mvc.UI.Widgets; | ||||
| 
 | ||||
| namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards.Components.Dashboard | ||||
| { | ||||
|     public class DashboardViewComponent : AbpViewComponent | ||||
|     { | ||||
|         public async Task<IViewComponentResult> InvokeAsync(string dashboardName, DashboardOptions dashboardOptions, WidgetOptions widgetOptions) | ||||
|         { | ||||
|             var model = new DashboardViewModel(dashboardName, dashboardOptions, widgetOptions); | ||||
|             return View("~/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml", model); | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @ -0,0 +1,21 @@ | ||||
| @using Microsoft.Extensions.Localization | ||||
| @using Volo.Abp.AspNetCore.Mvc.UI.Widgets | ||||
| @inject IWidgetRenderer WidgetRenderer | ||||
| @inject IStringLocalizerFactory localizer | ||||
| @model Volo.Abp.AspNetCore.Mvc.UI.Dashboards.Components.Dashboard.DashboardViewModel | ||||
| @{ | ||||
| } | ||||
| <abp-row> | ||||
|     @foreach (var widgetConfiguration in Model.Dashboard.AvailableWidgets) | ||||
|     { | ||||
|         var widgetDefinition = Model.GetWidget(widgetConfiguration.WidgetName); | ||||
|         widgetDefinition.DefaultDimensions = widgetConfiguration.Dimensions ?? widgetDefinition.DefaultDimensions ?? new WidgetDimensions(5, 5); | ||||
| 
 | ||||
|         <abp-column class="col-@widgetDefinition.DefaultDimensions.Width" | ||||
|                     style="height: @(widgetDefinition.DefaultDimensions.Height * 100)px" | ||||
|                     abp-border="Danger"> | ||||
| 
 | ||||
|             @await WidgetRenderer.RenderAsync(Component, widgetDefinition.Name) | ||||
|         </abp-column> | ||||
|     } | ||||
| </abp-row> | ||||
| @ -0,0 +1,3 @@ | ||||
| @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers | ||||
| @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap | ||||
| @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling | ||||
					Loading…
					
					
				
		Reference in new issue
	
	 Yunus Emre Kalkan
						Yunus Emre Kalkan