Created AbpSettingManagementWebModule

pull/625/head
Halil ibrahim Kalkan 6 years ago
parent 399e46e361
commit 5a1c67a554

@ -15,13 +15,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{7E8D2943-A
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.SettingManagement.Tests", "test\Volo.Abp.SettingManagement.Tests\Volo.Abp.SettingManagement.Tests.csproj", "{E8335ADC-D09E-4B74-8190-45A9FAF962CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.MongoDB", "src\Volo.Abp.SettingManagement.MongoDB\Volo.Abp.SettingManagement.MongoDB.csproj", "{7615D255-FB8F-49F0-81C0-F2E69F7F0CB7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.SettingManagement.MongoDB", "src\Volo.Abp.SettingManagement.MongoDB\Volo.Abp.SettingManagement.MongoDB.csproj", "{7615D255-FB8F-49F0-81C0-F2E69F7F0CB7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.TestBase", "test\Volo.Abp.SettingManagement.TestBase\Volo.Abp.SettingManagement.TestBase.csproj", "{D4A2DCB2-FA6A-43DC-9469-B6CDAA7EB489}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.SettingManagement.TestBase", "test\Volo.Abp.SettingManagement.TestBase\Volo.Abp.SettingManagement.TestBase.csproj", "{D4A2DCB2-FA6A-43DC-9469-B6CDAA7EB489}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.EntityFrameworkCore.Tests", "test\Volo.Abp.SettingManagement.EntityFrameworkCore.Tests\Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj", "{AFF6A7B6-A80B-4569-9F6B-CD6C72EAB6D4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.SettingManagement.EntityFrameworkCore.Tests", "test\Volo.Abp.SettingManagement.EntityFrameworkCore.Tests\Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj", "{AFF6A7B6-A80B-4569-9F6B-CD6C72EAB6D4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.MongoDB.Tests", "test\Volo.Abp.SettingManagement.MongoDB.Tests\Volo.Abp.SettingManagement.MongoDB.Tests.csproj", "{DF76DE74-1029-4FEA-8ADF-3C5636944757}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.SettingManagement.MongoDB.Tests", "test\Volo.Abp.SettingManagement.MongoDB.Tests\Volo.Abp.SettingManagement.MongoDB.Tests.csproj", "{DF76DE74-1029-4FEA-8ADF-3C5636944757}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.Web", "src\Volo.Abp.SettingManagement.Web\Volo.Abp.SettingManagement.Web.csproj", "{AF6BE46D-AC88-4DEF-BBEC-F60A00847D43}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -61,6 +63,10 @@ Global
{DF76DE74-1029-4FEA-8ADF-3C5636944757}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF76DE74-1029-4FEA-8ADF-3C5636944757}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF76DE74-1029-4FEA-8ADF-3C5636944757}.Release|Any CPU.Build.0 = Release|Any CPU
{AF6BE46D-AC88-4DEF-BBEC-F60A00847D43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF6BE46D-AC88-4DEF-BBEC-F60A00847D43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF6BE46D-AC88-4DEF-BBEC-F60A00847D43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF6BE46D-AC88-4DEF-BBEC-F60A00847D43}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -74,6 +80,7 @@ Global
{D4A2DCB2-FA6A-43DC-9469-B6CDAA7EB489} = {7E8D2943-ADE7-4C89-8048-0780CE07E0E0}
{AFF6A7B6-A80B-4569-9F6B-CD6C72EAB6D4} = {7E8D2943-ADE7-4C89-8048-0780CE07E0E0}
{DF76DE74-1029-4FEA-8ADF-3C5636944757} = {7E8D2943-ADE7-4C89-8048-0780CE07E0E0}
{AF6BE46D-AC88-4DEF-BBEC-F60A00847D43} = {F1BE945B-F0CF-4712-BC2B-9AF8C02059EA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {24B3A486-E7CA-4AA5-B76F-27D351A97E59}

@ -0,0 +1,13 @@
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.Modularity;
namespace Volo.Abp.SettingManagement.Web
{
[DependsOn(
typeof(AbpAspNetCoreMvcUiThemeSharedModule)
)]
public class AbpSettingManagementWebModule : AbpModule
{
}
}

@ -0,0 +1,9 @@
using System.Threading.Tasks;
namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement
{
public interface ISettingPageContributor
{
Task ConfigureAsync(SettingPageCreationContext context);
}
}

@ -0,0 +1,9 @@
@page
@model Volo.Abp.SettingManagement.Web.Pages.SettingManagement.IndexModel
@foreach (var group in Model.SettingPageCreationContext.Groups)
{
<h2 id="@group.Id">@group.DisplayName</h2>
<div>
@await Component.InvokeAsync(group.ComponentType)
</div>
}

@ -0,0 +1,28 @@
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement
{
public class IndexModel : AbpPageModel
{
public SettingPageCreationContext SettingPageCreationContext { get; private set; }
private readonly SettingManagementPageOptions _options;
public IndexModel(IOptions<SettingManagementPageOptions> options)
{
_options = options.Value;
}
public async Task OnGetAsync()
{
SettingPageCreationContext = new SettingPageCreationContext();
foreach (var contributor in _options.Contributors)
{
await contributor.ConfigureAsync(SettingPageCreationContext);
}
}
}
}

@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement
{
public class SettingManagementPageOptions
{
public List<ISettingPageContributor> Contributors { get; }
public SettingManagementPageOptions()
{
Contributors = new List<ISettingPageContributor>();
}
}
}

@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement
{
public class SettingPageCreationContext
{
public List<SettingPageGroup> Groups { get; }
public SettingPageCreationContext()
{
Groups = new List<SettingPageGroup>();
}
}
}

@ -0,0 +1,36 @@
using System;
using JetBrains.Annotations;
namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement
{
public class SettingPageGroup
{
public string Id
{
get => _id;
set => _id = Check.NotNullOrWhiteSpace(value, nameof(Id));
}
private string _id;
public string DisplayName
{
get => _displayName;
set => _displayName = Check.NotNullOrWhiteSpace(value, nameof(DisplayName));
}
private string _displayName;
public Type ComponentType
{
get => _componentType;
set => _componentType = Check.NotNull(value, nameof(ComponentType));
}
private Type _componentType;
public SettingPageGroup([NotNull] string id, [NotNull] string displayName, [NotNull] Type componentType)
{
Id = id;
DisplayName = displayName;
ComponentType = componentType;
}
}
}

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:62272/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Volo.Abp.SettingManagement.Web": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:62273/"
}
}
}

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<IsPackable>true</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj" />
</ItemGroup>
</Project>
Loading…
Cancel
Save