diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index 13ef057f97..de41f864c7 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -236,8 +236,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Cli.Core.Tests", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Mvc.UI.Widgets", "src\Volo.Abp.AspNetCore.Mvc.UI.Widgets\Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj", "{EE1AAB08-3FBD-487F-B0B4-BEBA4B69528A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Mvc.UI.Dashboards", "src\Volo.Abp.AspNetCore.Mvc.UI.Dashboards\Volo.Abp.AspNetCore.Mvc.UI.Dashboards.csproj", "{054D766D-5992-460E-A4D8-936D80BE2C1A}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Ldap", "src\Volo.Abp.Ldap\Volo.Abp.Ldap.csproj", "{4DADBBD2-4C63-4C90-9661-EBF6252A7D6F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Ldap.Tests", "test\Volo.Abp.Ldap.Tests\Volo.Abp.Ldap.Tests.csproj", "{38FB8F75-426E-4265-8D0E-E121837B6FCC}" @@ -246,9 +244,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Dapper", "src\Volo EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Dapper.Tests", "test\Volo.Abp.Dapper.Tests\Volo.Abp.Dapper.Tests.csproj", "{E026A085-D881-4AE0-9F08-422AC3903BD7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.MailKit", "src\Volo.Abp.MailKit\Volo.Abp.MailKit.csproj", "{0CAED4CC-1CFD-4092-A326-AFE4DB3A9AB4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.MailKit", "src\Volo.Abp.MailKit\Volo.Abp.MailKit.csproj", "{0CAED4CC-1CFD-4092-A326-AFE4DB3A9AB4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.MailKit.Tests", "test\Volo.Abp.MailKit.Tests\Volo.Abp.MailKit.Tests.csproj", "{70DD6E17-B98B-4B00-8F38-C489E291BB53}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.MailKit.Tests", "test\Volo.Abp.MailKit.Tests\Volo.Abp.MailKit.Tests.csproj", "{70DD6E17-B98B-4B00-8F38-C489E291BB53}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -716,10 +714,6 @@ Global {EE1AAB08-3FBD-487F-B0B4-BEBA4B69528A}.Debug|Any CPU.Build.0 = Debug|Any CPU {EE1AAB08-3FBD-487F-B0B4-BEBA4B69528A}.Release|Any CPU.ActiveCfg = Release|Any CPU {EE1AAB08-3FBD-487F-B0B4-BEBA4B69528A}.Release|Any CPU.Build.0 = Release|Any CPU - {054D766D-5992-460E-A4D8-936D80BE2C1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {054D766D-5992-460E-A4D8-936D80BE2C1A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {054D766D-5992-460E-A4D8-936D80BE2C1A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {054D766D-5992-460E-A4D8-936D80BE2C1A}.Release|Any CPU.Build.0 = Release|Any CPU {4DADBBD2-4C63-4C90-9661-EBF6252A7D6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4DADBBD2-4C63-4C90-9661-EBF6252A7D6F}.Debug|Any CPU.Build.0 = Debug|Any CPU {4DADBBD2-4C63-4C90-9661-EBF6252A7D6F}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -864,7 +858,6 @@ Global {D078553A-C70C-4F56-B3E2-9C5BA6384C72} = {447C8A77-E5F0-4538-8687-7383196D04EA} {F006B0B4-F25D-4511-9FB3-F17AA44BDCEA} = {447C8A77-E5F0-4538-8687-7383196D04EA} {EE1AAB08-3FBD-487F-B0B4-BEBA4B69528A} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} - {054D766D-5992-460E-A4D8-936D80BE2C1A} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {4DADBBD2-4C63-4C90-9661-EBF6252A7D6F} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {38FB8F75-426E-4265-8D0E-E121837B6FCC} = {447C8A77-E5F0-4538-8687-7383196D04EA} {D863A3C3-CC1D-426F-BDD4-02E7AE2A3170} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Pages/Components/Dashboard/Default.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Pages/Components/Dashboard/Default.js deleted file mode 100644 index 272fc751eb..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Pages/Components/Dashboard/Default.js +++ /dev/null @@ -1,6 +0,0 @@ -(function ($) { - $('#GlobalRefreshButton').on('click', - function () { - $(document).trigger('RefreshWidgets', $('#DashboardGlobalFiltersForm').serializeFormToObject()); - }); -})(jQuery); \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Properties/launchSettings.json deleted file mode 100644 index 0ce91a367d..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Properties/launchSettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "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/" - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo.Abp.AspNetCore.Mvc.UI.Dashboards.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo.Abp.AspNetCore.Mvc.UI.Dashboards.csproj deleted file mode 100644 index 69c8816688..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo.Abp.AspNetCore.Mvc.UI.Dashboards.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - netstandard2.0 - Volo.Abp.AspNetCore.Mvc.UI.Dashboards - Volo.Abp.AspNetCore.Mvc.UI.Dashboards - $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - false - false - false - true - Library - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/AbpAspNetCoreMvcUiDashboardsModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/AbpAspNetCoreMvcUiDashboardsModule.cs deleted file mode 100644 index 6fcb11d28e..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/AbpAspNetCoreMvcUiDashboardsModule.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Volo.Abp.AspNetCore.Mvc.UI.Widgets; -using Volo.Abp.Modularity; -using Volo.Abp.VirtualFileSystem; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - [DependsOn( - typeof(AbpAspNetCoreMvcUiWidgetsModule) - )] - public class AbpAspNetCoreMvcUiDashboardsModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.FileSets.AddEmbedded(); - }); - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/AbpBasicDashboardScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/AbpBasicDashboardScriptContributor.cs deleted file mode 100644 index 83f5910d68..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/AbpBasicDashboardScriptContributor.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Volo.Abp.AspNetCore.Mvc.UI.Bundling; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class AbpBasicDashboardScriptContributor : BundleContributor - { - public override void ConfigureBundle(BundleConfigurationContext context) - { - context.Files.Add("/Pages/Components/Dashboard/Default.js"); - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/AbpBasicDashboardStyleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/AbpBasicDashboardStyleContributor.cs deleted file mode 100644 index 5c074783fc..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/AbpBasicDashboardStyleContributor.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Volo.Abp.AspNetCore.Mvc.UI.Bundling; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class AbpBasicDashboardStyleContributor : BundleContributor - { - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/DashboardViewComponent.cshtml.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/DashboardViewComponent.cshtml.cs deleted file mode 100644 index dd6bdbb206..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/DashboardViewComponent.cshtml.cs +++ /dev/null @@ -1,31 +0,0 @@ -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 - { - private readonly DashboardOptions _dashboardOptions; - private readonly WidgetOptions _widgetOptions; - private readonly GlobalFilterOptions _globalFilterOptions; - - public DashboardViewComponent(IOptions dashboardOptions, IOptions widgetOptions, IOptions globalFilterOptions) - { - _dashboardOptions = dashboardOptions.Value; - _widgetOptions = widgetOptions.Value; - _globalFilterOptions = globalFilterOptions.Value; - } - - public IViewComponentResult Invoke(string dashboardName) - { - var dashboard = _dashboardOptions.Dashboards.Single(d => d.Name.Equals(dashboardName)); - - var model = new DashboardViewModel(dashboard, _widgetOptions.Widgets.GetAll().ToList(), _globalFilterOptions.GlobalFilters); - - return View("~/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml", model); - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/DashboardViewModel.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/DashboardViewModel.cs deleted file mode 100644 index c7caae2dc4..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/DashboardViewModel.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Authorization; -using Volo.Abp.AspNetCore.Mvc.UI.Widgets; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards.Components.Dashboard -{ - public class DashboardViewModel - { - public DashboardDefinition Dashboard { get; set; } - - public List Widgets { get; set; } - - public List GlobalFilters { get; set; } - - public DashboardViewModel(DashboardDefinition dashboard, List widgets, List globalFilters) - { - Dashboard = dashboard; - Widgets = widgets; - GlobalFilters = globalFilters; - } - - public WidgetDefinition GetWidget(string name) - { - return Widgets.Single(d => d.Name.Equals(name)); - } - - public GlobalFilterDefinition GetGlobalFilter(string name) - { - return GlobalFilters.Single(d => d.Name.Equals(name)); - } - - public async Task CheckPermissionsAsync(IAuthorizationService authorizationService, WidgetDefinition widget) - { - foreach (var permission in widget.RequiredPolicies) - { - if (!await authorizationService.IsGrantedAsync(permission)) - { - return false; - } - } - - return true; - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml deleted file mode 100644 index 1f51c44d44..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/Components/Dashboard/Default.cshtml +++ /dev/null @@ -1,53 +0,0 @@ -@using Localization.Resources.AbpUi -@using Microsoft.AspNetCore.Authorization -@using Microsoft.AspNetCore.Mvc.Localization -@using Microsoft.Extensions.Localization -@using Volo.Abp.AspNetCore.Mvc.UI.Dashboards -@using Volo.Abp.AspNetCore.Mvc.UI.Widgets -@inject IAuthorizationService AuthorizationService -@inject IGlobalFilterRenderer GlobalFilteRenderer -@inject IHtmlLocalizer L -@model Volo.Abp.AspNetCore.Mvc.UI.Dashboards.Components.Dashboard.DashboardViewModel -@{ -} - - - @if (Model.Dashboard.AvailableGlobalFilters.Any()) - { - -
- - @foreach (var globalFilterConfiguration in Model.Dashboard.AvailableGlobalFilters) - { - var globalFilter = Model.GetGlobalFilter(globalFilterConfiguration.GlobalFilterName); - - @await GlobalFilteRenderer.RenderAsync(Component, globalFilter.Name) - - } - -
-
- -
- -
-
- } -
- - - @foreach (var widgetConfiguration in Model.Dashboard.AvailableWidgets) - { - var widgetDefinition = Model.GetWidget(widgetConfiguration.WidgetName); - if (await Model.CheckPermissionsAsync(AuthorizationService, widgetDefinition)) - { - widgetDefinition.DefaultDimensions = widgetConfiguration.Dimensions ?? widgetDefinition.DefaultDimensions ?? new WidgetDimensions(6, 4); - - - - @await Component.InvokeAsync(widgetDefinition.Name) - - } - } - \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardDefinition.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardDefinition.cs deleted file mode 100644 index ff06fa0d44..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardDefinition.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Collections.Generic; -using JetBrains.Annotations; -using Volo.Abp.AspNetCore.Mvc.UI.Widgets; -using Volo.Abp.Localization; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class DashboardDefinition - { - /// - /// Unique name of the dashboard. - /// - [NotNull] - public string Name { get; } - - /// - /// A list of Widgets available for this dashboard. - /// - public List AvailableWidgets { get; } - - /// - /// A list of Global Filters available for this dashboard. - /// - public List AvailableGlobalFilters { get; } - - /// - /// Display name of the dashboard. - /// - [NotNull] - public ILocalizableString DisplayName - { - get => _displayName; - set => _displayName = Check.NotNull(value, nameof(value)); - } - private ILocalizableString _displayName; - - public DashboardDefinition( - [NotNull] string name, - [CanBeNull] ILocalizableString displayName) - { - Name = Check.NotNullOrWhiteSpace(name, nameof(name)); - DisplayName = displayName ?? new FixedLocalizableString(name); - - AvailableWidgets = new List(); - AvailableGlobalFilters = new List(); - } - - public DashboardDefinition WithWidget(string widgetName, WidgetLocation location = null, WidgetDimensions dimensions = null) - { - AvailableWidgets.Add( new DashboardWidgetConfiguration(widgetName, dimensions, location)); - - return this; - } - - public DashboardDefinition WithGlobalFilter(string globalFilterName) - { - AvailableGlobalFilters.Add( new DashboardGlobalFilterConfiguration(globalFilterName)); - - return this; - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardGlobalFilterConfiguration.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardGlobalFilterConfiguration.cs deleted file mode 100644 index 5f097270ca..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardGlobalFilterConfiguration.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JetBrains.Annotations; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class DashboardGlobalFilterConfiguration - { - [NotNull] - public string GlobalFilterName { get; } - - public DashboardGlobalFilterConfiguration([NotNull] string globalFilterName) - { - GlobalFilterName = Check.NotNullOrWhiteSpace(globalFilterName, nameof(globalFilterName)); - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardOptions.cs deleted file mode 100644 index fc3ca09b74..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class DashboardOptions - { - public List Dashboards { get; } - - public DashboardOptions() - { - Dashboards = new List(); - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardRenderer.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardRenderer.cs deleted file mode 100644 index d35c58f0e2..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardRenderer.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNetCore.Html; -using Microsoft.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc.UI.Dashboards.Components.Dashboard; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class DashboardRenderer : IDashboardRenderer - { - public async Task RenderAsync(IViewComponentHelper componentHelper, object args = null) - { - return await componentHelper.InvokeAsync(typeof(DashboardViewComponent), args ?? new object()); - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardWidgetConfiguration.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardWidgetConfiguration.cs deleted file mode 100644 index 74a20bc877..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/DashboardWidgetConfiguration.cs +++ /dev/null @@ -1,28 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.AspNetCore.Mvc.UI.Widgets; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class DashboardWidgetConfiguration - { - [NotNull] - public string WidgetName { get; } - - [CanBeNull] - public WidgetDimensions Dimensions { get; set; } - - [CanBeNull] - public WidgetLocation Location { get; set; } - - public DashboardWidgetConfiguration( - [NotNull] string widgetName, - [CanBeNull] WidgetDimensions dimensions = null, - [CanBeNull] WidgetLocation location = null - ) - { - WidgetName = Check.NotNullOrWhiteSpace(widgetName, nameof(widgetName)); - Dimensions = dimensions; - Location = location; - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/GlobalFilterDefinition.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/GlobalFilterDefinition.cs deleted file mode 100644 index f599f0c797..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/GlobalFilterDefinition.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using JetBrains.Annotations; -using Volo.Abp.Localization; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class GlobalFilterDefinition - { - /// - /// Unique name of the Global Filter. - /// - [NotNull] - public string Name { get; } - - /// - /// Display name of the Global Filter. - /// - [NotNull] - public ILocalizableString DisplayName - { - get => _displayName; - set => _displayName = Check.NotNull(value, nameof(value)); - } - private ILocalizableString _displayName; - - [NotNull] - public Type ViewComponentType { get; } - - public GlobalFilterDefinition( - [NotNull] string name, - [CanBeNull] ILocalizableString displayName, - [NotNull] Type viewComponentType) - { - Name = Check.NotNullOrWhiteSpace(name, nameof(name)); - DisplayName = displayName ?? new FixedLocalizableString(name); - ViewComponentType = Check.NotNull(viewComponentType, nameof(viewComponentType)); - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/GlobalFilterOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/GlobalFilterOptions.cs deleted file mode 100644 index 70ba40e696..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/GlobalFilterOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class GlobalFilterOptions - { - public List GlobalFilters { get; } - - public GlobalFilterOptions() - { - GlobalFilters = new List(); - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/GlobalFilterRenderer.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/GlobalFilterRenderer.cs deleted file mode 100644 index d1219943ae..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/GlobalFilterRenderer.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Html; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Options; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class GlobalFilterRenderer : IGlobalFilterRenderer - { - private readonly GlobalFilterOptions _globalFilterOptions; - - public GlobalFilterRenderer(IOptions widgetOptions) - { - _globalFilterOptions = widgetOptions.Value; - } - - public async Task RenderAsync(IViewComponentHelper componentHelper, string globalFilterName, object args = null) - { - var globalFilter = _globalFilterOptions.GlobalFilters.Single(w => w.Name.Equals(globalFilterName)); - - return await componentHelper.InvokeAsync(globalFilter.ViewComponentType, args ?? new object()); - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/IDashboardRenderer.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/IDashboardRenderer.cs deleted file mode 100644 index 7cfed80135..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/IDashboardRenderer.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNetCore.Html; -using Microsoft.AspNetCore.Mvc; -using Volo.Abp.DependencyInjection; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public interface IDashboardRenderer : ITransientDependency - { - Task RenderAsync(IViewComponentHelper componentHelper, object args = null); - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/IGlobalFilterRenderer.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/IGlobalFilterRenderer.cs deleted file mode 100644 index 6978f4d6b1..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/IGlobalFilterRenderer.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNetCore.Html; -using Microsoft.AspNetCore.Mvc; -using Volo.Abp.DependencyInjection; - -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public interface IGlobalFilterRenderer : ITransientDependency - { - Task RenderAsync(IViewComponentHelper componentHelper, string globalFilterName, object args = null); - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/WidgetLocation.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/WidgetLocation.cs deleted file mode 100644 index 7ce21a342e..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/WidgetLocation.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Volo.Abp.AspNetCore.Mvc.UI.Dashboards -{ - public class WidgetLocation - { - public int X { get; set; } - - public int Y { get; set; } - - public WidgetLocation(int x, int y) - { - X = x; - Y = y; - } - } -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/_ViewImports.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/_ViewImports.cshtml deleted file mode 100644 index 225780c2c2..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Dashboards/Volo/Abp/AspNetCore/Mvc/UI/Dashboards/_ViewImports.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap -@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetAttribute.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetAttribute.cs index 8bd5bc4929..002d981df3 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetAttribute.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetAttribute.cs @@ -31,10 +31,6 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets public bool RequiresAuthentication { get; set; } - public int? DefaultWidth { get; set; } - - public int? DefaultHeight { get; set; } - public string RefreshUrl { get; set; } public static bool IsWidget(Type type) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetDefinition.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetDefinition.cs index d82704b968..b33950abb3 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetDefinition.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo/Abp/AspNetCore/Mvc/UI/Widgets/WidgetDefinition.cs @@ -47,9 +47,6 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets [NotNull] public List Scripts { get; } - [CanBeNull] - public WidgetDimensions DefaultDimensions { get; set; } - [CanBeNull] public string RefreshUrl { get; set; } @@ -67,11 +64,6 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets Styles = GetStyles(WidgetAttribute); Scripts = GetScripts(WidgetAttribute); RefreshUrl = WidgetAttribute.RefreshUrl; - - if (WidgetAttribute.DefaultWidth.HasValue && WidgetAttribute.DefaultHeight.HasValue) - { - DefaultDimensions = new WidgetDimensions(WidgetAttribute.DefaultWidth.Value, WidgetAttribute.DefaultHeight.Value); - } } private static List GetStyles(WidgetAttribute widgetAttribute) @@ -169,12 +161,6 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Widgets return this; } - public WidgetDefinition WithDefaultDimensions(int width, int height) - { - DefaultDimensions = new WidgetDimensions(width, height); - return this; - } - public WidgetDefinition WithStyles(params string[] files) { return WithResources(Styles, files);