Browse Source

removed old dashboard demo

pull/1520/head
Yunus Emre Kalkan 7 years ago
parent
commit
c04e7b5bc1
  1. 1
      samples/DashboardDemo-old/.gitattributes
  2. 255
      samples/DashboardDemo-old/.gitignore
  3. 74
      samples/DashboardDemo-old/DashboardDemo.sln
  4. 7
      samples/DashboardDemo-old/DashboardDemo.sln.DotSettings
  5. 7
      samples/DashboardDemo-old/common.props
  6. 18
      samples/DashboardDemo-old/src/DashboardDemo.Application/DashboardDemo.Application.csproj
  7. 12
      samples/DashboardDemo-old/src/DashboardDemo.Application/DashboardDemoApplicationAutoMapperProfile.cs
  8. 27
      samples/DashboardDemo-old/src/DashboardDemo.Application/DashboardDemoApplicationModule.cs
  9. 63
      samples/DashboardDemo-old/src/DashboardDemo.Application/DemoStatisticAppService.cs
  10. 11
      samples/DashboardDemo-old/src/DashboardDemo.Application/FilterDto.cs
  11. 9
      samples/DashboardDemo-old/src/DashboardDemo.Application/GetMonthlyUserStatisticDto.cs
  12. 15
      samples/DashboardDemo-old/src/DashboardDemo.Application/IDemoStatisticAppService.cs
  13. 9
      samples/DashboardDemo-old/src/DashboardDemo.Application/MonthlyProfitStatisticDto.cs
  14. 22
      samples/DashboardDemo-old/src/DashboardDemo.Application/Permissions/DashboardDemoPermissionDefinitionProvider.cs
  15. 19
      samples/DashboardDemo-old/src/DashboardDemo.Application/Permissions/DashboardDemoPermissions.cs
  16. 25
      samples/DashboardDemo-old/src/DashboardDemo.Domain/DashboardDemo.Domain.csproj
  17. 11
      samples/DashboardDemo-old/src/DashboardDemo.Domain/DashboardDemoConsts.cs
  18. 49
      samples/DashboardDemo-old/src/DashboardDemo.Domain/DashboardDemoDomainModule.cs
  19. 10
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/DashboardDemoResource.cs
  20. 10
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/cs.json
  21. 10
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/en.json
  22. 10
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/pl.json
  23. 8
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/pt-BR.json
  24. 8
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/tr.json
  25. 10
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/vi.json
  26. 8
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/zh-Hans.json
  27. 13
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Settings/DashboardDemoSettingDefinitionProvider.cs
  28. 10
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Settings/DashboardDemoSettings.cs
  29. 53
      samples/DashboardDemo-old/src/DashboardDemo.Domain/Users/AppUser.cs
  30. 18
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/DashboardDemo.EntityFrameworkCore.DbMigrations.csproj
  31. 46
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/DashboardDemoMigrationsDbContext.cs
  32. 29
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/DashboardDemoMigrationsDbContextFactory.cs
  33. 760
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190402131334_Initial.Designer.cs
  34. 546
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190402131334_Initial.cs
  35. 758
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/DashboardDemoMigrationsDbContextModelSnapshot.cs
  36. 22
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore/DashboardDemo.EntityFrameworkCore.csproj
  37. 45
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore/EntityFrameworkCore/DashboardDemoDbContext.cs
  38. 30
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore/EntityFrameworkCore/DashboardDemoDbContextModelCreatingExtensions.cs
  39. 36
      samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore/EntityFrameworkCore/DashboardDemoEntityFrameworkCoreModule.cs
  40. 11
      samples/DashboardDemo-old/src/DashboardDemo.Web/Branding/DashboardDemoBrandingProvider.cs
  41. 43
      samples/DashboardDemo-old/src/DashboardDemo.Web/DashboardDemo.Web.csproj
  42. 12
      samples/DashboardDemo-old/src/DashboardDemo.Web/DashboardDemoWebAutoMapperProfile.cs
  43. 257
      samples/DashboardDemo-old/src/DashboardDemo.Web/DashboardDemoWebModule.cs
  44. 29
      samples/DashboardDemo-old/src/DashboardDemo.Web/Dashboards/DashboardDefinitionProvider.cs
  45. 14
      samples/DashboardDemo-old/src/DashboardDemo.Web/Dashboards/DashboardNames.cs
  46. 29
      samples/DashboardDemo-old/src/DashboardDemo.Web/GlobalFilters/GlobalFilterDefinitionProvider.cs
  47. 33
      samples/DashboardDemo-old/src/DashboardDemo.Web/Menus/DashboardDemoMenuContributor.cs
  48. 13
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/DashboardDemoPageBase.cs
  49. 13
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/DashboardDemoPageModelBase.cs
  50. 30
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/Index.cshtml
  51. 10
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/Index.cshtml.cs
  52. 22
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/MyDashboard.cshtml
  53. 13
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/MyDashboard.cshtml.cs
  54. 23
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/MyDashboardScriptBundleContributor.cs
  55. 21
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/MyDashboardStyleBundleContributor.cs
  56. 4
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/_ViewImports.cshtml
  57. 12
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Chartjs/ChartjsScriptContributor.cs
  58. 15
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Chartjs/ChartjsStyleContributor.cs
  59. 6
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilter.js
  60. 12
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterScriptContributor.cs
  61. 19
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml
  62. 17
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml.cs
  63. 3
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidget.css
  64. 48
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidget.js
  65. 19
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetScriptBundleContributor.cs
  66. 19
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetStyleBundleContributor.cs
  67. 16
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetViewComponent.cshtml
  68. 17
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetViewComponent.cshtml.cs
  69. 3
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidget.css
  70. 15
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidget.js
  71. 15
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidgetScriptContributor.cs
  72. 12
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidgetStyleContributor.cs
  73. 17
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidgetViewComponent.cshtml
  74. 17
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidgetViewComponent.cshtml.cs
  75. 3
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidget.css
  76. 48
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidget.js
  77. 20
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidgetScriptBundleContributor.cs
  78. 20
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidgetStyleBundleContributor.cs
  79. 16
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidgetViewComponent.cshtml
  80. 17
      samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidgetViewComponent.cshtml.cs
  81. 50
      samples/DashboardDemo-old/src/DashboardDemo.Web/Program.cs
  82. 27
      samples/DashboardDemo-old/src/DashboardDemo.Web/Properties/launchSettings.json
  83. 26
      samples/DashboardDemo-old/src/DashboardDemo.Web/Startup.cs
  84. 3
      samples/DashboardDemo-old/src/DashboardDemo.Web/Views/_ViewImports.cshtml
  85. 46
      samples/DashboardDemo-old/src/DashboardDemo.Web/Widgets/WidgetDefinitionProvider.cs
  86. 5
      samples/DashboardDemo-old/src/DashboardDemo.Web/abp.resourcemapping.js
  87. 5
      samples/DashboardDemo-old/src/DashboardDemo.Web/appsettings.json
  88. 6
      samples/DashboardDemo-old/src/DashboardDemo.Web/compilerconfig.json
  89. 49
      samples/DashboardDemo-old/src/DashboardDemo.Web/compilerconfig.json.defaults
  90. 9
      samples/DashboardDemo-old/src/DashboardDemo.Web/gulpfile.js
  91. 2390
      samples/DashboardDemo-old/src/DashboardDemo.Web/package-lock.json
  92. 9
      samples/DashboardDemo-old/src/DashboardDemo.Web/package.json
  93. 56
      samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/abp/core/abp.css
  94. 636
      samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/abp/core/abp.js
  95. 389
      samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/abp/jquery/abp.jquery.js
  96. 8981
      samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/bootstrap/css/bootstrap.css
  97. 6444
      samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/bootstrap/js/bootstrap.bundle.js
  98. 19288
      samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/chart.js/Chart.bundle.js
  99. 7
      samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/chart.js/Chart.bundle.min.js
  100. 47
      samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/chart.js/Chart.css

1
samples/DashboardDemo-old/.gitattributes

@ -1 +0,0 @@
**/wwwroot/libs/** linguist-vendored

255
samples/DashboardDemo-old/.gitignore

@ -1,255 +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/logs.txt

74
samples/DashboardDemo-old/DashboardDemo.sln

@ -1,74 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.1
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
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
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}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
EndGlobalSection
EndGlobal

7
samples/DashboardDemo-old/DashboardDemo.sln.DotSettings

@ -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>

7
samples/DashboardDemo-old/common.props

@ -1,7 +0,0 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
</Project>

18
samples/DashboardDemo-old/src/DashboardDemo.Application/DashboardDemo.Application.csproj

@ -1,18 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\DashboardDemo.Domain\DashboardDemo.Domain.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.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" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" />
</ItemGroup>
</Project>

12
samples/DashboardDemo-old/src/DashboardDemo.Application/DashboardDemoApplicationAutoMapperProfile.cs

@ -1,12 +0,0 @@
using AutoMapper;
namespace DashboardDemo
{
public class DashboardDemoApplicationAutoMapperProfile : Profile
{
public DashboardDemoApplicationAutoMapperProfile()
{
//Configure your AutoMapper mapping configuration here...
}
}
}

27
samples/DashboardDemo-old/src/DashboardDemo.Application/DashboardDemoApplicationModule.cs

@ -1,27 +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(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpFeatureManagementApplicationModule)
)]
public class DashboardDemoApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<DashboardDemoApplicationAutoMapperProfile>();
});
}
}
}

63
samples/DashboardDemo-old/src/DashboardDemo.Application/DemoStatisticAppService.cs

@ -1,63 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
namespace DashboardDemo
{
public class DemoStatisticAppService : ApplicationService, IDemoStatisticAppService
{
public async Task<GetMonthlyUserStatisticDto> GetMonthlyUserStatistic(FilterDto filter)
{
var monthCount = GetLabels(filter, out var monthList);
var data = Enumerable
.Repeat(0, monthCount)
.Select(i => new Random().Next(750, 960))
.ToArray();
return new GetMonthlyUserStatisticDto{Labels = monthList.ToArray(), Data = data};
}
public async Task<MonthlyProfitStatisticDto> GetMonthlyProfitStatistic(FilterDto filter)
{
var monthCount = GetLabels(filter, out var monthList);
var data = Enumerable
.Repeat(0, monthCount)
.Select(i => new Random().Next(-20, 40))
.ToArray();
return new MonthlyProfitStatisticDto { Labels = monthList.ToArray(), Data = data };
}
private static int GetLabels(FilterDto filter, out List<string> monthList)
{
DateTime endDate = filter.EndDate ?? DateTime.Now;
DateTime startDate = filter.StartDate ?? DateTime.Now.AddYears(-1);
if (filter.StartDate > filter.EndDate)
{
throw new BusinessException("Start date can not be greater than end date.");
}
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;
monthList = new List<string>();
for (int i = 0; i < monthCount; i++)
{
monthList.Add(months[endDate.Month-1]);
endDate = endDate.AddMonths(-1);
}
monthList.Reverse();
return monthCount;
}
}
}

11
samples/DashboardDemo-old/src/DashboardDemo.Application/FilterDto.cs

@ -1,11 +0,0 @@
using System;
namespace DashboardDemo
{
public class FilterDto
{
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
}
}

9
samples/DashboardDemo-old/src/DashboardDemo.Application/GetMonthlyUserStatisticDto.cs

@ -1,9 +0,0 @@
namespace DashboardDemo
{
public class GetMonthlyUserStatisticDto
{
public string[] Labels { get; set; }
public int[] Data { get; set; }
}
}

15
samples/DashboardDemo-old/src/DashboardDemo.Application/IDemoStatisticAppService.cs

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
namespace DashboardDemo
{
public interface IDemoStatisticAppService : IApplicationService
{
Task<GetMonthlyUserStatisticDto> GetMonthlyUserStatistic(FilterDto filter);
Task<MonthlyProfitStatisticDto> GetMonthlyProfitStatistic(FilterDto filter);
}
}

9
samples/DashboardDemo-old/src/DashboardDemo.Application/MonthlyProfitStatisticDto.cs

@ -1,9 +0,0 @@
namespace DashboardDemo
{
public class MonthlyProfitStatisticDto
{
public string[] Labels { get; set; }
public int[] Data { get; set; }
}
}

22
samples/DashboardDemo-old/src/DashboardDemo.Application/Permissions/DashboardDemoPermissionDefinitionProvider.cs

@ -1,22 +0,0 @@
using DashboardDemo.Localization.DashboardDemo;
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);
}
}
}

19
samples/DashboardDemo-old/src/DashboardDemo.Application/Permissions/DashboardDemoPermissions.cs

@ -1,19 +0,0 @@
using System;
using Volo.Abp.Reflection;
namespace DashboardDemo.Permissions
{
public static class DashboardDemoPermissions
{
public const string GroupName = "DashboardDemo";
//Add your own permission names. Example:
//public const string MyPermission1 = GroupName + ".MyPermission1";
public static string[] GetAll()
{
//Return an array of all permissions
return ReflectionHelper.GetPublicConstantsRecursively(typeof(DashboardDemoPermissions));
}
}
}

25
samples/DashboardDemo-old/src/DashboardDemo.Domain/DashboardDemo.Domain.csproj

@ -1,25 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Auditing\Volo.Abp.Auditing.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain\Volo.Abp.Identity.Domain.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\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\DashboardDemo\*.json" />
</ItemGroup>
</Project>

11
samples/DashboardDemo-old/src/DashboardDemo.Domain/DashboardDemoConsts.cs

@ -1,11 +0,0 @@
namespace DashboardDemo
{
public static class DashboardDemoConsts
{
public const string DbTablePrefix = "App";
public const string DbSchema = null;
public const bool IsMultiTenancyEnabled = true;
}
}

49
samples/DashboardDemo-old/src/DashboardDemo.Domain/DashboardDemoDomainModule.cs

@ -1,49 +0,0 @@
using DashboardDemo.Localization.DashboardDemo;
using Volo.Abp.Auditing;
using Volo.Abp.AuditLogging;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
using Volo.Abp.Localization.Resources.AbpValidation;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement.Identity;
using Volo.Abp.TenantManagement;
using Volo.Abp.VirtualFileSystem;
namespace DashboardDemo
{
[DependsOn(
typeof(AbpIdentityDomainModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpAuditingModule),
typeof(BackgroundJobsDomainModule),
typeof(AbpAuditLoggingDomainModule),
typeof(AbpTenantManagementDomainModule),
typeof(AbpFeatureManagementDomainModule)
)]
public class DashboardDemoDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<DashboardDemoDomainModule>("DashboardDemo");
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<DashboardDemoResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/DashboardDemo");
});
Configure<MultiTenancyOptions>(options =>
{
options.IsEnabled = DashboardDemoConsts.IsMultiTenancyEnabled;
});
}
}
}

10
samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/DashboardDemoResource.cs

@ -1,10 +0,0 @@
using Volo.Abp.Localization;
namespace DashboardDemo.Localization.DashboardDemo
{
[LocalizationResourceName("DashboardDemo")]
public class DashboardDemoResource
{
}
}

10
samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/cs.json

@ -1,10 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:Home": "Úvod",
"Welcome": "Vítejte",
"RolesInApplication": "Role v aplikaci",
"UserCount": "Počet uživatelů",
"LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io."
}
}

10
samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/en.json

@ -1,10 +0,0 @@
{
"culture": "en",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welcome",
"RolesInApplication": "Roles in application",
"UserCount": "User count",
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
}
}

10
samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/pl.json

@ -1,10 +0,0 @@
{
"culture": "pl",
"texts": {
"Menu:Home": "Home",
"Welcome": "Witaj",
"RolesInApplication": "Role w aplikacji",
"UserCount": "Ilość użytkowników",
"LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io."
}
}

8
samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/pt-BR.json

@ -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."
}
}

8
samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/tr.json

@ -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."
}
}

10
samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/vi.json

@ -1,10 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:Home": "Trang chủ",
"Welcome": "Xin chào bạn",
"RolesInApplication": "Vai trò trong ứng dụng",
"UserCount": "Số lượng người dùng",
"LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là mẫu khởi động dự án dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io."
}
}

8
samples/DashboardDemo-old/src/DashboardDemo.Domain/Localization/DashboardDemo/zh-Hans.json

@ -1,8 +0,0 @@
{
"culture": "zh-Hans",
"texts": {
"Menu:Home": "首页",
"Welcome": "欢迎",
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 cn.abp.io."
}
}

13
samples/DashboardDemo-old/src/DashboardDemo.Domain/Settings/DashboardDemoSettingDefinitionProvider.cs

@ -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));
}
}
}

10
samples/DashboardDemo-old/src/DashboardDemo.Domain/Settings/DashboardDemoSettings.cs

@ -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";
}
}

53
samples/DashboardDemo-old/src/DashboardDemo.Domain/Users/AppUser.cs

@ -1,53 +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 virtual string MyProperty { get; set; }
*/
private AppUser()
{
}
}
}

18
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/DashboardDemo.EntityFrameworkCore.DbMigrations.csproj

@ -1,18 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>DashboardDemo</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Migrations\20190320072839_Initial.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DashboardDemo.EntityFrameworkCore\DashboardDemo.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

46
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/DashboardDemoMigrationsDbContext.cs

@ -1,46 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace DashboardDemo.EntityFrameworkCore
{
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.ConfigureTenantManagement();
/* Configure customizations for entities from the modules included */
builder.Entity<IdentityUser>(b =>
{
b.ConfigureCustomUserProperties();
});
/* Configure your own tables/entities inside the ConfigureDashboardDemo method */
builder.ConfigureDashboardDemo();
}
}
}

29
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/DashboardDemoMigrationsDbContextFactory.cs

@ -1,29 +0,0 @@
using System.IO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace DashboardDemo.EntityFrameworkCore
{
public class DashboardDemoMigrationsDbContextFactory : IDesignTimeDbContextFactory<DashboardDemoMigrationsDbContext>
{
public DashboardDemoMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<DashboardDemoMigrationsDbContext>()
.UseSqlServer(configuration.GetConnectionString("Default"));
return new DashboardDemoMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}
}
}

760
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190402131334_Initial.Designer.cs

@ -1,760 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using DashboardDemo.EntityFrameworkCore;
namespace DashboardDemo.Migrations
{
[DbContext(typeof(DashboardDemoMigrationsDbContext))]
[Migration("20190402131334_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ApplicationName")
.HasColumnName("ApplicationName")
.HasMaxLength(96);
b.Property<string>("BrowserInfo")
.HasColumnName("BrowserInfo")
.HasMaxLength(512);
b.Property<string>("ClientId")
.HasColumnName("ClientId")
.HasMaxLength(64);
b.Property<string>("ClientIpAddress")
.HasColumnName("ClientIpAddress")
.HasMaxLength(64);
b.Property<string>("ClientName")
.HasColumnName("ClientName")
.HasMaxLength(128);
b.Property<string>("Comments")
.HasColumnName("Comments")
.HasMaxLength(256);
b.Property<string>("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasColumnName("CorrelationId")
.HasMaxLength(64);
b.Property<string>("Exceptions")
.HasColumnName("Exceptions")
.HasMaxLength(4000);
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("HttpMethod")
.HasColumnName("HttpMethod")
.HasMaxLength(16);
b.Property<int?>("HttpStatusCode")
.HasColumnName("HttpStatusCode");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnName("ImpersonatorTenantId");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnName("ImpersonatorUserId");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.Property<string>("TenantName");
b.Property<string>("Url")
.HasColumnName("Url")
.HasMaxLength(256);
b.Property<Guid?>("UserId")
.HasColumnName("UserId");
b.Property<string>("UserName")
.HasColumnName("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("TenantId", "ExecutionTime");
b.HasIndex("TenantId", "UserId", "ExecutionTime");
b.ToTable("AbpAuditLogs");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("MethodName")
.HasColumnName("MethodName")
.HasMaxLength(128);
b.Property<string>("Parameters")
.HasColumnName("Parameters")
.HasMaxLength(2000);
b.Property<string>("ServiceName")
.HasColumnName("ServiceName")
.HasMaxLength(256);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
.HasColumnName("ChangeType");
b.Property<string>("EntityId")
.IsRequired()
.HasColumnName("EntityId")
.HasMaxLength(128);
b.Property<Guid?>("EntityTenantId");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasColumnName("EntityTypeFullName")
.HasMaxLength(128);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("EntityChangeId");
b.Property<string>("NewValue")
.HasColumnName("NewValue")
.HasMaxLength(512);
b.Property<string>("OriginalValue")
.HasColumnName("OriginalValue")
.HasMaxLength(512);
b.Property<string>("PropertyName")
.IsRequired()
.HasColumnName("PropertyName")
.HasMaxLength(128);
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasColumnName("PropertyTypeFullName")
.HasMaxLength(64);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges");
});
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsAbandoned")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<string>("JobArgs")
.IsRequired()
.HasMaxLength(1048576);
b.Property<string>("JobName")
.IsRequired()
.HasMaxLength(128);
b.Property<DateTime?>("LastTryTime");
b.Property<DateTime>("NextTryTime");
b.Property<byte>("Priority")
.ValueGeneratedOnAdd()
.HasDefaultValue((byte)15);
b.Property<short>("TryCount")
.ValueGeneratedOnAdd()
.HasDefaultValue((short)0);
b.HasKey("Id");
b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("Description")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("Regex")
.HasMaxLength(512);
b.Property<string>("RegexDescription")
.HasMaxLength(128);
b.Property<bool>("Required");
b.Property<int>("ValueType");
b.HasKey("Id");
b.ToTable("AbpClaimTypes");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDefault")
.HasColumnName("IsDefault");
b.Property<bool>("IsPublic")
.HasColumnName("IsPublic");
b.Property<bool>("IsStatic")
.HasColumnName("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasMaxLength(256);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasColumnName("AccessFailedCount")
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("Email")
.HasColumnName("Email")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("EmailConfirmed")
.HasDefaultValue(false);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("LockoutEnabled")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("Name")
.HasColumnName("Name")
.HasMaxLength(64);
b.Property<string>("NormalizedEmail")
.HasColumnName("NormalizedEmail")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasColumnName("NormalizedUserName")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnName("PasswordHash")
.HasMaxLength(256);
b.Property<string>("PhoneNumber")
.HasColumnName("PhoneNumber")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("PhoneNumberConfirmed")
.HasDefaultValue(false);
b.Property<string>("SecurityStamp")
.IsRequired()
.HasColumnName("SecurityStamp")
.HasMaxLength(256);
b.Property<string>("Surname")
.HasColumnName("Surname")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("TwoFactorEnabled")
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasColumnName("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("Email");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.HasIndex("UserName");
b.ToTable("AbpUsers");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid?>("TenantId");
b.Property<Guid>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AbpUserClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("ProviderDisplayName")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(196);
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId");
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("Name")
.HasMaxLength(128);
b.Property<Guid?>("TenantId");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(64);
b.Property<string>("ProviderName")
.IsRequired()
.HasMaxLength(64);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpPermissionGrants");
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2048);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64);
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("AbpTenants");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.Property<Guid>("TenantId");
b.Property<string>("Name")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(1024);
b.HasKey("TenantId", "Name");
b.ToTable("AbpTenantConnectionStrings");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.EntityChange")
.WithMany("PropertyChanges")
.HasForeignKey("EntityChangeId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant")
.WithMany("ConnectionStrings")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}

546
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/20190402131334_Initial.cs

@ -1,546 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace DashboardDemo.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AbpAuditLogs",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
ApplicationName = table.Column<string>(maxLength: 96, nullable: true),
UserId = table.Column<Guid>(nullable: true),
UserName = table.Column<string>(maxLength: 256, nullable: true),
TenantId = table.Column<Guid>(nullable: true),
TenantName = table.Column<string>(nullable: true),
ImpersonatorUserId = table.Column<Guid>(nullable: true),
ImpersonatorTenantId = table.Column<Guid>(nullable: true),
ExecutionTime = table.Column<DateTime>(nullable: false),
ExecutionDuration = table.Column<int>(nullable: false),
ClientIpAddress = table.Column<string>(maxLength: 64, nullable: true),
ClientName = table.Column<string>(maxLength: 128, nullable: true),
ClientId = table.Column<string>(maxLength: 64, nullable: true),
CorrelationId = table.Column<string>(maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(maxLength: 512, nullable: true),
HttpMethod = table.Column<string>(maxLength: 16, nullable: true),
Url = table.Column<string>(maxLength: 256, nullable: true),
Exceptions = table.Column<string>(maxLength: 4000, nullable: true),
Comments = table.Column<string>(maxLength: 256, nullable: true),
HttpStatusCode = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpBackgroundJobs",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
JobName = table.Column<string>(maxLength: 128, nullable: false),
JobArgs = table.Column<string>(maxLength: 1048576, nullable: false),
TryCount = table.Column<short>(nullable: false, defaultValue: (short)0),
CreationTime = table.Column<DateTime>(nullable: false),
NextTryTime = table.Column<DateTime>(nullable: false),
LastTryTime = table.Column<DateTime>(nullable: true),
IsAbandoned = table.Column<bool>(nullable: false, defaultValue: false),
Priority = table.Column<byte>(nullable: false, defaultValue: (byte)15)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpClaimTypes",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false),
Name = table.Column<string>(maxLength: 256, nullable: false),
Required = table.Column<bool>(nullable: false),
IsStatic = table.Column<bool>(nullable: false),
Regex = table.Column<string>(maxLength: 512, nullable: true),
RegexDescription = table.Column<string>(maxLength: 128, nullable: true),
Description = table.Column<string>(maxLength: 256, nullable: true),
ValueType = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpPermissionGrants",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true),
Name = table.Column<string>(maxLength: 128, nullable: false),
ProviderName = table.Column<string>(maxLength: 64, nullable: false),
ProviderKey = table.Column<string>(maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpRoles",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false),
TenantId = table.Column<Guid>(nullable: true),
Name = table.Column<string>(maxLength: 256, nullable: false),
NormalizedName = table.Column<string>(maxLength: 256, nullable: false),
IsDefault = table.Column<bool>(nullable: false),
IsStatic = table.Column<bool>(nullable: false),
IsPublic = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpRoles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpSettings",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 128, nullable: false),
Value = table.Column<string>(maxLength: 2048, nullable: false),
ProviderName = table.Column<string>(maxLength: 64, nullable: true),
ProviderKey = table.Column<string>(maxLength: 64, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpSettings", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpTenants",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
Name = table.Column<string>(maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpTenants", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpUsers",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
TenantId = table.Column<Guid>(nullable: true),
UserName = table.Column<string>(maxLength: 256, nullable: false),
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: false),
Name = table.Column<string>(maxLength: 64, nullable: true),
Surname = table.Column<string>(maxLength: 64, nullable: true),
Email = table.Column<string>(maxLength: 256, nullable: true),
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
EmailConfirmed = table.Column<bool>(nullable: false, defaultValue: false),
PasswordHash = table.Column<string>(maxLength: 256, nullable: true),
SecurityStamp = table.Column<string>(maxLength: 256, nullable: false),
PhoneNumber = table.Column<string>(maxLength: 16, nullable: true),
PhoneNumberConfirmed = table.Column<bool>(nullable: false, defaultValue: false),
TwoFactorEnabled = table.Column<bool>(nullable: false, defaultValue: false),
LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
LockoutEnabled = table.Column<bool>(nullable: false, defaultValue: false),
AccessFailedCount = table.Column<int>(nullable: false, defaultValue: 0)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpAuditLogActions",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true),
AuditLogId = table.Column<Guid>(nullable: false),
ServiceName = table.Column<string>(maxLength: 256, nullable: true),
MethodName = table.Column<string>(maxLength: 128, nullable: true),
Parameters = table.Column<string>(maxLength: 2000, nullable: true),
ExecutionTime = table.Column<DateTime>(nullable: false),
ExecutionDuration = table.Column<int>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id);
table.ForeignKey(
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId",
column: x => x.AuditLogId,
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpEntityChanges",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
AuditLogId = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true),
ChangeTime = table.Column<DateTime>(nullable: false),
ChangeType = table.Column<byte>(nullable: false),
EntityTenantId = table.Column<Guid>(nullable: true),
EntityId = table.Column<string>(maxLength: 128, nullable: false),
EntityTypeFullName = table.Column<string>(maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpEntityChanges", x => x.Id);
table.ForeignKey(
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId",
column: x => x.AuditLogId,
principalTable: "AbpAuditLogs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpRoleClaims",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true),
ClaimType = table.Column<string>(maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true),
RoleId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpRoleClaims", x => x.Id);
table.ForeignKey(
name: "FK_AbpRoleClaims_AbpRoles_RoleId",
column: x => x.RoleId,
principalTable: "AbpRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpTenantConnectionStrings",
columns: table => new
{
TenantId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 64, nullable: false),
Value = table.Column<string>(maxLength: 1024, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name });
table.ForeignKey(
name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId",
column: x => x.TenantId,
principalTable: "AbpTenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserClaims",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true),
ClaimType = table.Column<string>(maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true),
UserId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserClaims", x => x.Id);
table.ForeignKey(
name: "FK_AbpUserClaims_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserLogins",
columns: table => new
{
UserId = table.Column<Guid>(nullable: false),
LoginProvider = table.Column<string>(maxLength: 64, nullable: false),
TenantId = table.Column<Guid>(nullable: true),
ProviderKey = table.Column<string>(maxLength: 196, nullable: false),
ProviderDisplayName = table.Column<string>(maxLength: 128, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider });
table.ForeignKey(
name: "FK_AbpUserLogins_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserRoles",
columns: table => new
{
UserId = table.Column<Guid>(nullable: false),
RoleId = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId });
table.ForeignKey(
name: "FK_AbpUserRoles_AbpRoles_RoleId",
column: x => x.RoleId,
principalTable: "AbpRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpUserRoles_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserTokens",
columns: table => new
{
UserId = table.Column<Guid>(nullable: false),
LoginProvider = table.Column<string>(maxLength: 64, nullable: false),
Name = table.Column<string>(maxLength: 128, nullable: false),
TenantId = table.Column<Guid>(nullable: true),
Value = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
table.ForeignKey(
name: "FK_AbpUserTokens_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpEntityPropertyChanges",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
TenantId = table.Column<Guid>(nullable: true),
EntityChangeId = table.Column<Guid>(nullable: false),
NewValue = table.Column<string>(maxLength: 512, nullable: true),
OriginalValue = table.Column<string>(maxLength: 512, nullable: true),
PropertyName = table.Column<string>(maxLength: 128, nullable: false),
PropertyTypeFullName = table.Column<string>(maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id);
table.ForeignKey(
name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId",
column: x => x.EntityChangeId,
principalTable: "AbpEntityChanges",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_AuditLogId",
table: "AbpAuditLogActions",
column: "AuditLogId");
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime",
table: "AbpAuditLogActions",
columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" });
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogs_TenantId_ExecutionTime",
table: "AbpAuditLogs",
columns: new[] { "TenantId", "ExecutionTime" });
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime",
table: "AbpAuditLogs",
columns: new[] { "TenantId", "UserId", "ExecutionTime" });
migrationBuilder.CreateIndex(
name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime",
table: "AbpBackgroundJobs",
columns: new[] { "IsAbandoned", "NextTryTime" });
migrationBuilder.CreateIndex(
name: "IX_AbpEntityChanges_AuditLogId",
table: "AbpEntityChanges",
column: "AuditLogId");
migrationBuilder.CreateIndex(
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId",
table: "AbpEntityChanges",
columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" });
migrationBuilder.CreateIndex(
name: "IX_AbpEntityPropertyChanges_EntityChangeId",
table: "AbpEntityPropertyChanges",
column: "EntityChangeId");
migrationBuilder.CreateIndex(
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey",
table: "AbpPermissionGrants",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpRoleClaims_RoleId",
table: "AbpRoleClaims",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "IX_AbpRoles_NormalizedName",
table: "AbpRoles",
column: "NormalizedName");
migrationBuilder.CreateIndex(
name: "IX_AbpSettings_Name_ProviderName_ProviderKey",
table: "AbpSettings",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpTenants_Name",
table: "AbpTenants",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_AbpUserClaims_UserId",
table: "AbpUserClaims",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_AbpUserLogins_LoginProvider_ProviderKey",
table: "AbpUserLogins",
columns: new[] { "LoginProvider", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpUserRoles_RoleId_UserId",
table: "AbpUserRoles",
columns: new[] { "RoleId", "UserId" });
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_Email",
table: "AbpUsers",
column: "Email");
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_NormalizedEmail",
table: "AbpUsers",
column: "NormalizedEmail");
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_NormalizedUserName",
table: "AbpUsers",
column: "NormalizedUserName");
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_UserName",
table: "AbpUsers",
column: "UserName");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpAuditLogActions");
migrationBuilder.DropTable(
name: "AbpBackgroundJobs");
migrationBuilder.DropTable(
name: "AbpClaimTypes");
migrationBuilder.DropTable(
name: "AbpEntityPropertyChanges");
migrationBuilder.DropTable(
name: "AbpPermissionGrants");
migrationBuilder.DropTable(
name: "AbpRoleClaims");
migrationBuilder.DropTable(
name: "AbpSettings");
migrationBuilder.DropTable(
name: "AbpTenantConnectionStrings");
migrationBuilder.DropTable(
name: "AbpUserClaims");
migrationBuilder.DropTable(
name: "AbpUserLogins");
migrationBuilder.DropTable(
name: "AbpUserRoles");
migrationBuilder.DropTable(
name: "AbpUserTokens");
migrationBuilder.DropTable(
name: "AbpEntityChanges");
migrationBuilder.DropTable(
name: "AbpTenants");
migrationBuilder.DropTable(
name: "AbpRoles");
migrationBuilder.DropTable(
name: "AbpUsers");
migrationBuilder.DropTable(
name: "AbpAuditLogs");
}
}
}

758
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore.DbMigrations/Migrations/DashboardDemoMigrationsDbContextModelSnapshot.cs

@ -1,758 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using DashboardDemo.EntityFrameworkCore;
namespace DashboardDemo.Migrations
{
[DbContext(typeof(DashboardDemoMigrationsDbContext))]
partial class DashboardDemoMigrationsDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ApplicationName")
.HasColumnName("ApplicationName")
.HasMaxLength(96);
b.Property<string>("BrowserInfo")
.HasColumnName("BrowserInfo")
.HasMaxLength(512);
b.Property<string>("ClientId")
.HasColumnName("ClientId")
.HasMaxLength(64);
b.Property<string>("ClientIpAddress")
.HasColumnName("ClientIpAddress")
.HasMaxLength(64);
b.Property<string>("ClientName")
.HasColumnName("ClientName")
.HasMaxLength(128);
b.Property<string>("Comments")
.HasColumnName("Comments")
.HasMaxLength(256);
b.Property<string>("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasColumnName("CorrelationId")
.HasMaxLength(64);
b.Property<string>("Exceptions")
.HasColumnName("Exceptions")
.HasMaxLength(4000);
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("HttpMethod")
.HasColumnName("HttpMethod")
.HasMaxLength(16);
b.Property<int?>("HttpStatusCode")
.HasColumnName("HttpStatusCode");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnName("ImpersonatorTenantId");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnName("ImpersonatorUserId");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.Property<string>("TenantName");
b.Property<string>("Url")
.HasColumnName("Url")
.HasMaxLength(256);
b.Property<Guid?>("UserId")
.HasColumnName("UserId");
b.Property<string>("UserName")
.HasColumnName("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("TenantId", "ExecutionTime");
b.HasIndex("TenantId", "UserId", "ExecutionTime");
b.ToTable("AbpAuditLogs");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("MethodName")
.HasColumnName("MethodName")
.HasMaxLength(128);
b.Property<string>("Parameters")
.HasColumnName("Parameters")
.HasMaxLength(2000);
b.Property<string>("ServiceName")
.HasColumnName("ServiceName")
.HasMaxLength(256);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
.HasColumnName("ChangeType");
b.Property<string>("EntityId")
.IsRequired()
.HasColumnName("EntityId")
.HasMaxLength(128);
b.Property<Guid?>("EntityTenantId");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasColumnName("EntityTypeFullName")
.HasMaxLength(128);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("EntityChangeId");
b.Property<string>("NewValue")
.HasColumnName("NewValue")
.HasMaxLength(512);
b.Property<string>("OriginalValue")
.HasColumnName("OriginalValue")
.HasMaxLength(512);
b.Property<string>("PropertyName")
.IsRequired()
.HasColumnName("PropertyName")
.HasMaxLength(128);
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasColumnName("PropertyTypeFullName")
.HasMaxLength(64);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges");
});
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsAbandoned")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<string>("JobArgs")
.IsRequired()
.HasMaxLength(1048576);
b.Property<string>("JobName")
.IsRequired()
.HasMaxLength(128);
b.Property<DateTime?>("LastTryTime");
b.Property<DateTime>("NextTryTime");
b.Property<byte>("Priority")
.ValueGeneratedOnAdd()
.HasDefaultValue((byte)15);
b.Property<short>("TryCount")
.ValueGeneratedOnAdd()
.HasDefaultValue((short)0);
b.HasKey("Id");
b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("Description")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("Regex")
.HasMaxLength(512);
b.Property<string>("RegexDescription")
.HasMaxLength(128);
b.Property<bool>("Required");
b.Property<int>("ValueType");
b.HasKey("Id");
b.ToTable("AbpClaimTypes");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDefault")
.HasColumnName("IsDefault");
b.Property<bool>("IsPublic")
.HasColumnName("IsPublic");
b.Property<bool>("IsStatic")
.HasColumnName("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasMaxLength(256);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasColumnName("AccessFailedCount")
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("Email")
.HasColumnName("Email")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("EmailConfirmed")
.HasDefaultValue(false);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("LockoutEnabled")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("Name")
.HasColumnName("Name")
.HasMaxLength(64);
b.Property<string>("NormalizedEmail")
.HasColumnName("NormalizedEmail")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasColumnName("NormalizedUserName")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnName("PasswordHash")
.HasMaxLength(256);
b.Property<string>("PhoneNumber")
.HasColumnName("PhoneNumber")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("PhoneNumberConfirmed")
.HasDefaultValue(false);
b.Property<string>("SecurityStamp")
.IsRequired()
.HasColumnName("SecurityStamp")
.HasMaxLength(256);
b.Property<string>("Surname")
.HasColumnName("Surname")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("TwoFactorEnabled")
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasColumnName("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("Email");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.HasIndex("UserName");
b.ToTable("AbpUsers");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid?>("TenantId");
b.Property<Guid>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AbpUserClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("ProviderDisplayName")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(196);
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId");
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("Name")
.HasMaxLength(128);
b.Property<Guid?>("TenantId");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(64);
b.Property<string>("ProviderName")
.IsRequired()
.HasMaxLength(64);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpPermissionGrants");
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2048);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64);
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("AbpTenants");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.Property<Guid>("TenantId");
b.Property<string>("Name")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(1024);
b.HasKey("TenantId", "Name");
b.ToTable("AbpTenantConnectionStrings");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.EntityChange")
.WithMany("PropertyChanges")
.HasForeignKey("EntityChangeId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant")
.WithMany("ConnectionStrings")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}

22
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore/DashboardDemo.EntityFrameworkCore.csproj

@ -1,22 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</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\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>

45
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore/EntityFrameworkCore/DashboardDemoDbContext.cs

@ -1,45 +0,0 @@
using Microsoft.EntityFrameworkCore;
using DashboardDemo.Users;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.Users.EntityFrameworkCore;
namespace DashboardDemo.EntityFrameworkCore
{
[ConnectionStringName("Default")]
public class DashboardDemoDbContext : AbpDbContext<DashboardDemoDbContext>
{
public DbSet<AppUser> Users { get; set; }
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("AbpUsers"); //Sharing the same table "AbpUsers" with the IdentityUser
b.ConfigureFullAudited();
b.ConfigureExtraProperties();
b.ConfigureConcurrencyStamp();
b.ConfigureAbpUser();
//Moved customization to a method so we can share it with the DashboardDemoMigrationsDbContext class
b.ConfigureCustomUserProperties();
});
/* Configure your own tables/entities inside the ConfigureDashboardDemo method */
builder.ConfigureDashboardDemo();
}
}
}

30
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore/EntityFrameworkCore/DashboardDemoDbContextModelCreatingExtensions.cs

@ -1,30 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Volo.Abp;
using Volo.Abp.Users;
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);
// //...
//});
}
public static void ConfigureCustomUserProperties<TUser>(this EntityTypeBuilder<TUser> b)
where TUser: class, IUser
{
//b.Property<string>(nameof(AppUser.MyProperty))...
}
}
}

36
samples/DashboardDemo-old/src/DashboardDemo.EntityFrameworkCore/EntityFrameworkCore/DashboardDemoEntityFrameworkCoreModule.cs

@ -1,36 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity.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(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(BackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule)
)]
public class DashboardDemoEntityFrameworkCoreModule : AbpModule
{
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);
});
}
}
}

11
samples/DashboardDemo-old/src/DashboardDemo.Web/Branding/DashboardDemoBrandingProvider.cs

@ -1,11 +0,0 @@
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components;
using Volo.Abp.DependencyInjection;
namespace DashboardDemo.Branding
{
[Dependency(ReplaceServices = true)]
public class DashboardDemoBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "DashboardDemo";
}
}

43
samples/DashboardDemo-old/src/DashboardDemo.Web/DashboardDemo.Web.csproj

@ -1,43 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<RootNamespace>DashboardDemo</RootNamespace>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DashboardDemo.Application\DashboardDemo.Application.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.AspNetCore.Mvc.UI.Dashboards\Volo.Abp.AspNetCore.Mvc.UI.Dashboards.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web\Volo.Abp.Account.Web.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>

12
samples/DashboardDemo-old/src/DashboardDemo.Web/DashboardDemoWebAutoMapperProfile.cs

@ -1,12 +0,0 @@
using AutoMapper;
namespace DashboardDemo
{
public class DashboardDemoWebAutoMapperProfile : Profile
{
public DashboardDemoWebAutoMapperProfile()
{
//Configure your AutoMapper mapping configuration here...
}
}
}

257
samples/DashboardDemo-old/src/DashboardDemo.Web/DashboardDemoWebModule.cs

@ -1,257 +0,0 @@
using System.IO;
using System.Linq;
using DashboardDemo.Dashboards;
using Localization.Resources.AbpUi;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using DashboardDemo.EntityFrameworkCore;
using DashboardDemo.GlobalFilters;
using DashboardDemo.Localization.DashboardDemo;
using DashboardDemo.Menus;
using DashboardDemo.Pages;
using DashboardDemo.Pages.widgets;
using DashboardDemo.Permissions;
using DashboardDemo.Widgets;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
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.Dashboards;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Data;
using Volo.Abp.Identity;
using Volo.Abp.Identity.Web;
using Volo.Abp.Localization;
using Volo.Abp.Localization.Resources.AbpValidation;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.Web;
using Volo.Abp.Threading;
using Volo.Abp.UI;
using Volo.Abp.UI.Navigation;
using Volo.Abp.VirtualFileSystem;
using Volo.Abp.PermissionManagement;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.TenantManagement.Web;
namespace DashboardDemo
{
[DependsOn(
typeof(DashboardDemoApplicationModule),
typeof(DashboardDemoEntityFrameworkCoreModule),
typeof(AbpAutofacModule),
typeof(AbpIdentityWebModule),
typeof(AbpAccountWebModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAspNetCoreMvcUiDashboardsModule),
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(DashboardDemoApplicationModule).Assembly,
typeof(DashboardDemoWebModule).Assembly
);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureWidgets();
ConfigureGlobalFilters();
ConfigureDashboards();
ConfigureDatabaseServices();
ConfigureAutoMapper();
ConfigureVirtualFileSystem(hostingEnvironment);
ConfigureLocalizationServices();
ConfigureNavigationServices();
ConfigureAutoApiControllers();
ConfigureSwaggerServices(context.Services);
}
private void ConfigureWidgets()
{
Configure<WidgetOptions>(options =>
{
options.Widgets.AddRange(WidgetDefinitionProvider.GetDefinitions());
});
}
private void ConfigureGlobalFilters()
{
Configure<GlobalFilterOptions>(options =>
{
options.GlobalFilters.AddRange(GlobalFilterDefinitionProvider.GetDefinitions());
});
}
private void ConfigureDashboards()
{
Configure<DashboardOptions>(options =>
{
options.Dashboards.AddRange(DashboardDefinitionProvider.GetDefinitions());
});
Configure<BundlingOptions>(options =>
{
options.ScriptBundles.Add(DashboardNames.MyDashboard, configuration =>
{
configuration.AddContributors(typeof(MyDashboardScriptBundleContributor));
});
options.ScriptBundles.Add(UserCountWidgetViewComponent.Name, configuration =>
{
configuration.AddContributors(typeof(UserCountWidgetScriptBundleContributor));
});
options.StyleBundles.Add(DashboardNames.MyDashboard, configuration =>
{
configuration.AddContributors(typeof(MyDashboardStyleBundleContributor));
});
options.StyleBundles.Add(UserCountWidgetViewComponent.Name, configuration =>
{
configuration.AddContributors(typeof(UserCountWidgetStyleBundleContributor));
});
});
}
private void ConfigureDatabaseServices()
{
Configure<AbpDbContextOptions>(options =>
{
options.UseSqlServer();
});
}
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<DashboardDemoWebAutoMapperProfile>();
});
}
private void ConfigureVirtualFileSystem(IHostingEnvironment hostingEnvironment)
{
if (hostingEnvironment.IsDevelopment())
{
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<DashboardDemoDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Domain", Path.DirectorySeparatorChar)));
});
}
}
private void ConfigureLocalizationServices()
{
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<DashboardDemoResource>()
.AddBaseTypes(
typeof(AbpValidationResource),
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<NavigationOptions>(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 Info { 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.UseAuthentication();
if (DashboardDemoConsts.IsMultiTenancyEnabled)
{
app.UseMultiTenancy();
}
app.UseAbpRequestLocalization();
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "DashboardDemo API");
});
app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea();
SeedDatabase(context);
}
private static void SeedDatabase(ApplicationInitializationContext context)
{
using (var scope = context.ServiceProvider.CreateScope())
{
AsyncHelper.RunSync(async () =>
{
await scope.ServiceProvider
.GetRequiredService<IDataSeeder>()
.SeedAsync();
});
}
}
}
}

29
samples/DashboardDemo-old/src/DashboardDemo.Web/Dashboards/DashboardDefinitionProvider.cs

@ -1,29 +0,0 @@
using System.Collections.Generic;
using DashboardDemo.Localization.DashboardDemo;
using DashboardDemo.Pages.widgets;
using DashboardDemo.Pages.widgets.Filters;
using Volo.Abp.AspNetCore.Mvc.UI.Dashboards;
using Volo.Abp.Localization;
namespace DashboardDemo.Dashboards
{
public static class DashboardDefinitionProvider
{
public static List<DashboardDefinition> GetDefinitions()
{
var myDashboard = new DashboardDefinition(
DashboardNames.MyDashboard,
LocalizableString.Create<DashboardDemoResource>("MyDashboard")
)
.WithWidget(UserCountWidgetViewComponent.Name)
.WithWidget(MonthlyProfitWidgetViewComponent.Name)
.WithWidget(RoleListWidgetViewComponent.Name)
.WithGlobalFilter(DateRangeGlobalFilterViewComponent.Name);
return new List<DashboardDefinition>
{
myDashboard
};
}
}
}

14
samples/DashboardDemo-old/src/DashboardDemo.Web/Dashboards/DashboardNames.cs

@ -1,14 +0,0 @@
using Volo.Abp.Reflection;
namespace DashboardDemo.Dashboards
{
public static class DashboardNames
{
public const string MyDashboard = "MyDashboard";
public static string[] GetAll()
{
return ReflectionHelper.GetPublicConstantsRecursively(typeof(DashboardNames));
}
}
}

29
samples/DashboardDemo-old/src/DashboardDemo.Web/GlobalFilters/GlobalFilterDefinitionProvider.cs

@ -1,29 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DashboardDemo.Localization.DashboardDemo;
using DashboardDemo.Pages.widgets;
using DashboardDemo.Pages.widgets.Filters;
using Volo.Abp.AspNetCore.Mvc.UI.Dashboards;
using Volo.Abp.Localization;
namespace DashboardDemo.GlobalFilters
{
public static class GlobalFilterDefinitionProvider
{
public static List<GlobalFilterDefinition> GetDefinitions()
{
var dateRangeFilter = new GlobalFilterDefinition(
DateRangeGlobalFilterViewComponent.Name,
LocalizableString.Create<DashboardDemoResource>("DateRangeFilter"),
typeof(DateRangeGlobalFilterViewComponent)
);
return new List<GlobalFilterDefinition>
{
dateRangeFilter
};
}
}
}

33
samples/DashboardDemo-old/src/DashboardDemo.Web/Menus/DashboardDemoMenuContributor.cs

@ -1,33 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using DashboardDemo.Localization.DashboardDemo;
using Volo.Abp.TenantManagement.Web.Navigation;
using Volo.Abp.UI.Navigation;
namespace DashboardDemo.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 (!DashboardDemoConsts.IsMultiTenancyEnabled)
{
ApplicationMenuItem 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"], "/"));
}
}
}

13
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/DashboardDemoPageBase.cs

@ -1,13 +0,0 @@
using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.AspNetCore.Mvc.Razor.Internal;
using DashboardDemo.Localization.DashboardDemo;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace DashboardDemo.Pages
{
public abstract class DashboardDemoPageBase : AbpPage
{
[RazorInject]
public IHtmlLocalizer<DashboardDemoResource> L { get; set; }
}
}

13
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/DashboardDemoPageModelBase.cs

@ -1,13 +0,0 @@
using DashboardDemo.Localization.DashboardDemo;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace DashboardDemo.Pages
{
public abstract class DashboardDemoPageModelBase : AbpPageModel
{
protected DashboardDemoPageModelBase()
{
LocalizationResourceType = typeof(DashboardDemoResource);
}
}
}

30
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/Index.cshtml

@ -1,30 +0,0 @@
@page
@inject IOptions<DashboardOptions> OptionsDashboadOptions
@inject IStringLocalizerFactory localizer
@using Microsoft.Extensions.Options
@using Volo.Abp.AspNetCore.Mvc.UI.Dashboards
@using DashboardDemo.Pages
@using DashboardDemo.Pages.widgets
@using DashboardDemo.Widgets
@using Microsoft.Extensions.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Widgets
@inherits DashboardDemoPageBase
@inject IWidgetRenderer WidgetRenderer
@model IndexModel
@section styles {
<link href="~/pages/index.css" rel="stylesheet" />
<abp-style-bundle name="@UserCountWidgetViewComponent.Name" />
}
@section scripts {
<abp-script-bundle name="@UserCountWidgetViewComponent.Name" />
}
<abp-card>
<abp-card-header>@L["Welcome"]</abp-card-header>
<abp-card-body>
@await WidgetRenderer.RenderAsync(Component, UserCountWidgetViewComponent.Name)
</abp-card-body>
</abp-card>
@foreach (var dashboard in OptionsDashboadOptions.Value.Dashboards)
{
<a href="/@dashboard.Name">Go to @dashboard.DisplayName.Localize(localizer)</a>
}

10
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/Index.cshtml.cs

@ -1,10 +0,0 @@
namespace DashboardDemo.Pages
{
public class IndexModel : DashboardDemoPageModelBase
{
public void OnGet()
{
}
}
}

22
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/MyDashboard.cshtml

@ -1,22 +0,0 @@
@page
@using DashboardDemo.Dashboards
@using Microsoft.Extensions.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Dashboards
@using Volo.Abp.AspNetCore.Mvc.UI.Widgets
@inject IWidgetRenderer WidgetRenderer
@inject IDashboardRenderer DashboardRenderer
@inject IStringLocalizerFactory localizer
@model DashboardDemo.Pages.MyDashboardModel
@{
}
@section styles {
<abp-style-bundle name="@DashboardNames.MyDashboard" />
}
@section scripts {
<abp-script-bundle name="@DashboardNames.MyDashboard" />
}
<abp-card-body style="background: rgb(240,240,240)" class="p-4">
@await DashboardRenderer.RenderAsync(Component, new { dashboardName = DashboardNames.MyDashboard })
</abp-card-body>

13
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/MyDashboard.cshtml.cs

@ -1,13 +0,0 @@
using System.Linq;
using DashboardDemo.Dashboards;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc.UI.Dashboards;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
namespace DashboardDemo.Pages
{
public class MyDashboardModel : DashboardDemoPageModelBase
{
}
}

23
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/MyDashboardScriptBundleContributor.cs

@ -1,23 +0,0 @@
using DashboardDemo.Pages.widgets;
using DashboardDemo.Pages.widgets.Filters;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Dashboards;
using Volo.Abp.Modularity;
namespace DashboardDemo.Pages
{
[DependsOn(
typeof(AbpBasicDashboardScriptContributor),
typeof(UserCountWidgetScriptBundleContributor),
typeof(MonthlyProfitWidgetScriptBundleContributor),
typeof(RoleListWidgetScriptContributor),
typeof(DateRangeGlobalFilterScriptContributor)
)]
public class MyDashboardScriptBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
}
}
}

21
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/MyDashboardStyleBundleContributor.cs

@ -1,21 +0,0 @@
using DashboardDemo.Pages.widgets;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Dashboards;
using Volo.Abp.Modularity;
namespace DashboardDemo.Pages
{
[DependsOn(
typeof(AbpBasicDashboardStyleContributor),
typeof(UserCountWidgetStyleBundleContributor),
typeof(MonthlyProfitWidgetStyleBundleContributor),
typeof(RoleListWidgetStyleContributor)
)]
public class MyDashboardStyleBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
}
}
}

4
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/_ViewImports.cshtml

@ -1,4 +0,0 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

12
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Chartjs/ChartjsScriptContributor.cs

@ -1,12 +0,0 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace DashboardDemo.Pages.widgets.Chartjs
{
public class ChartjsScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/chart.js/Chart.js");
}
}
}

15
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Chartjs/ChartjsStyleContributor.cs

@ -1,15 +0,0 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Clipboard;
using Volo.Abp.Modularity;
namespace DashboardDemo.Pages.widgets.Chartjs
{
public class ChartjsStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/libs/chart.js/Chart.css");
}
}
}

6
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilter.js

@ -1,6 +0,0 @@
(function ($) {
var $container = $('#DateRangeGlobalFilterContainer');
if ($container.length > 0) {
}
})(jQuery);

12
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterScriptContributor.cs

@ -1,12 +0,0 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace DashboardDemo.Pages.widgets.Filters
{
public class DateRangeGlobalFilterScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/Pages/widgets/Filters/DateRangeGlobalFilter.js");
}
}
}

19
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml

@ -1,19 +0,0 @@
@inject IHtmlLocalizer<DashboardDemoResource> L
@using DashboardDemo.Localization.DashboardDemo
@using Microsoft.AspNetCore.Mvc.Localization
@model DashboardDemo.Pages.widgets.Filters.DateRangeGlobalFilterViewComponent
@{
}
<div id="DateRangeGlobalFilterContainer">
<div class="row">
<div class="col-md-6 mb-3">
<label for="DateFilterStartDateInput">@L["Start Date"].Value</label>
<input class="form-control" type="date" name="StartDate" id="DateFilterStartDateInput">
</div>
<div class="col-md-6 mb-3">
<label for="DateFilterEndDateInput">@L["End Date"].Value</label>
<input class="form-control" type="date" name="EndDate" id="EndDateStartDateInput">
</div>
</div>
</div>

17
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml.cs

@ -1,17 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace DashboardDemo.Pages.widgets.Filters
{
[ViewComponent]
public class DateRangeGlobalFilterViewComponent : ViewComponent
{
public const string Name = "DateRangeGlobalFilter";
public const string DisplayName = "Date Range Filter";
public IViewComponentResult Invoke()
{
return View("/Pages/widgets/Filters/DateRangeGlobalFilterViewComponent.cshtml", new DateRangeGlobalFilterViewComponent());
}
}
}

3
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidget.css

@ -1,3 +0,0 @@
body {
margin: 0;
}

48
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidget.js

@ -1,48 +0,0 @@
(function ($) {
var $container = $('#MonthlyProfitWidgetContainer');
if ($container.length > 0) {
var chart = {};
var createChart = function () {
dashboardDemo.demoStatistic.getMonthlyProfitStatistic({}).then(function (result) {
chart = new Chart($container.find('#MonthlyProfitStatistics'), {
type: 'line',
data: {
labels: result.labels,
datasets: [{
label: 'Monthly Profit',
data: result.data,
backgroundColor: 'rgba(255, 255, 132, 0.2)'
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
});
};
$(document).on('RefreshWidgets',
function (event, filters) {
dashboardDemo.demoStatistic.getMonthlyProfitStatistic({ startDate: filters.startDate, endDate: filters.endDate }).then(function (result) {
chart.data = {
labels: result.labels,
datasets: [{
label: 'Monthly Profit',
data: result.data,
backgroundColor: 'rgba(255, 255, 132, 0.2)'
}]
},
chart.update();
});
});
createChart();
}
})(jQuery);

19
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetScriptBundleContributor.cs

@ -1,19 +0,0 @@
using DashboardDemo.Pages.widgets.Chartjs;
using DashboardDemo.Pages.widgets.Filters;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Clipboard;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery;
using Volo.Abp.Modularity;
namespace DashboardDemo.Pages.widgets
{
[DependsOn(typeof(JQueryScriptContributor))]
[DependsOn(typeof(ChartjsScriptContributor))]
public class MonthlyProfitWidgetScriptBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidget.js");
}
}
}

19
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetStyleBundleContributor.cs

@ -1,19 +0,0 @@
using DashboardDemo.Pages.widgets.Chartjs;
using DashboardDemo.Pages.widgets.Filters;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.HighlightJs;
using Volo.Abp.Modularity;
namespace DashboardDemo.Pages.widgets
{
[DependsOn(typeof(BootstrapStyleContributor))]
[DependsOn(typeof(ChartjsStyleContributor))]
public class MonthlyProfitWidgetStyleBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidget.css");
}
}
}

16
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetViewComponent.cshtml

@ -1,16 +0,0 @@
@inject IHtmlLocalizer<DashboardDemoResource> L
@using DashboardDemo.Localization.DashboardDemo
@using Microsoft.AspNetCore.Mvc.Localization
@model DashboardDemo.Pages.widgets.MonthlyProfitWidgetViewComponent
@{
}
<div id="MonthlyProfitWidgetContainer">
<abp-card background="Light">
<abp-card-header background="Info">@L["Monthly Profit"]</abp-card-header>
<abp-card-body>
<div class="row margin-bottom-5">
<canvas id="MonthlyProfitStatistics"></canvas>
</div>
</abp-card-body>
</abp-card>
</div>

17
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetViewComponent.cshtml.cs

@ -1,17 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace DashboardDemo.Pages.widgets
{
public class MonthlyProfitWidgetViewComponent : AbpViewComponent
{
public const string Name = "MonthlyProfitWidget";
public const string DisplayName = "Monthly Profit Widget";
public IViewComponentResult Invoke()
{
return View("/Pages/widgets/MonthlyProfitWidget/MonthlyProfitWidgetViewComponent.cshtml", new MonthlyProfitWidgetViewComponent());
}
}
}

3
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidget.css

@ -1,3 +0,0 @@
body {
margin: 0;
}

15
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidget.js

@ -1,15 +0,0 @@
(function ($) {
var $container = $('#RoleListWidgetContainer');
if ($container.length > 0) {
var _identityUserAppService = volo.abp.identity.identityRole;
_identityUserAppService.getList({}).then(function (result) {
var html = '';
for (var i = 0; i < result.items.length; i++) {
html += '<li>' + result.items[i].name + '</li>';
}
$container.find('#RoleList').html(html);
});
}
})(jQuery);

15
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidgetScriptContributor.cs

@ -1,15 +0,0 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Clipboard;
using Volo.Abp.Modularity;
namespace DashboardDemo.Pages.widgets
{
[DependsOn(typeof(ClipboardScriptBundleContributor))]
public class RoleListWidgetScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/Pages/widgets/RoleListWidget/RoleListWidget.js");
}
}
}

12
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidgetStyleContributor.cs

@ -1,12 +0,0 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace DashboardDemo.Pages.widgets
{
public class RoleListWidgetStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/Pages/widgets/RoleListWidget/RoleListWidget.css");
}
}
}

17
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidgetViewComponent.cshtml

@ -1,17 +0,0 @@
@inject IHtmlLocalizer<DashboardDemoResource> L
@using DashboardDemo.Localization.DashboardDemo
@using Microsoft.AspNetCore.Mvc.Localization
@model DashboardDemo.Pages.widgets.RoleListWidgetViewComponent
@{
}
<div id="RoleListWidgetContainer">
<abp-card background="Light">
<abp-card-header background="Warning"> @L["RolesInApplication"] :</abp-card-header>
<abp-card-body>
<ul id="RoleList">
</ul>
</abp-card-body>
</abp-card>
</div>

17
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/RoleListWidget/RoleListWidgetViewComponent.cshtml.cs

@ -1,17 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace DashboardDemo.Pages.widgets
{
[ViewComponent]
public class RoleListWidgetViewComponent : ViewComponent
{
public const string Name = "RoleListWidget";
public const string DisplayName = "RoleListWidgets";
public IViewComponentResult Invoke()
{
return View("/Pages/widgets/RoleListWidget/RoleListWidgetViewComponent.cshtml", new RoleListWidgetViewComponent());
}
}
}

3
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidget.css

@ -1,3 +0,0 @@
body {
margin: 0;
}

48
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidget.js

@ -1,48 +0,0 @@
(function ($) {
var $container = $('#UserCountWidgetContainer');
if ($container.length > 0) {
var chart = {};
var createChart = function () {
dashboardDemo.demoStatistic.getMonthlyUserStatistic({}).then(function (result) {
chart = new Chart($container.find('#UserStatistics'), {
type: 'bar',
data: {
labels: result.labels,
datasets: [{
label: 'Monthly user count',
data: result.data,
backgroundColor: 'rgba(255, 99, 132, 0.2)'
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
});
};
$(document).on('RefreshWidgets',
function (event, filters) {
dashboardDemo.demoStatistic.getMonthlyUserStatistic({ startDate: filters.startDate, endDate: filters.endDate }).then(function (result) {
chart.data= {
labels: result.labels,
datasets: [{
label: 'Monthly user count',
data: result.data,
backgroundColor: 'rgba(255, 99, 132, 0.2)'
}]
},
chart.update();
});
});
createChart();
}
})(jQuery);

20
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidgetScriptBundleContributor.cs

@ -1,20 +0,0 @@
using DashboardDemo.Pages.widgets.Chartjs;
using DashboardDemo.Pages.widgets.Filters;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Clipboard;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery;
using Volo.Abp.Modularity;
namespace DashboardDemo.Pages.widgets
{
[DependsOn(typeof(JQueryScriptContributor))]
[DependsOn(typeof(ClipboardScriptBundleContributor))]
[DependsOn(typeof(ChartjsScriptContributor))]
public class UserCountWidgetScriptBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/Pages/widgets/UserCountWidget/UserCountWidget.js");
}
}
}

20
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidgetStyleBundleContributor.cs

@ -1,20 +0,0 @@
using DashboardDemo.Pages.widgets.Chartjs;
using DashboardDemo.Pages.widgets.Filters;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.HighlightJs;
using Volo.Abp.Modularity;
namespace DashboardDemo.Pages.widgets
{
[DependsOn(typeof(BootstrapStyleContributor))]
[DependsOn(typeof(HighlightJsStyleContributor))]
[DependsOn(typeof(ChartjsStyleContributor))]
public class UserCountWidgetStyleBundleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.Add("/Pages/widgets/UserCountWidget/UserCountWidget.css");
}
}
}

16
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidgetViewComponent.cshtml

@ -1,16 +0,0 @@
@inject IHtmlLocalizer<DashboardDemoResource> L
@using DashboardDemo.Localization.DashboardDemo
@using Microsoft.AspNetCore.Mvc.Localization
@model DashboardDemo.Pages.widgets.UserCountWidgetViewComponent
@{
}
<div id="UserCountWidgetContainer">
<abp-card background="Light">
<abp-card-header background="Info">@L["UserCount"]</abp-card-header>
<abp-card-body>
<div class="row margin-bottom-5">
<canvas id="UserStatistics"></canvas>
</div>
</abp-card-body>
</abp-card>
</div>

17
samples/DashboardDemo-old/src/DashboardDemo.Web/Pages/widgets/UserCountWidget/UserCountWidgetViewComponent.cshtml.cs

@ -1,17 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace DashboardDemo.Pages.widgets
{
public class UserCountWidgetViewComponent : AbpViewComponent
{
public const string Name = "UserCountWidget";
public const string DisplayName = "UserCountWidgett";
public IViewComponentResult Invoke()
{
return View("/Pages/widgets/UserCountWidget/UserCountWidgetViewComponent.cshtml", new UserCountWidgetViewComponent());
}
}
}

50
samples/DashboardDemo-old/src/DashboardDemo.Web/Program.cs

@ -1,50 +0,0 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.InProcess;
using Serilog;
using Serilog.Events;
namespace DashboardDemo
{
public class Program
{
public static int Main(string[] args)
{
CurrentDirectoryHelpers.SetCurrentDirectory();
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug() //TODO: Should be configurable!
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.Enrich.FromLogContext()
.WriteTo.File("Logs/logs.txt")
.CreateLogger();
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Run();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
}
}

27
samples/DashboardDemo-old/src/DashboardDemo.Web/Properties/launchSettings.json

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

26
samples/DashboardDemo-old/src/DashboardDemo.Web/Startup.cs

@ -1,26 +0,0 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Volo.Abp;
namespace DashboardDemo
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddApplication<DashboardDemoWebModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
}
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}
}
}

3
samples/DashboardDemo-old/src/DashboardDemo.Web/Views/_ViewImports.cshtml

@ -1,3 +0,0 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap

46
samples/DashboardDemo-old/src/DashboardDemo.Web/Widgets/WidgetDefinitionProvider.cs

@ -1,46 +0,0 @@
using System.Collections.Generic;
using DashboardDemo.Localization.DashboardDemo;
using DashboardDemo.Pages.widgets;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
namespace DashboardDemo.Widgets
{
public static class WidgetDefinitionProvider
{
public static List<WidgetDefinition> GetDefinitions()
{
var userCountWidget = new WidgetDefinition(
UserCountWidgetViewComponent.Name,
LocalizableString.Create<DashboardDemoResource>(UserCountWidgetViewComponent.DisplayName),
typeof(UserCountWidgetViewComponent)
)
.SetDefaultDimension(6, 4)
.AddRequiredPermission(IdentityPermissions.Users.Default);
var monthlyProfitWidget = new WidgetDefinition(
MonthlyProfitWidgetViewComponent.Name,
LocalizableString.Create<DashboardDemoResource>(MonthlyProfitWidgetViewComponent.DisplayName),
typeof(MonthlyProfitWidgetViewComponent)
)
.SetDefaultDimension(6, 4)
.AddRequiredPermission(IdentityPermissions.Users.Default);
var roleListWidget = new WidgetDefinition(
RoleListWidgetViewComponent.Name,
LocalizableString.Create<DashboardDemoResource>(RoleListWidgetViewComponent.DisplayName),
typeof(RoleListWidgetViewComponent)
)
.SetDefaultDimension(6, 3)
.AddRequiredPermission(IdentityPermissions.Roles.Default);
return new List<WidgetDefinition>
{
userCountWidget,
monthlyProfitWidget,
roleListWidget
};
}
}
}

5
samples/DashboardDemo-old/src/DashboardDemo.Web/abp.resourcemapping.js

@ -1,5 +0,0 @@
module.exports = {
mappings: {
"@node_modules/chart.js/dist/*.*": "@libs/chart.js/"
}
};

5
samples/DashboardDemo-old/src/DashboardDemo.Web/appsettings.json

@ -1,5 +0,0 @@
{
"ConnectionStrings": {
"Default": "Server=localhost;Database=DashboardDemo;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}

6
samples/DashboardDemo-old/src/DashboardDemo.Web/compilerconfig.json

@ -1,6 +0,0 @@
[
{
"outputFile": "wwwroot/pages/index.css",
"inputFile": "wwwroot/pages/index.scss"
}
]

49
samples/DashboardDemo-old/src/DashboardDemo.Web/compilerconfig.json.defaults

@ -1,49 +0,0 @@
{
"compilers": {
"less": {
"autoPrefix": "",
"cssComb": "none",
"ieCompat": true,
"strictMath": false,
"strictUnits": false,
"relativeUrls": true,
"rootPath": "",
"sourceMapRoot": "",
"sourceMapBasePath": "",
"sourceMap": false
},
"sass": {
"includePath": "",
"indentType": "space",
"indentWidth": 2,
"outputStyle": "nested",
"Precision": 5,
"relativeUrls": true,
"sourceMapRoot": "",
"sourceMap": false
},
"stylus": {
"sourceMap": false
},
"babel": {
"sourceMap": false
},
"coffeescript": {
"bare": false,
"runtimeMode": "node",
"sourceMap": false
}
},
"minifiers": {
"css": {
"enabled": true,
"termSemicolons": true,
"gzip": false
},
"javascript": {
"enabled": true,
"termSemicolons": true,
"gzip": false
}
}
}

9
samples/DashboardDemo-old/src/DashboardDemo.Web/gulpfile.js

@ -1,9 +0,0 @@
"use strict";
var gulp = require("gulp"),
path = require('path'),
copyResources = require('./node_modules/@abp/aspnetcore.mvc.ui/gulp/copy-resources.js');
exports.default = function(){
return copyResources(path.resolve('./'));
};

2390
samples/DashboardDemo-old/src/DashboardDemo.Web/package-lock.json

File diff suppressed because it is too large

9
samples/DashboardDemo-old/src/DashboardDemo.Web/package.json

@ -1,9 +0,0 @@
{
"version": "0.1.0",
"name": "DashboardDemo",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^0.6.6",
"chart.js": "^2.8.0"
}
}

56
samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/abp/core/abp.css

@ -1,56 +0,0 @@
@keyframes spin {
0% {
transform: translateZ(0) rotate(0deg);
}
100% {
transform: translateZ(0) rotate(360deg);
}
}
.abp-block-area {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999999;
background-color: #fff;
opacity: .8;
transition: opacity .25s;
}
.abp-block-area.abp-block-area-disappearing {
opacity: 0;
}
.abp-block-area.abp-block-area-busy:after {
content: attr(data-text);
display: block;
max-width: 125px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 20px;
font-family: sans-serif;
color: #343a40;
text-align: center;
text-transform: uppercase;
}
.abp-block-area.abp-block-area-busy:before {
content: "";
display: block;
width: 150px;
height: 150px;
border-radius: 50%;
border-width: 2px;
border-style: solid;
border-color: transparent #228ae6 #228ae6 #228ae6;
position: absolute;
top: calc(50% - 75px);
left: calc(50% - 75px);
will-change: transform;
animation: spin .75s infinite ease-in-out;
}

636
samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/abp/core/abp.js

@ -1,636 +0,0 @@
var abp = abp || {};
(function () {
/* Application paths *****************************************/
//Current application root path (including virtual directory if exists).
abp.appPath = abp.appPath || '/';
abp.pageLoadTime = new Date();
//Converts given path to absolute path using abp.appPath variable.
abp.toAbsAppPath = function (path) {
if (path.indexOf('/') == 0) {
path = path.substring(1);
}
return abp.appPath + path;
};
/* LOGGING ***************************************************/
//Implements Logging API that provides secure & controlled usage of console.log
abp.log = abp.log || {};
abp.log.levels = {
DEBUG: 1,
INFO: 2,
WARN: 3,
ERROR: 4,
FATAL: 5
};
abp.log.level = abp.log.levels.DEBUG;
abp.log.log = function (logObject, logLevel) {
if (!window.console || !window.console.log) {
return;
}
if (logLevel != undefined && logLevel < abp.log.level) {
return;
}
console.log(logObject);
};
abp.log.debug = function (logObject) {
abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
abp.log.log(logObject, abp.log.levels.DEBUG);
};
abp.log.info = function (logObject) {
abp.log.log("INFO: ", abp.log.levels.INFO);
abp.log.log(logObject, abp.log.levels.INFO);
};
abp.log.warn = function (logObject) {
abp.log.log("WARN: ", abp.log.levels.WARN);
abp.log.log(logObject, abp.log.levels.WARN);
};
abp.log.error = function (logObject) {
abp.log.log("ERROR: ", abp.log.levels.ERROR);
abp.log.log(logObject, abp.log.levels.ERROR);
};
abp.log.fatal = function (logObject) {
abp.log.log("FATAL: ", abp.log.levels.FATAL);
abp.log.log(logObject, abp.log.levels.FATAL);
};
/* LOCALIZATION ***********************************************/
abp.localization = abp.localization || {};
abp.localization.values = {};
abp.localization.localize = function (key, sourceName) {
sourceName = sourceName || abp.localization.defaultResourceName;
var source = abp.localization.values[sourceName];
if (!source) {
abp.log.warn('Could not find localization source: ' + sourceName);
return key;
}
var value = source[key];
if (value == undefined) {
return key;
}
var copiedArguments = Array.prototype.slice.call(arguments, 0);
copiedArguments.splice(1, 1);
copiedArguments[0] = value;
return abp.utils.formatString.apply(this, copiedArguments);
};
abp.localization.getResource = function (name) {
return function () {
var copiedArguments = Array.prototype.slice.call(arguments, 0);
copiedArguments.splice(1, 0, name);
return abp.localization.localize.apply(this, copiedArguments);
};
};
abp.localization.defaultResourceName = undefined;
/* AUTHORIZATION **********************************************/
abp.auth = abp.auth || {};
abp.auth.policies = abp.auth.policies || {};
abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
abp.auth.isGranted = function (policyName) {
return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
};
abp.auth.isAnyGranted = function () {
if (!arguments || arguments.length <= 0) {
return true;
}
for (var i = 0; i < arguments.length; i++) {
if (abp.auth.isGranted(arguments[i])) {
return true;
}
}
return false;
};
abp.auth.areAllGranted = function () {
if (!arguments || arguments.length <= 0) {
return true;
}
for (var i = 0; i < arguments.length; i++) {
if (!abp.auth.isGranted(arguments[i])) {
return false;
}
}
return true;
};
abp.auth.tokenCookieName = 'Abp.AuthToken';
abp.auth.setToken = function (authToken, expireDate) {
abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
};
abp.auth.getToken = function () {
return abp.utils.getCookieValue(abp.auth.tokenCookieName);
}
abp.auth.clearToken = function () {
abp.auth.setToken();
}
/* SETTINGS *************************************************/
abp.setting = abp.setting || {};
abp.setting.values = abp.setting.values || {};
abp.setting.get = function (name) {
return abp.setting.values[name];
};
abp.setting.getBoolean = function (name) {
var value = abp.setting.get(name);
return value == 'true' || value == 'True';
};
abp.setting.getInt = function (name) {
return parseInt(abp.setting.values[name]);
};
/* NOTIFICATION *********************************************/
//Defines Notification API, not implements it
abp.notify = abp.notify || {};
abp.notify.success = function (message, title, options) {
abp.log.warn('abp.notify.success is not implemented!');
};
abp.notify.info = function (message, title, options) {
abp.log.warn('abp.notify.info is not implemented!');
};
abp.notify.warn = function (message, title, options) {
abp.log.warn('abp.notify.warn is not implemented!');
};
abp.notify.error = function (message, title, options) {
abp.log.warn('abp.notify.error is not implemented!');
};
/* MESSAGE **************************************************/
//Defines Message API, not implements it
abp.message = abp.message || {};
abp.message._showMessage = function (message, title) {
alert((title || '') + ' ' + message);
};
abp.message.info = function (message, title) {
abp.log.warn('abp.message.info is not implemented!');
return abp.message._showMessage(message, title);
};
abp.message.success = function (message, title) {
abp.log.warn('abp.message.success is not implemented!');
return abp.message._showMessage(message, title);
};
abp.message.warn = function (message, title) {
abp.log.warn('abp.message.warn is not implemented!');
return abp.message._showMessage(message, title);
};
abp.message.error = function (message, title) {
abp.log.warn('abp.message.error is not implemented!');
return abp.message._showMessage(message, title);
};
abp.message.confirm = function (message, titleOrCallback, callback) {
abp.log.warn('abp.message.confirm is not properly implemented!');
if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
callback = titleOrCallback;
}
var result = confirm(message);
callback && callback(result);
};
/* UI *******************************************************/
abp.ui = abp.ui || {};
/* UI BLOCK */
//Defines UI Block API and implements basically
var $abpBlockArea = document.createElement('div');
$abpBlockArea.classList.add('abp-block-area');
/* opts: { //Can be an object with options or a string for query a selector
* elm: a query selector (optional - default: document.body)
* busy: boolean (optional - default: false)
* promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
* }
*/
abp.ui.block = function (opts) {
if (!opts) {
opts = {};
} else if (typeof opts == 'string') {
opts = {
elm: opts
};
}
var $elm = document.querySelector(opts.elm) || document.body;
if (opts.busy) {
$abpBlockArea.classList.add('abp-block-area-busy');
} else {
$abpBlockArea.classList.remove('abp-block-area-busy');
}
if (document.querySelector(opts.elm)) {
$abpBlockArea.style.position = 'absolute';
} else {
$abpBlockArea.style.position = 'fixed';
}
$elm.appendChild($abpBlockArea);
if (opts.promise) {
if (opts.promise.always) { //jQuery.Deferred style
opts.promise.always(function () {
abp.ui.unblock({
$elm: opts.elm
});
});
} else if (opts.promise['finally']) { //Q style
opts.promise['finally'](function () {
abp.ui.unblock({
$elm: opts.elm
});
});
}
}
};
/* opts: {
*
* }
*/
abp.ui.unblock = function (opts) {
var element = document.querySelector('.abp-block-area');
if (element) {
element.classList.add('abp-block-area-disappearing');
setTimeout(function () {
if (element) {
element.classList.remove('abp-block-area-disappearing');
element.parentElement.removeChild(element);
}
}, 250);
}
};
/* UI BUSY */
//Defines UI Busy API, not implements it
abp.ui.setBusy = function (opts) {
if (!opts) {
opts = {
busy: true
};
} else if (typeof opts == 'string') {
opts = {
elm: opts,
busy: true
};
}
abp.ui.block(opts);
};
abp.ui.clearBusy = function (opts) {
abp.ui.unblock(opts);
};
/* SIMPLE EVENT BUS *****************************************/
abp.event = (function () {
var _callbacks = {};
var on = function (eventName, callback) {
if (!_callbacks[eventName]) {
_callbacks[eventName] = [];
}
_callbacks[eventName].push(callback);
};
var off = function (eventName, callback) {
var callbacks = _callbacks[eventName];
if (!callbacks) {
return;
}
var index = -1;
for (var i = 0; i < callbacks.length; i++) {
if (callbacks[i] === callback) {
index = i;
break;
}
}
if (index < 0) {
return;
}
_callbacks[eventName].splice(index, 1);
};
var trigger = function (eventName) {
var callbacks = _callbacks[eventName];
if (!callbacks || !callbacks.length) {
return;
}
var args = Array.prototype.slice.call(arguments, 1);
for (var i = 0; i < callbacks.length; i++) {
callbacks[i].apply(this, args);
}
};
// Public interface ///////////////////////////////////////////////////
return {
on: on,
off: off,
trigger: trigger
};
})();
/* UTILS ***************************************************/
abp.utils = abp.utils || {};
/* Creates a name namespace.
* Example:
* var taskService = abp.utils.createNamespace(abp, 'services.task');
* taskService will be equal to abp.services.task
* first argument (root) must be defined first
************************************************************/
abp.utils.createNamespace = function (root, ns) {
var parts = ns.split('.');
for (var i = 0; i < parts.length; i++) {
if (typeof root[parts[i]] == 'undefined') {
root[parts[i]] = {};
}
root = root[parts[i]];
}
return root;
};
/* Find and replaces a string (search) to another string (replacement) in
* given string (str).
* Example:
* abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
************************************************************/
abp.utils.replaceAll = function (str, search, replacement) {
var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
return str.replace(new RegExp(fix, 'g'), replacement);
};
/* Formats a string just like string.format in C#.
* Example:
* abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
************************************************************/
abp.utils.formatString = function () {
if (arguments.length < 1) {
return null;
}
var str = arguments[0];
for (var i = 1; i < arguments.length; i++) {
var placeHolder = '{' + (i - 1) + '}';
str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
}
return str;
};
abp.utils.toPascalCase = function (str) {
if (!str || !str.length) {
return str;
}
if (str.length === 1) {
return str.charAt(0).toUpperCase();
}
return str.charAt(0).toUpperCase() + str.substr(1);
}
abp.utils.toCamelCase = function (str) {
if (!str || !str.length) {
return str;
}
if (str.length === 1) {
return str.charAt(0).toLowerCase();
}
return str.charAt(0).toLowerCase() + str.substr(1);
}
abp.utils.truncateString = function (str, maxLength) {
if (!str || !str.length || str.length <= maxLength) {
return str;
}
return str.substr(0, maxLength);
};
abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
postfix = postfix || '...';
if (!str || !str.length || str.length <= maxLength) {
return str;
}
if (maxLength <= postfix.length) {
return postfix.substr(0, maxLength);
}
return str.substr(0, maxLength - postfix.length) + postfix;
};
abp.utils.isFunction = function (obj) {
return !!(obj && obj.constructor && obj.call && obj.apply);
};
/**
* parameterInfos should be an array of { name, value } objects
* where name is query string parameter name and value is it's value.
* includeQuestionMark is true by default.
*/
abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
if (includeQuestionMark === undefined) {
includeQuestionMark = true;
}
var qs = '';
function addSeperator() {
if (!qs.length) {
if (includeQuestionMark) {
qs = qs + '?';
}
} else {
qs = qs + '&';
}
}
for (var i = 0; i < parameterInfos.length; ++i) {
var parameterInfo = parameterInfos[i];
if (parameterInfo.value === undefined) {
continue;
}
if (parameterInfo.value === null) {
parameterInfo.value = '';
}
addSeperator();
if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
} else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
for (var j = 0; j < parameterInfo.value.length; j++) {
if (j > 0) {
addSeperator();
}
qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
}
} else {
qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
}
}
return qs;
}
/**
* Sets a cookie value for given key.
* This is a simple implementation created to be used by ABP.
* Please use a complete cookie library if you need.
* @param {string} key
* @param {string} value
* @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
* @param {string} path (optional)
*/
abp.utils.setCookieValue = function (key, value, expireDate, path) {
var cookieValue = encodeURIComponent(key) + '=';
if (value) {
cookieValue = cookieValue + encodeURIComponent(value);
}
if (expireDate) {
cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
}
if (path) {
cookieValue = cookieValue + "; path=" + path;
}
document.cookie = cookieValue;
};
/**
* Gets a cookie with given key.
* This is a simple implementation created to be used by ABP.
* Please use a complete cookie library if you need.
* @param {string} key
* @returns {string} Cookie value or null
*/
abp.utils.getCookieValue = function (key) {
var equalities = document.cookie.split('; ');
for (var i = 0; i < equalities.length; i++) {
if (!equalities[i]) {
continue;
}
var splitted = equalities[i].split('=');
if (splitted.length != 2) {
continue;
}
if (decodeURIComponent(splitted[0]) === key) {
return decodeURIComponent(splitted[1] || '');
}
}
return null;
};
/**
* Deletes cookie for given key.
* This is a simple implementation created to be used by ABP.
* Please use a complete cookie library if you need.
* @param {string} key
* @param {string} path (optional)
*/
abp.utils.deleteCookie = function (key, path) {
var cookieValue = encodeURIComponent(key) + '=';
cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
if (path) {
cookieValue = cookieValue + "; path=" + path;
}
document.cookie = cookieValue;
}
/* SECURITY ***************************************/
abp.security = abp.security || {};
abp.security.antiForgery = abp.security.antiForgery || {};
abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
abp.security.antiForgery.getToken = function () {
return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
};
})();

389
samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/abp/jquery/abp.jquery.js

@ -1,389 +0,0 @@
var abp = abp || {};
(function($) {
if (!$) {
throw "abp/jquery library requires the jquery library included to the page!";
}
// ABP CORE OVERRIDES /////////////////////////////////////////////////////
abp.message._showMessage = function (message, title) {
alert((title || '') + ' ' + message);
return $.Deferred(function ($dfd) {
$dfd.resolve();
});
};
abp.message.confirm = function (message, titleOrCallback, callback) {
if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
callback = titleOrCallback;
}
var result = confirm(message);
callback && callback(result);
return $.Deferred(function ($dfd) {
$dfd.resolve(result);
});
};
abp.utils.isFunction = function (obj) {
return $.isFunction(obj);
};
// JQUERY EXTENSIONS //////////////////////////////////////////////////////
$.fn.findWithSelf = function (selector) {
return this.filter(selector).add(this.find(selector));
};
// DOM ////////////////////////////////////////////////////////////////////
abp.dom = abp.dom || {};
abp.dom.onNodeAdded = function (callback) {
abp.event.on('abp.dom.nodeAdded', callback);
};
abp.dom.onNodeRemoved = function (callback) {
abp.event.on('abp.dom.nodeRemoved', callback);
};
var mutationObserverCallback = function (mutationsList) {
for (var i = 0; i < mutationsList.length; i++) {
var mutation = mutationsList[i];
if (mutation.type === 'childList') {
if (mutation.addedNodes && mutation.removedNodes.length) {
for (var k = 0; k < mutation.removedNodes.length; k++) {
abp.event.trigger(
'abp.dom.nodeRemoved',
{
$el: $(mutation.removedNodes[k])
}
);
}
}
if (mutation.addedNodes && mutation.addedNodes.length) {
for (var j = 0; j < mutation.addedNodes.length; j++) {
abp.event.trigger(
'abp.dom.nodeAdded',
{
$el: $(mutation.addedNodes[j])
}
);
}
}
}
}
};
new MutationObserver(mutationObserverCallback).observe(
$('body')[0],
{
subtree: true,
childList: true
}
);
// AJAX ///////////////////////////////////////////////////////////////////
abp.ajax = function (userOptions) {
userOptions = userOptions || {};
var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
options.success = undefined;
options.error = undefined;
return $.Deferred(function ($dfd) {
$.ajax(options)
.done(function (data, textStatus, jqXHR) {
$dfd.resolve(data);
userOptions.success && userOptions.success(data);
}).fail(function (jqXHR) {
if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
} else {
abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
}
});
});
};
$.extend(abp.ajax, {
defaultOpts: {
dataType: 'json',
type: 'POST',
contentType: 'application/json',
headers: {
'X-Requested-With': 'XMLHttpRequest'
}
},
defaultError: {
message: 'An error has occurred!',
details: 'Error detail not sent by server.'
},
defaultError401: {
message: 'You are not authenticated!',
details: 'You should be authenticated (sign in) in order to perform this operation.'
},
defaultError403: {
message: 'You are not authorized!',
details: 'You are not allowed to perform this operation.'
},
defaultError404: {
message: 'Resource not found!',
details: 'The resource requested could not found on the server.'
},
logError: function (error) {
abp.log.error(error);
},
showError: function (error) {
if (error.details) {
return abp.message.error(error.details, error.message);
} else {
return abp.message.error(error.message || abp.ajax.defaultError.message);
}
},
handleTargetUrl: function (targetUrl) {
if (!targetUrl) {
location.href = abp.appPath;
} else {
location.href = targetUrl;
}
},
handleErrorStatusCode: function (status) {
switch (status) {
case 401:
abp.ajax.handleUnAuthorizedRequest(
abp.ajax.showError(abp.ajax.defaultError401),
abp.appPath
);
break;
case 403:
abp.ajax.showError(abp.ajax.defaultError403);
break;
case 404:
abp.ajax.showError(abp.ajax.defaultError404);
break;
default:
abp.ajax.showError(abp.ajax.defaultError);
break;
}
},
handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
if (userOptions.abpHandleError !== false) {
abp.ajax.handleErrorStatusCode(jqXHR.status);
}
$dfd.reject.apply(this, arguments);
userOptions.error && userOptions.error.apply(this, arguments);
},
handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
var messagePromise = null;
if (userOptions.abpHandleError !== false) {
messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
}
abp.ajax.logError(jqXHR.responseJSON.error);
$dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
abp.ajax.handleUnAuthorizedRequest(messagePromise);
}
},
handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
if (messagePromise) {
messagePromise.done(function () {
abp.ajax.handleTargetUrl(targetUrl);
});
} else {
abp.ajax.handleTargetUrl(targetUrl);
}
},
blockUI: function (options) {
if (options.blockUI) {
if (options.blockUI === true) { //block whole page
abp.ui.setBusy();
} else { //block an element
abp.ui.setBusy(options.blockUI);
}
}
},
unblockUI: function (options) {
if (options.blockUI) {
if (options.blockUI === true) { //unblock whole page
abp.ui.clearBusy();
} else { //unblock an element
abp.ui.clearBusy(options.blockUI);
}
}
},
ajaxSendHandler: function (event, request, settings) {
var token = abp.security.antiForgery.getToken();
if (!token) {
return;
}
if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
}
}
});
$(document).ajaxSend(function (event, request, settings) {
return abp.ajax.ajaxSendHandler(event, request, settings);
});
abp.event.on('abp.configurationInitialized', function () {
var l = abp.localization.getResource('AbpUi');
abp.ajax.defaultError.message = l('DefaultErrorMessage');
abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
});
// RESOURCE LOADER ////////////////////////////////////////////////////////
/* UrlStates enum */
var UrlStates = {
LOADING: 'LOADING',
LOADED: 'LOADED',
FAILED: 'FAILED'
};
/* UrlInfo class */
function UrlInfo(url) {
this.url = url;
this.state = UrlStates.LOADING;
this.loadCallbacks = [];
this.failCallbacks = [];
}
UrlInfo.prototype.succeed = function () {
this.state = UrlStates.LOADED;
for (var i = 0; i < this.loadCallbacks.length; i++) {
this.loadCallbacks[i]();
}
};
UrlInfo.prototype.failed = function () {
this.state = UrlStates.FAILED;
for (var i = 0; i < this.failCallbacks.length; i++) {
this.failCallbacks[i]();
}
};
UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
switch (this.state) {
case UrlStates.LOADED:
loadCallback && loadCallback();
break;
case UrlStates.FAILED:
failCallback && failCallback();
break;
case UrlStates.LOADING:
this.addCallbacks(loadCallback, failCallback);
break;
}
};
UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
loadCallback && this.loadCallbacks.push(loadCallback);
failCallback && this.failCallbacks.push(failCallback);
};
/* ResourceLoader API */
abp.ResourceLoader = (function () {
var _urlInfos = {};
function getCacheKey(url) {
return url;
}
function appendTimeToUrl(url) {
if (url.indexOf('?') < 0) {
url += '?';
} else {
url += '&';
}
url += '_=' + new Date().getTime();
return url;
}
var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
var cacheKey = getCacheKey(url);
var urlInfo = _urlInfos[cacheKey];
if (urlInfo) {
urlInfo.handleCallbacks(loadCallback, failCallback);
return;
}
_urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
urlInfo.addCallbacks(loadCallback, failCallback);
serverLoader(urlInfo);
};
var _loadScript = function (url, loadCallback, failCallback) {
_loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
$.getScript(url)
.done(function () {
urlInfo.succeed();
})
.fail(function () {
urlInfo.failed();
});
});
};
var _loadStyle = function (url) {
_loadFromUrl(url, undefined, undefined, function (urlInfo) {
$('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: appendTimeToUrl(url)
}).appendTo('head');
});
};
return {
loadScript: _loadScript,
loadStyle: _loadStyle
}
})();
})(jQuery);

8981
samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/bootstrap/css/bootstrap.css

File diff suppressed because it is too large

6444
samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/bootstrap/js/bootstrap.bundle.js

File diff suppressed because it is too large

19288
samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/chart.js/Chart.bundle.js

File diff suppressed because it is too large

7
samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/chart.js/Chart.bundle.min.js

File diff suppressed because one or more lines are too long

47
samples/DashboardDemo-old/src/DashboardDemo.Web/wwwroot/libs/chart.js/Chart.css

@ -1,47 +0,0 @@
/*
* DOM element rendering detection
* https://davidwalsh.name/detect-node-insertion
*/
@keyframes chartjs-render-animation {
from { opacity: 0.99; }
to { opacity: 1; }
}
.chartjs-render-monitor {
animation: chartjs-render-animation 0.001s;
}
/*
* DOM element resizing detection
* https://github.com/marcj/css-element-queries
*/
.chartjs-size-monitor,
.chartjs-size-monitor-expand,
.chartjs-size-monitor-shrink {
position: absolute;
direction: ltr;
left: 0;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
pointer-events: none;
visibility: hidden;
z-index: -1;
}
.chartjs-size-monitor-expand > div {
position: absolute;
width: 1000000px;
height: 1000000px;
left: 0;
top: 0;
}
.chartjs-size-monitor-shrink > div {
position: absolute;
width: 200%;
height: 200%;
left: 0;
top: 0;
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save