mirror of https://github.com/abpframework/abp.git
481 changed files with 7 additions and 124382 deletions
@ -1 +0,0 @@ |
|||
**/wwwroot/libs/** linguist-vendored |
|||
@ -1,258 +0,0 @@ |
|||
## Ignore Visual Studio temporary files, build results, and |
|||
## files generated by popular Visual Studio add-ons. |
|||
|
|||
# User-specific files |
|||
*.suo |
|||
*.user |
|||
*.userosscache |
|||
*.sln.docstates |
|||
|
|||
# User-specific files (MonoDevelop/Xamarin Studio) |
|||
*.userprefs |
|||
|
|||
# Build results |
|||
[Dd]ebug/ |
|||
[Dd]ebugPublic/ |
|||
[Rr]elease/ |
|||
[Rr]eleases/ |
|||
x64/ |
|||
x86/ |
|||
bld/ |
|||
[Bb]in/ |
|||
[Oo]bj/ |
|||
[Ll]og/ |
|||
|
|||
# Visual Studio 2015 cache/options directory |
|||
.vs/ |
|||
# Uncomment if you have tasks that create the project's static files in wwwroot |
|||
#wwwroot/ |
|||
|
|||
# MSTest test Results |
|||
[Tt]est[Rr]esult*/ |
|||
[Bb]uild[Ll]og.* |
|||
|
|||
# NUNIT |
|||
*.VisualState.xml |
|||
TestResult.xml |
|||
|
|||
# Build Results of an ATL Project |
|||
[Dd]ebugPS/ |
|||
[Rr]eleasePS/ |
|||
dlldata.c |
|||
|
|||
# DNX |
|||
project.lock.json |
|||
artifacts/ |
|||
|
|||
*_i.c |
|||
*_p.c |
|||
*_i.h |
|||
*.ilk |
|||
*.meta |
|||
*.obj |
|||
*.pch |
|||
*.pdb |
|||
*.pgc |
|||
*.pgd |
|||
*.rsp |
|||
*.sbr |
|||
*.tlb |
|||
*.tli |
|||
*.tlh |
|||
*.tmp |
|||
*.tmp_proj |
|||
*.log |
|||
*.vspscc |
|||
*.vssscc |
|||
.builds |
|||
*.pidb |
|||
*.svclog |
|||
*.scc |
|||
|
|||
# Chutzpah Test files |
|||
_Chutzpah* |
|||
|
|||
# Visual C++ cache files |
|||
ipch/ |
|||
*.aps |
|||
*.ncb |
|||
*.opendb |
|||
*.opensdf |
|||
*.sdf |
|||
*.cachefile |
|||
*.VC.db |
|||
*.VC.VC.opendb |
|||
|
|||
# Visual Studio profiler |
|||
*.psess |
|||
*.vsp |
|||
*.vspx |
|||
*.sap |
|||
|
|||
# TFS 2012 Local Workspace |
|||
$tf/ |
|||
|
|||
# Guidance Automation Toolkit |
|||
*.gpState |
|||
|
|||
# ReSharper is a .NET coding add-in |
|||
_ReSharper*/ |
|||
*.[Rr]e[Ss]harper |
|||
*.DotSettings.user |
|||
|
|||
# JustCode is a .NET coding add-in |
|||
.JustCode |
|||
|
|||
# TeamCity is a build add-in |
|||
_TeamCity* |
|||
|
|||
# DotCover is a Code Coverage Tool |
|||
*.dotCover |
|||
|
|||
# NCrunch |
|||
_NCrunch_* |
|||
.*crunch*.local.xml |
|||
nCrunchTemp_* |
|||
|
|||
# MightyMoose |
|||
*.mm.* |
|||
AutoTest.Net/ |
|||
|
|||
# Web workbench (sass) |
|||
.sass-cache/ |
|||
|
|||
# Installshield output folder |
|||
[Ee]xpress/ |
|||
|
|||
# DocProject is a documentation generator add-in |
|||
DocProject/buildhelp/ |
|||
DocProject/Help/*.HxT |
|||
DocProject/Help/*.HxC |
|||
DocProject/Help/*.hhc |
|||
DocProject/Help/*.hhk |
|||
DocProject/Help/*.hhp |
|||
DocProject/Help/Html2 |
|||
DocProject/Help/html |
|||
|
|||
# Click-Once directory |
|||
publish/ |
|||
|
|||
# Publish Web Output |
|||
*.[Pp]ublish.xml |
|||
*.azurePubxml |
|||
# TODO: Comment the next line if you want to checkin your web deploy settings |
|||
# but database connection strings (with potential passwords) will be unencrypted |
|||
*.pubxml |
|||
*.publishproj |
|||
|
|||
# Microsoft Azure Web App publish settings. Comment the next line if you want to |
|||
# checkin your Azure Web App publish settings, but sensitive information contained |
|||
# in these scripts will be unencrypted |
|||
PublishScripts/ |
|||
|
|||
# NuGet Packages |
|||
*.nupkg |
|||
# The packages folder can be ignored because of Package Restore |
|||
**/packages/* |
|||
# except build/, which is used as an MSBuild target. |
|||
!**/packages/build/ |
|||
# Uncomment if necessary however generally it will be regenerated when needed |
|||
#!**/packages/repositories.config |
|||
# NuGet v3's project.json files produces more ignoreable files |
|||
*.nuget.props |
|||
*.nuget.targets |
|||
|
|||
# Microsoft Azure Build Output |
|||
csx/ |
|||
*.build.csdef |
|||
|
|||
# Microsoft Azure Emulator |
|||
ecf/ |
|||
rcf/ |
|||
|
|||
# Windows Store app package directories and files |
|||
AppPackages/ |
|||
BundleArtifacts/ |
|||
Package.StoreAssociation.xml |
|||
_pkginfo.txt |
|||
|
|||
# Visual Studio cache files |
|||
# files ending in .cache can be ignored |
|||
*.[Cc]ache |
|||
# but keep track of directories ending in .cache |
|||
!*.[Cc]ache/ |
|||
|
|||
# Others |
|||
ClientBin/ |
|||
~$* |
|||
*~ |
|||
*.dbmdl |
|||
*.dbproj.schemaview |
|||
*.pfx |
|||
*.publishsettings |
|||
node_modules/ |
|||
orleans.codegen.cs |
|||
|
|||
# Since there are multiple workflows, uncomment next line to ignore bower_components |
|||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) |
|||
#bower_components/ |
|||
|
|||
# RIA/Silverlight projects |
|||
Generated_Code/ |
|||
|
|||
# Backup & report files from converting an old project file |
|||
# to a newer Visual Studio version. Backup files are not needed, |
|||
# because we have git ;-) |
|||
_UpgradeReport_Files/ |
|||
Backup*/ |
|||
UpgradeLog*.XML |
|||
UpgradeLog*.htm |
|||
|
|||
# SQL Server files |
|||
*.mdf |
|||
*.ldf |
|||
|
|||
# Business Intelligence projects |
|||
*.rdl.data |
|||
*.bim.layout |
|||
*.bim_*.settings |
|||
|
|||
# Microsoft Fakes |
|||
FakesAssemblies/ |
|||
|
|||
# GhostDoc plugin setting file |
|||
*.GhostDoc.xml |
|||
|
|||
# Node.js Tools for Visual Studio |
|||
.ntvs_analysis.dat |
|||
|
|||
# Visual Studio 6 build log |
|||
*.plg |
|||
|
|||
# Visual Studio 6 workspace options file |
|||
*.opt |
|||
|
|||
# Visual Studio LightSwitch build output |
|||
**/*.HTMLClient/GeneratedArtifacts |
|||
**/*.DesktopClient/GeneratedArtifacts |
|||
**/*.DesktopClient/ModelManifest.xml |
|||
**/*.Server/GeneratedArtifacts |
|||
**/*.Server/ModelManifest.xml |
|||
_Pvt_Extensions |
|||
|
|||
# Paket dependency manager |
|||
.paket/paket.exe |
|||
paket-files/ |
|||
|
|||
# FAKE - F# Make |
|||
.fake/ |
|||
|
|||
# JetBrains Rider |
|||
.idea/ |
|||
*.sln.iml |
|||
|
|||
# DashboardDemo |
|||
src/DashboardDemo.Web/Logs/* |
|||
src/DashboardDemo.Web.Host/Logs/* |
|||
src/DashboardDemo.IdentityServer/Logs/* |
|||
src/DashboardDemo.HttpApi.Host/Logs/* |
|||
@ -1,137 +0,0 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio Version 16 |
|||
VisualStudioVersion = 16.0.29020.237 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Domain", "src\DashboardDemo.Domain\DashboardDemo.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Application", "src\DashboardDemo.Application\DashboardDemo.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.EntityFrameworkCore", "src\DashboardDemo.EntityFrameworkCore\DashboardDemo.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Web", "src\DashboardDemo.Web\DashboardDemo.Web.csproj", "{068855E8-9240-4F1A-910B-CF825794513B}" |
|||
EndProject |
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}" |
|||
EndProject |
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Application.Tests", "test\DashboardDemo.Application.Tests\DashboardDemo.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Web.Tests", "test\DashboardDemo.Web.Tests\DashboardDemo.Web.Tests.csproj", "{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.EntityFrameworkCore.DbMigrations", "src\DashboardDemo.EntityFrameworkCore.DbMigrations\DashboardDemo.EntityFrameworkCore.DbMigrations.csproj", "{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Domain.Shared", "src\DashboardDemo.Domain.Shared\DashboardDemo.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Application.Contracts", "src\DashboardDemo.Application.Contracts\DashboardDemo.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.HttpApi", "src\DashboardDemo.HttpApi\DashboardDemo.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.HttpApi.Client", "src\DashboardDemo.HttpApi.Client\DashboardDemo.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.EntityFrameworkCore.Tests", "test\DashboardDemo.EntityFrameworkCore.Tests\DashboardDemo.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.TestBase", "test\DashboardDemo.TestBase\DashboardDemo.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.Domain.Tests", "test\DashboardDemo.Domain.Tests\DashboardDemo.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.HttpApi.Client.ConsoleTestApp", "test\DashboardDemo.HttpApi.Client.ConsoleTestApp\DashboardDemo.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DashboardDemo.DbMigrator", "src\DashboardDemo.DbMigrator\DashboardDemo.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(NestedProjects) = preSolution |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{068855E8-9240-4F1A-910B-CF825794513B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -1,7 +0,0 @@ |
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> |
|||
<s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=59923913AE66194DB837F628B1FC08BE/@KeyIndexDefined">True</s:Boolean> |
|||
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=59923913AE66194DB837F628B1FC08BE/AbsolutePath/@EntryValue">D:\github\abp\common.DotSettings</s:String> |
|||
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=59923913AE66194DB837F628B1FC08BE/RelativePath/@EntryValue">..\..\..\common.DotSettings</s:String> |
|||
<s:Boolean x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File59923913AE66194DB837F628B1FC08BE/@KeyIndexDefined">True</s:Boolean> |
|||
<s:Double x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File59923913AE66194DB837F628B1FC08BE/RelativePriority/@EntryValue">1</s:Double> |
|||
</wpf:ResourceDictionary> |
|||
@ -1,7 +0,0 @@ |
|||
<Project> |
|||
<PropertyGroup> |
|||
<LangVersion>latest</LangVersion> |
|||
<Version>1.0.0</Version> |
|||
<NoWarn>$(NoWarn);CS1591</NoWarn> |
|||
</PropertyGroup> |
|||
</Project> |
|||
@ -1,11 +0,0 @@ |
|||
using System; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class CountersWidgetInputDto |
|||
{ |
|||
public DateTime StartDate { get; set; } |
|||
|
|||
public DateTime EndDate { get; set; } |
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
namespace DashboardDemo |
|||
{ |
|||
public class CountersWidgetResultDto |
|||
{ |
|||
public int NewUsers { get; set; } |
|||
public int ActiveUsers { get; set; } |
|||
public double TotalIncome { get; set; } |
|||
public double TotalProfit { get; set; } |
|||
} |
|||
} |
|||
@ -1,21 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Domain.Shared\DashboardDemo.Domain.Shared.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application.Contracts\Volo.Abp.Identity.Application.Contracts.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application.Contracts\Volo.Abp.PermissionManagement.Application.Contracts.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application.Contracts\Volo.Abp.TenantManagement.Application.Contracts.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application.Contracts\Volo.Abp.FeatureManagement.Application.Contracts.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,20 +0,0 @@ |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.TenantManagement; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoDomainSharedModule), |
|||
typeof(AbpFeatureManagementApplicationContractsModule), |
|||
typeof(AbpIdentityApplicationContractsModule), |
|||
typeof(AbpPermissionManagementApplicationContractsModule), |
|||
typeof(AbpTenantManagementApplicationContractsModule) |
|||
)] |
|||
public class DashboardDemoApplicationContractsModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -1,14 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public interface IDashboardAppService : IApplicationService |
|||
{ |
|||
Task<CountersWidgetResultDto> GetCountersWidgetAsync(CountersWidgetInputDto input); |
|||
|
|||
Task<NewUserStatisticWidgetResultDto> GetNewUserStatisticWidgetAsync(NewUserStatisticWidgetInputDto input); |
|||
|
|||
Task<LicenseStatistiWidgetResultDto> GetLicenseStatisticWidgetAsync(LicenseStatisticWidgetInputDto input); |
|||
} |
|||
} |
|||
@ -1,9 +0,0 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class LicenseStatistiWidgetResultDto |
|||
{ |
|||
public Dictionary<string, int> Data { get; set; } |
|||
} |
|||
} |
|||
@ -1,11 +0,0 @@ |
|||
using System; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class LicenseStatisticWidgetInputDto |
|||
{ |
|||
public DateTime StartDate { get; set; } |
|||
|
|||
public DateTime EndDate { get; set; } |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
namespace DashboardDemo |
|||
{ |
|||
public enum NewUserStatisticFrequency |
|||
{ |
|||
Daily, |
|||
Monthly |
|||
} |
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
using System; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class NewUserStatisticWidgetInputDto |
|||
{ |
|||
public DateTime StartDate { get; set; } |
|||
|
|||
public DateTime EndDate { get; set; } |
|||
|
|||
public NewUserStatisticFrequency Frequency { get; set; } = NewUserStatisticFrequency.Daily; |
|||
} |
|||
} |
|||
@ -1,9 +0,0 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class NewUserStatisticWidgetResultDto |
|||
{ |
|||
public Dictionary<string, int> Data { get; set; } |
|||
} |
|||
} |
|||
@ -1,107 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class DashboardAppService : DashboardDemoAppService, IDashboardAppService |
|||
{ |
|||
public async Task<CountersWidgetResultDto> GetCountersWidgetAsync(CountersWidgetInputDto input) |
|||
{ |
|||
/* Instead of hard-coded / calculated values, get counts from a repository! |
|||
*/ |
|||
|
|||
var dayFactor = (int)Math.Round(input.EndDate.Subtract(input.StartDate).TotalDays + 1); |
|||
return new CountersWidgetResultDto |
|||
{ |
|||
NewUsers = dayFactor * 86, |
|||
ActiveUsers = dayFactor * 58, |
|||
TotalIncome = dayFactor * 749.53, |
|||
TotalProfit = dayFactor * 239.45, |
|||
}; |
|||
} |
|||
|
|||
public async Task<NewUserStatisticWidgetResultDto> GetNewUserStatisticWidgetAsync(NewUserStatisticWidgetInputDto input) |
|||
{ |
|||
switch (input.Frequency) |
|||
{ |
|||
case NewUserStatisticFrequency.Daily: |
|||
return await GetDailyNewUserStatisticWidgetAsync(input); |
|||
case NewUserStatisticFrequency.Monthly: |
|||
return await GetMonthlyNewUserStatisticWidgetAsync(input); |
|||
} |
|||
|
|||
throw new UserFriendlyException("Not implemented statistic frequency."); |
|||
} |
|||
|
|||
public async Task<LicenseStatistiWidgetResultDto> GetLicenseStatisticWidgetAsync(LicenseStatisticWidgetInputDto input) |
|||
{ |
|||
var days = (int)Math.Round(input.EndDate.Subtract(input.StartDate).TotalDays + 1); |
|||
|
|||
var data = new Dictionary<string, int> |
|||
{ |
|||
{"Regular", new Random().Next(50, 100) * days}, |
|||
{"Enterprise", new Random().Next(40, 70) * days}, |
|||
{"Ultimate", new Random().Next(30, 40) * days} |
|||
}; |
|||
|
|||
return new LicenseStatistiWidgetResultDto() { Data = data }; |
|||
} |
|||
|
|||
private async Task<NewUserStatisticWidgetResultDto> GetMonthlyNewUserStatisticWidgetAsync(NewUserStatisticWidgetInputDto input) |
|||
{ |
|||
DateTime endDate = input.EndDate; |
|||
DateTime startDate = input.StartDate; |
|||
|
|||
var months = new[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec" }; |
|||
var monthCount = (endDate.Year - startDate.Year) * 12 + endDate.Month - startDate.Month + 1; |
|||
var labels = new List<string>(); |
|||
|
|||
for (var i = 0; i < monthCount; i++) |
|||
{ |
|||
labels.Add(months[endDate.Month - 1] + " " + endDate.Year); |
|||
endDate = endDate.AddMonths(-1); |
|||
} |
|||
|
|||
labels.Reverse(); |
|||
|
|||
var data = new Dictionary<string, int>(); |
|||
|
|||
for (var i = 0; i < monthCount; i++) |
|||
{ |
|||
data.Add(labels[i], new Random().Next(1500, 3000)); |
|||
} |
|||
|
|||
return new NewUserStatisticWidgetResultDto() |
|||
{ |
|||
Data = data |
|||
}; |
|||
} |
|||
|
|||
private async Task<NewUserStatisticWidgetResultDto> GetDailyNewUserStatisticWidgetAsync(NewUserStatisticWidgetInputDto input) |
|||
{ |
|||
var dayCount = (input.EndDate - input.StartDate).Days + 1; |
|||
|
|||
var labels = new List<string>(); |
|||
|
|||
for (int i = 0; i < dayCount; i++) |
|||
{ |
|||
labels.Add(input.StartDate.AddDays(i).ToString("dd/MM/yyyy")); |
|||
} |
|||
|
|||
var data = new Dictionary<string, int>(); |
|||
|
|||
for (var i = 0; i < dayCount; i++) |
|||
{ |
|||
data.Add(labels[i], new Random().Next(50, 100)); |
|||
} |
|||
|
|||
return new NewUserStatisticWidgetResultDto() |
|||
{ |
|||
Data = data |
|||
}; |
|||
} |
|||
} |
|||
} |
|||
@ -1,22 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp3.1</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Domain\DashboardDemo.Domain.csproj" /> |
|||
<ProjectReference Include="..\DashboardDemo.Application.Contracts\DashboardDemo.Application.Contracts.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application\Volo.Abp.TenantManagement.Application.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application\Volo.Abp.FeatureManagement.Application.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,18 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
using DashboardDemo.Localization; |
|||
using Volo.Abp.Application.Services; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
/* Inherit your application services from this class. |
|||
*/ |
|||
public abstract class DashboardDemoAppService : ApplicationService |
|||
{ |
|||
protected DashboardDemoAppService() |
|||
{ |
|||
LocalizationResource = typeof(DashboardDemoResource); |
|||
} |
|||
} |
|||
} |
|||
@ -1,14 +0,0 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
public class DashboardDemoApplicationAutoMapperProfile : Profile |
|||
{ |
|||
public DashboardDemoApplicationAutoMapperProfile() |
|||
{ |
|||
/* You can configure your AutoMapper mapping configuration here. |
|||
* Alternatively, you can split your mapping configurations |
|||
* into multiple profile classes for a better organization. */ |
|||
} |
|||
} |
|||
} |
|||
@ -1,32 +0,0 @@ |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.TenantManagement; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoDomainModule), |
|||
typeof(DashboardDemoApplicationContractsModule), |
|||
typeof(AbpIdentityApplicationModule), |
|||
typeof(AbpPermissionManagementApplicationModule), |
|||
typeof(AbpTenantManagementApplicationModule), |
|||
typeof(AbpFeatureManagementApplicationModule) |
|||
)] |
|||
public class DashboardDemoApplicationModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpAutoMapperOptions>(options => |
|||
{ |
|||
/* Use `true` for the `validate` parameter if you want to |
|||
* validate the profile on application startup. |
|||
* See http://docs.automapper.org/en/stable/Configuration-validation.html for more info
|
|||
* about the configuration validation. */ |
|||
options.AddProfile<DashboardDemoApplicationAutoMapperProfile>(); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,22 +0,0 @@ |
|||
using DashboardDemo.Localization; |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace DashboardDemo.Permissions |
|||
{ |
|||
public class DashboardDemoPermissionDefinitionProvider : PermissionDefinitionProvider |
|||
{ |
|||
public override void Define(IPermissionDefinitionContext context) |
|||
{ |
|||
var myGroup = context.AddGroup(DashboardDemoPermissions.GroupName); |
|||
|
|||
//Define your own permissions here. Example:
|
|||
//myGroup.AddPermission(DashboardDemoPermissions.MyPermission1, L("Permission:MyPermission1"));
|
|||
} |
|||
|
|||
private static LocalizableString L(string name) |
|||
{ |
|||
return LocalizableString.Create<DashboardDemoResource>(name); |
|||
} |
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
namespace DashboardDemo.Permissions |
|||
{ |
|||
public static class DashboardDemoPermissions |
|||
{ |
|||
public const string GroupName = "DashboardDemo"; |
|||
|
|||
//Add your own permission names. Example:
|
|||
//public const string MyPermission1 = GroupName + ".MyPermission1";
|
|||
} |
|||
} |
|||
@ -1,31 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<OutputType>Exe</OutputType> |
|||
<TargetFramework>netcoreapp3.1</TargetFramework> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<None Remove="appsettings.json" /> |
|||
<Content Include="appsettings.json"> |
|||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> |
|||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|||
</Content> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.2" /> |
|||
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" /> |
|||
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> |
|||
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> |
|||
<ProjectReference Include="..\DashboardDemo.Application.Contracts\DashboardDemo.Application.Contracts.csproj" /> |
|||
<ProjectReference Include="..\DashboardDemo.EntityFrameworkCore.DbMigrations\DashboardDemo.EntityFrameworkCore.DbMigrations.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,16 +0,0 @@ |
|||
using DashboardDemo.EntityFrameworkCore; |
|||
using Volo.Abp.Autofac; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace DashboardDemo.DbMigrator |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpAutofacModule), |
|||
typeof(DashboardDemoEntityFrameworkCoreDbMigrationsModule), |
|||
typeof(DashboardDemoApplicationContractsModule) |
|||
)] |
|||
public class DashboardDemoDbMigratorModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -1,34 +0,0 @@ |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Hosting; |
|||
using DashboardDemo.Data; |
|||
using Serilog; |
|||
using Volo.Abp; |
|||
|
|||
namespace DashboardDemo.DbMigrator |
|||
{ |
|||
public class DbMigratorHostedService : IHostedService |
|||
{ |
|||
public async Task StartAsync(CancellationToken cancellationToken) |
|||
{ |
|||
using (var application = AbpApplicationFactory.Create<DashboardDemoDbMigratorModule>(options => |
|||
{ |
|||
options.UseAutofac(); |
|||
options.Services.AddLogging(c => c.AddSerilog()); |
|||
})) |
|||
{ |
|||
application.Initialize(); |
|||
|
|||
await application |
|||
.ServiceProvider |
|||
.GetRequiredService<DashboardDemoDbMigrationService>() |
|||
.MigrateAsync(); |
|||
|
|||
application.Shutdown(); |
|||
} |
|||
} |
|||
|
|||
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; |
|||
} |
|||
} |
|||
@ -1,38 +0,0 @@ |
|||
using System.IO; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Hosting; |
|||
using Serilog; |
|||
using Serilog.Events; |
|||
|
|||
namespace DashboardDemo.DbMigrator |
|||
{ |
|||
class Program |
|||
{ |
|||
static async Task Main(string[] args) |
|||
{ |
|||
Log.Logger = new LoggerConfiguration() |
|||
.MinimumLevel.Information() |
|||
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning) |
|||
.MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) |
|||
#if DEBUG
|
|||
.MinimumLevel.Override("DashboardDemo", LogEventLevel.Debug) |
|||
#else
|
|||
.MinimumLevel.Override("DashboardDemo", LogEventLevel.Information) |
|||
#endif
|
|||
.Enrich.FromLogContext() |
|||
.WriteTo.File(Path.Combine(Directory.GetCurrentDirectory(), "Logs/logs.txt")) |
|||
.WriteTo.Console() |
|||
.CreateLogger(); |
|||
|
|||
await CreateHostBuilder(args).RunConsoleAsync(); |
|||
} |
|||
|
|||
public static IHostBuilder CreateHostBuilder(string[] args) => |
|||
Host.CreateDefaultBuilder(args) |
|||
.ConfigureServices((hostContext, services) => |
|||
{ |
|||
services.AddHostedService<DbMigratorHostedService>(); |
|||
}); |
|||
} |
|||
} |
|||
@ -1,18 +0,0 @@ |
|||
{ |
|||
"ConnectionStrings": { |
|||
"Default": "Server=localhost;Database=DashboardDemo;Trusted_Connection=True;MultipleActiveResultSets=true" |
|||
}, |
|||
"IdentityServer": { |
|||
"Clients": { |
|||
"DashboardDemo_Web": { |
|||
"ClientId": "DashboardDemo_Web", |
|||
"ClientSecret": "1q2w3e*", |
|||
"RootUrl": "https://localhost:44351" |
|||
}, |
|||
"DashboardDemo_ConsoleTestApp": { |
|||
"ClientId": "DashboardDemo_ConsoleTestApp", |
|||
"ClientSecret": "1q2w3e*" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,26 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netstandard2.0</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain.Shared\Volo.Abp.Identity.Domain.Shared.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.Domain.Shared\Volo.Abp.IdentityServer.Domain.Shared.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.Domain.Shared\Volo.Abp.BackgroundJobs.Domain.Shared.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.Domain.Shared\Volo.Abp.AuditLogging.Domain.Shared.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Domain.Shared\Volo.Abp.TenantManagement.Domain.Shared.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain.Shared\Volo.Abp.FeatureManagement.Domain.Shared.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Domain.Shared\Volo.Abp.PermissionManagement.Domain.Shared.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.Domain.Shared\Volo.Abp.SettingManagement.Domain.Shared.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<EmbeddedResource Include="Localization\DashboardDemo\*.json" /> |
|||
<Content Remove="Localization\DashboardDemo\*.json" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,7 +0,0 @@ |
|||
namespace DashboardDemo |
|||
{ |
|||
public static class DashboardDemoDomainErrorCodes |
|||
{ |
|||
/* You can add your business exception error codes here, as constants */ |
|||
} |
|||
} |
|||
@ -1,45 +0,0 @@ |
|||
using DashboardDemo.Localization; |
|||
using Volo.Abp.AuditLogging; |
|||
using Volo.Abp.BackgroundJobs; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.IdentityServer; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Validation.Localization; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.SettingManagement; |
|||
using Volo.Abp.TenantManagement; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpAuditLoggingDomainSharedModule), |
|||
typeof(AbpBackgroundJobsDomainSharedModule), |
|||
typeof(AbpFeatureManagementDomainSharedModule), |
|||
typeof(AbpIdentityDomainSharedModule), |
|||
typeof(AbpIdentityServerDomainSharedModule), |
|||
typeof(AbpPermissionManagementDomainSharedModule), |
|||
typeof(AbpSettingManagementDomainSharedModule), |
|||
typeof(AbpTenantManagementDomainSharedModule) |
|||
)] |
|||
public class DashboardDemoDomainSharedModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpVirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.AddEmbedded<DashboardDemoDomainSharedModule>("DashboardDemo"); |
|||
}); |
|||
|
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Resources |
|||
.Add<DashboardDemoResource>("en") |
|||
.AddBaseTypes(typeof(AbpValidationResource)) |
|||
.AddVirtualJson("/Localization/DashboardDemo"); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "cs", |
|||
"texts": { |
|||
"Menu:Home": "Úvod", |
|||
"Welcome": "Vítejte", |
|||
"LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "en", |
|||
"texts": { |
|||
"Menu:Home": "Home", |
|||
"Welcome": "Welcome", |
|||
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "pl", |
|||
"texts": { |
|||
"Menu:Home": "Home", |
|||
"Welcome": "Witaj", |
|||
"LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "pt-BR", |
|||
"texts": { |
|||
"Menu:Home": "Principal", |
|||
"Welcome": "Seja bem-vindo!", |
|||
"LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "tr", |
|||
"texts": { |
|||
"Menu:Home": "Ana sayfa", |
|||
"Welcome": "Hoşgeldiniz", |
|||
"LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "vi", |
|||
"texts": { |
|||
"Menu:Home": "Trang chủ", |
|||
"Welcome": "Chào mừng bạn", |
|||
"LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"Menu:Home": "首页", |
|||
"Welcome": "欢迎", |
|||
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io." |
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
using Volo.Abp.Localization; |
|||
|
|||
namespace DashboardDemo.Localization |
|||
{ |
|||
[LocalizationResourceName("DashboardDemo")] |
|||
public class DashboardDemoResource |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -1,11 +0,0 @@ |
|||
namespace DashboardDemo.MultiTenancy |
|||
{ |
|||
public static class MultiTenancyConsts |
|||
{ |
|||
/* Enable/disable multi-tenancy easily in a single point. |
|||
* If you will never need to multi-tenancy, you can remove |
|||
* related modules and code parts, including this file. |
|||
*/ |
|||
public const bool IsEnabled = true; |
|||
} |
|||
} |
|||
@ -1,27 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp3.1</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Domain.Shared\DashboardDemo.Domain.Shared.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain\Volo.Abp.Identity.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.Domain\Volo.Abp.IdentityServer.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identityserver\src\Volo.Abp.PermissionManagement.Domain.IdentityServer\Volo.Abp.PermissionManagement.Domain.IdentityServer.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.Domain\Volo.Abp.BackgroundJobs.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.Domain\Volo.Abp.AuditLogging.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Domain\Volo.Abp.TenantManagement.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.Domain\Volo.Abp.SettingManagement.Domain.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,9 +0,0 @@ |
|||
namespace DashboardDemo |
|||
{ |
|||
public static class DashboardDemoConsts |
|||
{ |
|||
public const string DbTablePrefix = "App"; |
|||
|
|||
public const string DbSchema = null; |
|||
} |
|||
} |
|||
@ -1,38 +0,0 @@ |
|||
using DashboardDemo.MultiTenancy; |
|||
using Volo.Abp.AuditLogging; |
|||
using Volo.Abp.BackgroundJobs; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.IdentityServer; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.MultiTenancy; |
|||
using Volo.Abp.PermissionManagement.Identity; |
|||
using Volo.Abp.PermissionManagement.IdentityServer; |
|||
using Volo.Abp.SettingManagement; |
|||
using Volo.Abp.TenantManagement; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoDomainSharedModule), |
|||
typeof(AbpAuditLoggingDomainModule), |
|||
typeof(AbpBackgroundJobsDomainModule), |
|||
typeof(AbpFeatureManagementDomainModule), |
|||
typeof(AbpIdentityDomainModule), |
|||
typeof(AbpPermissionManagementDomainIdentityModule), |
|||
typeof(AbpIdentityServerDomainModule), |
|||
typeof(AbpPermissionManagementDomainIdentityServerModule), |
|||
typeof(AbpSettingManagementDomainModule), |
|||
typeof(AbpTenantManagementDomainModule) |
|||
)] |
|||
public class DashboardDemoDomainModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpMultiTenancyOptions>(options => |
|||
{ |
|||
options.IsEnabled = MultiTenancyConsts.IsEnabled; |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,39 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Logging; |
|||
using Microsoft.Extensions.Logging.Abstractions; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace DashboardDemo.Data |
|||
{ |
|||
public class DashboardDemoDbMigrationService : ITransientDependency |
|||
{ |
|||
public ILogger<DashboardDemoDbMigrationService> Logger { get; set; } |
|||
|
|||
private readonly IDataSeeder _dataSeeder; |
|||
private readonly IDashboardDemoDbSchemaMigrator _dbSchemaMigrator; |
|||
|
|||
public DashboardDemoDbMigrationService( |
|||
IDataSeeder dataSeeder, |
|||
IDashboardDemoDbSchemaMigrator dbSchemaMigrator) |
|||
{ |
|||
_dataSeeder = dataSeeder; |
|||
_dbSchemaMigrator = dbSchemaMigrator; |
|||
|
|||
Logger = NullLogger<DashboardDemoDbMigrationService>.Instance; |
|||
} |
|||
|
|||
public async Task MigrateAsync() |
|||
{ |
|||
Logger.LogInformation("Started database migrations..."); |
|||
|
|||
Logger.LogInformation("Migrating database schema..."); |
|||
await _dbSchemaMigrator.MigrateAsync(); |
|||
|
|||
Logger.LogInformation("Executing database seed..."); |
|||
await _dataSeeder.SeedAsync(); |
|||
|
|||
Logger.LogInformation("Successfully completed database migrations."); |
|||
} |
|||
} |
|||
} |
|||
@ -1,9 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace DashboardDemo.Data |
|||
{ |
|||
public interface IDashboardDemoDbSchemaMigrator |
|||
{ |
|||
Task MigrateAsync(); |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace DashboardDemo.Data |
|||
{ |
|||
/* This is used if database provider does't define |
|||
* IDashboardDemoDbSchemaMigrator implementation. |
|||
*/ |
|||
public class NullDashboardDemoDbSchemaMigrator : IDashboardDemoDbSchemaMigrator, ITransientDependency |
|||
{ |
|||
public Task MigrateAsync() |
|||
{ |
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
@ -1,223 +0,0 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using IdentityServer4.Models; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Volo.Abp.Authorization.Permissions; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.IdentityServer.ApiResources; |
|||
using Volo.Abp.IdentityServer.Clients; |
|||
using Volo.Abp.IdentityServer.IdentityResources; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.Uow; |
|||
using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource; |
|||
using Client = Volo.Abp.IdentityServer.Clients.Client; |
|||
|
|||
namespace DashboardDemo.IdentityServer |
|||
{ |
|||
public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency |
|||
{ |
|||
private readonly IApiResourceRepository _apiResourceRepository; |
|||
private readonly IClientRepository _clientRepository; |
|||
private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder; |
|||
private readonly IGuidGenerator _guidGenerator; |
|||
private readonly IPermissionDataSeeder _permissionDataSeeder; |
|||
private readonly IConfiguration _configuration; |
|||
|
|||
public IdentityServerDataSeedContributor( |
|||
IClientRepository clientRepository, |
|||
IApiResourceRepository apiResourceRepository, |
|||
IIdentityResourceDataSeeder identityResourceDataSeeder, |
|||
IGuidGenerator guidGenerator, |
|||
IPermissionDataSeeder permissionDataSeeder, |
|||
IConfiguration configuration) |
|||
{ |
|||
_clientRepository = clientRepository; |
|||
_apiResourceRepository = apiResourceRepository; |
|||
_identityResourceDataSeeder = identityResourceDataSeeder; |
|||
_guidGenerator = guidGenerator; |
|||
_permissionDataSeeder = permissionDataSeeder; |
|||
_configuration = configuration; |
|||
} |
|||
|
|||
[UnitOfWork] |
|||
public virtual async Task SeedAsync(DataSeedContext context) |
|||
{ |
|||
await _identityResourceDataSeeder.CreateStandardResourcesAsync(); |
|||
await CreateApiResourcesAsync(); |
|||
await CreateClientsAsync(); |
|||
} |
|||
|
|||
private async Task CreateApiResourcesAsync() |
|||
{ |
|||
var commonApiUserClaims = new[] |
|||
{ |
|||
"email", |
|||
"email_verified", |
|||
"name", |
|||
"phone_number", |
|||
"phone_number_verified", |
|||
"role" |
|||
}; |
|||
|
|||
await CreateApiResourceAsync("DashboardDemo", commonApiUserClaims); |
|||
} |
|||
|
|||
private async Task<ApiResource> CreateApiResourceAsync(string name, IEnumerable<string> claims) |
|||
{ |
|||
var apiResource = await _apiResourceRepository.FindByNameAsync(name); |
|||
if (apiResource == null) |
|||
{ |
|||
apiResource = await _apiResourceRepository.InsertAsync( |
|||
new ApiResource( |
|||
_guidGenerator.Create(), |
|||
name, |
|||
name + " API" |
|||
), |
|||
autoSave: true |
|||
); |
|||
} |
|||
|
|||
foreach (var claim in claims) |
|||
{ |
|||
if (apiResource.FindClaim(claim) == null) |
|||
{ |
|||
apiResource.AddUserClaim(claim); |
|||
} |
|||
} |
|||
|
|||
return await _apiResourceRepository.UpdateAsync(apiResource); |
|||
} |
|||
|
|||
private async Task CreateClientsAsync() |
|||
{ |
|||
var commonScopes = new[] |
|||
{ |
|||
"email", |
|||
"openid", |
|||
"profile", |
|||
"role", |
|||
"phone", |
|||
"address", |
|||
"DashboardDemo" |
|||
}; |
|||
|
|||
var configurationSection = _configuration.GetSection("IdentityServer:Clients"); |
|||
|
|||
//Web Client
|
|||
var webClientId = configurationSection["DashboardDemo_Web:ClientId"]; |
|||
if (!webClientId.IsNullOrWhiteSpace()) |
|||
{ |
|||
var webClientRootUrl = configurationSection["DashboardDemo_Web:RootUrl"].EnsureEndsWith('/'); |
|||
|
|||
/* DashboardDemo_Web client is only needed if you created a tiered |
|||
* solution. Otherwise, you can delete this client. */ |
|||
|
|||
await CreateClientAsync( |
|||
webClientId, |
|||
commonScopes, |
|||
new[] { "hybrid" }, |
|||
(configurationSection["DashboardDemo_Web:ClientSecret"] ?? "1q2w3e*").Sha256(), |
|||
redirectUri: $"{webClientRootUrl}signin-oidc", |
|||
postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc" |
|||
); |
|||
} |
|||
|
|||
//Console Test Client
|
|||
var consoleClientId = configurationSection["DashboardDemo_ConsoleTestApp:ClientId"]; |
|||
if (!consoleClientId.IsNullOrWhiteSpace()) |
|||
{ |
|||
await CreateClientAsync( |
|||
consoleClientId, |
|||
commonScopes, |
|||
new[] { "password", "client_credentials" }, |
|||
(configurationSection["DashboardDemo_ConsoleTestApp:ClientSecret"] ?? "1q2w3e*").Sha256() |
|||
); |
|||
} |
|||
} |
|||
|
|||
private async Task<Client> CreateClientAsync( |
|||
string name, |
|||
IEnumerable<string> scopes, |
|||
IEnumerable<string> grantTypes, |
|||
string secret, |
|||
string redirectUri = null, |
|||
string postLogoutRedirectUri = null, |
|||
IEnumerable<string> permissions = null) |
|||
{ |
|||
var client = await _clientRepository.FindByCliendIdAsync(name); |
|||
if (client == null) |
|||
{ |
|||
client = await _clientRepository.InsertAsync( |
|||
new Client( |
|||
_guidGenerator.Create(), |
|||
name |
|||
) |
|||
{ |
|||
ClientName = name, |
|||
ProtocolType = "oidc", |
|||
Description = name, |
|||
AlwaysIncludeUserClaimsInIdToken = true, |
|||
AllowOfflineAccess = true, |
|||
AbsoluteRefreshTokenLifetime = 31536000, //365 days
|
|||
AccessTokenLifetime = 31536000, //365 days
|
|||
AuthorizationCodeLifetime = 300, |
|||
IdentityTokenLifetime = 300, |
|||
RequireConsent = false |
|||
}, |
|||
autoSave: true |
|||
); |
|||
} |
|||
|
|||
foreach (var scope in scopes) |
|||
{ |
|||
if (client.FindScope(scope) == null) |
|||
{ |
|||
client.AddScope(scope); |
|||
} |
|||
} |
|||
|
|||
foreach (var grantType in grantTypes) |
|||
{ |
|||
if (client.FindGrantType(grantType) == null) |
|||
{ |
|||
client.AddGrantType(grantType); |
|||
} |
|||
} |
|||
|
|||
if (client.FindSecret(secret) == null) |
|||
{ |
|||
client.AddSecret(secret); |
|||
} |
|||
|
|||
if (redirectUri != null) |
|||
{ |
|||
if (client.FindRedirectUri(redirectUri) == null) |
|||
{ |
|||
client.AddRedirectUri(redirectUri); |
|||
} |
|||
} |
|||
|
|||
if (postLogoutRedirectUri != null) |
|||
{ |
|||
if (client.FindPostLogoutRedirectUri(postLogoutRedirectUri) == null) |
|||
{ |
|||
client.AddPostLogoutRedirectUri(postLogoutRedirectUri); |
|||
} |
|||
} |
|||
|
|||
if (permissions != null) |
|||
{ |
|||
await _permissionDataSeeder.SeedAsync( |
|||
ClientPermissionValueProvider.ProviderName, |
|||
name, |
|||
permissions |
|||
); |
|||
} |
|||
|
|||
return await _clientRepository.UpdateAsync(client); |
|||
} |
|||
} |
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
using Volo.Abp.Settings; |
|||
|
|||
namespace DashboardDemo.Settings |
|||
{ |
|||
public class DashboardDemoSettingDefinitionProvider : SettingDefinitionProvider |
|||
{ |
|||
public override void Define(ISettingDefinitionContext context) |
|||
{ |
|||
//Define your own settings here. Example:
|
|||
//context.Add(new SettingDefinition(DashboardDemoSettings.MySetting1));
|
|||
} |
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
namespace DashboardDemo.Settings |
|||
{ |
|||
public static class DashboardDemoSettings |
|||
{ |
|||
private const string Prefix = "DashboardDemo"; |
|||
|
|||
//Add your own setting names here. Example:
|
|||
//public const string MySetting1 = Prefix + ".MySetting1";
|
|||
} |
|||
} |
|||
@ -1,63 +0,0 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
using Volo.Abp.Users; |
|||
|
|||
namespace DashboardDemo.Users |
|||
{ |
|||
/* This entity shares the same table/collection ("AbpUsers" by default) with the |
|||
* IdentityUser entity of the Identity module. |
|||
* |
|||
* - You can define your custom properties into this class. |
|||
* - You never create or delete this entity, because it is Identity module's job. |
|||
* - You can query users from database with this entity. |
|||
* - You can update values of your custom properties. |
|||
*/ |
|||
public class AppUser : FullAuditedAggregateRoot<Guid>, IUser |
|||
{ |
|||
#region Base properties
|
|||
|
|||
/* These properties are shared with the IdentityUser entity of the Identity module. |
|||
* Do not change these properties through this class. Instead, use Identity module |
|||
* services (like IdentityUserManager) to change them. |
|||
* So, this properties are designed as read only! |
|||
*/ |
|||
|
|||
public virtual Guid? TenantId { get; private set; } |
|||
|
|||
public virtual string UserName { get; private set; } |
|||
|
|||
public virtual string Name { get; private set; } |
|||
|
|||
public virtual string Surname { get; private set; } |
|||
|
|||
public virtual string Email { get; private set; } |
|||
|
|||
public virtual bool EmailConfirmed { get; private set; } |
|||
|
|||
public virtual string PhoneNumber { get; private set; } |
|||
|
|||
public virtual bool PhoneNumberConfirmed { get; private set; } |
|||
|
|||
#endregion
|
|||
|
|||
/* Add your own properties here. Example: |
|||
* |
|||
* public string MyProperty { get; set; } |
|||
* |
|||
* If you add a property and using the EF Core, remember these; |
|||
* |
|||
* 1. Update BookStoreDbContext.OnModelCreating |
|||
* to configure the mapping for your new property |
|||
* 2. Update DashboardDemoEfCoreEntityExtensionMappings to extend the IdentityUser entity |
|||
* and add your new property to the migration. |
|||
* 3. Use the Add-Migration to add a new database migration. |
|||
* 4. Run the .DbMigrator project (or use the Update-Database command) to apply |
|||
* schema change to the database. |
|||
*/ |
|||
|
|||
private AppUser() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -1,18 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp3.1</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.EntityFrameworkCore\DashboardDemo.EntityFrameworkCore.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.2" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,16 +0,0 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoEntityFrameworkCoreModule) |
|||
)] |
|||
public class DashboardDemoEntityFrameworkCoreDbMigrationsModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddAbpDbContext<DashboardDemoMigrationsDbContext>(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,48 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.AuditLogging.EntityFrameworkCore; |
|||
using Volo.Abp.BackgroundJobs.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.FeatureManagement.EntityFrameworkCore; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Identity.EntityFrameworkCore; |
|||
using Volo.Abp.IdentityServer.EntityFrameworkCore; |
|||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|||
using Volo.Abp.TenantManagement.EntityFrameworkCore; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
/* This DbContext is only used for database migrations. |
|||
* It is not used on runtime. See DashboardDemoDbContext for the runtime DbContext. |
|||
* It is a unified model that includes configuration for |
|||
* all used modules and your application. |
|||
*/ |
|||
public class DashboardDemoMigrationsDbContext : AbpDbContext<DashboardDemoMigrationsDbContext> |
|||
{ |
|||
public DashboardDemoMigrationsDbContext(DbContextOptions<DashboardDemoMigrationsDbContext> options) |
|||
: base(options) |
|||
{ |
|||
|
|||
} |
|||
|
|||
protected override void OnModelCreating(ModelBuilder builder) |
|||
{ |
|||
base.OnModelCreating(builder); |
|||
|
|||
/* Include modules to your migration db context */ |
|||
|
|||
builder.ConfigurePermissionManagement(); |
|||
builder.ConfigureSettingManagement(); |
|||
builder.ConfigureBackgroundJobs(); |
|||
builder.ConfigureAuditLogging(); |
|||
builder.ConfigureIdentity(); |
|||
builder.ConfigureIdentityServer(); |
|||
builder.ConfigureFeatureManagement(); |
|||
builder.ConfigureTenantManagement(); |
|||
|
|||
/* Configure your own tables/entities inside the ConfigureDashboardDemo method */ |
|||
|
|||
builder.ConfigureDashboardDemo(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,33 +0,0 @@ |
|||
using System.IO; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Design; |
|||
using Microsoft.Extensions.Configuration; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
/* This class is needed for EF Core console commands |
|||
* (like Add-Migration and Update-Database commands) */ |
|||
public class DashboardDemoMigrationsDbContextFactory : IDesignTimeDbContextFactory<DashboardDemoMigrationsDbContext> |
|||
{ |
|||
public DashboardDemoMigrationsDbContext CreateDbContext(string[] args) |
|||
{ |
|||
DashboardDemoEfCoreEntityExtensionMappings.Configure(); |
|||
|
|||
var configuration = BuildConfiguration(); |
|||
|
|||
var builder = new DbContextOptionsBuilder<DashboardDemoMigrationsDbContext>() |
|||
.UseSqlServer(configuration.GetConnectionString("Default")); |
|||
|
|||
return new DashboardDemoMigrationsDbContext(builder.Options); |
|||
} |
|||
|
|||
private static IConfiguration BuildConfiguration() |
|||
{ |
|||
var builder = new ConfigurationBuilder() |
|||
.SetBasePath(Directory.GetCurrentDirectory()) |
|||
.AddJsonFile("appsettings.json", optional: false); |
|||
|
|||
return builder.Build(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using DashboardDemo.Data; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
[Dependency(ReplaceServices = true)] |
|||
public class EntityFrameworkCoreDashboardDemoDbSchemaMigrator |
|||
: IDashboardDemoDbSchemaMigrator, ITransientDependency |
|||
{ |
|||
private readonly DashboardDemoMigrationsDbContext _dbContext; |
|||
|
|||
public EntityFrameworkCoreDashboardDemoDbSchemaMigrator(DashboardDemoMigrationsDbContext dbContext) |
|||
{ |
|||
_dbContext = dbContext; |
|||
} |
|||
|
|||
public async Task MigrateAsync() |
|||
{ |
|||
await _dbContext.Database.MigrateAsync(); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,23 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp3.1</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Domain\DashboardDemo.Domain.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.EntityFrameworkCore\Volo.Abp.IdentityServer.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.EntityFrameworkCore\Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.EntityFrameworkCore\Volo.Abp.TenantManagement.EntityFrameworkCore.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.EntityFrameworkCore\Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,60 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using DashboardDemo.Users; |
|||
using Volo.Abp.Data; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.Modeling; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Users.EntityFrameworkCore; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
/* This is your actual DbContext used on runtime. |
|||
* It includes only your entities. |
|||
* It does not include entities of the used modules, because each module has already |
|||
* its own DbContext class. If you want to share some database tables with the used modules, |
|||
* just create a structure like done for AppUser. |
|||
* |
|||
* Don't use this DbContext for database migrations since it does not contain tables of the |
|||
* used modules (as explained above). See DashboardDemoMigrationsDbContext for migrations. |
|||
*/ |
|||
[ConnectionStringName("Default")] |
|||
public class DashboardDemoDbContext : AbpDbContext<DashboardDemoDbContext> |
|||
{ |
|||
public DbSet<AppUser> Users { get; set; } |
|||
|
|||
/* Add DbSet properties for your Aggregate Roots / Entities here. |
|||
* Also map them inside DashboardDemoDbContextModelCreatingExtensions.ConfigureDashboardDemo |
|||
*/ |
|||
|
|||
public DashboardDemoDbContext(DbContextOptions<DashboardDemoDbContext> options) |
|||
: base(options) |
|||
{ |
|||
|
|||
} |
|||
|
|||
protected override void OnModelCreating(ModelBuilder builder) |
|||
{ |
|||
base.OnModelCreating(builder); |
|||
|
|||
/* Configure the shared tables (with included modules) here */ |
|||
|
|||
builder.Entity<AppUser>(b => |
|||
{ |
|||
b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "Users"); //Sharing the same table "AbpUsers" with the IdentityUser
|
|||
|
|||
b.ConfigureFullAudited(); |
|||
b.ConfigureExtraProperties(); |
|||
b.ConfigureConcurrencyStamp(); |
|||
b.ConfigureAbpUser(); |
|||
|
|||
/* Configure mappings for your additional properties |
|||
* Also see the DashboardDemoEfCoreEntityExtensionMappings class |
|||
*/ |
|||
}); |
|||
|
|||
/* Configure your own tables/entities inside the ConfigureDashboardDemo method */ |
|||
|
|||
builder.ConfigureDashboardDemo(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,22 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
public static class DashboardDemoDbContextModelCreatingExtensions |
|||
{ |
|||
public static void ConfigureDashboardDemo(this ModelBuilder builder) |
|||
{ |
|||
Check.NotNull(builder, nameof(builder)); |
|||
|
|||
/* Configure your own tables/entities inside here */ |
|||
|
|||
//builder.Entity<YourEntity>(b =>
|
|||
//{
|
|||
// b.ToTable(DashboardDemoConsts.DbTablePrefix + "YourEntities", DashboardDemoConsts.DbSchema);
|
|||
|
|||
// //...
|
|||
//});
|
|||
} |
|||
} |
|||
} |
|||
@ -1,37 +0,0 @@ |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.ObjectExtending; |
|||
using Volo.Abp.Threading; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
public static class DashboardDemoEfCoreEntityExtensionMappings |
|||
{ |
|||
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
|||
|
|||
public static void Configure() |
|||
{ |
|||
OneTimeRunner.Run(() => |
|||
{ |
|||
/* You can configure entity extension properties for the |
|||
* entities defined in the used modules. |
|||
* |
|||
* The properties defined here becomes table fields. |
|||
* If you want to use the ExtraProperties dictionary of the entity |
|||
* instead of creating a new field, then define the property in the |
|||
* MyProjectNameDomainObjectExtensions class. |
|||
* |
|||
* Example: |
|||
* |
|||
* ObjectExtensionManager.Instance |
|||
* .MapEfCoreProperty<IdentityUser, string>( |
|||
* "MyProperty", |
|||
* b => b.HasMaxLength(128) |
|||
* ); |
|||
* |
|||
* See the documentation for more: |
|||
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
|
|||
*/ |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,52 +0,0 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.AuditLogging.EntityFrameworkCore; |
|||
using Volo.Abp.BackgroundJobs.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.Abp.EntityFrameworkCore.SqlServer; |
|||
using Volo.Abp.FeatureManagement.EntityFrameworkCore; |
|||
using Volo.Abp.Identity.EntityFrameworkCore; |
|||
using Volo.Abp.IdentityServer.EntityFrameworkCore; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|||
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|||
using Volo.Abp.TenantManagement.EntityFrameworkCore; |
|||
|
|||
namespace DashboardDemo.EntityFrameworkCore |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoDomainModule), |
|||
typeof(AbpIdentityEntityFrameworkCoreModule), |
|||
typeof(AbpIdentityServerEntityFrameworkCoreModule), |
|||
typeof(AbpPermissionManagementEntityFrameworkCoreModule), |
|||
typeof(AbpSettingManagementEntityFrameworkCoreModule), |
|||
typeof(AbpEntityFrameworkCoreSqlServerModule), |
|||
typeof(AbpBackgroundJobsEntityFrameworkCoreModule), |
|||
typeof(AbpAuditLoggingEntityFrameworkCoreModule), |
|||
typeof(AbpTenantManagementEntityFrameworkCoreModule), |
|||
typeof(AbpFeatureManagementEntityFrameworkCoreModule) |
|||
)] |
|||
public class DashboardDemoEntityFrameworkCoreModule : AbpModule |
|||
{ |
|||
public override void PreConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
DashboardDemoEfCoreEntityExtensionMappings.Configure(); |
|||
} |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddAbpDbContext<DashboardDemoDbContext>(options => |
|||
{ |
|||
/* Remove "includeAllEntities: true" to create |
|||
* default repositories only for aggregate roots */ |
|||
options.AddDefaultRepositories(includeAllEntities: true); |
|||
}); |
|||
|
|||
Configure<AbpDbContextOptions>(options => |
|||
{ |
|||
/* The main point to change your DBMS. |
|||
* See also DashboardDemoMigrationsDbContextFactory for EF Core tooling. */ |
|||
options.UseSqlServer(); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,21 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp3.1</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Application.Contracts\DashboardDemo.Application.Contracts.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi.Client\Volo.Abp.Identity.HttpApi.Client.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi.Client\Volo.Abp.PermissionManagement.HttpApi.Client.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi.Client\Volo.Abp.TenantManagement.HttpApi.Client.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.HttpApi.Client\Volo.Abp.FeatureManagement.HttpApi.Client.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,29 +0,0 @@ |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement; |
|||
using Volo.Abp.TenantManagement; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoApplicationContractsModule), |
|||
typeof(AbpIdentityHttpApiClientModule), |
|||
typeof(AbpPermissionManagementHttpApiClientModule), |
|||
typeof(AbpTenantManagementHttpApiClientModule), |
|||
typeof(AbpFeatureManagementHttpApiClientModule) |
|||
)] |
|||
public class DashboardDemoHttpApiClientModule : AbpModule |
|||
{ |
|||
public const string RemoteServiceName = "Default"; |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddHttpClientProxies( |
|||
typeof(DashboardDemoApplicationContractsModule).Assembly, |
|||
RemoteServiceName |
|||
); |
|||
} |
|||
} |
|||
} |
|||
@ -1,15 +0,0 @@ |
|||
using DashboardDemo.Localization; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace DashboardDemo.Controllers |
|||
{ |
|||
/* Inherit your controllers from this class. |
|||
*/ |
|||
public abstract class DashboardDemoController : AbpController |
|||
{ |
|||
protected DashboardDemoController() |
|||
{ |
|||
LocalizationResource = typeof(DashboardDemoResource); |
|||
} |
|||
} |
|||
} |
|||
@ -1,28 +0,0 @@ |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using DashboardDemo.Models.Test; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace DashboardDemo.Controllers |
|||
{ |
|||
[Route("api/test")] |
|||
public class TestController : DashboardDemoController |
|||
{ |
|||
public TestController() |
|||
{ |
|||
|
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("")] |
|||
public async Task<List<TestModel>> GetAsync() |
|||
{ |
|||
return new List<TestModel> |
|||
{ |
|||
new TestModel {Name = "John", BirthDate = new DateTime(1942, 11, 18)}, |
|||
new TestModel {Name = "Adams", BirthDate = new DateTime(1997, 05, 24)} |
|||
}; |
|||
} |
|||
} |
|||
} |
|||
@ -1,21 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp3.1</TargetFramework> |
|||
<RootNamespace>DashboardDemo</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Application.Contracts\DashboardDemo.Application.Contracts.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi\Volo.Abp.PermissionManagement.HttpApi.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi\Volo.Abp.TenantManagement.HttpApi.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.HttpApi\Volo.Abp.FeatureManagement.HttpApi.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,20 +0,0 @@ |
|||
using Volo.Abp.FeatureManagement; |
|||
using Volo.Abp.Identity; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement.HttpApi; |
|||
using Volo.Abp.TenantManagement; |
|||
|
|||
namespace DashboardDemo |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoApplicationContractsModule), |
|||
typeof(AbpIdentityHttpApiModule), |
|||
typeof(AbpPermissionManagementHttpApiModule), |
|||
typeof(AbpTenantManagementHttpApiModule), |
|||
typeof(AbpFeatureManagementHttpApiModule) |
|||
)] |
|||
public class DashboardDemoHttpApiModule : AbpModule |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -1,11 +0,0 @@ |
|||
using System; |
|||
|
|||
namespace DashboardDemo.Models.Test |
|||
{ |
|||
public class TestModel |
|||
{ |
|||
public string Name { get; set; } |
|||
|
|||
public DateTime BirthDate { get; set; } |
|||
} |
|||
} |
|||
@ -1,53 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
|||
|
|||
<Import Project="..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>netcoreapp3.1</TargetFramework> |
|||
<RootNamespace>DashboardDemo.Web</RootNamespace> |
|||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> |
|||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
|||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> |
|||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> |
|||
<PreserveCompilationContext>true</PreserveCompilationContext> |
|||
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> |
|||
<PreserveCompilationReferences>true</PreserveCompilationReferences> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<Compile Remove="Logs\**" /> |
|||
<Content Remove="Logs\**" /> |
|||
<EmbeddedResource Remove="Logs\**" /> |
|||
<None Remove="Logs\**" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<None Update="Pages\**\*.js"> |
|||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|||
</None> |
|||
<None Update="Pages\**\*.css"> |
|||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|||
</None> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" /> |
|||
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> |
|||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0" /> |
|||
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\DashboardDemo.Application\DashboardDemo.Application.csproj" /> |
|||
<ProjectReference Include="..\DashboardDemo.HttpApi\DashboardDemo.HttpApi.csproj" /> |
|||
<ProjectReference Include="..\DashboardDemo.EntityFrameworkCore.DbMigrations\DashboardDemo.EntityFrameworkCore.DbMigrations.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Authentication.JwtBearer\Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web.IdentityServer\Volo.Abp.Account.Web.IdentityServer.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Web\Volo.Abp.TenantManagement.Web.csproj" /> |
|||
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Web\Volo.Abp.FeatureManagement.Web.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,11 +0,0 @@ |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace DashboardDemo.Web |
|||
{ |
|||
[Dependency(ReplaceServices = true)] |
|||
public class DashboardDemoBrandingProvider : DefaultBrandingProvider |
|||
{ |
|||
public override string AppName => "DashboardDemo"; |
|||
} |
|||
} |
|||
@ -1,12 +0,0 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace DashboardDemo.Web |
|||
{ |
|||
public class DashboardDemoWebAutoMapperProfile : Profile |
|||
{ |
|||
public DashboardDemoWebAutoMapperProfile() |
|||
{ |
|||
//Define your AutoMapper configuration here for the Web project.
|
|||
} |
|||
} |
|||
} |
|||
@ -1,211 +0,0 @@ |
|||
using System.IO; |
|||
using Localization.Resources.AbpUi; |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.AspNetCore.Hosting; |
|||
using Microsoft.Extensions.Configuration; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Hosting; |
|||
using DashboardDemo.EntityFrameworkCore; |
|||
using DashboardDemo.Localization; |
|||
using DashboardDemo.MultiTenancy; |
|||
using DashboardDemo.Web.Menus; |
|||
using Microsoft.OpenApi.Models; |
|||
using Swashbuckle.AspNetCore.Swagger; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Account.Web; |
|||
using Volo.Abp.AspNetCore.Authentication.JwtBearer; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.Localization; |
|||
using Volo.Abp.AspNetCore.Mvc.UI; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
using Volo.Abp.Autofac; |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Abp.Identity.Web; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.Modularity; |
|||
using Volo.Abp.PermissionManagement.Web; |
|||
using Volo.Abp.TenantManagement.Web; |
|||
using Volo.Abp.UI.Navigation.Urls; |
|||
using Volo.Abp.UI; |
|||
using Volo.Abp.UI.Navigation; |
|||
using Volo.Abp.VirtualFileSystem; |
|||
|
|||
namespace DashboardDemo.Web |
|||
{ |
|||
[DependsOn( |
|||
typeof(DashboardDemoHttpApiModule), |
|||
typeof(DashboardDemoApplicationModule), |
|||
typeof(DashboardDemoEntityFrameworkCoreDbMigrationsModule), |
|||
typeof(AbpAutofacModule), |
|||
typeof(AbpIdentityWebModule), |
|||
typeof(AbpAccountWebIdentityServerModule), |
|||
typeof(AbpAspNetCoreMvcUiBasicThemeModule), |
|||
typeof(AbpAspNetCoreAuthenticationJwtBearerModule), |
|||
typeof(AbpTenantManagementWebModule) |
|||
)] |
|||
public class DashboardDemoWebModule : AbpModule |
|||
{ |
|||
public override void PreConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options => |
|||
{ |
|||
options.AddAssemblyResource( |
|||
typeof(DashboardDemoResource), |
|||
typeof(DashboardDemoDomainModule).Assembly, |
|||
typeof(DashboardDemoDomainSharedModule).Assembly, |
|||
typeof(DashboardDemoApplicationModule).Assembly, |
|||
typeof(DashboardDemoApplicationContractsModule).Assembly, |
|||
typeof(DashboardDemoWebModule).Assembly |
|||
); |
|||
}); |
|||
} |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
var hostingEnvironment = context.Services.GetHostingEnvironment(); |
|||
var configuration = context.Services.GetConfiguration(); |
|||
|
|||
ConfigureUrls(configuration); |
|||
ConfigureAuthentication(context, configuration); |
|||
ConfigureAutoMapper(); |
|||
ConfigureVirtualFileSystem(hostingEnvironment); |
|||
ConfigureLocalizationServices(); |
|||
ConfigureNavigationServices(); |
|||
ConfigureAutoApiControllers(); |
|||
ConfigureSwaggerServices(context.Services); |
|||
} |
|||
|
|||
private void ConfigureUrls(IConfiguration configuration) |
|||
{ |
|||
Configure<AppUrlOptions>(options => |
|||
{ |
|||
options.Applications["MVC"].RootUrl = configuration["AppSelfUrl"]; |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration) |
|||
{ |
|||
context.Services.AddAuthentication() |
|||
.AddIdentityServerAuthentication(options => |
|||
{ |
|||
options.Authority = configuration["AuthServer:Authority"]; |
|||
options.RequireHttpsMetadata = false; |
|||
options.ApiName = "DashboardDemo"; |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureAutoMapper() |
|||
{ |
|||
Configure<AbpAutoMapperOptions>(options => |
|||
{ |
|||
/* use `true` for the `validate` parameter if you want to |
|||
* validate the profile on application startup. |
|||
* See http://docs.automapper.org/en/stable/Configuration-validation.html for more
|
|||
* about configuration validation. |
|||
*/ |
|||
options.AddProfile<DashboardDemoWebAutoMapperProfile>(); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment) |
|||
{ |
|||
if (hostingEnvironment.IsDevelopment()) |
|||
{ |
|||
Configure<AbpVirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiThemeSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared", Path.DirectorySeparatorChar))); |
|||
options.FileSets.ReplaceEmbeddedByPhysical<DashboardDemoDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Domain.Shared", Path.DirectorySeparatorChar))); |
|||
options.FileSets.ReplaceEmbeddedByPhysical<DashboardDemoDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Domain", Path.DirectorySeparatorChar))); |
|||
options.FileSets.ReplaceEmbeddedByPhysical<DashboardDemoApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Application.Contracts", Path.DirectorySeparatorChar))); |
|||
options.FileSets.ReplaceEmbeddedByPhysical<DashboardDemoApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Application", Path.DirectorySeparatorChar))); |
|||
options.FileSets.ReplaceEmbeddedByPhysical<DashboardDemoWebModule>(hostingEnvironment.ContentRootPath); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
private void ConfigureLocalizationServices() |
|||
{ |
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Resources |
|||
.Get<DashboardDemoResource>() |
|||
.AddBaseTypes( |
|||
typeof(AbpUiResource) |
|||
); |
|||
|
|||
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); |
|||
options.Languages.Add(new LanguageInfo("en", "en", "English")); |
|||
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); |
|||
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); |
|||
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureNavigationServices() |
|||
{ |
|||
Configure<AbpNavigationOptions>(options => |
|||
{ |
|||
options.MenuContributors.Add(new DashboardDemoMenuContributor()); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureAutoApiControllers() |
|||
{ |
|||
Configure<AbpAspNetCoreMvcOptions>(options => |
|||
{ |
|||
options.ConventionalControllers.Create(typeof(DashboardDemoApplicationModule).Assembly); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigureSwaggerServices(IServiceCollection services) |
|||
{ |
|||
services.AddSwaggerGen( |
|||
options => |
|||
{ |
|||
options.SwaggerDoc("v1", new OpenApiInfo { Title = "DashboardDemo API", Version = "v1" }); |
|||
options.DocInclusionPredicate((docName, description) => true); |
|||
options.CustomSchemaIds(type => type.FullName); |
|||
} |
|||
); |
|||
} |
|||
|
|||
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|||
{ |
|||
var app = context.GetApplicationBuilder(); |
|||
var env = context.GetEnvironment(); |
|||
|
|||
if (env.IsDevelopment()) |
|||
{ |
|||
app.UseDeveloperExceptionPage(); |
|||
} |
|||
else |
|||
{ |
|||
app.UseErrorPage(); |
|||
} |
|||
|
|||
app.UseVirtualFiles(); |
|||
app.UseRouting(); |
|||
app.UseAuthentication(); |
|||
app.UseJwtTokenMiddleware(); |
|||
|
|||
if (MultiTenancyConsts.IsEnabled) |
|||
{ |
|||
app.UseMultiTenancy(); |
|||
} |
|||
|
|||
app.UseIdentityServer(); |
|||
app.UseAbpRequestLocalization(); |
|||
app.UseSwagger(); |
|||
app.UseSwaggerUI(options => |
|||
{ |
|||
options.SwaggerEndpoint("/swagger/v1/swagger.json", "DashboardDemo API"); |
|||
}); |
|||
app.UseAuditing(); |
|||
app.UseMvcWithDefaultRouteAndArea(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,34 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.Extensions.Localization; |
|||
using DashboardDemo.Localization; |
|||
using DashboardDemo.MultiTenancy; |
|||
using Volo.Abp.TenantManagement.Web.Navigation; |
|||
using Volo.Abp.UI.Navigation; |
|||
|
|||
namespace DashboardDemo.Web.Menus |
|||
{ |
|||
public class DashboardDemoMenuContributor : IMenuContributor |
|||
{ |
|||
public async Task ConfigureMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
if (context.Menu.Name == StandardMenus.Main) |
|||
{ |
|||
await ConfigureMainMenuAsync(context); |
|||
} |
|||
} |
|||
|
|||
private async Task ConfigureMainMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
if (!MultiTenancyConsts.IsEnabled) |
|||
{ |
|||
var administration = context.Menu.GetAdministration(); |
|||
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName); |
|||
} |
|||
|
|||
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<DashboardDemoResource>>(); |
|||
|
|||
context.Menu.Items.Insert(0, new ApplicationMenuItem("DashboardDemo.Home", l["Menu:Home"], "/")); |
|||
} |
|||
} |
|||
} |
|||
@ -1,16 +0,0 @@ |
|||
using Microsoft.AspNetCore.Mvc.Localization; |
|||
using Microsoft.AspNetCore.Mvc.Razor.Internal; |
|||
using DashboardDemo.Localization; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
|||
|
|||
namespace DashboardDemo.Web.Pages |
|||
{ |
|||
/* Inherit your UI Pages from this class. To do that, add this line to your Pages (.cshtml files under the Page folder): |
|||
* @inherits DashboardDemo.Web.Pages.DashboardDemoPage |
|||
*/ |
|||
public abstract class DashboardDemoPage : AbpPage |
|||
{ |
|||
[RazorInject] |
|||
public IHtmlLocalizer<DashboardDemoResource> L { get; set; } |
|||
} |
|||
} |
|||
@ -1,15 +0,0 @@ |
|||
using DashboardDemo.Localization; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
|||
|
|||
namespace DashboardDemo.Web.Pages |
|||
{ |
|||
/* Inherit your PageModel classes from this class. |
|||
*/ |
|||
public abstract class DashboardDemoPageModel : AbpPageModel |
|||
{ |
|||
protected DashboardDemoPageModel() |
|||
{ |
|||
LocalizationResourceType = typeof(DashboardDemoResource); |
|||
} |
|||
} |
|||
} |
|||
@ -1,31 +0,0 @@ |
|||
@page |
|||
@inherits DashboardDemo.Web.Pages.DashboardDemoPage |
|||
@using Volo.Abp.AspNetCore.Mvc.UI.Widgets |
|||
@model DashboardDemo.Web.Pages.IndexModel |
|||
@section styles { |
|||
<abp-style-bundle> |
|||
<abp-style src="/Pages/Index.css" /> |
|||
</abp-style-bundle> |
|||
} |
|||
@section scripts { |
|||
<abp-script-bundle> |
|||
<abp-script src="/Pages/Index.js" /> |
|||
</abp-script-bundle> |
|||
} |
|||
<abp-card> |
|||
<abp-card-header>@L["Welcome"]</abp-card-header> |
|||
<abp-card-body> |
|||
<h2>Demo Pages</h2> |
|||
<ul> |
|||
<li><a asp-page="./MyWidgets">Widgets Demo</a></li> |
|||
<li><a asp-page="./MyDashboard">Dashboard Demo</a></li> |
|||
</ul> |
|||
<hr /> |
|||
@if (!CurrentUser.IsAuthenticated) |
|||
{ |
|||
<p><a abp-button="Primary" href="/Account/Login"><i class="fa fa-sign-in"></i> @L["Login"]</a></p> |
|||
} |
|||
<hr /> |
|||
<p class="text-right"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p> |
|||
</abp-card-body> |
|||
</abp-card> |
|||
@ -1,10 +0,0 @@ |
|||
namespace DashboardDemo.Web.Pages |
|||
{ |
|||
public class IndexModel : DashboardDemoPageModel |
|||
{ |
|||
public void OnGet() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -1,3 +0,0 @@ |
|||
body { |
|||
|
|||
} |
|||
@ -1,3 +0,0 @@ |
|||
$(function () { |
|||
abp.log.debug('Index.js initialized!'); |
|||
}); |
|||
@ -1,44 +0,0 @@ |
|||
@page |
|||
@model DashboardDemo.Web.Pages.MyDashboardModel |
|||
|
|||
@section scripts { |
|||
<abp-script src="/Pages/MyDashboard.js" /> |
|||
} |
|||
|
|||
@section styles { |
|||
<abp-style src="/Pages/MyDashboard.css" /> |
|||
} |
|||
|
|||
<form method="get" id="MyDashboardFilterForm"> |
|||
<abp-row class="mb-3"> |
|||
<abp-column size-md="_5"> |
|||
<abp-input asp-for="StartDate" /> |
|||
</abp-column> |
|||
<abp-column size-md="_5"> |
|||
<abp-input asp-for="EndDate" /> |
|||
</abp-column> |
|||
<abp-column size-md="_2"> |
|||
<abp-button button-type="Primary" icon="refresh" size="Block_Large" type="Submit" text="Refresh" /> |
|||
</abp-column> |
|||
</abp-row> |
|||
</form> |
|||
|
|||
<div id="MyDashboardWidgetsArea" data-widget-filter="#MyDashboardFilterForm"> |
|||
<abp-row> |
|||
<abp-column> |
|||
@await Component.InvokeAsync("CountersWidget", new |
|||
{ |
|||
startDate = @Model.StartDate, |
|||
endDate = @Model.EndDate |
|||
}) |
|||
</abp-column> |
|||
</abp-row> |
|||
<abp-row class="mt-5"> |
|||
<abp-column size="_6"> |
|||
@await Component.InvokeAsync("NewUserStatisticWidget") |
|||
</abp-column> |
|||
<abp-column size="_6"> |
|||
@await Component.InvokeAsync("LicenseStatisticWidget") |
|||
</abp-column> |
|||
</abp-row> |
|||
</div> |
|||
@ -1,28 +0,0 @@ |
|||
using System; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.AspNetCore.Mvc.RazorPages; |
|||
|
|||
namespace DashboardDemo.Web.Pages |
|||
{ |
|||
public class MyDashboardModel : PageModel |
|||
{ |
|||
[BindProperty(SupportsGet = true)] |
|||
public DateTime? StartDate { get; set; } |
|||
|
|||
[BindProperty(SupportsGet = true)] |
|||
public DateTime? EndDate { get; set; } |
|||
|
|||
public void OnGet() |
|||
{ |
|||
if (StartDate == null) |
|||
{ |
|||
StartDate = DateTime.Now.Subtract(TimeSpan.FromDays(6)).ClearTime(); |
|||
} |
|||
|
|||
if (EndDate == null) |
|||
{ |
|||
EndDate = DateTime.Now.AddDays(1).ClearTime(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,3 +0,0 @@ |
|||
#MyDashboardFilterForm button[type=Submit] { |
|||
margin-top: 25px; |
|||
} |
|||
@ -1,4 +0,0 @@ |
|||
$(function() { |
|||
var myWidgetManager = new abp.WidgetManager('#MyDashboardWidgetsArea'); |
|||
myWidgetManager.init(); |
|||
}) |
|||
@ -1,11 +0,0 @@ |
|||
@page |
|||
@using DashboardDemo.Web.Pages.Shared.Components.MySimpleWidget |
|||
@model DashboardDemo.Web.Pages.MyWidgetsModel |
|||
|
|||
@* Example usage by widget name *@ |
|||
@await Component.InvokeAsync("MySimpleWidget", new { name = "John" }) |
|||
|
|||
<hr /> |
|||
|
|||
@* Example usage by widget type *@ |
|||
@await Component.InvokeAsync(typeof(MySimpleWidgetViewComponent), new { name = "Mete" }) |
|||
@ -1,11 +0,0 @@ |
|||
using Microsoft.AspNetCore.Mvc.RazorPages; |
|||
|
|||
namespace DashboardDemo.Web.Pages |
|||
{ |
|||
public class MyWidgetsModel : PageModel |
|||
{ |
|||
public void OnGet() |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -1,17 +0,0 @@ |
|||
using System; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace DashboardDemo.Web.Pages.Shared.Components.CountersWidget |
|||
{ |
|||
[Route("Widgets")] |
|||
public class CountersWidgetController : AbpController |
|||
{ |
|||
[HttpGet] |
|||
[Route("Counters")] |
|||
public IActionResult Counters(DateTime startDate, DateTime endDate) |
|||
{ |
|||
return ViewComponent("CountersWidget", new {startDate, endDate}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,35 +0,0 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
|
|||
namespace DashboardDemo.Web.Pages.Shared.Components.CountersWidget |
|||
{ |
|||
[Widget( |
|||
StyleFiles = new[] { "/Pages/Shared/Components/CountersWidget/Default.css" }, |
|||
RefreshUrl = "Widgets/Counters" |
|||
)] |
|||
public class CountersWidgetViewComponent : AbpViewComponent |
|||
{ |
|||
private readonly IDashboardAppService _dashboardAppService; |
|||
|
|||
public CountersWidgetViewComponent(IDashboardAppService dashboardAppService) |
|||
{ |
|||
_dashboardAppService = dashboardAppService; |
|||
} |
|||
|
|||
public async Task<IViewComponentResult> InvokeAsync(DateTime startDate, DateTime endDate) |
|||
{ |
|||
var result = await _dashboardAppService.GetCountersWidgetAsync( |
|||
new CountersWidgetInputDto |
|||
{ |
|||
StartDate = startDate, |
|||
EndDate = endDate |
|||
} |
|||
); |
|||
|
|||
return View(result); |
|||
} |
|||
} |
|||
} |
|||
@ -1,29 +0,0 @@ |
|||
@model DashboardDemo.CountersWidgetResultDto |
|||
<div class="counters-widget"> |
|||
<abp-row> |
|||
<abp-column size-md="_3"> |
|||
<div class="counters-widget-item"> |
|||
<div class="counters-widget-count">@Model.NewUsers</div> |
|||
<div class="counters-widget-count-name">New Users</div> |
|||
</div> |
|||
</abp-column> |
|||
<abp-column size-md="_3"> |
|||
<div class="counters-widget-item"> |
|||
<div class="counters-widget-count">@Model.ActiveUsers</div> |
|||
<div class="counters-widget-count-name">Active Users</div> |
|||
</div> |
|||
</abp-column> |
|||
<abp-column size-md="_3"> |
|||
<div class="counters-widget-item"> |
|||
<div class="counters-widget-count">@Model.TotalIncome.ToString("c")</div> |
|||
<div class="counters-widget-count-name">Total Income</div> |
|||
</div> |
|||
</abp-column> |
|||
<abp-column size-md="_3"> |
|||
<div class="counters-widget-item"> |
|||
<div class="counters-widget-count">@Model.TotalProfit.ToString("c")</div> |
|||
<div class="counters-widget-count-name">Total Profit</div> |
|||
</div> |
|||
</abp-column> |
|||
</abp-row> |
|||
</div> |
|||
@ -1,17 +0,0 @@ |
|||
.counters-widget .counters-widget-item { |
|||
border: 1px solid #ddd; |
|||
border-bottom: 5px solid #bbb; |
|||
border-right: 5px solid #ddd; |
|||
background-color: #f5f5f5; |
|||
text-align: center; |
|||
padding: 10px; |
|||
} |
|||
|
|||
.counters-widget .counters-widget-count { |
|||
font-size: 2em; |
|||
color: #00008b; |
|||
} |
|||
|
|||
.counters-widget .counters-widget-count-name { |
|||
color: #666; |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
<abp-card background="Light"> |
|||
<abp-card-header background="Secondary" class="text-white"> |
|||
License Statistics |
|||
</abp-card-header> |
|||
<abp-card-body> |
|||
<div class="row"> |
|||
<canvas class="LicenseStatisticChart"></canvas> |
|||
</div> |
|||
</abp-card-body> |
|||
</abp-card> |
|||
@ -1,52 +0,0 @@ |
|||
(function () { |
|||
abp.widgets.LicenseStatisticWidget = function($wrapper) { |
|||
|
|||
var _chart; |
|||
|
|||
var refreshChart = function(statistic) { |
|||
_chart.data = { |
|||
labels: Object.keys(statistic.data), |
|||
datasets: [ |
|||
{ |
|||
label: 'License ratios', |
|||
data: Object.values(statistic.data), |
|||
backgroundColor: [ |
|||
'rgba(50, 150, 255, 1)', |
|||
'rgba(150, 255, 100, 1)', |
|||
'rgba(255, 100, 150, 1)' |
|||
] |
|||
} |
|||
] |
|||
}; |
|||
_chart.update(); |
|||
}; |
|||
|
|||
var render = function(filters, callback) { |
|||
dashboardDemo.dashboard.getLicenseStatisticWidget({ |
|||
startDate: filters.startDate, |
|||
endDate: filters.endDate |
|||
}) |
|||
.then(function(result) { |
|||
callback(result); |
|||
}); |
|||
}; |
|||
|
|||
var refresh = function(filters) { |
|||
render(filters, refreshChart); |
|||
}; |
|||
|
|||
var init = function (filters) { |
|||
_chart = new Chart($wrapper.find('.LicenseStatisticChart'), |
|||
{ |
|||
type: 'pie' |
|||
}); |
|||
|
|||
refresh(filters); |
|||
}; |
|||
|
|||
return { |
|||
init: init, |
|||
refresh: refresh |
|||
}; |
|||
}; |
|||
})(); |
|||
@ -1,15 +0,0 @@ |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Packages.ChartJs; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace DashboardDemo.Web.Pages.Shared.Components.LicenseStatisticWidget |
|||
{ |
|||
[DependsOn(typeof(ChartjsScriptContributor))] |
|||
public class LicenseStatisticWidgetScriptContributor : BundleContributor |
|||
{ |
|||
public override void ConfigureBundle(BundleConfigurationContext context) |
|||
{ |
|||
context.Files.Add("/Pages/Shared/Components/LicenseStatisticWidget/Default.js"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,19 +0,0 @@ |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Packages.ChartJs; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; |
|||
|
|||
namespace DashboardDemo.Web.Pages.Shared.Components.LicenseStatisticWidget |
|||
{ |
|||
[Widget( |
|||
StyleTypes = new[] { typeof(ChartjsStyleContributor) }, |
|||
ScriptTypes = new[] { typeof(LicenseStatisticWidgetScriptContributor) } |
|||
)] |
|||
public class LicenseStatisticWidgetViewComponent : AbpViewComponent |
|||
{ |
|||
public IViewComponentResult Invoke() |
|||
{ |
|||
return View(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,5 +0,0 @@ |
|||
@model DashboardDemo.Web.Pages.Shared.Components.MySimpleWidget.MySimpleWidgetViewModel |
|||
<div class="my-simple-widget"> |
|||
<h2>My Simple Widget</h2> |
|||
<p>Hello <strong>@Model.Name</strong>! This is a simple widget!</p> |
|||
</div> |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue