From 0ad7b0c0349e06aa969495676fd9bb0e4e2cc462 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Fri, 12 Jul 2019 13:52:33 +0300 Subject: [PATCH] dashboard demo improvements --- .../Dashboards/DashboardDefinitionProvider.cs | 2 +- .../Pages/MyDashboard.cshtml | 5 ++++- .../Pages/MyDashboard.cshtml.cs | 19 ------------------- ...thlyProfitWidgetScriptBundleContributor.cs | 1 - ...nthlyProfitWidgetStyleBundleContributor.cs | 1 - 5 files changed, 5 insertions(+), 23 deletions(-) diff --git a/samples/DashboardDemo/src/DashboardDemo.Web/Dashboards/DashboardDefinitionProvider.cs b/samples/DashboardDemo/src/DashboardDemo.Web/Dashboards/DashboardDefinitionProvider.cs index 73d8d46426..38d0802c4d 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Web/Dashboards/DashboardDefinitionProvider.cs +++ b/samples/DashboardDemo/src/DashboardDemo.Web/Dashboards/DashboardDefinitionProvider.cs @@ -16,8 +16,8 @@ namespace DashboardDemo.Dashboards LocalizableString.Create("MyDashboard") ) .WithWidget(UserCountWidgetViewComponent.Name) - .WithWidget(RoleListWidgetViewComponent.Name) .WithWidget(MonthlyProfitWidgetViewComponent.Name) + .WithWidget(RoleListWidgetViewComponent.Name) .WithGlobalFilter(DateRangeGlobalFilterViewComponent.Name); return new List diff --git a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/MyDashboard.cshtml b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/MyDashboard.cshtml index 9bfa30bafe..6dcc897445 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/MyDashboard.cshtml +++ b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/MyDashboard.cshtml @@ -16,4 +16,7 @@ } -@await DashboardRenderer.RenderAsync(Component, new { dashboardName = DashboardNames.MyDashboard }) \ No newline at end of file + + @await DashboardRenderer.RenderAsync(Component, new { dashboardName = DashboardNames.MyDashboard }) + + diff --git a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/MyDashboard.cshtml.cs b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/MyDashboard.cshtml.cs index 14d582808e..a655023e4c 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/MyDashboard.cshtml.cs +++ b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/MyDashboard.cshtml.cs @@ -8,25 +8,6 @@ namespace DashboardDemo.Pages { public class MyDashboardModel : DashboardDemoPageModelBase { - public DashboardDefinition Dashboard { get; set; } - public readonly DashboardOptions _dashboardOptions; - public readonly WidgetOptions _widgetOptions; - - public MyDashboardModel(IOptions dashboardOptions, IOptions widgetOptions) - { - _dashboardOptions = dashboardOptions.Value; - _widgetOptions = widgetOptions.Value; - } - - public void OnGet() - { - Dashboard = _dashboardOptions.Dashboards.Single(d => d.Name.Equals(DashboardNames.MyDashboard)); - } - - public WidgetDefinition GetWidget(string name) - { - return _widgetOptions.Widgets.Single(d => d.Name.Equals(name)); - } } } \ No newline at end of file diff --git a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetScriptBundleContributor.cs b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetScriptBundleContributor.cs index 9f40cd0032..0a6086f1f9 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetScriptBundleContributor.cs +++ b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetScriptBundleContributor.cs @@ -8,7 +8,6 @@ using Volo.Abp.Modularity; namespace DashboardDemo.Pages.widgets { [DependsOn(typeof(JQueryScriptContributor))] - [DependsOn(typeof(ClipboardScriptBundleContributor))] [DependsOn(typeof(ChartjsScriptContributor))] public class MonthlyProfitWidgetScriptBundleContributor : BundleContributor { diff --git a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetStyleBundleContributor.cs b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetStyleBundleContributor.cs index 2823361ff5..85ebcfae98 100644 --- a/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetStyleBundleContributor.cs +++ b/samples/DashboardDemo/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetStyleBundleContributor.cs @@ -8,7 +8,6 @@ using Volo.Abp.Modularity; namespace DashboardDemo.Pages.widgets { [DependsOn(typeof(BootstrapStyleContributor))] - [DependsOn(typeof(HighlightJsStyleContributor))] [DependsOn(typeof(ChartjsStyleContributor))] public class MonthlyProfitWidgetStyleBundleContributor : BundleContributor {