Compare commits
No commits in common. "master" and "release-QJXM" have entirely different histories.
master
...
release-QJ
|
@ -16,7 +16,7 @@ indent_size = 4
|
|||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8-bom
|
||||
[*.{json,yml,xml,csproj,props}]
|
||||
[*.{json,yml,xml}]
|
||||
indent_size = 2
|
||||
###############################
|
||||
# .NET Coding Conventions #
|
||||
|
@ -123,13 +123,9 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
|||
# Wrapping preferences
|
||||
csharp_preserve_single_line_statements = true
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_style_namespace_declarations=file_scoped:silent
|
||||
###############################
|
||||
# VB Coding Conventions #
|
||||
###############################
|
||||
[*.vb]
|
||||
# Modifier preferences
|
||||
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
|
||||
[*.cs]
|
||||
# Add file header
|
||||
file_header_template = Copyright (c) Argo Zhang (argo@163.com). All rights reserved.\nLicensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.\nWebsite: https://admin.blazor.zone
|
|
@ -14,6 +14,6 @@ jobs:
|
|||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.103
|
||||
dotnet-version: 3.0.100
|
||||
- name: Build with dotnet
|
||||
run: dotnet build src/admin/Bootstrap.Admin/ --configuration Release
|
|
@ -12,4 +12,4 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file src/admin/Bootstrap.Admin/Dockerfile --tag ba:$(date +%s)
|
||||
run: docker build . --file src/admin/Bootstrap.Admin/Linux.Dockerfile --tag ba:$(date +%s)
|
||||
|
|
|
@ -85,6 +85,7 @@ StyleCopReport.xml
|
|||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
|
@ -347,7 +348,7 @@ ASALocalRun/
|
|||
|
||||
# Net Core Keys
|
||||
**/[Kk]eys/*.xml
|
||||
Bootstrap*.xml
|
||||
Bootstrap.*.xml
|
||||
|
||||
###### -- Custom Ignore Section, Make sure all files you add to the git repo are below this line -- ######
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"solution": {
|
||||
"path": "BootstrapAdmin.sln",
|
||||
"projects": [
|
||||
"src\\blazor\\admin\\BootstrapAdmin.Caching\\BootstrapAdmin.Caching.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.DataAccess.Models\\BootstrapAdmin.DataAccess.Models.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.DataAccess.PetaPoco\\BootstrapAdmin.DataAccess.PetaPoco.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.Web.Core\\BootstrapAdmin.Web.Core.csproj",
|
||||
"src\\blazor\\admin\\BootstrapAdmin.Web\\BootstrapAdmin.Web.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.DataAccess\\BootstrapClient.DataAccess.PetaPoco.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Shared\\BootstrapClient.Web.Shared.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Web.Core\\BootstrapClient.Web.Core.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Web.Models\\BootstrapClient.DataAccess.Models.csproj",
|
||||
"src\\blazor\\client\\BootstrapClient.Web\\BootstrapClient.Web.csproj",
|
||||
"src\\mvc\\admin\\Bootstrap.Admin\\Bootstrap.Admin.csproj",
|
||||
"src\\mvc\\admin\\Bootstrap.DataAccess\\Bootstrap.DataAccess.csproj",
|
||||
"test\\UnitTest\\UnitTest.csproj"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29215.179
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLServer", "SQLServer", "{87319AF5-7C40-4362-B67C-35F9DD737DB4}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
|
@ -10,15 +10,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLServer", "SQLServer", "{
|
|||
db\SqlServer\Install.sql = db\SqlServer\Install.sql
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Admin", "src\mvc\admin\Bootstrap.Admin\Bootstrap.Admin.csproj", "{7B2B7043-3CB2-4C5A-BDF2-8C47F1A5471A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Admin", "src\admin\Bootstrap.Admin\Bootstrap.Admin.csproj", "{7B2B7043-3CB2-4C5A-BDF2-8C47F1A5471A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "db", "db", "{586410F2-C1F0-47CD-AB28-2CF506DED2C8}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client", "src\mvc\client\Bootstrap.Client\Bootstrap.Client.csproj", "{C82A6E45-AB90-43D1-8429-5CBE953D8151}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client", "src\client\Bootstrap.Client\Bootstrap.Client.csproj", "{C82A6E45-AB90-43D1-8429-5CBE953D8151}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client", "client", "{C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess", "src\mvc\admin\Bootstrap.DataAccess\Bootstrap.DataAccess.csproj", "{8D62BE79-BE13-43C8-969B-C9B00B3C84B7}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess", "src\admin\Bootstrap.DataAccess\Bootstrap.DataAccess.csproj", "{8D62BE79-BE13-43C8-969B-C9B00B3C84B7}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLite", "SQLite", "{523515EC-2AD7-4282-9AF4-9D20371183B0}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
|
@ -26,7 +26,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLite", "SQLite", "{523515
|
|||
db\SQLite\Install.sql = db\SQLite\Install.sql
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess.MongoDB", "src\mvc\admin\Bootstrap.DataAccess.MongoDB\Bootstrap.DataAccess.MongoDB.csproj", "{8336F096-4B4A-4710-A1FA-0F5E44CD8D26}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.DataAccess.MongoDB", "src\admin\Bootstrap.DataAccess.MongoDB\Bootstrap.DataAccess.MongoDB.csproj", "{8336F096-4B4A-4710-A1FA-0F5E44CD8D26}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MongoDB", "MongoDB", "{A06A0AD8-A246-4329-B024-7174AE4A3EDE}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
|
@ -57,9 +57,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Postgresql", "Postgresql",
|
|||
db\Postgresql\install.sql = db\Postgresql\install.sql
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client.DataAccess", "src\mvc\client\Bootstrap.Client.DataAccess\Bootstrap.Client.DataAccess.csproj", "{843811A2-FE49-410F-BF9F-9F1FB14A1DEE}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client.DataAccess", "src\client\Bootstrap.Client.DataAccess\Bootstrap.Client.DataAccess.csproj", "{843811A2-FE49-410F-BF9F-9F1FB14A1DEE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client.DataAccess.MongoDB", "src\mvc\client\Bootstrap.Client.DataAccess.MongoDB\Bootstrap.Client.DataAccess.MongoDB.csproj", "{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bootstrap.Client.DataAccess.MongoDB", "src\client\Bootstrap.Client.DataAccess.MongoDB\Bootstrap.Client.DataAccess.MongoDB.csproj", "{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6AD32A76-F3AA-423E-96EA-E5CC679934D1}"
|
||||
EndProject
|
||||
|
@ -67,6 +67,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{41B6D37A-5E5
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{E03B7391-B52F-4449-B400-5CD9DE01F085}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{D8F90830-15D0-4031-94EE-6E5D93CB734A}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
appveyor.build.ps1 = appveyor.build.ps1
|
||||
appveyor.test.ps1 = appveyor.test.ps1
|
||||
appveyor.yml = appveyor.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{E057452E-00EB-4C46-9F8D-14096AAE8148}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
README.md = README.md
|
||||
|
@ -74,97 +81,46 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{E057452E-0
|
|||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{85574E7C-7D58-4135-AB4B-76678552D271}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\admin\Bootstrap.Admin\Dockerfile = src\admin\Bootstrap.Admin\Dockerfile
|
||||
src\admin\Bootstrap.Admin\Linux.Dockerfile = src\admin\Bootstrap.Admin\Linux.Dockerfile
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "srcipts", "srcipts", "{72C103DB-E1D3-449F-97C2-DF12CA111FD4}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "win", "win", "{C6F2DCA0-7941-4C28-9328-2D495F5DCB00}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
scripts\windows\publish-admin.cmd = scripts\windows\publish-admin.cmd
|
||||
scripts\windows\publish-client.cmd = scripts\windows\publish-client.cmd
|
||||
scripts\windows\watch-run-admin.cmd = scripts\windows\watch-run-admin.cmd
|
||||
scripts\windows\watch-run-client.cmd = scripts\windows\watch-run-client.cmd
|
||||
publish-admin.cmd = publish-admin.cmd
|
||||
publish-client.cmd = publish-client.cmd
|
||||
watch-run-admin.cmd = watch-run-admin.cmd
|
||||
watch-run-client.cmd = watch-run-client.cmd
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "linux", "linux", "{FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
scripts\linux\deploy-admin.sh = scripts\linux\deploy-admin.sh
|
||||
scripts\linux\deploy-client.sh = scripts\linux\deploy-client.sh
|
||||
scripts\linux\init.sh = scripts\linux\init.sh
|
||||
scripts\linux\publish-admin.sh = scripts\linux\publish-admin.sh
|
||||
scripts\linux\publish-client.sh = scripts\linux\publish-client.sh
|
||||
scripts\linux\watch-run-admin.sh = scripts\linux\watch-run-admin.sh
|
||||
scripts\linux\watch-run-client.sh = scripts\linux\watch-run-client.sh
|
||||
deploy-admin.sh = deploy-admin.sh
|
||||
deploy-client.sh = deploy-client.sh
|
||||
init.sh = init.sh
|
||||
publish-admin.sh = publish-admin.sh
|
||||
publish-client.sh = publish-client.sh
|
||||
watch-run-admin.sh = watch-run-admin.sh
|
||||
watch-run-client.sh = watch-run-client.sh
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "appveyor", "appveyor", "{5F732D4E-133B-4DA6-811B-C369CDC3FB89}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ci", "ci", "{5F732D4E-133B-4DA6-811B-C369CDC3FB89}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
scripts\appveyor\appveyor.build.ps1 = scripts\appveyor\appveyor.build.ps1
|
||||
scripts\appveyor\appveyor.install.ps1 = scripts\appveyor\appveyor.install.ps1
|
||||
scripts\appveyor\appveyor.test.ps1 = scripts\appveyor\appveyor.test.ps1
|
||||
appveyor.build.ps1 = appveyor.build.ps1
|
||||
appveyor.test.ps1 = appveyor.test.ps1
|
||||
appveyor.yml = appveyor.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "services", "services", "{68F7C160-3FB2-4129-8F89-96F78B2DA0A9}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
scripts\linux\services\ba.admin.service = scripts\linux\services\ba.admin.service
|
||||
scripts\linux\services\ba.client.service = scripts\linux\services\ba.client.service
|
||||
scripts\linux\services\nginx.service = scripts\linux\services\nginx.service
|
||||
services\ba.admin.service = services\ba.admin.service
|
||||
services\ba.client.service = services\ba.client.service
|
||||
services\nginx.service = services\nginx.service
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Oracle", "Oracle", "{41E078CA-F005-4B66-B440-FD7EB731AD61}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
db\Oracle\InitData.sql = db\Oracle\InitData.sql
|
||||
db\Oracle\Install.sql = db\Oracle\Install.sql
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "git", "git", "{64EACBD1-23DD-4168-BEED-55D47DB1A8BB}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
scripts\git\commit_msg_template.txt = scripts\git\commit_msg_template.txt
|
||||
scripts\git\readme.md = scripts\git\readme.md
|
||||
scripts\git\run.cmd = scripts\git\run.cmd
|
||||
scripts\git\run.sh = scripts\git\run.sh
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "blazor", "blazor", "{DAE3826B-AAAB-468A-9A06-2F56EF5C0767}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github", "github", "{C07631B9-5E5E-417A-9A16-3C88956D574E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.github\workflows\build.yml = .github\workflows\build.yml
|
||||
.github\workflows\docker.yml = .github\workflows\docker.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "mvc", "mvc", "{C996F427-DA93-49D6-9804-4E665D195FC2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{45ADEF9B-C8BD-4224-9E12-F6716E85A22C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client", "client", "{55A2459A-6BDE-4493-B2C0-5BE1673E99EE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.Web", "src\blazor\admin\BootstrapAdmin.Web\BootstrapAdmin.Web.csproj", "{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.DataAccess.EFCore", "src\blazor\admin\BootstrapAdmin.DataAccess.EFCore\BootstrapAdmin.DataAccess.EFCore.csproj", "{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.DataAccess.Models", "src\blazor\admin\BootstrapAdmin.DataAccess.Models\BootstrapAdmin.DataAccess.Models.csproj", "{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.DataAccess.PetaPoco", "src\blazor\admin\BootstrapAdmin.DataAccess.PetaPoco\BootstrapAdmin.DataAccess.PetaPoco.csproj", "{20D03C52-0F8B-47B6-BCA8-CF0812F82722}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.Web.Core", "src\blazor\admin\BootstrapAdmin.Web.Core\BootstrapAdmin.Web.Core.csproj", "{DA143654-C258-410D-B5DC-FE446ED99CE4}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.DataAccess.PetaPoco", "src\blazor\client\BootstrapClient.DataAccess\BootstrapClient.DataAccess.PetaPoco.csproj", "{640F598B-6586-4AD6-B544-78CFF2602DFB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.Web.Shared", "src\blazor\client\BootstrapClient.Shared\BootstrapClient.Web.Shared.csproj", "{93770088-3463-427B-9CD8-88B8D7945C83}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.Web", "src\blazor\client\BootstrapClient.Web\BootstrapClient.Web.csproj", "{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootStarpAdmin.DataAccess.FreeSql", "src\blazor\admin\BootStarpAdmin.DataAccess.FreeSql\BootStarpAdmin.DataAccess.FreeSql.csproj", "{11122D97-B349-4A3E-B7DD-73B8B363C47C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BootStarpAdmin.DataAccess.SqlSugar", "src\blazor\admin\BootStarpAdmin.DataAccess.SqlSugar\BootStarpAdmin.DataAccess.SqlSugar.csproj", "{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.Web.Core", "src\blazor\client\BootstrapClient.Web.Core\BootstrapClient.Web.Core.csproj", "{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapClient.DataAccess.Models", "src\blazor\client\BootstrapClient.Web.Models\BootstrapClient.DataAccess.Models.csproj", "{CC3DF23A-2880-438F-BDEB-DB093E919ABA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BootstrapAdmin.Caching", "src\blazor\admin\BootstrapAdmin.Caching\BootstrapAdmin.Caching.csproj", "{ADD20515-1C1C-418B-84F6-8B05A7AA315B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -199,58 +155,6 @@ Global
|
|||
{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -259,7 +163,7 @@ Global
|
|||
{87319AF5-7C40-4362-B67C-35F9DD737DB4} = {586410F2-C1F0-47CD-AB28-2CF506DED2C8}
|
||||
{7B2B7043-3CB2-4C5A-BDF2-8C47F1A5471A} = {E03B7391-B52F-4449-B400-5CD9DE01F085}
|
||||
{C82A6E45-AB90-43D1-8429-5CBE953D8151} = {C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}
|
||||
{C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0} = {C996F427-DA93-49D6-9804-4E665D195FC2}
|
||||
{C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0} = {41B6D37A-5E5E-42B3-85E4-D81A81E3D757}
|
||||
{8D62BE79-BE13-43C8-969B-C9B00B3C84B7} = {E03B7391-B52F-4449-B400-5CD9DE01F085}
|
||||
{523515EC-2AD7-4282-9AF4-9D20371183B0} = {586410F2-C1F0-47CD-AB28-2CF506DED2C8}
|
||||
{8336F096-4B4A-4710-A1FA-0F5E44CD8D26} = {E03B7391-B52F-4449-B400-5CD9DE01F085}
|
||||
|
@ -269,30 +173,11 @@ Global
|
|||
{6F61C2AC-84D4-48A9-8A48-680657CC8175} = {586410F2-C1F0-47CD-AB28-2CF506DED2C8}
|
||||
{843811A2-FE49-410F-BF9F-9F1FB14A1DEE} = {C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}
|
||||
{BC1C6D63-ADA9-4C3B-89F0-CEB191A86BF5} = {C7F51A14-2D89-4D1F-AD78-C42B79AB0BF0}
|
||||
{E03B7391-B52F-4449-B400-5CD9DE01F085} = {C996F427-DA93-49D6-9804-4E665D195FC2}
|
||||
{E03B7391-B52F-4449-B400-5CD9DE01F085} = {41B6D37A-5E5E-42B3-85E4-D81A81E3D757}
|
||||
{C6F2DCA0-7941-4C28-9328-2D495F5DCB00} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
|
||||
{FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
|
||||
{5F732D4E-133B-4DA6-811B-C369CDC3FB89} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
|
||||
{68F7C160-3FB2-4129-8F89-96F78B2DA0A9} = {FDCFC3E3-14CF-40B2-9FE5-5BC239AAC110}
|
||||
{41E078CA-F005-4B66-B440-FD7EB731AD61} = {586410F2-C1F0-47CD-AB28-2CF506DED2C8}
|
||||
{64EACBD1-23DD-4168-BEED-55D47DB1A8BB} = {72C103DB-E1D3-449F-97C2-DF12CA111FD4}
|
||||
{DAE3826B-AAAB-468A-9A06-2F56EF5C0767} = {41B6D37A-5E5E-42B3-85E4-D81A81E3D757}
|
||||
{C996F427-DA93-49D6-9804-4E665D195FC2} = {41B6D37A-5E5E-42B3-85E4-D81A81E3D757}
|
||||
{45ADEF9B-C8BD-4224-9E12-F6716E85A22C} = {DAE3826B-AAAB-468A-9A06-2F56EF5C0767}
|
||||
{55A2459A-6BDE-4493-B2C0-5BE1673E99EE} = {DAE3826B-AAAB-468A-9A06-2F56EF5C0767}
|
||||
{EF5EF5A4-616A-4BA7-9E1E-1407E8EC0395} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{D8ED2DF7-F7E1-4DE7-B097-D0BEE51D58E9} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{7E3861AB-F797-4A9F-B7CE-0E35751FFCD9} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{20D03C52-0F8B-47B6-BCA8-CF0812F82722} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{DA143654-C258-410D-B5DC-FE446ED99CE4} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{640F598B-6586-4AD6-B544-78CFF2602DFB} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{93770088-3463-427B-9CD8-88B8D7945C83} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{6CD7A35B-93A8-4DB2-B078-EE5A81F40032} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{11122D97-B349-4A3E-B7DD-73B8B363C47C} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{1D20E6CF-9825-4CDE-B732-AE586BD1AABA} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
{FFDF9FF9-0B29-47D3-AD42-53A476B570EC} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{CC3DF23A-2880-438F-BDEB-DB093E919ABA} = {55A2459A-6BDE-4493-B2C0-5BE1673E99EE}
|
||||
{ADD20515-1C1C-418B-84F6-8B05A7AA315B} = {45ADEF9B-C8BD-4224-9E12-F6716E85A22C}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {221EAE38-5F75-4391-9A48-E462A9F3B8FC}
|
||||
|
|
|
@ -11,17 +11,17 @@
|
|||
|
||||
<Target Condition=" $(IsWebProject) == true Or $(IsTestProject) == true" Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Message Text="Copy lic file -> $(TargetDir)" Importance="high" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(TargetDir)" SourceFiles="$(MSBuildThisFileDirectory)src\mvc\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(TargetDir)" SourceFiles="$(MSBuildThisFileDirectory)src/mvc/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(TargetDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(TargetDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
<Target Condition=" $(IsWebProject) == true " Name="PostPublish" AfterTargets="Publish">
|
||||
<Message Text="Publish lic file -> $(PublishDir)" Importance="high" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\mvc\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/mvc/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\keys\Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/keys/Longbow.lic" SkipUnchangedFiles="true" />
|
||||
<Message Text="Publish db file -> $(PublishDir)" Importance="high" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\mvc\admin\Bootstrap.Admin\BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/mvc/admin/Bootstrap.Admin/BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'Windows_NT'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src\admin\Bootstrap.Admin\BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
<Copy Condition="'$(OS)' == 'UNIX'" DestinationFolder="$(PublishDir)" SourceFiles="$(MSBuildThisFileDirectory)src/admin/Bootstrap.Admin/BootstrapAdmin.db" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
284
LICENSE
284
LICENSE
|
@ -1,165 +1,191 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
0. Additional Definitions.
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
||||
owner that is granting the License.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities
|
||||
that control, are controlled by, or are under common control with that entity.
|
||||
For the purposes of this definition, "control" means (i) the power, direct or
|
||||
indirect, to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
"Source" form shall mean the preferred form for making modifications, including
|
||||
but not limited to software source code, documentation source, and configuration
|
||||
files.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
"Object" form shall mean any form resulting from mechanical transformation or
|
||||
translation of a Source form, including but not limited to compiled object code,
|
||||
generated documentation, and conversions to other media types.
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
||||
available under the License, as indicated by a copyright notice that is included
|
||||
in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
||||
is based on (or derived from) the Work and for which the editorial revisions,
|
||||
annotations, elaborations, or other modifications represent, as a whole, an
|
||||
original work of authorship. For the purposes of this License, Derivative Works
|
||||
shall not include works that remain separable from, or merely link (or bind by
|
||||
name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
"Contribution" shall mean any work of authorship, including the original version
|
||||
of the Work and any modifications or additions to that Work or Derivative Works
|
||||
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
||||
by the copyright owner or by an individual or Legal Entity authorized to submit
|
||||
on behalf of the copyright owner. For the purposes of this definition,
|
||||
"submitted" means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems, and
|
||||
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
||||
the purpose of discussing and improving the Work, but excluding communication
|
||||
that is conspicuously marked or otherwise designated in writing by the copyright
|
||||
owner as "Not a Contribution."
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
||||
of whom a Contribution has been received by Licensor and subsequently
|
||||
incorporated within the Work.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
2. Grant of Copyright License.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
3. Grant of Patent License.
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable (except as stated in this section) patent license to make, have
|
||||
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
such license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by combination
|
||||
of their Contribution(s) with the Work to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or contributory
|
||||
patent infringement, then any patent licenses granted to You under this License
|
||||
for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
4. Redistribution.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
||||
in any medium, with or without modifications, and in Source or Object form,
|
||||
provided that You meet the following conditions:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
You must give any other recipients of the Work or Derivative Works a copy of
|
||||
this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You
|
||||
changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute,
|
||||
all copyright, patent, trademark, and attribution notices from the Source form
|
||||
of the Work, excluding those notices that do not pertain to any part of the
|
||||
Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any
|
||||
Derivative Works that You distribute must include a readable copy of the
|
||||
attribution notices contained within such NOTICE file, excluding those notices
|
||||
that do not pertain to any part of the Derivative Works, in at least one of the
|
||||
following places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if provided along
|
||||
with the Derivative Works; or, within a display generated by the Derivative
|
||||
Works, if and wherever such third-party notices normally appear. The contents of
|
||||
the NOTICE file are for informational purposes only and do not modify the
|
||||
License. You may add Your own attribution notices within Derivative Works that
|
||||
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
||||
provided that such additional attribution notices cannot be construed as
|
||||
modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide
|
||||
additional or different license terms and conditions for use, reproduction, or
|
||||
distribution of Your modifications, or for any such Derivative Works as a whole,
|
||||
provided Your use, reproduction, and distribution of the Work otherwise complies
|
||||
with the conditions stated in this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
5. Submission of Contributions.
|
||||
|
||||
4. Combined Works.
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
||||
for inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
||||
any separate license agreement you may have executed with Licensor regarding
|
||||
such Contributions.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
6. Trademarks.
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
This License does not grant permission to use the trade names, trademarks,
|
||||
service marks, or product names of the Licensor, except as required for
|
||||
reasonable and customary use in describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
7. Disclaimer of Warranty.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the
|
||||
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
||||
including, without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
||||
solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise of
|
||||
permissions under this License.
|
||||
|
||||
d) Do one of the following:
|
||||
8. Limitation of Liability.
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
In no event and under no legal theory, whether in tort (including negligence),
|
||||
contract, or otherwise, unless required by applicable law (such as deliberate
|
||||
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License or
|
||||
out of the use or inability to use the Work (including but not limited to
|
||||
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
||||
any and all other commercial damages or losses), even if such Contributor has
|
||||
been advised of the possibility of such damages.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
9. Accepting Warranty or Additional Liability.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to
|
||||
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
||||
other liability obligations and/or rights consistent with this License. However,
|
||||
in accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if You
|
||||
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason of your
|
||||
accepting any such warranty or additional liability.
|
||||
|
||||
5. Combined Libraries.
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
APPENDIX: How to apply the Apache License to your work
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "{}" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included on
|
||||
the same "printed page" as the copyright notice for easier identification within
|
||||
third-party archives.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
Copyright 2019 LaoGanDie
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
22
README.md
22
README.md
|
@ -5,22 +5,21 @@
|
|||
---
|
||||
|
||||
##### Version & Coverage
|
||||
[![Release](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=red&color=green&label=release&url=https://admin.blazor.zone/api/Gitee/Releases?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/releases)
|
||||
[![Release](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=red&color=green&label=release&url=https://ba.sdgxgz.com/api/Gitee/Releases)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/releases)
|
||||
[![Coveralls](https://img.shields.io/coveralls/github/ArgoZhang/BootstrapAdmin/master.svg?logo=ReverbNation&logoColor=green&label=coveralls)](https://coveralls.io/github/ArgoZhang/BootstrapAdmin)
|
||||
[![Codecov](https://img.shields.io/codecov/c/gh/argozhang/bootstrapadmin/master.svg?logo=codecov&label=codecov)](https://codecov.io/gh/argozhang/bootstrapadmin/branch/master)
|
||||
|
||||
##### Gitee
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://admin.blazor.zone/api/Gitee/Builds?projName=bootstrapadmin-9m1jm)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Build Status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&label=master)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/branch/master)
|
||||
[![Test](https://img.shields.io/appveyor/tests/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/branch/master/tests)
|
||||
[![Issue Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=critical&label=issues&url=https://admin.blazor.zone/api/Gitee/Issues?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues)
|
||||
[![Pull Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=green&color=success&label=pulls&url=https://admin.blazor.zone/api/Gitee/Pulls?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/pulls)
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://ba.sdgxgz.com/api/Gitee/Builds?projName=bootstrapadmin-9m1jm)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Build Status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&label=maser)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Test](https://img.shields.io/appveyor/tests/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/build/tests)
|
||||
[![Issue Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=critical&label=issues&url=https://ba.sdgxgz.com/api/Gitee/Issues)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues)
|
||||
[![Pull Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=green&color=success&label=pulls&url=https://ba.sdgxgz.com/api/Gitee/Pulls)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/pulls)
|
||||
|
||||
##### GitHub
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://admin.blazor.zone/api/Gitee/Builds?projName=bootstrapadmin)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin)
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://ba.sdgxgz.com/api/Gitee/Builds?projName=bootstrapadmin)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin)
|
||||
[![master status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin/master.svg?logo=appveyor&label=master)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin/branch/master)
|
||||
[![Test](https://img.shields.io/appveyor/tests/argozhang/bootstrapadmin/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin/branch/master/tests)
|
||||
[![Github build](https://img.shields.io/github/workflow/status/ArgoZhang/BootstrapAdmin/Auto%20Build%20CI/master?label=master&logoColor=green&logo=github)](https://github.com/ArgoZhang/BootstrapAdmin/actions?query=workflow%3A%22Auto+Build+CI%22+branch%3Amaster)
|
||||
[![Repo Size](https://img.shields.io/github/repo-size/ArgoZhang/BootstrapAdmin.svg?logo=github&logoColor=green&label=repo)](https://github.com/ArgoZhang/BootstrapAdmin)
|
||||
[![Commit Date](https://img.shields.io/github/last-commit/ArgoZhang/BootstrapAdmin/master.svg?logo=github&logoColor=green&label=commit)](https://github.com/ArgoZhang/BootstrapAdmin)
|
||||
|
||||
|
@ -60,7 +59,7 @@ Departments Authorize Users
|
|||
For more information, please click [wiki](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E9%A1%B9%E7%9B%AE%E4%BB%8B%E7%BB%8D)
|
||||
|
||||
### Database
|
||||
**MSSQL/Oracle/SQLite/MySql/MariaDB/Firebird/MongoDB**
|
||||
**MSSQL/Oracle/SQLite/MySql/MariaDB/Postgresql/Firebird/MongoDB**
|
||||
|
||||
For more information, please click [wiki](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/数据库连接配置?sort_id=1333482)
|
||||
|
||||
|
@ -122,7 +121,7 @@ For more information, please click [wiki](https://gitee.com/LongbowEnterprise/Bo
|
|||
|
||||
## Online Demonstration
|
||||
[![website1](https://img.shields.io/badge/linux-http://ba.zylweb.cn-success.svg?logo=buzzfeed&logoColor=green)](http://ba.zylweb.cn)
|
||||
[![website2](https://img.shields.io/badge/linux-http://admin.blazor.zone-success.svg?logo=buzzfeed&logoColor=green)](http://admin.blazor.zone)
|
||||
[![website2](https://img.shields.io/badge/linux-http://ba.sdgxgz.com-success.svg?logo=buzzfeed&logoColor=green)](http://ba.sdgxgz.com)
|
||||
|
||||
### Login
|
||||
Administrator: Admin/123789
|
||||
|
@ -131,7 +130,6 @@ User: User/123789
|
|||
## Docker Images
|
||||
[![Docker](https://img.shields.io/docker/cloud/automated/argozhang/ba.svg?logo=docker&logoColor=success)](https://hub.docker.com/r/argozhang/ba)
|
||||
[![Docker](https://img.shields.io/docker/cloud/build/argozhang/ba.svg?logo=docker&logoColor=success)](https://hub.docker.com/r/argozhang/ba/builds)
|
||||
[![Docker](https://img.shields.io/github/workflow/status/ArgoZhang/BootstrapAdmin/Docker%20Image%20CI/master?label=Docker%20Image%20CI&logo=github&logoColor=green)](https://github.com/ArgoZhang/BootstrapAdmin/actions?query=workflow%3A%22Docker+Image+CI%22%3Amaster)
|
||||
|
||||
### Docker Hub
|
||||
Mirror [Portal](https://hub.docker.com/r/argozhang/ba)
|
||||
|
@ -154,7 +152,7 @@ Please click [wikis](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E
|
|||
[![Gitee license](https://img.shields.io/github/license/argozhang/bootstrapadmin.svg?logo=git&logoColor=red)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/blob/master/LICENSE)
|
||||
|
||||
## GVP award
|
||||
[View](https://images.gitee.com/uploads/images/2021/0112/112021_9d570be1_554725.png "GiteeGVP.png")
|
||||
[View](https://images.gitee.com/uploads/images/2019/0516/124055_96cc9f8d_554725.png "GiteeGVP.png")
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -5,22 +5,21 @@
|
|||
---
|
||||
|
||||
##### Version & Coverage
|
||||
[![Release](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=red&color=green&label=release&url=https://admin.blazor.zone/api/Gitee/Releases?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/releases)
|
||||
[![Coveralls](https://img.shields.io/coveralls/github/ArgoZhang/BootstrapAdmin/master.svg?logo=ReverbNation&logoColor=green&label=coveralls)](https://coveralls.io/github/ArgoZhang/BootstrapAdmin?branch=master)
|
||||
[![Release](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=red&color=green&label=release&url=https://ba.sdgxgz.com/api/Gitee/Releases)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/releases)
|
||||
[![Coveralls](https://img.shields.io/coveralls/github/ArgoZhang/BootstrapAdmin/master.svg?logo=ReverbNation&logoColor=green&label=coveralls)](https://coveralls.io/github/ArgoZhang/BootstrapAdmin)
|
||||
[![Codecov](https://img.shields.io/codecov/c/gh/argozhang/bootstrapadmin/master.svg?logo=codecov&label=codecov)](https://codecov.io/gh/argozhang/bootstrapadmin/branch/master)
|
||||
|
||||
##### Gitee
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://admin.blazor.zone/api/Gitee/Builds?projName=bootstrapadmin-9m1jm)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Build Status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&label=master)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/branch/master)
|
||||
[![Test](https://img.shields.io/appveyor/tests/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/branch/master/tests)
|
||||
[![Issue Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=critical&label=issues&url=https://admin.blazor.zone/api/Gitee/Issues?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues)
|
||||
[![Pull Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=green&color=success&label=pulls&url=https://admin.blazor.zone/api/Gitee/Pulls?userName=LongbowEnterprise)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/pulls)
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://ba.sdgxgz.com/api/Gitee/Builds?projName=bootstrapadmin-9m1jm)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Build Status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&label=maser)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm)
|
||||
[![Test](https://img.shields.io/appveyor/tests/ArgoZhang/bootstrapadmin-9m1jm/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin-9m1jm/build/tests)
|
||||
[![Issue Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=critical&label=issues&url=https://ba.sdgxgz.com/api/Gitee/Issues)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues)
|
||||
[![Pull Status](https://img.shields.io/endpoint.svg?logo=Groupon&logoColor=green&color=success&label=pulls&url=https://ba.sdgxgz.com/api/Gitee/Pulls)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/pulls)
|
||||
|
||||
##### GitHub
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://admin.blazor.zone/api/Gitee/Builds?projName=bootstrapadmin)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin)
|
||||
[![Appveyor build](https://img.shields.io/endpoint.svg?logo=appveyor&label=build&color=blueviolet&url=https://ba.sdgxgz.com/api/Gitee/Builds?projName=bootstrapadmin)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin)
|
||||
[![master status](https://img.shields.io/appveyor/ci/ArgoZhang/bootstrapadmin/master.svg?logo=appveyor&label=master)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin/branch/master)
|
||||
[![Test](https://img.shields.io/appveyor/tests/argozhang/bootstrapadmin/master.svg?logo=appveyor&)](https://ci.appveyor.com/project/ArgoZhang/bootstrapadmin/branch/master/tests)
|
||||
[![Github build](https://img.shields.io/github/workflow/status/ArgoZhang/BootstrapAdmin/Auto%20Build%20CI/master?label=master&logoColor=green&logo=github)](https://github.com/ArgoZhang/BootstrapAdmin/actions?query=workflow%3A%22Auto+Build+CI%22+branch%3Amaster)
|
||||
[![Repo Size](https://img.shields.io/github/repo-size/ArgoZhang/BootstrapAdmin.svg?logo=github&logoColor=green&label=repo)](https://github.com/ArgoZhang/BootstrapAdmin)
|
||||
[![Commit Date](https://img.shields.io/github/last-commit/ArgoZhang/BootstrapAdmin/master.svg?logo=github&logoColor=green&label=commit)](https://github.com/ArgoZhang/BootstrapAdmin)
|
||||
|
||||
|
@ -29,15 +28,6 @@
|
|||
|
||||
使用 NET Core + Bootstrap + PetaPoco + HTML 5 + jQuery 构建的后台管理平台
|
||||
|
||||
**BootstrapAdmin** 与 **开源驰骋 ccflow** 达成如下协议.
|
||||
|
||||
1. 驰骋工作流引擎、表单引擎、快速开发平台系统采用 `GPL` 协议.
|
||||
2. 驰骋 `.net` 版本成为 `ccflow`, `java` 版本成为 `jflow` 两个版本代码 100% 开源.
|
||||
3. 与 BootstrapAdmin 签订服务合同的并且付费的 BootstrapAdmin 客户使用ccflow不开源系统代码受到法律保护.
|
||||
4. 驰骋 BPM 代码下载地址: [传送门](http://ccflow.org/down.htm?from=argo)
|
||||
|
||||
<a href='http://ccflow.org/?from=argo' target=_blank ><img src='https://images.gitee.com/uploads/images/2021/0718/172630_7ebb560a_554725.png' /></a>
|
||||
|
||||
### 特别说明
|
||||
**BootstrapAdmin** 无需二次开发,要做的仅仅是与前台系统集成,前台系统模板工程为 **Bootstrap.Client**
|
||||
项目原始出发点是把权限系统从业务系统中剥离出来,项目开发专注于功能,详细配置说明请点击 [查看文档](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E7%B3%BB%E7%BB%9F%E9%9B%86%E6%88%90)
|
||||
|
@ -75,10 +65,6 @@
|
|||
数据库支持列表如下:
|
||||
**MSSQL/Oracle/SQLite/MySql/MariaDB/Postgresql/Firebird/MongoDB**
|
||||
|
||||
### 工作流
|
||||
|
||||
与 **驰骋工作流** 进行深度集成,欢迎访问其主页 [传送门](http://ccflow.org/?from=argo)
|
||||
|
||||
### 浏览器支持
|
||||
|
||||
![chrome](https://img.shields.io/badge/chrome->%3D4.5-success.svg?logo=google%20chrome&logoColor=red)
|
||||
|
@ -129,10 +115,12 @@
|
|||
|
||||
## 开发环境搭建
|
||||
1. 安装 .net core sdk [官方网址](http://www.microsoft.com/net/download)
|
||||
2. 安装 Visual Studio 2019 最新版 [官方网址](https://visualstudio.microsoft.com/vs/getting-started/)
|
||||
2. 安装 Visual Studio 2019 以上 [官方网址](https://visualstudio.microsoft.com/vs/getting-started/)
|
||||
3. 获取本项目代码 [BootstrapAdmin](https://gitee.com/LongbowEnterprise/BootstrapAdmin)
|
||||
|
||||
环境搭建教程 [详细说明](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B?sort_id=1333477)
|
||||
*注意*
|
||||
master 分支为 NETCore 3.0 框架 必须使用 Visual Studio 2019 (v16.3)
|
||||
netcore-2.2 分支为 NETCore 2.2 框架支持 Visual Studio 2017 (v15.9+)
|
||||
|
||||
### 安装数据库
|
||||
|
||||
|
@ -140,7 +128,7 @@
|
|||
1. SQLite
|
||||
2. SqlServer
|
||||
3. MySql
|
||||
4. Oracle
|
||||
4. PostgresSql
|
||||
5. MongoDB
|
||||
|
||||
数据库配置 [详细说明](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/数据库连接配置?sort_id=1333482)
|
||||
|
@ -150,7 +138,7 @@
|
|||
|
||||
## 演示地址
|
||||
[![website1](https://img.shields.io/badge/linux-http://ba.zylweb.cn-success.svg?logo=buzzfeed&logoColor=green)](http://ba.zylweb.cn)
|
||||
[![website2](https://img.shields.io/badge/linux-http://admin.blazor.zone-success.svg?logo=buzzfeed&logoColor=green)](http://admin.blazor.zone)
|
||||
[![website2](https://img.shields.io/badge/linux-http://ba.sdgxgz.com-success.svg?logo=buzzfeed&logoColor=green)](http://ba.sdgxgz.com)
|
||||
|
||||
### 登录用户名与密码
|
||||
管理账号:Admin/123789
|
||||
|
@ -159,7 +147,6 @@
|
|||
## Docker 镜像
|
||||
[![Docker](https://img.shields.io/docker/cloud/automated/argozhang/ba.svg?logo=docker&logoColor=success)](https://hub.docker.com/r/argozhang/ba)
|
||||
[![Docker](https://img.shields.io/docker/cloud/build/argozhang/ba.svg?logo=docker&logoColor=success)](https://hub.docker.com/r/argozhang/ba/builds)
|
||||
[![Docker](https://img.shields.io/github/workflow/status/ArgoZhang/BootstrapAdmin/Docker%20Image%20CI/master?label=Docker%20Image%20CI&logo=github&logoColor=green)](https://github.com/ArgoZhang/BootstrapAdmin/actions?query=workflow%3A%22Docker+Image+CI%22%3Amaster)
|
||||
|
||||
### Docker Hub
|
||||
镜像拉取 [传送门](https://hub.docker.com/r/argozhang/ba)
|
||||
|
@ -182,7 +169,7 @@ docker pull reg.qiniu.com/argozhang/ba
|
|||
[![Gitee license](https://img.shields.io/github/license/argozhang/bootstrapadmin.svg?logo=git&logoColor=red)](https://gitee.com/LongbowEnterprise/BootstrapAdmin/blob/master/LICENSE)
|
||||
|
||||
## GVP 奖杯
|
||||
![项目奖杯](https://images.gitee.com/uploads/images/2021/0112/112021_9d570be1_554725.png "GVP.png")
|
||||
[查看照片](https://images.gitee.com/uploads/images/2019/0516/124055_96cc9f8d_554725.png "GiteeGVP.png")
|
||||
|
||||
## 项目截图
|
||||
|
||||
|
@ -207,12 +194,8 @@ docker pull reg.qiniu.com/argozhang/ba
|
|||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
## 相关视频讲解
|
||||
|
||||
[视频教材](https://gitee.com/LongbowEnterprise/BootstrapAdmin/wikis/%E8%AF%BE%E7%A8%8B%E5%88%97%E8%A1%A8?sort_id=1916635#%E8%AF%BE%E7%A8%8B%E5%88%97%E8%A1%A8)
|
||||
|
||||
## 捐助
|
||||
|
||||
如果这个项目对您有所帮助,请扫下方二维码打赏一杯咖啡。
|
||||
|
||||
<img src="https://gitee.com/LongbowEnterprise/Pictures/raw/master/WeChat/BarCode@2x.png" width="382px;" />
|
||||
![WeChat](https://gitee.com/LongbowEnterprise/Pictures/raw/master/WeChat/WeChat.png "微信扫码")
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
function installDB() {
|
||||
write-host "init sqlserver database..." -ForegroundColor Cyan
|
||||
$startPath = "$($env:appveyor_build_folder)\db\SqlServer"
|
||||
$sqlInstance = "(local)\SQL2017"
|
||||
$outFile = join-path $startPath "output.log"
|
||||
$sqlFile = join-path $startPath "Install.sql"
|
||||
$initFile = join-path $startPath "InitData.sql"
|
||||
|
||||
sqlcmd -S "$sqlInstance" -U sa -P Password12! -i "$sqlFile" -i "$initFile" -o "$outFile"
|
||||
|
||||
#write-host "init mysql database..." -ForegroundColor Cyan
|
||||
#$env:MYSQL_PWD="Password12!"
|
||||
#$mysql = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe"'
|
||||
#$cmd = $mysql + ' -e "create database BootstrapAdmin;" -uroot'
|
||||
#cmd.exe /c $cmd
|
||||
|
||||
#$startPath = "$($env:appveyor_build_folder)\db\MySQL"
|
||||
#$para = ' -hlocalhost -uroot -DBootstrapAdmin < '
|
||||
#$sqlFile = join-path $startPath "Install.sql"
|
||||
#$cmd = $mysql + $para + $sqlFile
|
||||
#cmd.exe /c $cmd
|
||||
|
||||
#$initFile = join-path $startPath "InitData.sql"
|
||||
#$cmd = $mysql + $para + $initFile
|
||||
#cmd.exe /c $cmd
|
||||
|
||||
write-host "init mongodb data..." -ForegroundColor Cyan
|
||||
$initFolder = "$($env:appveyor_build_folder)\db\MongoDB"
|
||||
cd $initFolder
|
||||
|
||||
cmd.exe /c "C:\mongodb\bin\mongo init.js"
|
||||
|
||||
$cmd = 'C:\mongodb\bin\mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())"'
|
||||
iex "& $cmd"
|
||||
|
||||
cd $($env:appveyor_build_folder)
|
||||
}
|
||||
|
||||
function runUnitTest() {
|
||||
write-host "dotnet test test\UnitTest" -ForegroundColor Cyan
|
||||
dotnet test test\UnitTest --filter="FullyQualifiedName!~MySql" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[Bootstrap.Admin*]*%2c[Bootstrap.DataAccess*]*" /p:Exclude="[*]*Program%2c[*]*Startup%2c[Bootstrap.DataAccess]*AutoDB%2c[Bootstrap.DataAccess]*WeChatHelper" /p:ExcludeByFile="**/SMSExtensions.cs%2c**/Helper/OAuthHelper.cs" /p:CoverletOutput=..\..\
|
||||
}
|
||||
|
||||
function coverallUnitTest() {
|
||||
write-host "install coveralls.net tools" -ForegroundColor Cyan
|
||||
dotnet tool install coveralls.net --version 1.0.0 --tool-path ".\tools"
|
||||
runUnitTest
|
||||
write-host "report UnitTest with Coveralls" -ForegroundColor Cyan
|
||||
cmd.exe /c ".\tools\csmacnz.Coveralls.exe --opencover -i coverage.opencover.xml --useRelativePaths"
|
||||
}
|
||||
|
||||
function codecovUnitTest() {
|
||||
Set-AppveyorBuildVariable COVERALLS_REPO_TOKEN $($env:COVERALLS_REPO_TOKEN)
|
||||
Set-AppveyorBuildVariable CODECOV_TOKEN $($env:CODECOV_TOKEN)
|
||||
|
||||
$codecovCmd = "C:\ProgramData\chocolatey\lib\codecov\tools\codecov.exe"
|
||||
$codecov = Test-Path $codecovCmd
|
||||
if (!$codecov) {
|
||||
write-host "install codecov tools" -ForegroundColor Cyan
|
||||
choco install codecov
|
||||
}
|
||||
$coverageFile = Test-Path coverage.opencover.xml
|
||||
if (!$coverageFile) {
|
||||
runUnitTest
|
||||
}
|
||||
write-host "report UnitTest with Codecov" -ForegroundColor Cyan
|
||||
cmd.exe /c "$codecovCmd -f ""coverage.opencover.xml"""
|
||||
}
|
||||
|
||||
$branch = $($env:APPVEYOR_REPO_BRANCH)
|
||||
if ($branch -ne "dev") {
|
||||
installDB
|
||||
coverallUnitTest
|
||||
codecovUnitTest
|
||||
}
|
17
appveyor.yml
17
appveyor.yml
|
@ -1,4 +1,4 @@
|
|||
version: 5.0.{build}
|
||||
version: 1.0.{build}
|
||||
branches:
|
||||
only:
|
||||
- release
|
||||
|
@ -9,7 +9,6 @@ clone_depth: 1
|
|||
init:
|
||||
- ps: git version
|
||||
environment:
|
||||
CI: true
|
||||
Appveyor: true
|
||||
COVERALLS_REPO_TOKEN:
|
||||
secure: 5L1b6XqSNTOfU1iZrARo5eUOi1HOleVO3VDCW0pr6yaspgkC5jxL+gBDK0OEY8EI
|
||||
|
@ -19,21 +18,25 @@ environment:
|
|||
secure: 6rKKLXCmy3HZBxW5SjoO4Ox7G09FC0NJgGnvukWkYyJ2rx1GCzu4JvmLin69SHRz
|
||||
CODECOV_TOKEN_GITLAB:
|
||||
secure: +22PuAn5seq4bbCVCly8zDFuyEV3m2NjW3QuM0+2gm4c8akwicNFmv2T/ZGd0Jpd
|
||||
cache: C:\ProgramData\chocolatey\lib\codecov\tools
|
||||
services:
|
||||
- mssql2017
|
||||
- mysql
|
||||
- mongodb
|
||||
install:
|
||||
- ps: >-
|
||||
.\scripts\appveyor\appveyor.install.ps1
|
||||
#copy my.ini into mysql folder
|
||||
|
||||
dotnet --version
|
||||
|
||||
#xcopy "$($env:appveyor_build_folder)\db\MySQL\my.ini" "C:\Program Files\MySQL\MySQL Server 5.7" /y
|
||||
build_script:
|
||||
- ps: >-
|
||||
.\scripts\appveyor\appveyor.build.ps1
|
||||
.\appveyor.build.ps1
|
||||
test_script:
|
||||
- ps: >-
|
||||
.\scripts\appveyor\appveyor.test.ps1
|
||||
.\appveyor.test.ps1
|
||||
artifacts:
|
||||
- path: src\admin\Bootstrap.Admin\bin\release\net5.0\publish\
|
||||
- path: src\admin\Bootstrap.Admin\bin\release\netcoreapp3.0\publish\
|
||||
name: BootstrapAdmin
|
||||
type: WebDeployPackage
|
||||
deploy:
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Category": "当前样式",
|
||||
"Name": "使用样式",
|
||||
"Code": "blue.css",
|
||||
"Define": NumberInt(0)
|
||||
|
@ -158,126 +158,90 @@
|
|||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "个人中心地址",
|
||||
"Code": "/Admin/Profiles",
|
||||
"Code": "http://localhost:50852/Admin/Profiles",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "系统设置地址",
|
||||
"Code": "/Admin/Index",
|
||||
"Code": "http://localhost:50852/Admin/Index",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "系统通知地址",
|
||||
"Code": "/Admin/Notifications",
|
||||
"Code": "http://localhost:50852/Admin/Notifications",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "应用首页",
|
||||
"Name": "Demo",
|
||||
"Code": "http://localhost:49185",
|
||||
"Code": "http://localhost:49185/",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Category": "系统设置",
|
||||
"Name": "程序异常保留时长",
|
||||
"Code": "1",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
|
||||
"Category": "网站设置",
|
||||
"Category": "系统设置",
|
||||
"Name": "操作日志保留时长",
|
||||
"Code": "12",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Category": "系统设置",
|
||||
"Name": "登录日志保留时长",
|
||||
"Code": "12",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Category": "系统设置",
|
||||
"Name": "Cookie保留时长",
|
||||
"Code": "7",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Category": "系统设置",
|
||||
"Name": "IP地理位置接口",
|
||||
"Code": "None",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "地理位置服务",
|
||||
"Name": "百度地图开放平台",
|
||||
"Code": "BaiDuIPSvr",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "地理位置服务",
|
||||
"Name": "聚合地理位置",
|
||||
"Code": "百度138地理位置",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "地理位置服务",
|
||||
"Name": "https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=",
|
||||
"Code": "BaiDuIP138Svr",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "地理位置",
|
||||
"Category": "系统设置",
|
||||
"Name": "BaiDuIPSvr",
|
||||
"Code": "http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "地理位置",
|
||||
"Category": "系统设置",
|
||||
"Name": "JuheIPSvr",
|
||||
"Code": "http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "地理位置",
|
||||
"Name": "BaiDuIP138Svr",
|
||||
"Code": "https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Category": "系统设置",
|
||||
"Name": "访问日志保留时长",
|
||||
"Code": "1",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Category": "系统设置",
|
||||
"Name": "IP请求缓存时长",
|
||||
"Code": "10",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Category": "系统设置",
|
||||
"Name": "演示系统",
|
||||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "授权盐值",
|
||||
"Code": "yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "哈希结果",
|
||||
"Code": "6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Category": "系统设置",
|
||||
"Name": "验证码图床",
|
||||
"Code": "http://imgs.sdgxgz.com/images/",
|
||||
"Define": NumberInt(0)
|
||||
|
@ -300,12 +264,6 @@
|
|||
"Code": "1",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "固定表头",
|
||||
"Code": "1",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "OAuth 认证登录",
|
||||
|
@ -324,76 +282,16 @@
|
|||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "Blazor",
|
||||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "健康检查",
|
||||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "默认应用程序",
|
||||
"Code": "0",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "后台地址",
|
||||
"Code": "http://localhost:50852",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "favicon",
|
||||
"Code": "/favicon.ico",
|
||||
"Code": "http://localhost:49185/favicon.ico",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "测试平台",
|
||||
"Name": "网站图标",
|
||||
"Code": "/favicon.png",
|
||||
"Code": "http://localhost:49185/favicon.png",
|
||||
"Define": NumberInt(1)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "高仿码云",
|
||||
"Code": "Login-Gitee",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "蓝色清新",
|
||||
"Code": "Login-Blue",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "系统默认",
|
||||
"Code": "Login",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "科技动感",
|
||||
"Code": "Login-Tec",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "系统首页",
|
||||
"Name": "Admin-LTE",
|
||||
"Code": "Login-LTE",
|
||||
"Define": NumberInt(0)
|
||||
},
|
||||
{
|
||||
"Category": "网站设置",
|
||||
"Name": "登录界面",
|
||||
"Code": "Login",
|
||||
"Define": NumberInt(0)
|
||||
}
|
||||
];
|
|
@ -215,18 +215,6 @@
|
|||
"IsResource": NumberInt(2),
|
||||
"Application": "BA"
|
||||
},
|
||||
{
|
||||
"_id": ObjectId("5bd7b8445fa31256f77e4b08"),
|
||||
"ParentId": "5bd7b8445fa31256f77e4b93",
|
||||
"Name": "默认应用",
|
||||
"Order": NumberInt(80),
|
||||
"Icon": "fa fa-fa",
|
||||
"Url": "defaultApp",
|
||||
"Category": "0",
|
||||
"Target": "_self",
|
||||
"IsResource": NumberInt(2),
|
||||
"Application": "BA"
|
||||
},
|
||||
{
|
||||
"_id": ObjectId("5bd7b8445fa31256f77e4b94"),
|
||||
"ParentId": "0",
|
||||
|
|
|
@ -26,13 +26,12 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('头像地址', '头像
|
|||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', '蓝色样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', '黑色样式', 'black.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', 'AdminLTE', 'lte.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('当前样式', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '前台首页', '~/Home/Index', 0);
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '侧边栏状态', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '卡片标题状态', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '固定表头', '1', 0);
|
||||
|
||||
-- 登录配置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '短信验证码登录', '1', 0);
|
||||
|
@ -42,49 +41,22 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'OAuth
|
|||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '自动锁屏时长', '30', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '自动锁屏', '0', 0);
|
||||
|
||||
-- 是否启用 Blazor 默认为 0 未启用
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'Blazor', '0', 0);
|
||||
|
||||
-- 是否启用 健康检查 默认为 0 未启用 1 启用
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) Values ('网站设置', '健康检查', '1', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '访问日志保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '访问日志保留时长', '1', 0);
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置服务', '百度地图开放平台', 'BaiDuIPSvr', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置服务', '聚合地理位置', 'JuheIPSvr', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置服务', '百度138地理位置', 'BaiDuIP138Svr', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'BaiDuIP138Svr', 'https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
-- 时长单位 分钟
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '演示系统', '0', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '授权盐值', 'yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '哈希结果', '6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '默认应用程序', '0', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '后台地址', 'http://localhost:50852', 0);
|
||||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '高仿码云', 'Login-Gitee', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '蓝色清新', 'Login-Blue', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '系统默认', 'Login', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '科技动感', 'Login-Tec', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', 'Admin-LTE', 'Login-LTE', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '登录界面', 'Login', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '演示系统', '0', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
|
||||
DELETE FROM Navigations Where Category = '0';
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (0, '后台管理', 10, 'fa fa-gear', '~/Admin/Index', '0');
|
||||
|
@ -105,7 +77,6 @@ INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResourc
|
|||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 4, '清理全部缓存', 50, 'fa fa-fa', 'clearAllCache', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 5, '登录设置', 60, 'fa fa-fa', 'loginSettings', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 6, '自动锁屏', 70, 'fa fa-fa', 'lockScreen', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 7, '默认应用', 80, 'fa fa-fa', 'defaultApp', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (0, '菜单管理', 50, 'fa fa-dashboard', '~/Admin/Menus', '0');
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category, IsResource) VALUES (@@identity - 1, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
|
@ -157,11 +128,6 @@ INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@
|
|||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@@identity - 1, 'API文档', 10, 'fa fa-wrench', '~/swagger', '0');
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@@identity - 2, '图标集', 10, 'fa fa-dashboard', '~/Admin/FAIcon', '0');
|
||||
|
||||
-- 控件集合菜单
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (0, '控件集合', 170, 'fa fa-stethoscope', '#', '0');
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@@identity, '行为式验证码', 10, 'fa fa-wrench', 'https://gitee.com/LongbowEnterprise/SliderCaptcha', '0');
|
||||
INSERT INTO Navigations (ParentId, Name, `Order`, Icon, Url, Category) VALUES (@@identity - 1, '下拉框', 20, 'fa fa-bars', 'http://longbowenterprise.gitee.io/longbow-select/', '0');
|
||||
|
||||
DELETE FROM `Groups` WHERE GroupName = 'Admin';
|
||||
INSERT INTO `Groups` (GroupCode, GroupName, Description) VALUES ('001', 'Admin', '系统默认组');
|
||||
|
||||
|
@ -187,16 +153,16 @@ INSERT INTO NavigationRole (NavigationID, RoleID) SELECT n.Id, r.Id FROM Navigat
|
|||
Delete From Dicts Where Category = '应用程序' and Code = 'Demo';
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('应用程序', '测试平台', 'Demo', 0);
|
||||
Delete From Dicts Where Category = '应用首页' and Name = 'Demo';
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('应用首页', 'Demo', 'http://localhost:49185', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('应用首页', 'Demo', 'http://localhost:49185/', 0);
|
||||
|
||||
Delete From Dicts Where Category = '测试平台';
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站标题', '前台演示系统', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '网站页脚', '前台演示程序后台权限管理框架', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '个人中心地址', '/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统设置地址', '/Admin/Index', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统通知地址', '/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', 'favicon', '/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', '网站图标', '/favicon.png', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
|
||||
Insert into Dicts (Category, Name, Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', 'favicon', 'http://localhost:49185/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.png', 1);
|
||||
|
||||
Delete from Navigations where Application = 'Demo';
|
||||
INSERT into Navigations (ParentId, Name, `Order`, Icon, Url, Category, Application) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 'Demo');
|
||||
|
|
|
@ -178,10 +178,10 @@ CREATE TABLE Traces(
|
|||
UserName VARCHAR (50) NOT NULL,
|
||||
LogTime DATETIME NOT NULL,
|
||||
IP VARCHAR (15) NOT NULL,
|
||||
Browser VARCHAR (2000),
|
||||
OS VARCHAR (2000),
|
||||
Browser VARCHAR (50),
|
||||
OS VARCHAR (50),
|
||||
City VARCHAR (50),
|
||||
RequestUrl VARCHAR (2000) NOT NULL,
|
||||
RequestUrl VARCHAR (500) NOT NULL,
|
||||
UserAgent VARCHAR (2000) NULL,
|
||||
Referer VARCHAR (2000)
|
||||
);
|
||||
|
@ -189,6 +189,6 @@ CREATE TABLE Traces(
|
|||
CREATE TABLE DBLogs (
|
||||
ID INTEGER PRIMARY KEY Auto_increment,
|
||||
UserName VARCHAR (50) NULL,
|
||||
`SQL` Text NOT NULL,
|
||||
`SQL` VARCHAR (2000) NOT NULL,
|
||||
LogTime DATETIME NOT NULL
|
||||
);
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
[mysqld]
|
||||
basedir=C:\\Program Files\\MySQL\\MySQL Server 5.7
|
||||
datadir=C:\\Program Files\\MySQL\\MySQL Server 5.7\\data
|
||||
character-set-server=utf8
|
||||
|
||||
[client]
|
||||
[client]
|
||||
default-character-set=utf8
|
||||
|
||||
[mysql]
|
||||
default-character-set=utf8
|
||||
[mysqld]
|
||||
charcater_set_client=utf8
|
||||
character_set_connection=utf8
|
||||
character_set_results=utf8
|
||||
character_set_server=utf8
|
||||
character_set_database=utf8
|
||||
|
|
|
@ -1,214 +0,0 @@
|
|||
-- ADMIN/123789
|
||||
-- User/123789
|
||||
DELETE From Users where UserName in ('Admin', 'User');
|
||||
INSERT INTO Users (Id, UserName, Password, PassSalt, DisplayName, RegisterTime, ApprovedTime, ApprovedBy, Description) values (SEQ_USERS_ID.NEXTVAL, 'Admin', 'Es7WVgNsJuELwWK8daCqufUBknCsSC0IYDphQZAiGOo=', 'W5vpBEOYRGHkQXatN0t+ECM/U8cHDuEgrq56+zZBk4J481xH', 'Administrator', sysdate, sysdate, 'system', '系统默认创建');
|
||||
INSERT INTO Users (Id, UserName, Password, PassSalt, DisplayName, RegisterTime, ApprovedTime, ApprovedBy, Description, App) values (SEQ_USERS_ID.NEXTVAL, 'User', 'tXG/yNffpnm6cThrCH7wf6jN1ic3VHvLoY4OrzKtrZ4=', 'c5cIrRMn8XjB84M/D/X7Lg9uUqQFmYNEdxb/4HWH8OLa4pNZ', '测试账号', sysdate, sysdate, 'system', '系统默认创建', 'Demo');
|
||||
|
||||
DELETE From Dicts Where Define = 0;
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '菜单', '系统菜单', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '菜单', '外部菜单', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '应用程序', '后台管理', 'BA', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '网站标题', '后台管理系统', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '网站页脚', '2016 © 通用后台管理系统', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '系统通知', '用户注册', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '系统通知', '程序异常', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '系统通知', '数据库连接', '2', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '通知状态', '未处理', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '通知状态', '已处理', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '处理结果', '同意', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '处理结果', '拒绝', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '消息状态', '未读', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '消息状态', '已读', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '消息标签', '一般', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '消息标签', '紧要', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '头像地址', '头像路径', '~/images/uploader/', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '头像地址', '头像文件', 'default.jpg', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站样式', '蓝色样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站样式', '黑色样式', 'black.css', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站样式', 'AdminLTE', 'lte.css', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '前台首页', '~/Home/Index', 0);
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '侧边栏状态', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '卡片标题状态', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '固定表头', '1', 0);
|
||||
|
||||
-- 登录配置
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '短信验证码登录', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'OAuth 认证登录', '1', 0);
|
||||
|
||||
-- 自动锁屏(秒)默认 30 秒
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '自动锁屏时长', '30', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '自动锁屏', '0', 0);
|
||||
|
||||
-- 是否启用 Blazor 默认为 0 未启用
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'Blazor', '0', 0);
|
||||
|
||||
-- 是否启用 健康检查 默认为 0 未启用 1 启用
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '健康检查', '1', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '访问日志保留时长', '1', 0);
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '地理位置服务', '百度地图开放平台', 'BaiDuIPSvr', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '地理位置服务', '聚合地理位置', 'JuheIPSvr', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '地理位置服务', '百度138地理位置', 'BaiDuIP138Svr', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '地理位置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj'||CHR(38)||'ip=', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '地理位置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206'||CHR(38)||'ip=', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '地理位置', 'BaiDuIP138Svr', 'https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=', 0);
|
||||
|
||||
-- 时长单位 分钟
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', 'IP请求缓存时长', '10', 0);
|
||||
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '演示系统', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '网站设置', '授权盐值', 'yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '网站设置', '哈希结果', '6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=', 0);
|
||||
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '默认应用程序', '0', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) Values (SEQ_DICTS_ID.NEXTVAL, '网站设置', '后台地址', 'http://localhost:50852', 0);
|
||||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '高仿码云', 'Login-Gitee', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '蓝色清新', 'Login-Blue', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '系统默认', 'Login', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', '科技动感', 'Login-Tec', 0);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '系统首页', 'Admin-LTE', 'Login-LTE', 0);
|
||||
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '网站设置', '登录界面', 'Login', 0);
|
||||
|
||||
DELETE FROM Navigations Where Category = '0';
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL, 0, '后台管理', 10, 'fa fa-gear', '~/Admin/Index', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL, 0, '个人中心', 20, 'fa fa-suitcase', '~/Admin/Profiles', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '保存显示名称', 10, 'fa fa-fa', 'saveDisplayName', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '保存密码', 20, 'fa fa-fa', 'savePassword', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '保存应用', 30, 'fa fa-fa', 'saveApp', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '保存样式', 40, 'fa fa-fa', 'saveTheme', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '保存头像', 50, 'fa fa-fa', 'saveIcon', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 6, '保存网站设置', 60, 'fa fa-fa', 'saveUISettings', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '系统锁屏', 25, 'fa fa-television', '~/Account/Lock', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '返回前台', 30, 'fa fa-hand-o-left', '~/Home/Index', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '网站设置', 40, 'fa fa-fa', '~/Admin/Settings', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '保存系统名称', 10, 'fa fa-fa', 'saveTitle', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '保存页脚设置', 20, 'fa fa-fa', 'saveFooter', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '保存样式', 30, 'fa fa-fa', 'saveTheme', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '清理缓存', 40, 'fa fa-fa', 'clearCache', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '清理全部缓存', 50, 'fa fa-fa', 'clearAllCache', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 6, '登录设置', 60, 'fa fa-fa', 'loginSettings', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 7, '自动锁屏', 70, 'fa fa-fa', 'lockScreen', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 8, '默认应用', 80, 'fa fa-fa', 'defaultApp', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '菜单管理', 50, 'fa fa-dashboard', '~/Admin/Menus', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '分配角色', 40, 'fa fa-fa', 'assignRole', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '图标页面', 50, 'fa fa-fa', '~/Admin/IconView', '0', 1);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '侧边栏', 55, 'fa fa-fa', '~/Admin/Sidebar', '0', 1);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '用户管理', 60, 'fa fa-user', '~/Admin/Users', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '分配部门', 40, 'fa fa-fa', 'assignGroup', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '分配角色', 50, 'fa fa-fa', 'assignRole', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '角色管理', 70, 'fa fa-sitemap', '~/Admin/Roles', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '分配用户', 40, 'fa fa-fa', 'assignUser', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '分配部门', 50, 'fa fa-fa', 'assignGroup', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 6, '分配菜单', 60, 'fa fa-fa', 'assignMenu', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 7, '分配应用', 70, 'fa fa-fa', 'assignApp', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '部门管理', 80, 'fa fa-bank', '~/Admin/Groups', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, '分配用户', 40, 'fa fa-fa', 'assignUser', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 5, '分配角色', 50, 'fa fa-fa', 'assignRole', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '字典表维护', 90, 'fa fa-book', '~/Admin/Dicts', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '删除', 30, 'fa fa-fa', 'del', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '站内消息', 100, 'fa fa-envelope', '~/Admin/Messages', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '任务管理', 110, 'fa fa fa-tasks', '~/Admin/Tasks', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '暂停', 10, 'fa fa-fa', 'pause', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '日志', 20, 'fa fa-fa', 'info', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '通知管理', 120, 'fa fa-bell', '~/Admin/Notifications', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '系统日志', 130, 'fa fa-gears', '#', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '操作日志', 10, 'fa fa-edit', '~/Admin/Logs', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '登录日志', 20, 'fa fa-user-circle-o', '~/Admin/Logins', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '访问日志', 30, 'fa fa-bars', '~/Admin/Traces', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 4, 'SQL日志', 40, 'fa fa-database', '~/Admin/SQL', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '在线用户', 140, 'fa fa-users', '~/Admin/Online', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '网站分析', 145, 'fa fa-line-chart', '~/Admin/Analyse', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '程序异常', 150, 'fa fa-cubes', '~/Admin/Exceptions', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, IsResource) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL, '服务器日志', 10, 'fa fa-fa', 'log', '0', 2);
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '健康检查', 155, 'fa fa-heartbeat', '~/Admin/Healths', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL,0, '工具集合', 160, 'fa fa-gavel', '#', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '客户端测试', 10, 'fa fa-wrench', '~/Admin/Mobile', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, 'API文档', 20, 'fa fa-wrench', '~/swagger', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 3, '图标集', 30, 'fa fa-dashboard', '~/Admin/FAIcon', '0');
|
||||
|
||||
-- 控件集合菜单
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAL, 0, '控件集合', 170, 'fa fa-stethoscope', '#', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 1, '行为式验证码', 10, 'fa fa-wrench', 'https://gitee.com/LongbowEnterprise/SliderCaptcha', '0');
|
||||
INSERT INTO Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category) Values (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL - 2, '下拉框', 20, 'fa fa-bars', 'http://longbowenterprise.gitee.io/longbow-select/', '0');
|
||||
|
||||
DELETE FROM GROUPS WHERE GroupName = 'Admin';
|
||||
INSERT INTO Groups (Id, GroupCode, GroupName, Description) VALUES (SEQ_GROUPS_ID.NEXTVAL, '001', 'Admin', '系统默认组');
|
||||
|
||||
DELETE FROM Roles where RoleName in ('Administrators', 'Default');
|
||||
INSERT INTO Roles (Id, RoleName, Description) VALUES (SEQ_ROLES_ID.NEXTVAL, 'Administrators', '系统管理员');
|
||||
INSERT INTO Roles (Id, RoleName, Description) VALUES (SEQ_ROLES_ID.NEXTVAL, 'Default', '默认用户,可访问前台页面');
|
||||
|
||||
DELETE FROM RoleGroup;
|
||||
INSERT INTO RoleGroup (Id, GroupId, RoleId) SELECT SEQ_ROLEGROUP_ID.NEXTVAL, g.Id, r.Id From Groups g left join Roles r on 1=1 where GroupName = 'Admin' and RoleName = 'Administrators';
|
||||
|
||||
DELETE FROM UserGroup;
|
||||
|
||||
DELETE FROM UserRole;
|
||||
INSERT INTO UserRole (Id, UserId, RoleId) SELECT SEQ_USERROLE_ID.NEXTVAL, u.Id, r.Id From Users u left join Roles r on 1=1 where UserName = 'Admin' and RoleName = 'Administrators';
|
||||
INSERT INTO UserRole (Id, UserId, RoleId) SELECT SEQ_USERROLE_ID.NEXTVAL, u.Id, r.Id From Users u left join Roles r on 1=1 where UserName = 'User' and RoleName = 'Default';
|
||||
|
||||
DELETE FROM NavigationRole;
|
||||
INSERT INTO NavigationRole (Id, NavigationID, RoleID) SELECT SEQ_NAVIGATIONROLE_ID.NEXTVAL, n.Id, r.Id FROM Navigations n left join Roles r on 1=1 Where RoleName = 'Administrators';
|
||||
INSERT INTO NavigationRole (Id, NavigationID, RoleID) SELECT SEQ_NAVIGATIONROLE_ID.NEXTVAL, n.Id, r.Id FROM Navigations n left join Roles r on 1=1 Where RoleName = 'Default' and Name in ('后台管理', '个人中心', '返回前台', '通知管理');
|
||||
INSERT INTO NavigationRole (Id, NavigationID, RoleID) SELECT SEQ_NAVIGATIONROLE_ID.NEXTVAL, n.Id, r.Id FROM Navigations n left join Roles r on 1=1 Where RoleName = 'Default' and ParentId in (select id from Navigations where Name in ('个人中心'));
|
||||
|
||||
-- Client Data
|
||||
Delete From Dicts Where Category = '应用程序' and Code = 'Demo';
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '应用程序', '测试平台', 'Demo', 0);
|
||||
Delete From Dicts Where Category = '应用首页' and Name = 'Demo';
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '应用首页', 'Demo', 'http://localhost:49185', 0);
|
||||
|
||||
Delete From Dicts Where Category = '测试平台';
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '网站标题', '前台演示系统', 1);
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '网站页脚', '前台演示程序后台权限管理框架', 1);
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '个人中心地址', '/Admin/Profiles', 1);
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '系统设置地址', '/Admin/Index', 1);
|
||||
Insert into Dicts (Id, Category, Name, Code, Define) values (SEQ_DICTS_ID.NEXTVAL, '测试平台', '系统通知地址', '/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '测试平台', 'favicon', '/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Id, Category, Name, Code, Define) VALUES (SEQ_DICTS_ID.NEXTVAL, '测试平台', '网站图标', '/favicon.png', 1);
|
||||
|
||||
Delete from Navigations where Application = 'Demo';
|
||||
INSERT into Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, Application) VALUES (SEQ_NAVIGATIONS_ID.NEXTVAl, 0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 'Demo');
|
||||
|
||||
INSERT into Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, Application) VALUES (SEQ_NAVIGATIONS_ID.NEXTVAl, 0, '测试页面', 20, 'fa fa-fa', '#', '1', 'Demo');
|
||||
INSERT into Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, Application) VALUES (SEQ_NAVIGATIONS_ID.NEXTVAl, SEQ_NAVIGATIONS_ID.CURRVAL, '关于', 10, 'fa fa-fa', '~/Home/About', '1', 'Demo');
|
||||
|
||||
INSERT into Navigations (Id, ParentId, Name, "ORDER", Icon, Url, Category, Application) VALUES (SEQ_NAVIGATIONS_ID.NEXTVAl, 0, '返回码云', 20, 'fa fa-fa', 'https://gitee.com/LongbowEnterprise/BootstrapAdmin', '1', 'Demo');
|
||||
|
||||
-- 菜单授权
|
||||
INSERT INTO NavigationRole (Id, NavigationId, RoleId) SELECT SEQ_NAVIGATIONROLE_ID.NEXTVAL, n.ID, r.ID FROM Navigations n left join Roles r on 1=1 Where r.RoleName = 'Default' and Application = 'Demo';
|
||||
|
||||
-- 角色对应用授权
|
||||
DELETE From RoleApp where AppId in ('Demo', 'BA');
|
||||
INSERT INTO RoleApp (Id, AppId, RoleId) SELECT SEQ_ROLEAPP_ID.NEXTVAL, 'Demo', ID From Roles Where RoleName = 'Default';
|
||||
INSERT INTO RoleApp (Id, AppId, RoleId) SELECT SEQ_ROLEAPP_ID.NEXTVAL, 'BA', ID From Roles Where RoleName = 'Default';
|
|
@ -1,215 +0,0 @@
|
|||
CREATE TABLE Users (
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (16) NOT NULL,
|
||||
Password NVARCHAR2 (50) NOT NULL,
|
||||
PassSalt NVARCHAR2 (50) NOT NULL,
|
||||
DisplayName NVARCHAR2 (50) NOT NULL,
|
||||
RegisterTime DATE NOT NULL,
|
||||
ApprovedTime DATE,
|
||||
ApprovedBy NVARCHAR2 (50),
|
||||
Description NVARCHAR2 (500) NOT NULL,
|
||||
RejectedBy NVARCHAR2 (50) ,
|
||||
RejectedTime DATE,
|
||||
RejectedReason NVARCHAR2 (50),
|
||||
Icon NVARCHAR2 (50),
|
||||
Css NVARCHAR2 (50),
|
||||
App NVARCHAR2 (50)
|
||||
);
|
||||
|
||||
CREATE TABLE UserRole (
|
||||
ID INTEGER NOT NULL,
|
||||
UserID INTEGER NOT NULL,
|
||||
RoleID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE UserGroup(
|
||||
ID INTEGER NOT NULL,
|
||||
UserID INTEGER NOT NULL,
|
||||
GroupID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Roles(
|
||||
ID INTEGER NOT NULL,
|
||||
RoleName NVARCHAR2 (50) NOT NULL,
|
||||
Description NVARCHAR2 (500) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE RoleGroup(
|
||||
ID INTEGER NOT NULL,
|
||||
RoleID INTEGER NOT NULL,
|
||||
GroupID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE RoleApp(
|
||||
ID INTEGER NOT NULL,
|
||||
AppID NVARCHAR2 (50) NOT NULL,
|
||||
RoleID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Notifications(
|
||||
ID INTEGER NOT NULL,
|
||||
Category NVARCHAR2 (50) NOT NULL,
|
||||
Title NVARCHAR2 (50) NOT NULL,
|
||||
Content NVARCHAR2 (50) NOT NULL,
|
||||
RegisterTime DATE NOT NULL,
|
||||
ProcessTime DATE NULL,
|
||||
ProcessBy NVARCHAR2 (50) NULL,
|
||||
ProcessResult NVARCHAR2 (50) NULL,
|
||||
Status NVARCHAR2 (50) DEFAULT 0
|
||||
);
|
||||
|
||||
CREATE TABLE Navigations(
|
||||
ID INTEGER NOT NULL,
|
||||
ParentId INTEGER DEFAULT 0,
|
||||
Name NVARCHAR2 (50) NOT NULL,
|
||||
"ORDER" INTEGER DEFAULT 0 NOT NULL,
|
||||
Icon NVARCHAR2 (50) DEFAULT 'fa fa-fa',
|
||||
Url NVARCHAR2 (2000) NULL,
|
||||
Category NVARCHAR2 (50) DEFAULT 0,
|
||||
Target NVARCHAR2 (10) DEFAULT '_self',
|
||||
IsResource INTEGER DEFAULT 0,
|
||||
Application NVARCHAR2 (200) DEFAULT 'BA'
|
||||
);
|
||||
|
||||
CREATE TABLE NavigationRole(
|
||||
ID INTEGER NOT NULL,
|
||||
NavigationID INTEGER NOT NULL,
|
||||
RoleID INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Logs(
|
||||
ID INTEGER NOT NULL,
|
||||
CRUD NVARCHAR2 (50) NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
LogTime DATE NOT NULL,
|
||||
Ip NVARCHAR2 (15) NOT NULL,
|
||||
Browser NVARCHAR2 (50) NULL,
|
||||
OS NVARCHAR2 (50) NULL,
|
||||
City NVARCHAR2 (50) NULL,
|
||||
RequestUrl NVARCHAR2 (500) NOT NULL,
|
||||
RequestData NVARCHAR2 (2000) NULL,
|
||||
UserAgent NVARCHAR2 (2000) NULL,
|
||||
Referer NVARCHAR2 (2000) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Groups(
|
||||
ID INTEGER NOT NULL,
|
||||
GroupCode NVARCHAR2 (50) NOT NULL,
|
||||
GroupName NVARCHAR2 (50) NOT NULL,
|
||||
Description NVARCHAR2 (500) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Exceptions(
|
||||
ID INTEGER NOT NULL,
|
||||
AppDomainName NVARCHAR2 (50) NOT NULL,
|
||||
ErrorPage NVARCHAR2 (50) NOT NULL,
|
||||
UserID NVARCHAR2 (50) NULL,
|
||||
UserIp NVARCHAR2 (15) NULL,
|
||||
ExceptionType NVARCHAR2 (2000) NOT NULL,
|
||||
Message NVARCHAR2 (2000) NOT NULL,
|
||||
StackTrace NVARCHAR2 (2000) NULL,
|
||||
LogTime DATE NOT NULL,
|
||||
Category NVARCHAR2 (50) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Dicts(
|
||||
ID INTEGER NOT NULL,
|
||||
Category NVARCHAR2 (50) NOT NULL,
|
||||
Name NVARCHAR2 (50) NOT NULL,
|
||||
Code NVARCHAR2 (2000) NOT NULL,
|
||||
Define INTEGER DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Messages(
|
||||
ID INTEGER NOT NULL,
|
||||
Title NVARCHAR2 (50) NOT NULL,
|
||||
Content NVARCHAR2 (500) NOT NULL,
|
||||
"FROM" NVARCHAR2 (50) NOT NULL,
|
||||
"TO" NVARCHAR2 (50) NOT NULL,
|
||||
SendTime DATE NOT NULL,
|
||||
Status NVARCHAR2 (50) NOT NULL,
|
||||
Flag INTEGER DEFAULT 0,
|
||||
IsDelete INTEGER DEFAULT 0,
|
||||
Label NVARCHAR2 (50)
|
||||
);
|
||||
|
||||
CREATE TABLE Tasks(
|
||||
ID INTEGER NOT NULL,
|
||||
TaskName NVARCHAR2 (500) NOT NULL,
|
||||
AssignName NVARCHAR2 (50) NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
TaskTime INTEGER NOT NULL,
|
||||
TaskProgress INTEGER NOT NULL,
|
||||
AssignTime DATE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE RejectUsers(
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
DisplayName NVARCHAR2 (50) NOT NULL,
|
||||
RegisterTime DATE NOT NULL,
|
||||
RejectedBy NVARCHAR2 (50) NOT NULL,
|
||||
RejectedTime DATE NOT NULL,
|
||||
RejectedReason NVARCHAR2 (50) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE LoginLogs(
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
LoginTime DATE NOT NULL,
|
||||
Ip NVARCHAR2 (15) NOT NULL,
|
||||
OS NVARCHAR2 (50) NULL,
|
||||
Browser NVARCHAR2 (50) NULL,
|
||||
City NVARCHAR2 (50) NULL,
|
||||
Result NVARCHAR2 (50) NOT NULL,
|
||||
UserAgent NVARCHAR2 (2000) NULL
|
||||
);
|
||||
|
||||
CREATE TABLE ResetUsers(
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
DisplayName NVARCHAR2 (50) NOT NULL,
|
||||
Reason NVARCHAR2 (500) NOT NULL,
|
||||
ResetTime DATE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE Traces(
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50) NOT NULL,
|
||||
LogTime DATE NOT NULL,
|
||||
IP NVARCHAR2 (15) NOT NULL,
|
||||
Browser NVARCHAR2 (2000),
|
||||
OS NVARCHAR2 (2000),
|
||||
City NVARCHAR2 (50),
|
||||
RequestUrl NVARCHAR2 (2000) NOT NULL,
|
||||
UserAgent NVARCHAR2 (2000),
|
||||
Referer NVARCHAR2 (2000)
|
||||
);
|
||||
|
||||
CREATE TABLE DBLogs (
|
||||
ID INTEGER NOT NULL,
|
||||
UserName NVARCHAR2 (50),
|
||||
SQL NVARCHAR2 (2000) NOT NULL,
|
||||
LogTime DATE NOT NULL
|
||||
);
|
||||
|
||||
CREATE SEQUENCE SEQ_USERS_ID;
|
||||
CREATE SEQUENCE SEQ_USERROLE_ID;
|
||||
CREATE SEQUENCE SEQ_USERGROUP_ID;
|
||||
CREATE SEQUENCE SEQ_ROLES_ID;
|
||||
CREATE SEQUENCE SEQ_ROLEGROUP_ID;
|
||||
CREATE SEQUENCE SEQ_ROLEAPP_ID;
|
||||
CREATE SEQUENCE SEQ_NOTIFICATIONS_ID;
|
||||
CREATE SEQUENCE SEQ_NAVIGATIONS_ID;
|
||||
CREATE SEQUENCE SEQ_NAVIGATIONROLE_ID;
|
||||
CREATE SEQUENCE SEQ_LOGS_ID;
|
||||
CREATE SEQUENCE SEQ_GROUPS_ID;
|
||||
CREATE SEQUENCE SEQ_EXCEPTIONS_ID;
|
||||
CREATE SEQUENCE SEQ_DICTS_ID;
|
||||
CREATE SEQUENCE SEQ_MESSAGES_ID;
|
||||
CREATE SEQUENCE SEQ_TASKS_ID;
|
||||
CREATE SEQUENCE SEQ_REJECTUSERS_ID;
|
||||
CREATE SEQUENCE SEQ_LOGINLOGS_ID;
|
||||
CREATE SEQUENCE SEQ_RESETUSERS_ID;
|
||||
CREATE SEQUENCE SEQ_TRACES_ID;
|
||||
CREATE SEQUENCE SEQ_DBLOGS_ID;
|
|
@ -26,13 +26,12 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('头像地址', '头像
|
|||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', '蓝色样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', '黑色样式', 'black.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站样式', 'AdminLTE', 'lte.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('当前样式', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '前台首页', '~/Home/Index', 0);
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '侧边栏状态', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '卡片标题状态', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '固定表头', '1', 0);
|
||||
|
||||
-- 登录配置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '短信验证码登录', '1', 0);
|
||||
|
@ -43,23 +42,21 @@ INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '自动
|
|||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '自动锁屏', '0', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '访问日志保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '访问日志保留时长', '1', 0);
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('地理位置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '演示系统', '0', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '演示系统', '0', 0);
|
||||
-- 时长单位 分钟
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('网站设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
|
||||
DELETE FROM Navigations Where Category = '0';
|
||||
INSERT INTO Navigations (ParentId, Name, "order", Icon, Url, Category) VALUES (0, '后台管理', 10, 'fa fa-gear', '~/Admin/Index', '0');
|
||||
|
|
|
@ -178,10 +178,10 @@ CREATE TABLE Traces(
|
|||
UserName VARCHAR (50) NOT NULL,
|
||||
LogTime DATE NOT NULL,
|
||||
IP VARCHAR (15) NOT NULL,
|
||||
Browser VARCHAR (2000),
|
||||
OS VARCHAR (2000),
|
||||
Browser VARCHAR (50),
|
||||
OS VARCHAR (50),
|
||||
City VARCHAR (50),
|
||||
RequestUrl VARCHAR (2000) NOT NULL,
|
||||
RequestUrl VARCHAR (500) NOT NULL,
|
||||
UserAgent VARCHAR (2000) NULL,
|
||||
Referer VARCHAR (2000)
|
||||
);
|
||||
|
|
|
@ -5,6 +5,8 @@ INSERT INTO Users (UserName, Password, PassSalt, DisplayName, RegisterTime, Appr
|
|||
INSERT INTO Users (UserName, Password, PassSalt, DisplayName, RegisterTime, ApprovedTime, ApprovedBy, [Description], [App]) values ('User', 'tXG/yNffpnm6cThrCH7wf6jN1ic3VHvLoY4OrzKtrZ4=', 'c5cIrRMn8XjB84M/D/X7Lg9uUqQFmYNEdxb/4HWH8OLa4pNZ', '测试账号', datetime(CURRENT_TIMESTAMP, 'localtime'), datetime(CURRENT_TIMESTAMP, 'localtime'), 'system', '系统默认创建', 'Demo');
|
||||
|
||||
DELETE From Dicts Where Define = 0;
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('菜单', '系统菜单', '0', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('菜单', '外部菜单', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用程序', '后台管理', 'BA', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '网站标题', '后台管理系统', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '网站页脚', '2016 © 通用后台管理系统', 0);
|
||||
|
@ -24,13 +26,12 @@ INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('头像地址
|
|||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站样式', '蓝色样式', 'blue.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站样式', '黑色样式', 'black.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站样式', 'AdminLTE', 'lte.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('当前样式', '使用样式', 'blue.css', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '前台首页', '~/Home/Index', 0);
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '侧边栏状态', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '卡片标题状态', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '固定表头', '1', 0);
|
||||
|
||||
-- 登录配置
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '短信验证码登录', '1', 0);
|
||||
|
@ -40,53 +41,22 @@ INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置
|
|||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '自动锁屏时长', '30', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '自动锁屏', '0', 0);
|
||||
|
||||
-- 是否启用 Blazor 默认为 0 未启用
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', 'Blazor', '0', 0);
|
||||
|
||||
-- 是否启用 健康检查 默认为 0 未启用 1 启用
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '健康检查', '1', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '访问日志保留时长', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '程序异常保留时长', '1', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '操作日志保留时长', '12', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '登录日志保留时长', '12', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '访问日志保留时长', '1', 0);
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置服务', '百度地图开放平台', 'BaiDuIPSvr', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置服务', '聚合地理位置', 'JuheIPSvr', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置服务', '百度138地理位置', 'BaiDuIP138Svr', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('地理位置', 'BaiDuIP138Svr', 'https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'Cookie保留时长', '7', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'IP地理位置接口', 'None', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0);
|
||||
-- 时长单位 分钟
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', 'IP请求缓存时长', '10', 0);
|
||||
|
||||
-- 演示系统
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '演示系统', '0', 0);
|
||||
-- 授权密码默认为 123789
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '授权盐值', 'yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '哈希结果', '6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '默认应用程序', '0', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '后台地址', 'http://localhost:50852', 0);
|
||||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统首页', '2-高仿码云', 'Login-Gitee', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统首页', '3-蓝色清新', 'Login-Blue', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统首页', '1-系统默认', 'Login', 1);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', '科技动感', '4-Login-Tec', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES ('系统首页', 'Admin-LTE', '5-Login-LTE', 0);
|
||||
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('网站设置', '登录界面', 'Login', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', 'IP请求缓存时长', '10', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '演示系统', '0', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('系统设置', '验证码图床', 'http://imgs.sdgxgz.com/images/', 0);
|
||||
|
||||
DELETE FROM Navigations Where Category = '0';
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (0, '后台管理', 10, 'fa fa-gear', '~/Admin/Index', '0');
|
||||
|
@ -107,7 +77,6 @@ INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category
|
|||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 4, '清理全部缓存', 50, 'fa fa-fa', 'clearAllCache', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 5, '登录设置', 60, 'fa fa-fa', 'loginSettings', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 6, '自动锁屏', 70, 'fa fa-fa', 'lockScreen', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 7, '默认应用', 80, 'fa fa-fa', 'defaultApp', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (0, '菜单管理', 50, 'fa fa-dashboard', '~/Admin/Menus', '0');
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid(), '新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (last_insert_rowid() - 1, '编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
|
@ -189,16 +158,16 @@ INSERT INTO NavigationRole (NavigationID, RoleID) SELECT n.Id, r.Id FROM Navigat
|
|||
Delete From [Dicts] Where Category = '应用程序' and Code = 'Demo';
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用程序', '测试平台', 'Demo', 0);
|
||||
Delete From [Dicts] Where Category = '应用首页' and Name = 'Demo';
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用首页', 'Demo', 'http://localhost:49185', 0);
|
||||
INSERT INTO [Dicts] ([Category], [Name], [Code], [Define]) VALUES ('应用首页', 'Demo', 'http://localhost:49185/', 0);
|
||||
|
||||
Delete From [Dicts] Where Category = '测试平台';
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站标题', '前台演示系统', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '网站页脚', '前台演示程序后台权限管理框架', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '个人中心地址', '/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统设置地址', '/Admin/Index', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统通知地址', '/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', 'favicon', '/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', '网站图标', '/favicon.png', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '个人中心地址', 'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统设置地址', 'http://localhost:50852/Admin/Index', 1);
|
||||
Insert into Dicts (Category, [Name], Code, Define) values ('测试平台', '系统通知地址', 'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', 'favicon', 'http://localhost:49185/favicon.ico', 1);
|
||||
INSERT INTO Dicts (Category, [Name], Code, Define) VALUES ('测试平台', '网站图标', 'http://localhost:49185/favicon.png', 1);
|
||||
|
||||
Delete from [Navigations] where Application = 'Demo';
|
||||
INSERT into [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], [Application]) VALUES (0, '首页', 10, 'fa fa-fa', '~/Home/Index', '1', 'Demo');
|
||||
|
|
|
@ -178,10 +178,10 @@ CREATE TABLE Traces(
|
|||
UserName VARCHAR (50) NOT NULL COLLATE NOCASE,
|
||||
LogTime DATETIME NOT NULL,
|
||||
IP VARCHAR (15) NOT NULL,
|
||||
Browser VARCHAR (2000),
|
||||
OS VARCHAR (2000),
|
||||
Browser VARCHAR (50),
|
||||
OS VARCHAR (50),
|
||||
City VARCHAR (50),
|
||||
RequestUrl VARCHAR (2000) NOT NULL,
|
||||
RequestUrl VARCHAR (500) NOT NULL,
|
||||
UserAgent VARCHAR (2000),
|
||||
Referer VARCHAR (2000)
|
||||
);
|
||||
|
|
|
@ -29,13 +29,12 @@ INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'头像地
|
|||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站样式', N'蓝色样式', N'blue.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站样式', N'黑色样式', N'black.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站样式', N'AdminLTE', N'lte.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'使用样式', N'blue.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'当前样式', N'使用样式', N'blue.css', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'前台首页', N'~/Home/Index', 0)
|
||||
|
||||
-- 网站UI设置
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'侧边栏状态', N'1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'卡片标题状态', N'1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'固定表头', N'1', 0)
|
||||
|
||||
-- 登录配置
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'短信验证码登录', N'1', 0)
|
||||
|
@ -45,50 +44,22 @@ INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设
|
|||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'自动锁屏时长', N'30', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'自动锁屏', N'0', 0)
|
||||
|
||||
-- 是否启用 Blazor 默认为 0 未启用
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'Blazor', N'0', 0)
|
||||
|
||||
-- 是否启用 健康检查 默认为 0 未启用 1 启用
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'健康检查', N'1', 0);
|
||||
|
||||
-- 时长单位 月
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'程序异常保留时长', '1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'操作日志保留时长', '12', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'登录日志保留时长', '12', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'访问日志保留时长', '1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'程序异常保留时长', '1', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'操作日志保留时长', '12', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'登录日志保留时长', '12', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'访问日志保留时长', '1', 0)
|
||||
|
||||
-- 时长单位 天
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'Cookie保留时长', '7', 0)
|
||||
|
||||
-- 地理位置接口
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'IP地理位置接口', 'None', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置服务', N'百度地图开放平台', 'BaiDuIPSvr', 0);
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置服务', N'聚合地理位置', 'JuheIPSvr', 0);
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置服务', N'百度138地理位置', 'BaiDuIP138Svr', 0);
|
||||
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置', N'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置', N'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'地理位置', N'BaiDuIP138Svr', 'https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query=', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'Cookie保留时长', '7', 0)
|
||||
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'IP地理位置接口', 'None', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'BaiDuIPSvr', 'http://api.map.baidu.com/location/ip?ak=6lvVPMDlm2gjLpU0aiqPsHXi2OiwGQRj&ip=', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'JuheIPSvr', 'http://apis.juhe.cn/ip/ipNew?key=f57102d1b9fadd3f4a1c29072d0c0206&ip=', 0)
|
||||
-- 时长单位 分钟
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'IP请求缓存时长', '10', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'演示系统', '0', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'授权盐值', 'yjglE2eddCGcS7tTFTDd2DfvqXHgCnMhNhpmx9HJaC9l8GAZ', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'哈希结果', '6jTT50HGuk8V+AIsiE4IfqjcER71PBN1DY7gqOLZE7E=', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'验证码图床', 'http://imgs.sdgxgz.com/images/', 0)
|
||||
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'默认应用程序', '0', 0)
|
||||
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'网站设置', N'后台地址', 'http://localhost:50852', 0)
|
||||
|
||||
-- 系统登录首页设置
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'高仿码云', N'Login-Gitee', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'蓝色清新', N'Login-Blue', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'系统默认', N'Login', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'科技动感', N'Login-Tec', 0);
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'系统首页', N'Admin-LTE', N'Login-LTE', 0);
|
||||
|
||||
INSERT INTO Dicts (Category, Name, Code, Define) VALUES (N'网站设置', N'登录界面', N'Login', 0);
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'IP请求缓存时长', '10', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'演示系统', '0', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'系统设置', N'验证码图床', 'http://imgs.sdgxgz.com/images/', 0)
|
||||
|
||||
DELETE FROM Navigations Where Category = N'0'
|
||||
INSERT [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (0, N'后台管理', 10, N'fa fa-gear', N'~/Admin/Index', N'0')
|
||||
|
@ -109,7 +80,6 @@ INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category
|
|||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 4, N'清理全部缓存', 50, 'fa fa-fa', 'clearAllCache', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 5, N'登录设置', 60, 'fa fa-fa', 'loginSettings', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 6, N'自动锁屏', 70, 'fa fa-fa', 'lockScreen', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 7, N'默认应用', 80, 'fa fa-fa', 'defaultApp', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (0, N'菜单管理', 50, N'fa fa-dashboard', N'~/Admin/Menus', N'0')
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity, N'新增', 10, 'fa fa-fa', 'add', '0', 2);
|
||||
INSERT INTO [Navigations] ([ParentId], [Name], [Order], [Icon], [Url], [Category], IsResource) VALUES (@@Identity - 1, N'编辑', 20, 'fa fa-fa', 'edit', '0', 2);
|
||||
|
@ -195,16 +165,16 @@ set @AppName = N'测试平台'
|
|||
Delete From [dbo].[Dicts] Where Category = N'应用程序' and Code = @AppId
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'应用程序', @AppName, @AppId, 0)
|
||||
Delete From [Dicts] Where Category = '应用首页' and Name = @AppId
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'应用首页', @AppId, 'http://localhost:49185', 0)
|
||||
INSERT [dbo].[Dicts] ([Category], [Name], [Code], [Define]) VALUES (N'应用首页', @AppId, 'http://localhost:49185/', 0)
|
||||
|
||||
Delete From [dbo].[Dicts] Where Category = @AppName
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'网站标题', N'前台演示程序', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'网站页脚', N'前台演示程序后台权限管理框架', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'个人中心地址', N'/Admin/Profiles', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统设置地址', N'/Admin/Index', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统通知地址', N'/Admin/Notifications', 1);
|
||||
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'favicon', N'/favicon.ico', 1);
|
||||
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'网站图标', '/favicon.png', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'个人中心地址', N'http://localhost:50852/Admin/Profiles', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统设置地址', N'http://localhost:50852/Admin/Index', 1);
|
||||
Insert Dicts (Category, Name, Code, Define) values (@AppName, N'系统通知地址', N'http://localhost:50852/Admin/Notifications', 1);
|
||||
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'favicon', N'http://localhost:49185/favicon.ico', 1);
|
||||
INSERT Dicts (Category, Name, Code, Define) VALUES (@AppName, N'网站图标', 'http://localhost:49185/favicon.png', 1);
|
||||
|
||||
-- 菜单
|
||||
DELETE FROM Navigations Where [Application] = @AppId
|
||||
|
|
|
@ -564,10 +564,10 @@ CREATE TABLE [dbo].[Traces](
|
|||
[UserName] [varchar](50) NOT NULL,
|
||||
[LogTime] [datetime] NOT NULL,
|
||||
[Ip] [varchar](15) NOT NULL,
|
||||
[Browser] [varchar](2000) NULL,
|
||||
[OS] [varchar](2000) NULL,
|
||||
[Browser] [varchar](50) NULL,
|
||||
[OS] [varchar](50) NULL,
|
||||
[City] [nvarchar](50) NULL,
|
||||
[RequestUrl] [nvarchar](2000) NOT NULL,
|
||||
[RequestUrl] [nvarchar](500) NOT NULL,
|
||||
[UserAgent] [varchar](2000) NULL,
|
||||
[Referer] [nvarchar](2000) NULL,
|
||||
CONSTRAINT [PK_Traces] PRIMARY KEY CLUSTERED
|
||||
|
|
|
@ -4,10 +4,10 @@ cd ~/BootstrapAdmin
|
|||
git pull
|
||||
dotnet publish src/admin/Bootstrap.Admin -c Release
|
||||
|
||||
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/net5.0/publish/appsettings*.json
|
||||
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/net5.0/publish/BootstrapAdmin.db
|
||||
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp3.0/publish/appsettings*.json
|
||||
rm -f ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp3.0/publish/BootstrapAdmin.db
|
||||
|
||||
systemctl stop ba.admin
|
||||
\cp -fr ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/net5.0/publish/* /usr/local/ba/admin/
|
||||
\cp -fr ~/BootstrapAdmin/src/admin/Bootstrap.Admin/bin/Release/netcoreapp3.0/publish/* /usr/local/ba/admin/
|
||||
systemctl start ba.admin
|
||||
systemctl status ba.admin -l
|
|
@ -4,8 +4,8 @@ cd ~/BootstrapAdmin
|
|||
git pull
|
||||
dotnet publish src/client/Bootstrap.Client -c Release
|
||||
|
||||
rm -f ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/net5.0/publish/appsettings*.json
|
||||
rm -f ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/netcoreapp3.0/publish/appsettings*.json
|
||||
systemctl stop ba.client
|
||||
\cp -fr ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/net5.0/publish/* /usr/local/ba/client/
|
||||
\cp -fr ~/BootstrapAdmin/src/client/Bootstrap.Client/bin/Release/netcoreapp3.0/publish/* /usr/local/ba/client/
|
||||
systemctl start ba.client
|
||||
systemctl status ba.client -l
|
|
@ -8,7 +8,7 @@ cp ~/BootstrapAdmin/src/admin/Bootstrap.Admin/appsettings.json /usr/local/ba/adm
|
|||
cp ~/BootstrapAdmin/src/admin/Bootstrap.Admin/BootstrapAdmin.db /usr/local/ba/admin
|
||||
cp ~/BootstrapAdmin/src/client/Bootstrap.Client/appsettings.json /usr/local/ba/client
|
||||
|
||||
cp ~/BootstrapAdmin/scripts/linux/services/* /usr/lib/systemd/system
|
||||
cp ~/BootstrapAdmin/services/* /usr/lib/systemd/system
|
||||
systemctl enable ba.admin
|
||||
systemctl enable ba.client
|
||||
systemctl enable nginx
|
|
@ -1,13 +0,0 @@
|
|||
# 显示 dotnet version
|
||||
write-host "dotnet --version" -ForegroundColor Cyan
|
||||
dotnet --version
|
||||
|
||||
# 注意 my.ini 文件行结束符必须为CRLF
|
||||
|
||||
$iniPath="C:\Program Files\MySQL\MySQL Server 5.7\my.ini"
|
||||
write-host "copy $($env:appveyor_build_folder)\db\MySQL\my.ini -> $iniPath" -ForegroundColor Cyan
|
||||
xcopy "$($env:appveyor_build_folder)\db\MySQL\my.ini" $iniPath /y
|
||||
$newText = ([System.IO.File]::ReadAllText($iniPath)).Replace("\n", "\r\n")
|
||||
[System.IO.File]::WriteAllText($iniPath, $newText)
|
||||
|
||||
write-host "starting database services ..." -ForegroundColor Cyan
|
|
@ -1,78 +0,0 @@
|
|||
function installDB() {
|
||||
write-host "init sqlserver database..." -ForegroundColor Cyan
|
||||
$startPath = "$($env:appveyor_build_folder)\db\SqlServer"
|
||||
$sqlInstance = "(local)\SQL2017"
|
||||
$outFile = join-path $startPath "output.log"
|
||||
$sqlFile = join-path $startPath "Install.sql"
|
||||
$initFile = join-path $startPath "InitData.sql"
|
||||
|
||||
sqlcmd -S "$sqlInstance" -U sa -P Password12! -i "$sqlFile" -i "$initFile" -o "$outFile"
|
||||
|
||||
write-host "init mysql database..." -ForegroundColor Cyan
|
||||
$env:MYSQL_PWD="Password12!"
|
||||
$mysql = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe"'
|
||||
$cmd = $mysql + ' -e "create database BootstrapAdmin;" -uroot'
|
||||
cmd.exe /c $cmd
|
||||
|
||||
$startPath = "$($env:appveyor_build_folder)\db\MySQL"
|
||||
$para = ' -hlocalhost -uroot -DBootstrapAdmin < '
|
||||
$sqlFile = join-path $startPath "Install.sql"
|
||||
$cmd = $mysql + $para + $sqlFile
|
||||
cmd.exe /c $cmd
|
||||
|
||||
$initFile = join-path $startPath "InitData.sql"
|
||||
$cmd = $mysql + $para + $initFile
|
||||
cmd.exe /c $cmd
|
||||
|
||||
write-host "init mongodb data..." -ForegroundColor Cyan
|
||||
$initFolder = "$($env:appveyor_build_folder)\db\MongoDB"
|
||||
cd $initFolder
|
||||
|
||||
cmd.exe /c "C:\mongodb\bin\mongo init.js"
|
||||
|
||||
$cmd = 'C:\mongodb\bin\mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())"'
|
||||
iex "& $cmd"
|
||||
|
||||
cd $($env:appveyor_build_folder)
|
||||
}
|
||||
|
||||
function runUnitTest() {
|
||||
write-host "dotnet test test\UnitTest" -ForegroundColor Cyan
|
||||
dotnet test "test\UnitTest" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[Bootstrap.Admin*]*%2c[Bootstrap.DataAccess*]*" /p:Exclude="[*]*Program%2c[*]*Startup%2c[Bootstrap.DataAccess*]*AutoDB*%2c[Bootstrap.DataAccess]*WeChatHelper" /p:ExcludeByFile="**/SMSExtensions.cs%2c**/Helper/OAuthHelper.cs%2c**/Extensions/CloudLoggerExtensions.cs%2c**/Extensions/AutoGenerateDatabaseExtensions.cs%2c**/Api/HealthsController.cs%2c**/Pages/**%2c**/DBLogTask.cs%2c**/AutoDbHelper.cs" /p:CoverletOutput=..\..\
|
||||
}
|
||||
|
||||
function installCoveralls() {
|
||||
write-host "install coveralls.net tools" -ForegroundColor Cyan
|
||||
dotnet tool install coveralls.net --tool-path ".\tools"
|
||||
}
|
||||
|
||||
function reportCoveralls() {
|
||||
Set-AppveyorBuildVariable COVERALLS_REPO_TOKEN $($env:COVERALLS_REPO_TOKEN)
|
||||
|
||||
write-host "report UnitTest with Coveralls" -ForegroundColor Cyan
|
||||
.\tools\csmacnz.Coveralls.exe --opencover -i coverage.opencover.xml --useRelativePaths
|
||||
}
|
||||
|
||||
function installCodecov {
|
||||
write-host "install codecov.tool tools" -ForegroundColor Cyan
|
||||
dotnet tool install Codecov.Tool --tool-path ".\tools"
|
||||
}
|
||||
|
||||
function reportCodecov() {
|
||||
Set-AppveyorBuildVariable CODECOV_TOKEN $($env:CODECOV_TOKEN)
|
||||
Set-AppveyorBuildVariable CI $($env:CI)
|
||||
Set-AppveyorBuildVariable APPVEYOR $($env:Appveyor)
|
||||
|
||||
$coverageFile = Test-Path coverage.opencover.xml
|
||||
if ($coverageFile) {
|
||||
write-host "report UnitTest with Codecov" -ForegroundColor Cyan
|
||||
.\tools\codecov -f coverage.opencover.xml
|
||||
}
|
||||
}
|
||||
|
||||
installDB
|
||||
installCoveralls
|
||||
installCodecov
|
||||
runUnitTest
|
||||
reportCoveralls
|
||||
reportCodecov
|
|
@ -1,42 +0,0 @@
|
|||
fix(#BUGID): 简要描述
|
||||
|
||||
#Comment
|
||||
comment #BUGID
|
||||
|
||||
#Issue
|
||||
close link fix https://gitee.com/LongbowEnterprise/dashboard/issues?id=BUGID
|
||||
|
||||
# 样式 : feat(location): 接入登录API
|
||||
#
|
||||
# 登录功能与服务器对接
|
||||
#
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
<body>
|
||||
|
||||
<footer>
|
||||
|
||||
#其中 type 的值可以有
|
||||
# feat: 新功能
|
||||
# fix: 修复bug
|
||||
# doc: 文档改变
|
||||
# style: 代码格式改变
|
||||
# refactor: 某个已有功能重构
|
||||
# perf: 性能优化
|
||||
# test: 增加测试
|
||||
# build: 改变了build工具 如 更新 props 文件
|
||||
# revert: 撤销上一次的 commit
|
||||
# db: 数据库文件或者脚本更改
|
||||
# script: 辅助脚本改变
|
||||
#
|
||||
#scope: 用来说明此次修改的影响范围
|
||||
# all: 表示影响面大 ,如修改了网络框架 会对真个程序产生影响
|
||||
# location: 表示影响小,某个小小的功能
|
||||
# module: 表示会影响某个模块 如登录模块、首页模块 、用户管理模块等等
|
||||
#
|
||||
#subject: 用来简要描述本次改动,概述就好了
|
||||
#
|
||||
#body: 具体的修改信息 应该尽量详细
|
||||
#
|
||||
#footer: 放置写备注啥的,如果是 bug ,可以把bug id放入
|
||||
#
|
|
@ -1,32 +0,0 @@
|
|||
## 提交模板配置
|
||||
|
||||
### Windows Fork
|
||||
|
||||
Windows 版本的 Fork 提供了提交模板 (commit message template)功能,配置步骤如下
|
||||
|
||||
#### git 配置文件
|
||||
|
||||
1. 拷贝仓库 `scripts\git\commit_msg_template.txt` 文件到当前用户根目录下 `C:\Users\[用户名]\.commit_msg_template.txt`
|
||||
2. 配置 git 全局配置文件 `C:\Users\[用户名]\.gitconfig` (此文件为隐藏文件)
|
||||
3. 更新 commit 配置项
|
||||
|
||||
```log
|
||||
[commit]
|
||||
template = /Users/argo/.commit_msg_template.txt
|
||||
```
|
||||
|
||||
注意原始文件不是 . 开头拷贝到跟目录下为 . 开头文件名(点号开头文件默认为隐藏文件)
|
||||
|
||||
#### Fork 配置步骤
|
||||
|
||||
1. 打开要配置的仓库
|
||||
2. 点击菜单栏第二个 **仓库** 菜单(Repository)
|
||||
3. 下拉菜单中选中最后一个菜单项 **仓库设置** 子菜单(Settings for this repository)
|
||||
|
||||
如下图所示
|
||||
![输入图片说明](https://images.gitee.com/uploads/images/2020/0327/123310_1b9b4af3_554725.png "Screen Shot 2020-03-27 at 12.30.38.png")
|
||||
|
||||
4. 切换到 **提交模板** 面板(Commit Template)
|
||||
5. 勾选使用 **全局配置文件** (Use global git configuration file)
|
||||
|
||||
下面的文本框内即出现提交模板内容
|
|
@ -1,3 +0,0 @@
|
|||
@echo off
|
||||
|
||||
copy commit_msg_template.txt "%USERPROFILE%\.commit_msg_template.txt" /y
|
|
@ -1,3 +0,0 @@
|
|||
#! /bin/bash
|
||||
|
||||
cp commit_msg_template.txt "../../.git/commit_msg_template1.txt"
|
|
@ -3,15 +3,11 @@
|
|||
<Import Project="..\Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageProjectUrl>https://gitee.com/LongbowEnterprise/BootstrapAdmin</PackageProjectUrl>
|
||||
<RepositoryUrl>https://gitee.com/LongbowEnterprise/BootstrapAdmin.git</RepositoryUrl>
|
||||
<PackageProjectUrl>https://gitee.com/LongbowGroup/$(MsBuildProjectName)</PackageProjectUrl>
|
||||
<RepositoryUrl>https://gitee.com/LongbowGroup/$(MsBuildProjectName).git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DocumentationFile>$(MSBuildProjectName).xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<IsWebProject>true</IsWebProject>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -9,12 +10,10 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BootstrapBlazor" Version="6.2.9-beta07" />
|
||||
<PackageReference Include="Exceptionless.AspNetCore" Version="4.6.2" />
|
||||
<PackageReference Include="Longbow.Logging" Version="5.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
|
||||
<PackageReference Include="Sentry.AspNetCore" Version="3.10.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
<PackageReference Include="Longbow.Logging" Version="3.0.3-beta1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.0.0" />
|
||||
<PackageReference Include="Sentry.AspNetCore" Version="2.0.0-beta6" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
Binary file not shown.
|
@ -1,14 +1,8 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security.Mvc;
|
||||
using Longbow.AlipayAuth;
|
||||
using Longbow.GiteeAuth;
|
||||
using Longbow.GitHubAuth;
|
||||
using Longbow.TencentAuth;
|
||||
using Longbow.Web.SMS;
|
||||
using Longbow.WeChatAuth;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
|
@ -42,12 +36,11 @@ namespace Bootstrap.Admin.Controllers
|
|||
[HttpGet]
|
||||
public async Task<ActionResult> Lock()
|
||||
{
|
||||
if (!User.Identity!.IsAuthenticated) return Login();
|
||||
if (!User.Identity.IsAuthenticated) return Login();
|
||||
|
||||
var authenticationType = User.Identity.AuthenticationType;
|
||||
await HttpContext.SignOutAsync();
|
||||
var urlReferrer = Request.Headers["Referer"].FirstOrDefault();
|
||||
if (urlReferrer?.Contains("/Pages", StringComparison.OrdinalIgnoreCase) ?? false) urlReferrer = "/Pages";
|
||||
return View(new LockModel(User.Identity.Name)
|
||||
{
|
||||
AuthenticationType = authenticationType,
|
||||
|
@ -65,7 +58,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[IgnoreAntiforgeryToken]
|
||||
public Task<IActionResult> Lock([FromServices] ISMSProvider provider, string userName, string password, string authType)
|
||||
public Task<IActionResult> Lock([FromServices]ISMSProvider provider, string userName, string password, string authType)
|
||||
{
|
||||
// 根据不同的登陆方式
|
||||
Task<IActionResult> ret;
|
||||
|
@ -78,27 +71,16 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// 系统登录方法
|
||||
/// </summary>
|
||||
/// <param name="appId"></param>
|
||||
/// <param name="view"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult Login([FromQuery] string? appId = null, [FromQuery] string view = "")
|
||||
public ActionResult Login([FromQuery]string? appId = null)
|
||||
{
|
||||
if (DictHelper.RetrieveSystemModel())
|
||||
{
|
||||
ViewBag.UserName = "Admin";
|
||||
ViewBag.Password = "123789";
|
||||
}
|
||||
return User.Identity!.IsAuthenticated ? (ActionResult)Redirect("~/Home/Index") : LoginView(view, new LoginModel(appId));
|
||||
}
|
||||
|
||||
private ViewResult LoginView(string view, LoginModel model)
|
||||
{
|
||||
if (string.IsNullOrEmpty(view))
|
||||
{
|
||||
// retrieve login view from db
|
||||
view = DictHelper.RetrieveLoginView();
|
||||
}
|
||||
return View(view, model);
|
||||
return User.Identity.IsAuthenticated ? (ActionResult)Redirect("~/Home/Index") : View("Login", new LoginModel(appId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -109,12 +91,10 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost()]
|
||||
public async Task<IActionResult> Mobile([FromServices] ISMSProvider provider, string phone, string code)
|
||||
public async Task<IActionResult> Mobile([FromServices]ISMSProvider provider, string phone, string code)
|
||||
{
|
||||
if (string.IsNullOrEmpty(phone) || string.IsNullOrEmpty(code)) return RedirectLogin();
|
||||
|
||||
var auth = provider.Validate(phone, code);
|
||||
await HttpContext.Log(phone, auth);
|
||||
HttpContext.Log(phone, auth);
|
||||
if (auth)
|
||||
{
|
||||
var user = UserHelper.Retrieves().FirstOrDefault(u => u.UserName == phone);
|
||||
|
@ -134,8 +114,10 @@ namespace Bootstrap.Admin.Controllers
|
|||
if (UserHelper.Save(user) && !string.IsNullOrEmpty(user.Id))
|
||||
{
|
||||
// 根据配置文件设置默认角色
|
||||
var roles = RoleHelper.Retrieves().Where(r => provider.Options.Roles.Any(rl => rl.Equals(r.RoleName, StringComparison.OrdinalIgnoreCase))).Select(r => r.Id!);
|
||||
var roles = RoleHelper.Retrieves().Where(r => provider.Options.Roles.Any(rl => rl.Equals(r.RoleName, StringComparison.OrdinalIgnoreCase))).Select(r => r.Id);
|
||||
#pragma warning disable CS8620 // 由于引用类型的可为 null 性差异,实参不能用于形参。
|
||||
RoleHelper.SaveByUserId(user.Id, roles);
|
||||
#pragma warning restore CS8620 // 由于引用类型的可为 null 性差异,实参不能用于形参。
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +126,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
|
||||
private IActionResult RedirectLogin()
|
||||
{
|
||||
var query = Request.Query.Aggregate(new Dictionary<string, string?>(), (d, v) =>
|
||||
var query = Request.Query.Aggregate(new Dictionary<string, string>(), (d, v) =>
|
||||
{
|
||||
d.Add(v.Key, v.Value.ToString());
|
||||
return d;
|
||||
|
@ -162,11 +144,9 @@ namespace Bootstrap.Admin.Controllers
|
|||
[HttpPost]
|
||||
public async Task<IActionResult> Login(string userName, string password, string remember)
|
||||
{
|
||||
if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(password)) return RedirectLogin();
|
||||
|
||||
var auth = UserHelper.Authenticate(userName, password);
|
||||
await HttpContext.Log(userName, auth);
|
||||
return auth ? await SignInAsync(userName, remember == "true") : LoginView("", new LoginModel() { AuthFailed = true });
|
||||
HttpContext.Log(userName, auth);
|
||||
return auth ? await SignInAsync(userName, remember == "true") : View("Login", new LoginModel() { AuthFailed = true });
|
||||
}
|
||||
|
||||
private async Task<IActionResult> SignInAsync(string userName, bool persistent, string authenticationScheme = CookieAuthenticationDefaults.AuthenticationScheme)
|
||||
|
@ -186,7 +166,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <param name="appId"></param>
|
||||
/// <returns>The logout.</returns>
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Logout([FromQuery] string appId)
|
||||
public async Task<IActionResult> Logout([FromQuery]string appId)
|
||||
{
|
||||
await HttpContext.SignOutAsync();
|
||||
return Redirect(QueryHelpers.AddQueryString(Request.PathBase + CookieAuthenticationDefaults.LoginPath, "AppId", appId ?? BootstrapAppContext.AppId));
|
||||
|
@ -205,7 +185,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public IActionResult Gitee([FromServices] IConfiguration config)
|
||||
public IActionResult Gitee([FromServices]IConfiguration config)
|
||||
{
|
||||
var enabled = config.GetValue($"{nameof(GiteeOptions)}:Enabled", false);
|
||||
return Challenge(enabled ? GiteeDefaults.AuthenticationScheme : CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
|
@ -216,42 +196,20 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public IActionResult GitHub([FromServices] IConfiguration config)
|
||||
public IActionResult GitHub([FromServices]IConfiguration config)
|
||||
{
|
||||
var enabled = config.GetValue($"{nameof(GitHubOptions)}:Enabled", false);
|
||||
return Challenge(enabled ? GitHubDefaults.AuthenticationScheme : CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tencent 认证
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public IActionResult Tencent([FromServices] IConfiguration config)
|
||||
{
|
||||
var enabled = config.GetValue($"{nameof(TencentOptions)}:Enabled", false);
|
||||
return Challenge(enabled ? TencentDefaults.AuthenticationScheme : CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Alipay 认证
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public IActionResult Alipay([FromServices] IConfiguration config)
|
||||
{
|
||||
var enabled = config.GetValue($"{nameof(AlipayOptions)}:Enabled", false);
|
||||
return Challenge(enabled ? AlipayDefaults.AuthenticationScheme : CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WeChat 认证
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public IActionResult WeChat([FromServices] IConfiguration config)
|
||||
public IActionResult WeChat([FromServices]IConfiguration config)
|
||||
{
|
||||
var enabled = config.GetValue($"{nameof(WeChatOptions)}:Enabled", false);
|
||||
var enabled = config.GetValue($"{nameof(GitHubOptions)}:Enabled", false);
|
||||
return Challenge(enabled ? WeChatDefaults.AuthenticationScheme : CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.Admin.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
@ -23,6 +19,6 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
public IEnumerable<DataAccess.App> Get(string id) => AppHelper.RetrievesByRoleId(id);
|
||||
public IEnumerable<App> Get(string id) => AppHelper.RetrievesByRoleId(id);
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
@ -36,7 +32,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
[HttpGet]
|
||||
public IEnumerable<string> RetrieveMenus()
|
||||
{
|
||||
return MenuHelper.RetrieveAllMenus(User.Identity!.Name).OrderBy(m => m.Name).Select(m => m.Name);
|
||||
return MenuHelper.RetrieveAllMenus(User.Identity.Name).OrderBy(m => m.Name).Select(m => m.Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -46,7 +42,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
[HttpGet]
|
||||
public IEnumerable<string> RetrieveParentMenus()
|
||||
{
|
||||
return MenuHelper.RetrieveMenus(User.Identity!.Name).Where(m => m.Menus.Count() > 0).OrderBy(m => m.Name).Select(m => m.Name);
|
||||
return MenuHelper.RetrieveMenus(User.Identity.Name).Where(m => m.Menus.Count() > 0).OrderBy(m => m.Name).Select(m => m.Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -56,7 +52,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
[HttpGet("{id}")]
|
||||
public bool ValidateMenuBySubMenu(string id)
|
||||
{
|
||||
return !MenuHelper.RetrieveAllMenus(User.Identity!.Name).Where(m => m.ParentId == id).Any();
|
||||
return !MenuHelper.RetrieveAllMenus(User.Identity.Name).Where(m => m.ParentId == id).Any();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -66,7 +62,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
[HttpGet("{id}")]
|
||||
public bool ValidateParentMenuById(string id)
|
||||
{
|
||||
return MenuHelper.RetrieveAllMenus(User.Identity!.Name).FirstOrDefault(m => m.Id == id)?.IsResource == 0;
|
||||
return MenuHelper.RetrieveAllMenus(User.Identity.Name).FirstOrDefault(m => m.Id == id)?.IsResource == 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
|
@ -1,9 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
@ -11,6 +6,7 @@ using Microsoft.AspNetCore.Mvc.Filters;
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
|
@ -40,7 +36,15 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ButtonAuthorize(Url = "~/Admin/Exceptions", Auth = "log")]
|
||||
public IEnumerable<string> Post() => ExceptionsHelper.RetrieveLogFiles();
|
||||
public IEnumerable<string> Post()
|
||||
{
|
||||
var filePath = Path.Combine(AppContext.BaseDirectory, "Error");
|
||||
return Directory.Exists(filePath)
|
||||
? Directory.GetFiles(filePath)
|
||||
.Where(f => Path.GetExtension(f).Equals(".log", StringComparison.OrdinalIgnoreCase))
|
||||
.Select(f => Path.GetFileNameWithoutExtension(f)).OrderByDescending(s => s)
|
||||
: Enumerable.Empty<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 选中指定文件查看其内容方法
|
||||
|
@ -52,10 +56,10 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
{
|
||||
var filePath = Path.Combine(AppContext.BaseDirectory, "Error");
|
||||
var logName = $"{Path.Combine(filePath, exceptionFile.FileName)}.log";
|
||||
if (!System.IO.File.Exists(logName)) return new JsonResult("无此日志文件");
|
||||
var sb = new StringBuilder();
|
||||
if (System.IO.File.Exists(logName))
|
||||
using (var reader = new StreamReader(logName))
|
||||
{
|
||||
using var reader = new StreamReader(logName);
|
||||
while (!reader.EndOfStream)
|
||||
{
|
||||
var line = reader.ReadLine()?.Replace("<", "<").Replace(">", ">");
|
|
@ -0,0 +1,140 @@
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Gitee 网站信息接口类
|
||||
/// </summary>
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
[AllowAnonymous]
|
||||
public class GiteeController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取 Gitee 网站 Issues 信息
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="repoName"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <param name="color"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> Issues([FromServices]GiteeHttpClient client, [FromQuery]string? userName = "LongbowEnterprise", [FromQuery]string? repoName = "BootstrapAdmin", [FromQuery]string? label = "custom badge", [FromQuery]string? color = "orange")
|
||||
{
|
||||
var ret = await GetJsonAsync(() => client.HttpClient.GetStringAsync($"https://gitee.com/{userName}/{repoName}/issues"), content =>
|
||||
{
|
||||
var regex = Regex.Matches(content, "<div class='ui mini circular label'>([\\d]+)</div>", RegexOptions.IgnoreCase);
|
||||
var labels = new string[] { "open", "progressing", "closed", "rejected" };
|
||||
var result = string.IsNullOrEmpty(content) ? new string[] { "unknown" } : regex.Select((m, i) => $"{labels[i]} {m.Groups[1].Value}");
|
||||
return string.Join(" ", result);
|
||||
});
|
||||
color = ret.StartsWith("open 0 progressing 0", StringComparison.OrdinalIgnoreCase) ? "success" : color;
|
||||
return new JsonResult(new { schemaVersion = 1, label, message = ret, color });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取 Gitee 网站 Pulls 信息
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="repoName"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <param name="color"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> Pulls([FromServices]GiteeHttpClient client, [FromQuery]string? userName = "LongbowEnterprise", [FromQuery]string? repoName = "BootstrapAdmin", [FromQuery]string? label = "custom badge", [FromQuery]string? color = "orange")
|
||||
{
|
||||
var ret = await GetJsonAsync(() => client.HttpClient.GetStringAsync($"https://gitee.com/{userName}/{repoName}/pulls"), content =>
|
||||
{
|
||||
var regex = Regex.Matches(content, "<div class='ui mini circular label'>([\\d]+)</div>", RegexOptions.IgnoreCase);
|
||||
var labels = new string[] { "open", "merged", "closed" };
|
||||
var result = string.IsNullOrEmpty(content) ? new string[] { "unknown" } : regex.Select((m, i) => $"{labels[i]} {m.Groups[1].Value}");
|
||||
return string.Join(" ", result);
|
||||
});
|
||||
return new JsonResult(new { schemaVersion = 1, label, message = ret, color });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取 Gitee 网站 Releases 信息
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="repoName"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <param name="color"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> Releases([FromServices]GiteeHttpClient client, [FromQuery]string? userName = "LongbowEnterprise", [FromQuery]string? repoName = "BootstrapAdmin", [FromQuery]string? label = "custom badge", [FromQuery]string? color = "orange")
|
||||
{
|
||||
var ret = await GetJsonAsync(() => client.HttpClient.GetStringAsync($"https://gitee.com/{userName}/{repoName}/releases"), content =>
|
||||
{
|
||||
var regex = Regex.Match(content, $"<a href=\"/{userName}/{repoName}/releases/([^\\s]+)\" target=\"_blank\">", RegexOptions.IgnoreCase);
|
||||
return string.IsNullOrEmpty(content) ? "unknown" : regex.Groups[1].Value;
|
||||
});
|
||||
return new JsonResult(new { schemaVersion = 1, label, message = ret, color });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取 Gitee 网站 Builds 信息
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="projName"></param>
|
||||
/// <param name="branchName"></param>
|
||||
/// <param name="label"></param>
|
||||
/// <param name="color"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> Builds([FromServices]GiteeHttpClient client, [FromQuery]string? userName = "ArgoZhang", [FromQuery]string? projName = "bootstrapadmin", [FromQuery]string? branchName = "master", [FromQuery]string? label = "custom badge", [FromQuery]string? color = "orange")
|
||||
{
|
||||
var ret = await GetJsonAsync(() => client.HttpClient.GetAsJsonAsync<AppveyorBuildResult>($"https://ci.appveyor.com/api/projects/{userName}/{projName}/branch/{branchName}", null, new CancellationTokenSource(10000).Token), content =>
|
||||
{
|
||||
return content == null ? "unknown" : content.Build.Version;
|
||||
});
|
||||
return new JsonResult(new { schemaVersion = 1, label, message = ret, color });
|
||||
}
|
||||
|
||||
private async static Task<string> GetJsonAsync<T>(Func<Task<T>> requestUrl, Func<T, string> callback)
|
||||
{
|
||||
var ret = "unresponsive";
|
||||
try
|
||||
{
|
||||
var resq = await requestUrl();
|
||||
ret = callback(resq);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.Log();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private class AppveyorBuildResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Appveyor 编译版本实例
|
||||
/// </summary>
|
||||
public Build Build { get; set; } = new Build();
|
||||
}
|
||||
|
||||
private class Build
|
||||
{
|
||||
/// <summary>
|
||||
/// Build 版本信息
|
||||
/// </summary>
|
||||
public string Version { get; set; } = "";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
|
@ -1,13 +1,12 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Bootstrap.Security.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
|
@ -65,6 +64,30 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public IEnumerable<BootstrapMenu> RetrieveAppMenus([FromBody]AppMenuOption args) => MenuHelper.RetrieveAppMenus(args.AppId, args.UserName, args.Url);
|
||||
public IEnumerable<BootstrapMenu> RetrieveAppMenus([FromBody]AppMenuOption args)
|
||||
{
|
||||
if (string.IsNullOrEmpty(args.AppId) || string.IsNullOrEmpty(args.UserName)) return new BootstrapMenu[0];
|
||||
return MenuHelper.RetrieveAppMenus(args.AppId, args.UserName, args.Url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送健康检查结果
|
||||
/// </summary>
|
||||
/// <param name="httpClient"></param>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="message"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<bool> Healths([FromServices]GiteeHttpClient httpClient, [FromServices]IConfiguration config, [FromBody]string message)
|
||||
{
|
||||
var ret = false;
|
||||
var url = config.GetValue("HealthsCloudUrl", "");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
try { await httpClient.HttpClient.PostAsJsonAsync(url, message); ret = true; }
|
||||
catch { }
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +1,10 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security.Authentication;
|
||||
using Longbow.Web.Mvc;
|
||||
using Longbow.Web.SMS;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
|
@ -29,32 +24,24 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <returns></returns>
|
||||
[Authorize]
|
||||
[HttpGet]
|
||||
public QueryData<LoginUser> Get([FromQuery] QueryLoginOption value) => value.RetrieveData();
|
||||
public QueryData<LoginUser> Get([FromQuery]QueryLoginOption value) => value.RetrieveData();
|
||||
|
||||
/// <summary>
|
||||
/// JWT 登陆认证接口
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<string?> Post([FromServices] IConfiguration config, [FromBody] User user)
|
||||
public string? Post([FromBody]User user)
|
||||
{
|
||||
string? token = null;
|
||||
var token = string.Empty;
|
||||
string userName = user.UserName;
|
||||
string password = user.Password;
|
||||
if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password) && UserHelper.Authenticate(userName, password))
|
||||
{
|
||||
token = BootstrapAdminJwtTokenHandler.CreateToken(userName, op =>
|
||||
{
|
||||
var tokenOption = config.GetOption(() => new TokenValidateOption());
|
||||
op.Audience = tokenOption.Audience;
|
||||
op.Expires = tokenOption.Expires;
|
||||
op.Issuer = tokenOption.Issuer;
|
||||
op.SecurityKey = tokenOption.SecurityKey;
|
||||
});
|
||||
token = BootstrapAdminJwtTokenHandler.CreateToken(userName);
|
||||
}
|
||||
await HttpContext.Log(userName, !string.IsNullOrEmpty(token));
|
||||
HttpContext.Log(userName, token != null);
|
||||
return token;
|
||||
}
|
||||
|
||||
|
@ -65,7 +52,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <param name="phone"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public async Task<SMSResult> Put([FromServices] ISMSProvider provider, [FromQuery] string phone) => string.IsNullOrEmpty(phone) ? new SMSResult() { Result = false, Msg = "手机号不可为空" } : await provider.SendCodeAsync(phone);
|
||||
public async Task<SMSResult> Put([FromServices]ISMSProvider provider, [FromQuery]string phone) => string.IsNullOrEmpty(phone) ? new SMSResult() { Result = false, Msg = "手机号不可为空" } : await provider.SendCodeAsync(phone);
|
||||
|
||||
/// <summary>
|
||||
/// 跨域握手协议
|
|
@ -1,15 +1,10 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
|
@ -27,7 +22,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<Log> Get([FromQuery] QueryLogOption value)
|
||||
public QueryData<Log> Get([FromQuery]QueryLogOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
|
@ -39,15 +34,15 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<bool> Post([FromServices] IIPLocatorProvider ipLocator, [FromBody] Log value)
|
||||
public bool Post([FromServices]IIPLocatorProvider ipLocator, [FromBody]Log value)
|
||||
{
|
||||
value.UserAgent = Request.Headers["User-Agent"];
|
||||
var agent = new UserAgent(value.UserAgent);
|
||||
value.Ip = HttpContext.Connection.RemoteIpAddress?.ToIPv4String() ?? "";
|
||||
value.Ip = HttpContext.Connection.RemoteIpAddress.ToIPv4String();
|
||||
value.Browser = $"{agent.Browser?.Name} {agent.Browser?.Version}";
|
||||
value.OS = $"{agent.OS?.Name} {agent.OS?.Version}";
|
||||
value.City = await ipLocator.Locate(value.Ip);
|
||||
value.UserName = User.Identity?.Name ?? string.Empty;
|
||||
value.City = ipLocator.Locate(value.Ip);
|
||||
value.UserName = User.Identity.Name ?? string.Empty;
|
||||
return LogHelper.Save(value);
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
|
@ -29,7 +25,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
[HttpGet]
|
||||
public QueryData<object> Get([FromQuery]QueryMenuOption value)
|
||||
{
|
||||
return value.RetrieveData(User.Identity!.Name);
|
||||
return value.RetrieveData(User.Identity.Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -70,7 +66,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
ret = MenuHelper.RetrieveMenusByRoleId(id);
|
||||
break;
|
||||
case "user":
|
||||
ret = MenuHelper.RetrieveMenus(User.Identity!.Name);
|
||||
ret = MenuHelper.RetrieveMenus(User.Identity.Name);
|
||||
break;
|
||||
}
|
||||
return ret;
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
@ -32,16 +28,16 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
switch (id)
|
||||
{
|
||||
case "inbox":
|
||||
ret = MessageHelper.Inbox(User.Identity!.Name).ToList();
|
||||
ret = MessageHelper.Inbox(User.Identity.Name).ToList();
|
||||
break;
|
||||
case "sendmail":
|
||||
ret = MessageHelper.SendMail(User.Identity!.Name).ToList();
|
||||
ret = MessageHelper.SendMail(User.Identity.Name).ToList();
|
||||
break;
|
||||
case "mark":
|
||||
ret = MessageHelper.Mark(User.Identity!.Name).ToList();
|
||||
ret = MessageHelper.Mark(User.Identity.Name).ToList();
|
||||
break;
|
||||
case "trash":
|
||||
ret = MessageHelper.Trash(User.Identity!.Name).ToList();
|
||||
ret = MessageHelper.Trash(User.Identity.Name).ToList();
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
@ -56,10 +52,10 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
{
|
||||
var mcm = new MessageCountModel
|
||||
{
|
||||
InboxCount = MessageHelper.Inbox(User.Identity!.Name).Count(),
|
||||
SendmailCount = MessageHelper.SendMail(User.Identity!.Name).Count(),
|
||||
MarkCount = MessageHelper.Mark(User.Identity!.Name).Count(),
|
||||
TrashCount = MessageHelper.Trash(User.Identity!.Name).Count()
|
||||
InboxCount = MessageHelper.Inbox(User.Identity.Name).Count(),
|
||||
SendmailCount = MessageHelper.SendMail(User.Identity.Name).Count(),
|
||||
MarkCount = MessageHelper.Mark(User.Identity.Name).Count(),
|
||||
TrashCount = MessageHelper.Trash(User.Identity.Name).Count()
|
||||
};
|
||||
return mcm;
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
@ -42,7 +38,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
public bool Put([FromBody]User value)
|
||||
{
|
||||
var ret = false;
|
||||
var userName = User.Identity!.Name;
|
||||
var userName = User.Identity.Name;
|
||||
if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(value.Id))
|
||||
{
|
||||
if (value.UserStatus == UserStates.ApproveUser)
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
@ -47,11 +43,11 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
var tasksCount = task.Count();
|
||||
|
||||
//Message
|
||||
var message = MessageHelper.Retrieves(User.Identity!.Name);
|
||||
var message = MessageHelper.Retrieves(User.Identity.Name);
|
||||
var messagesCount = message.Count();
|
||||
|
||||
message = message.Take(6);
|
||||
message.AsParallel().ForAll(m => m.FromIcon = Url.Content(m.FromIcon) ?? string.Empty);
|
||||
message.AsParallel().ForAll(m => m.FromIcon = Url.Content(m.FromIcon));
|
||||
|
||||
//Apps
|
||||
var apps = ExceptionsHelper.Retrieves().Where(n => n.Category != "DB");
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Longbow.Web;
|
||||
using Longbow.Web;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
|
@ -27,7 +23,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet()]
|
||||
public IEnumerable<OnlineUser> Get([FromServices] IOnlineUsers onlineUSers)
|
||||
public IEnumerable<OnlineUser> Get([FromServices]IOnlineUsers onlineUSers)
|
||||
{
|
||||
return onlineUSers.OnlineUsers.OrderByDescending(u => u.LastAccessTime);
|
||||
}
|
||||
|
@ -39,7 +35,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <param name="onlineUSers"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
public IEnumerable<KeyValuePair<DateTime, string>> Get(string id, [FromServices] IOnlineUsers onlineUSers)
|
||||
public IEnumerable<KeyValuePair<DateTime, string>> Get(string id, [FromServices]IOnlineUsers onlineUSers)
|
||||
{
|
||||
var user = onlineUSers.OnlineUsers.FirstOrDefault(u => u.ConnectionId == id);
|
||||
return user?.RequestUrls ?? new KeyValuePair<DateTime, string>[0];
|
||||
|
@ -53,7 +49,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
[AllowAnonymous]
|
||||
public bool Put()
|
||||
{
|
||||
var ip = Request.HttpContext.Connection.RemoteIpAddress?.ToIPv4String() ?? "";
|
||||
var ip = Request.HttpContext.Connection.RemoteIpAddress.ToIPv4String();
|
||||
if (_loginUsers.TryGetValue(ip, out var user))
|
||||
{
|
||||
user.Reset();
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
@ -31,10 +27,10 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <returns></returns>
|
||||
[HttpPost("{id}")]
|
||||
[ButtonAuthorize(Url = "~/Admin/Profiles", Auth = "saveIcon")]
|
||||
public JsonResult Post(string id, [FromServices] IWebHostEnvironment env, [FromForm] DeleteFileCollection files)
|
||||
public JsonResult Post(string id, [FromServices]IWebHostEnvironment env, [FromForm]DeleteFileCollection files)
|
||||
{
|
||||
if (!id.Equals("Delete", StringComparison.OrdinalIgnoreCase)) return new JsonResult(new object());
|
||||
var userName = User.Identity!.Name;
|
||||
var userName = User.Identity.Name;
|
||||
var fileName = files.Key;
|
||||
|
||||
fileName = Path.Combine(env.WebRootPath, $"images{Path.DirectorySeparatorChar}uploader{Path.DirectorySeparatorChar}{fileName}");
|
||||
|
@ -44,7 +40,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
var filePath = Path.Combine(env.WebRootPath, webSiteUrl.Replace("~", string.Empty).Replace('/', Path.DirectorySeparatorChar).TrimStart(Path.DirectorySeparatorChar) + fileName);
|
||||
var fileSize = new FileInfo(filePath).Length;
|
||||
var iconName = $"{fileName}?v={DateTime.Now.Ticks}";
|
||||
var previewUrl = Url.Content($"{webSiteUrl}{iconName}") ?? string.Empty;
|
||||
var previewUrl = Url.Content($"{webSiteUrl}{iconName}");
|
||||
if (!string.IsNullOrEmpty(userName)) UserHelper.SaveUserIconByName(userName, iconName);
|
||||
|
||||
return new JsonResult(new
|
||||
|
@ -76,11 +72,11 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ButtonAuthorize(Url = "~/Admin/Profiles", Auth = "saveIcon")]
|
||||
public async Task<JsonResult> Post([FromServices] IWebHostEnvironment env, IFormCollection files)
|
||||
public async Task<JsonResult> Post([FromServices]IWebHostEnvironment env, IFormCollection files)
|
||||
{
|
||||
string? previewUrl = null;
|
||||
var previewUrl = string.Empty;
|
||||
long fileSize = 0;
|
||||
var userName = User.Identity!.Name;
|
||||
var userName = User.Identity.Name;
|
||||
var fileName = string.Empty;
|
||||
if (files.Files.Count > 0)
|
||||
{
|
||||
|
@ -88,7 +84,9 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
var webSiteUrl = DictHelper.RetrieveIconFolderPath();
|
||||
fileName = $"{userName}{Path.GetExtension(uploadFile.FileName)}";
|
||||
var filePath = Path.Combine(env.WebRootPath, webSiteUrl.Replace("~", string.Empty).Replace('/', Path.DirectorySeparatorChar).TrimStart(Path.DirectorySeparatorChar) + fileName);
|
||||
var fileFolder = Path.GetDirectoryName(filePath);
|
||||
fileSize = uploadFile.Length;
|
||||
if (!Directory.Exists(fileFolder)) Directory.CreateDirectory(fileFolder);
|
||||
using (var fs = new FileStream(filePath, FileMode.Create))
|
||||
{
|
||||
await uploadFile.CopyToAsync(fs);
|
||||
|
@ -99,7 +97,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
}
|
||||
return new JsonResult(new
|
||||
{
|
||||
initialPreview = new string[] { previewUrl ?? string.Empty },
|
||||
initialPreview = new string[] { previewUrl },
|
||||
initialPreviewConfig = new object[] {
|
||||
new { caption = "新头像", size = fileSize, showZoom = true, key = fileName }
|
||||
},
|
||||
|
@ -113,19 +111,19 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ButtonAuthorize(Url = "~/Admin/Profiles", Auth = "saveDisplayName,savePassword,saveApp,saveTheme")]
|
||||
public bool Put([FromBody] User value)
|
||||
public bool Put([FromBody]User value)
|
||||
{
|
||||
var ret = false;
|
||||
if (value.UserName.Equals(User.Identity!.Name, StringComparison.OrdinalIgnoreCase))
|
||||
if (value.UserName.Equals(User.Identity.Name, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
ret = value.UserStatus switch
|
||||
{
|
||||
UserStates.ChangeTheme => UserHelper.SaveUserCssByName(value.UserName, value.Css),
|
||||
UserStates.ChangeDisplayName => UserHelper.SaveDisplayName(value.UserName, value.DisplayName),
|
||||
UserStates.ChangePassword => UserHelper.ChangePassword(value.UserName, value.Password, value.NewPassword),
|
||||
UserStates.SaveApp => UserHelper.SaveApp(value.UserName, value.App),
|
||||
_ => false
|
||||
};
|
||||
if (value.UserStatus == UserStates.ChangeTheme)
|
||||
ret = UserHelper.SaveUserCssByName(value.UserName, value.Css);
|
||||
else if (value.UserStatus == UserStates.ChangeDisplayName)
|
||||
ret = UserHelper.SaveDisplayName(value.UserName, value.DisplayName);
|
||||
else if (value.UserStatus == UserStates.ChangePassword)
|
||||
ret = UserHelper.ChangePassword(value.UserName, value.Password, value.NewPassword);
|
||||
else if (value.UserStatus == UserStates.SaveApp)
|
||||
ret = UserHelper.SaveApp(value.UserName, value.App);
|
||||
}
|
||||
return ret;
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.SignalR;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
@ -41,13 +37,19 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
[HttpPost("{id}")]
|
||||
public IEnumerable<object> Post(string id, [FromQuery]string type)
|
||||
{
|
||||
var ret = type switch
|
||||
IEnumerable<Role> ret = new Role[0];
|
||||
switch (type)
|
||||
{
|
||||
"user" => RoleHelper.RetrievesByUserId(id),
|
||||
"group" => RoleHelper.RetrievesByGroupId(id),
|
||||
"menu" => RoleHelper.RetrievesByMenuId(id),
|
||||
_ => new Role[0]
|
||||
};
|
||||
case "user":
|
||||
ret = RoleHelper.RetrievesByUserId(id);
|
||||
break;
|
||||
case "group":
|
||||
ret = RoleHelper.RetrievesByGroupId(id);
|
||||
break;
|
||||
case "menu":
|
||||
ret = RoleHelper.RetrievesByMenuId(id);
|
||||
break;
|
||||
}
|
||||
return ret.Select(m => new { m.Id, m.Checked, m.RoleName, m.Description });
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -59,14 +61,26 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <returns></returns>
|
||||
[HttpPut("{id}")]
|
||||
[ButtonAuthorize(Url = "~/Admin/Roles", Auth = "assignUser,assignGroup,assignMenu,assignApp")]
|
||||
public bool Put(string id, [FromBody]IEnumerable<string> values, [FromQuery]string type) => type switch
|
||||
public bool Put(string id, [FromBody]IEnumerable<string> values, [FromQuery]string type)
|
||||
{
|
||||
"user" => UserHelper.SaveByRoleId(id, values),
|
||||
"group" => GroupHelper.SaveByRoleId(id, values),
|
||||
"menu" => MenuHelper.SaveMenusByRoleId(id, values),
|
||||
"app" => AppHelper.SaveByRoleId(id, values),
|
||||
_ => false
|
||||
};
|
||||
var ret = false;
|
||||
switch (type)
|
||||
{
|
||||
case "user":
|
||||
ret = UserHelper.SaveByRoleId(id, values);
|
||||
break;
|
||||
case "group":
|
||||
ret = GroupHelper.SaveByRoleId(id, values);
|
||||
break;
|
||||
case "menu":
|
||||
ret = MenuHelper.SaveMenusByRoleId(id, values);
|
||||
break;
|
||||
case "app":
|
||||
ret = AppHelper.SaveByRoleId(id, values);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存角色方法
|
||||
/// </summary>
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
|
@ -0,0 +1,34 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Cache;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// 网站设置控制器
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
public class SettingsController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 保存网站设置方法
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ButtonAuthorize(Url = "~/Admin/Settings", Auth = "saveTitle,saveFooter,saveTheme,saveUISettings")]
|
||||
public bool Post([FromBody]BootstrapDict value) => DictHelper.SaveSettings(value);
|
||||
|
||||
/// <summary>
|
||||
/// 获取网站缓存站点集合
|
||||
/// </summary>
|
||||
[HttpGet]
|
||||
public IEnumerable<ICacheCorsItem> Get() => CacheManager.CorsSites;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务管理控制器
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
public class TasksController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取所有任务数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public IEnumerable<object> Get()
|
||||
{
|
||||
return TaskServicesManager.ToList().Select(s => new { s.Name, Status = s.Status.ToString(), s.LastRuntime, s.CreatedTime, s.NextRuntime, LastRunResult = s.Triggers.First().LastResult.ToString(), TriggerExpression = s.Triggers.FirstOrDefault().ToString() }).OrderBy(s => s.Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 任务相关操作
|
||||
/// </summary>
|
||||
/// <param name="scheName">调度名称</param>
|
||||
/// <param name="operType">操作方式 pause run</param>
|
||||
[HttpPut("{scheName}")]
|
||||
public bool Put(string scheName, [FromQuery]string operType)
|
||||
{
|
||||
var sche = TaskServicesManager.Get(scheName);
|
||||
if (sche != null) sche.Status = operType == "pause" ? SchedulerStatus.Disabled : SchedulerStatus.Running;
|
||||
|
||||
// SQL 日志任务特殊处理
|
||||
if (scheName == "SQL日志")
|
||||
{
|
||||
if (operType == "pause") LogHelper.Pause();
|
||||
else LogHelper.Run();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Longbow.Tasks;
|
||||
using Longbow.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web;
|
||||
using Longbow.Web.Mvc;
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
@ -40,19 +36,29 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <param name="type">类型 如角色、部门</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("{id}")]
|
||||
public IEnumerable<object> Post(string id, [FromQuery]string type) => type switch
|
||||
public IEnumerable<object> Post(string id, [FromQuery]string type)
|
||||
{
|
||||
"role" => UserHelper.RetrievesByRoleId(id).Select(p => new
|
||||
IEnumerable<object> ret = new string[0];
|
||||
switch (type)
|
||||
{
|
||||
p.Id,
|
||||
p.DisplayName,
|
||||
p.UserName,
|
||||
p.Checked
|
||||
}).OrderBy(u => u.DisplayName),
|
||||
"group" => UserHelper.RetrievesByGroupId(id),
|
||||
"reset" => UserHelper.RetrieveResetReasonsByUserName(id).Select(u => new { u.Key, u.Value }),
|
||||
_ => new string[0]
|
||||
};
|
||||
case "role":
|
||||
ret = UserHelper.RetrievesByRoleId(id).Select(p => new
|
||||
{
|
||||
p.Id,
|
||||
p.DisplayName,
|
||||
p.UserName,
|
||||
p.Checked
|
||||
}).OrderBy(u => u.DisplayName);
|
||||
break;
|
||||
case "group":
|
||||
ret = UserHelper.RetrievesByGroupId(id);
|
||||
break;
|
||||
case "reset":
|
||||
ret = UserHelper.RetrieveResetReasonsByUserName(id).Select(u => new { u.Key, u.Value });
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 前台User View调用,新建/更新用户
|
||||
|
@ -65,7 +71,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
bool ret;
|
||||
if (string.IsNullOrEmpty(value.Id))
|
||||
{
|
||||
value.Description = string.Format("管理员{0}创建用户", User.Identity!.Name);
|
||||
value.Description = string.Format("管理员{0}创建用户", User.Identity.Name);
|
||||
value.ApprovedBy = User.Identity.Name;
|
||||
value.ApprovedTime = DateTime.Now;
|
||||
ret = UserHelper.Save(value);
|
||||
|
@ -86,12 +92,20 @@ namespace Bootstrap.Admin.Controllers.Api
|
|||
/// <returns></returns>
|
||||
[HttpPut("{id}")]
|
||||
[ButtonAuthorize(Url = "~/Admin/Users", Auth = "assignRole,assignGroup")]
|
||||
public bool Put(string id, [FromBody]IEnumerable<string> values, [FromQuery]string type) => type switch
|
||||
public bool Put(string id, [FromBody]IEnumerable<string> values, [FromQuery]string type)
|
||||
{
|
||||
"role" => RoleHelper.SaveByUserId(id, values),
|
||||
"group" => GroupHelper.SaveByUserId(id, values),
|
||||
_ => false
|
||||
};
|
||||
var ret = false;
|
||||
switch (type)
|
||||
{
|
||||
case "role":
|
||||
ret = RoleHelper.SaveByUserId(id, values);
|
||||
break;
|
||||
case "group":
|
||||
ret = GroupHelper.SaveByUserId(id, values);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除用户操作
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
@ -22,10 +18,9 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public IActionResult Index()
|
||||
{
|
||||
var model = new HeaderBarModel(User.Identity!.Name);
|
||||
var homeUrl = DictHelper.RetrieveHomeUrl(User.Identity.Name, model.AppId);
|
||||
var useBlazor = DictHelper.RetrieveEnableBlazor();
|
||||
return homeUrl.Equals("~/Home/Index", System.StringComparison.OrdinalIgnoreCase) ? (useBlazor ? Redirect("~/Pages") : (IActionResult)View(model)) : Redirect(homeUrl);
|
||||
var model = new HeaderBarModel(User.Identity.Name);
|
||||
var homeUrl = DictHelper.RetrieveHomeUrl(model.AppId);
|
||||
return homeUrl.Equals("~/Home/Index", System.StringComparison.OrdinalIgnoreCase) ? (IActionResult)View(model) : Redirect(homeUrl);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -34,9 +29,9 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public IActionResult Error(int? id = 0)
|
||||
public IActionResult Error(int id)
|
||||
{
|
||||
var model = ErrorModel.CreateById(id ?? 0);
|
||||
var model = ErrorModel.CreateById(id);
|
||||
if (id != 403)
|
||||
{
|
||||
var returnUrl = Request.Query[CookieAuthenticationDefaults.ReturnUrlParameter].ToString();
|
|
@ -0,0 +1,19 @@
|
|||
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
||||
#For more information, please see https://aka.ms/containercompat
|
||||
|
||||
FROM microsoft/dotnet:3.0-aspnetcore-runtime-nanoserver-1903 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:3.0-sdk-nanoserver-1903 AS build
|
||||
WORKDIR /src
|
||||
COPY src/admin .
|
||||
|
||||
WORKDIR "/src/Bootstrap.Admin"
|
||||
FROM build AS publish
|
||||
RUN dotnet publish -c Release -o /app
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
ENTRYPOINT ["dotnet", "Bootstrap.Admin.dll"]
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess.Helper;
|
||||
using Bootstrap.DataAccess.Helper;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
|
@ -1,14 +1,9 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Longbow.Logging;
|
||||
using Longbow.Logging;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging.Configuration;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Json;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection
|
||||
{
|
||||
|
@ -59,7 +54,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
{
|
||||
if (!string.IsNullOrEmpty(option.Url))
|
||||
{
|
||||
try { await httpClient.PostAsJsonAsync(option.Url, message); }
|
||||
try { await httpClient.PostAsJsonAsync(option.Url, message).ConfigureAwait(false); }
|
||||
catch { }
|
||||
}
|
||||
});
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Longbow.Web.SMS;
|
||||
using Longbow.Web.SMS;
|
||||
using Longbow.Web.SMS.Tencent;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.SignalR;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using System;
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using System;
|
|
@ -1,9 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
|
@ -62,7 +57,7 @@ namespace Bootstrap.Admin.HealthChecks
|
|||
};
|
||||
|
||||
// 检查 当前用户 账户权限
|
||||
var loginUser = _httpContextAccessor.HttpContext?.User.Identity?.Name;
|
||||
var loginUser = _httpContextAccessor.HttpContext.User.Identity.Name;
|
||||
var userName = loginUser ?? "Admin";
|
||||
var dictsCount = 0;
|
||||
var menusCount = 0;
|
||||
|
@ -78,25 +73,16 @@ namespace Bootstrap.Admin.HealthChecks
|
|||
menusCount = MenuHelper.RetrieveMenusByUserName(userName)?.Count() ?? 0;
|
||||
dictsCount = DictHelper.RetrieveDicts()?.Count() ?? 0;
|
||||
healths = user != null && !string.IsNullOrEmpty(roles) && menusCount > 0 && dictsCount > 0;
|
||||
|
||||
// 检查数据库是否可写
|
||||
var dict = new BootstrapDict()
|
||||
{
|
||||
Category = "DB-Check",
|
||||
Name = "WriteTest",
|
||||
Code = "1"
|
||||
};
|
||||
if (DictHelper.Save(dict) && !string.IsNullOrEmpty(dict.Id)) DictHelper.Delete(new string[] { dict.Id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
error = ex;
|
||||
}
|
||||
var data = new Dictionary<string, object>()
|
||||
var data = new Dictionary<string, object?>()
|
||||
{
|
||||
{ "ConnectionString", db.ConnectionString ?? string.Empty },
|
||||
{ "Reference", DbContextManager.Create<Dict>()?.GetType().Assembly.FullName ?? db.Widget ?? string.Empty },
|
||||
{ "DbType", db?.ProviderName ?? string.Empty },
|
||||
{ "ConnectionString", db.ConnectionString },
|
||||
{ "Reference", DbContextManager.Create<Dict>()?.GetType().Assembly.FullName ?? db.Widget },
|
||||
{ "DbType", db?.ProviderName },
|
||||
{ "Dicts", dictsCount },
|
||||
{ "LoginName", userName },
|
||||
{ "DisplayName", displayName },
|
||||
|
@ -115,13 +101,7 @@ namespace Bootstrap.Admin.HealthChecks
|
|||
if (error != null)
|
||||
{
|
||||
data.Add("Exception", error.Message);
|
||||
|
||||
if (error.Message.Contains("SQLite Error 8: 'attempt to write a readonly database'.")) data.Add("解决办法", "更改数据库文件为可读,并授予进程可写权限");
|
||||
if (error.Message.Contains("Could not load", StringComparison.OrdinalIgnoreCase)) data.Add("解决办法", "Nuget 引用相对应的数据库驱动 dll");
|
||||
|
||||
// UNDONE: Json 序列化循环引用导致异常 NET 5.0 修复此问题
|
||||
// 目前使用 new Exception() 临时解决
|
||||
return Task.FromResult(HealthCheckResult.Unhealthy("Error", new Exception(error.Message), data));
|
||||
return Task.FromResult(HealthCheckResult.Unhealthy("Error", error, data));
|
||||
}
|
||||
|
||||
return healths ? Task.FromResult(HealthCheckResult.Healthy("Ok", data)) : Task.FromResult(HealthCheckResult.Degraded("Failed", null, data));
|
|
@ -1,7 +1,3 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
|
|
@ -1,14 +1,10 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Json;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -28,7 +24,7 @@ namespace Bootstrap.Admin.HealthChecks
|
|||
public GiteeHttpHealthCheck(GiteeHttpClient client, IHttpContextAccessor accessor)
|
||||
{
|
||||
_client = client;
|
||||
_client.HttpClient.BaseAddress = new Uri($"{accessor.HttpContext!.Request.Scheme}://{accessor.HttpContext?.Request.Host}{accessor.HttpContext?.Request.PathBase}");
|
||||
_client.HttpClient.BaseAddress = new Uri($"{accessor.HttpContext.Request.Scheme}://{accessor.HttpContext.Request.Host}{accessor.HttpContext.Request.PathBase}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -46,17 +42,10 @@ namespace Bootstrap.Admin.HealthChecks
|
|||
{
|
||||
var sw = Stopwatch.StartNew();
|
||||
Exception? error = null;
|
||||
object? result = null;
|
||||
try
|
||||
{
|
||||
result = await _client.HttpClient.GetFromJsonAsync<object>($"/api/Gitee/{url}", cancellationToken);
|
||||
}
|
||||
catch (Exception ex) { error = ex; }
|
||||
var result = await _client.HttpClient.GetAsJsonAsync<object>($"/api/Gitee/{url}", ex => error = ex, cancellationToken);
|
||||
sw.Stop();
|
||||
data.Add(url, error == null
|
||||
? $"{result} Elapsed: {sw.Elapsed}"
|
||||
: $"Elapsed: {sw.Elapsed} Exception: {error}");
|
||||
})).ToArray(), cancellationToken);
|
||||
data.Add(url, error == null ? $"{result} Elapsed: {sw.Elapsed}" : $"{result} Elapsed: {sw.Elapsed} Exception: {error}");
|
||||
})).ToArray());
|
||||
return Task.FromResult(HealthCheckResult.Healthy("Ok", data));
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.Admin.HealthChecks;
|
||||
using Bootstrap.Admin.HealthChecks;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection
|
|
@ -1,15 +1,15 @@
|
|||
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
||||
#For more information, please see https://aka.ms/containercompat
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
COPY src/admin .
|
||||
|
||||
WORKDIR "src/admin/Bootstrap.Admin"
|
||||
WORKDIR "/src/Bootstrap.Admin"
|
||||
FROM build AS publish
|
||||
RUN dotnet publish -c Release -o /app
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security.Mvc;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
|
@ -24,15 +20,14 @@ namespace Bootstrap.Admin.Models
|
|||
Footer = DictHelper.RetrieveWebFooter(appId);
|
||||
Theme = DictHelper.RetrieveActiveTheme();
|
||||
IsDemo = DictHelper.RetrieveSystemModel();
|
||||
ShowCardTitle = DictHelper.RetrieveCardTitleStatus();
|
||||
ShowSideBar = DictHelper.RetrieveSidebarStatus();
|
||||
ShowCardTitle = DictHelper.RetrieveCardTitleStatus() ? "" : "no-card-header";
|
||||
ShowSideBar = DictHelper.RetrieveSidebarStatus() ? "" : "collapsed";
|
||||
AllowMobile = DictHelper.RetrieveMobileLogin();
|
||||
AllowOAuth = DictHelper.RetrieveOAuthLogin();
|
||||
ShowMobile = AllowMobile;
|
||||
ShowOAuth = AllowOAuth;
|
||||
ShowMobile = AllowMobile ? "" : "mobile";
|
||||
ShowOAuth = AllowOAuth ? "" : "oauth";
|
||||
LockScreenPeriod = DictHelper.RetrieveAutoLockScreenPeriod();
|
||||
EnableAutoLockScreen = DictHelper.RetrieveAutoLockScreen();
|
||||
FixedTableHeader = DictHelper.RetrieveFixedTableHeader();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -58,12 +53,12 @@ namespace Bootstrap.Admin.Models
|
|||
/// <summary>
|
||||
/// 是否显示卡片标题
|
||||
/// </summary>
|
||||
public bool ShowCardTitle { get; protected set; }
|
||||
public string ShowCardTitle { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否收缩侧边栏
|
||||
/// </summary>
|
||||
public bool ShowSideBar { get; protected set; }
|
||||
public string ShowSideBar { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 是否允许短信验证码登录
|
||||
|
@ -78,12 +73,12 @@ namespace Bootstrap.Admin.Models
|
|||
/// <summary>
|
||||
/// 获得 是否允许短信验证码登录
|
||||
/// </summary>
|
||||
public bool ShowMobile { get; }
|
||||
public string ShowMobile { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 是否允许第三方 OAuth 认证登录
|
||||
/// </summary>
|
||||
public bool ShowOAuth { get; }
|
||||
public string ShowOAuth { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 自动锁屏时长 默认 1 分钟 字典表中配置
|
||||
|
@ -94,10 +89,5 @@ namespace Bootstrap.Admin.Models
|
|||
/// 获得 自动锁屏功能是否自动开启 默认关闭
|
||||
/// </summary>
|
||||
public bool EnableAutoLockScreen { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 是否固定表头
|
||||
/// </summary>
|
||||
public bool FixedTableHeader { get; }
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
///
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security.Mvc;
|
||||
using System;
|
||||
|
||||
|
@ -41,7 +37,6 @@ namespace Bootstrap.Admin.Models
|
|||
WebSiteIcon = DictHelper.RetrieveWebIcon(AppId);
|
||||
WebSiteLogo = DictHelper.RetrieveWebLogo(AppId);
|
||||
}
|
||||
EnableBlazor = DictHelper.RetrieveEnableBlazor();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -52,7 +47,7 @@ namespace Bootstrap.Admin.Models
|
|||
/// <summary>
|
||||
/// 获得 当前用户显示名称
|
||||
/// </summary>
|
||||
public string DisplayName { get; set; } = "";
|
||||
public string DisplayName { get; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 获得 用户头像地址
|
||||
|
@ -73,10 +68,5 @@ namespace Bootstrap.Admin.Models
|
|||
/// 获得 当前样式
|
||||
/// </summary>
|
||||
public string ActiveCss { get; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 获得 是否开启 Blazor
|
||||
/// </summary>
|
||||
public bool EnableBlazor { get; }
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统锁屏数据模型
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
///
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Model 基类
|
|
@ -0,0 +1,36 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 侧边栏导航条 Model
|
||||
/// </summary>
|
||||
public class NavigatorBarModel : HeaderBarModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
/// <param name="controller"></param>
|
||||
public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity.Name)
|
||||
{
|
||||
Navigations = MenuHelper.RetrieveSystemMenus(UserName, $"~{controller.HttpContext.Request.Path}");
|
||||
var authApps = AppHelper.RetrievesByUserName(controller.User.Identity.Name);
|
||||
Applications = DictHelper.RetrieveApps().Where(app => app.Key.IsNullOrEmpty() || authApps.Any(key => key.Equals(app.Key, StringComparison.OrdinalIgnoreCase)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得 网站菜单
|
||||
/// </summary>
|
||||
public IEnumerable<BootstrapMenu> Navigations { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 网站应用程序
|
||||
/// </summary>
|
||||
public IEnumerable<KeyValuePair<string, string>> Applications { get; private set; }
|
||||
}
|
||||
}
|
|
@ -1,9 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -11,7 +6,7 @@ using System.Linq;
|
|||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 个人中心模型
|
||||
///
|
||||
/// </summary>
|
||||
public class ProfilesModel : SettingsModel
|
||||
{
|
||||
|
@ -28,7 +23,6 @@ namespace Bootstrap.Admin.Models
|
|||
/// <summary>
|
||||
/// 获得 是否为第三方用户
|
||||
/// </summary>
|
||||
/// <remarks>第三方用户不允许修改密码</remarks>
|
||||
public bool External { get; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -37,7 +31,7 @@ namespace Bootstrap.Admin.Models
|
|||
public string AppName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="host"></param>
|
||||
/// <param name="controller"></param>
|
||||
|
@ -49,14 +43,14 @@ namespace Bootstrap.Admin.Models
|
|||
|
||||
// 数据库存储的个人图片有后缀 default.jpg?v=1234567
|
||||
fileName = fileName.Split('?').FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(fileName) && File.Exists(fileName))
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
Size = new FileInfo(fileName).Length;
|
||||
FileName = Path.GetFileName(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
if (controller.User.Identity!.AuthenticationType != CookieAuthenticationDefaults.AuthenticationScheme) External = true;
|
||||
if (controller.User.Identity.AuthenticationType != Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.AuthenticationScheme) External = true;
|
||||
|
||||
// 设置 当前用户默认应用名称
|
||||
AppName = Applications.FirstOrDefault(app => app.Key == AppId).Value;
|
|
@ -0,0 +1,33 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 网站设置 Model 实体类
|
||||
/// </summary>
|
||||
public class SettingsModel : NavigatorBarModel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="controller"></param>
|
||||
public SettingsModel(ControllerBase controller) : base(controller)
|
||||
{
|
||||
Themes = DictHelper.RetrieveThemes();
|
||||
AutoLockScreen = EnableAutoLockScreen ? "" : "lockScreen";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得 系统配置的所有样式表
|
||||
/// </summary>
|
||||
public IEnumerable<BootstrapDict> Themes { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得 是否开启自动锁屏
|
||||
/// </summary>
|
||||
public string AutoLockScreen { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class TaskModel : NavigatorBarModel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="controller"></param>
|
||||
public TaskModel(ControllerBase controller) : base(controller)
|
||||
{
|
||||
Tasks = new string[] { "测试任务" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得 系统配置的所有任务
|
||||
/// </summary>
|
||||
public IEnumerable<string> Tasks { get; }
|
||||
}
|
||||
}
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace Bootstrap.Admin
|
|
@ -1,11 +1,6 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
|
@ -42,19 +37,15 @@ namespace Bootstrap.Admin.Query
|
|||
var data = DictHelper.RetrieveDicts();
|
||||
if (!string.IsNullOrEmpty(Category))
|
||||
{
|
||||
data = data.Where(t => t.Category.Contains(Category, StringComparison.OrdinalIgnoreCase));
|
||||
data = data.Where(t => t.Category?.Contains(Category) ?? false);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Name))
|
||||
{
|
||||
data = data.Where(t => t.Name.Contains(Name, StringComparison.OrdinalIgnoreCase));
|
||||
data = data.Where(t => t.Name?.Contains(Name) ?? false);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Define))
|
||||
{
|
||||
data = data.Where(t => t.Define.ToString() == Define);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Search))
|
||||
{
|
||||
data = data.Where(t => t.Category.Contains(Search, StringComparison.OrdinalIgnoreCase) || t.Name.Contains(Search, StringComparison.OrdinalIgnoreCase) || t.Code.Contains(Search, StringComparison.OrdinalIgnoreCase));
|
||||
data = data.Where(t => t.Define.ToString() == (Define ?? ""));
|
||||
}
|
||||
var ret = new QueryData<BootstrapDict>();
|
||||
ret.total = data.Count();
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
|
@ -1,10 +1,5 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
|
@ -34,15 +29,11 @@ namespace Bootstrap.Admin.Query
|
|||
var data = GroupHelper.Retrieves();
|
||||
if (!string.IsNullOrEmpty(GroupName))
|
||||
{
|
||||
data = data.Where(t => t.GroupName.Contains(GroupName, StringComparison.OrdinalIgnoreCase));
|
||||
data = data.Where(t => t.GroupName?.Contains(GroupName) ?? false);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Description))
|
||||
{
|
||||
data = data.Where(t => t.Description?.Contains(Description, StringComparison.OrdinalIgnoreCase) ?? false);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Search))
|
||||
{
|
||||
data = data.Where(t => t.GroupName.Contains(Search, StringComparison.OrdinalIgnoreCase) || (t.Description?.Contains(Search, StringComparison.OrdinalIgnoreCase) ?? false));
|
||||
data = data.Where(t => t.Description?.Contains(Description) ?? false);
|
||||
}
|
||||
var ret = new QueryData<object>();
|
||||
ret.total = data.Count();
|
|
@ -1,8 +1,4 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue