Browse Source

rewrite setting view and fixed apigateway admin service an bug

pull/41/head
cKey 5 years ago
parent
commit
a61e4460d7
  1. 199
      aspnet-core/database/ApiGateway-Init.sql
  2. 44
      aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountSettingDefinitionProvider.cs
  3. 6
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupUpdateDto.cs
  4. 4
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/RouteGroupAppService.cs
  5. 6
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN/ApiGateway/Ocelot/RouteGroup/RouteGroup.cs
  6. 20
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN/ApiGateway/EntityFrameworkCore/ApiGatewayDbContext.cs
  7. 24
      aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN/ApiGateway/EntityFrameworkCore/ApiGatewayEfCoreRepositoryBase.cs
  8. 22
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Settings/PlatformSettingDefinitionProvider.cs
  9. 1
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/AbpSettingManagementPermissionProvider.cs
  10. 7
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/AbpSettingManagementPermissions.cs
  11. 11
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/ISettingAppService.cs
  12. 3
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Localization/ApplicationContracts/en.json
  13. 3
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Localization/ApplicationContracts/zh-Hans.json
  14. 91
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs
  15. 35
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs
  16. 4
      aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
  17. 1
      aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/LINGYUN.BackendAdminApp.Host.csproj
  18. 13
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/ApiGatewayHttpApiHostModule.cs
  19. 43
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/DataSeeder/ApiGatewayAdminDataSeedContributor.cs
  20. 10
      vueJs/src/api/apigateway.ts
  21. 37
      vueJs/src/api/settings.ts
  22. 8
      vueJs/src/views/admin/apigateway/components/RouteGroupCreateOrEditForm.vue
  23. 3
      vueJs/src/views/admin/apigateway/global.vue
  24. 1
      vueJs/src/views/admin/apigateway/group.vue
  25. 740
      vueJs/src/views/admin/settings/components/GlobalSettingEditForm.vue
  26. 717
      vueJs/src/views/admin/settings/components/SettingEditForm.vue
  27. 22
      vueJs/src/views/admin/settings/components/TenantSettingEditForm.vue
  28. 22
      vueJs/src/views/admin/settings/components/UserSettingEditForm.vue
  29. 29
      vueJs/src/views/admin/settings/index.vue

199
aspnet-core/database/ApiGateway-Init.sql

@ -11,7 +11,7 @@
Target Server Version : 80020
File Encoding : 65001
Date: 30/07/2020 16:54:44
Date: 05/08/2020 15:56:55
*/
SET NAMES utf8mb4;
@ -159,26 +159,6 @@ INSERT INTO `appapigatewayauthoptions` VALUES (67, 1267383367629807616, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (68, 1267817055527632896, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (69, 1267817221286526976, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (70, 1268893687085518848, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (71, 1273527659565547520, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (72, 1273542336509079552, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (73, 1273542755520049152, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (74, 1273543111322857472, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (75, 1273543850526994432, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (76, 1273544135009857536, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (77, 1273544377432240128, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (78, 1273544549834911744, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (79, 1273545100509278208, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (80, 1273545462146363392, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (81, 1273545765801390080, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (82, 1273877904709361664, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (83, 1273878097483767808, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (84, 1273878425839050752, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (85, 1273879014778052608, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (86, 1273879265417076736, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (87, 1273879533101752320, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (88, 1274294160109314048, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (89, 1274524600855441408, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (90, 1274543888438525952, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (91, 1285579388652576768, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (92, 1285580096881778688, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (93, 1285582774663864320, '', '');
@ -189,6 +169,10 @@ INSERT INTO `appapigatewayauthoptions` VALUES (97, 1288658305156964352, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (98, 1288658491216289792, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (99, 1288658638302142464, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (100, 1288658791784308736, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (101, 1290849478956199936, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (102, 1290849628051124224, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (103, 1290849798553776128, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (104, 1290849978032238592, '', '');
-- ----------------------------
-- Table structure for appapigatewaybalanceroptions
@ -272,33 +256,11 @@ INSERT INTO `appapigatewaybalanceroptions` VALUES (63, NULL, 1263305430536855552
INSERT INTO `appapigatewaybalanceroptions` VALUES (64, NULL, 1263639172959174656, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (65, NULL, 1264799968944640000, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (66, NULL, 1264800070161584128, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (67, 1265168245423443968, NULL, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (68, NULL, 1267360794414161920, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (69, NULL, 1267383367629807616, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (70, NULL, 1267817055527632896, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (71, NULL, 1267817221286526976, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (72, NULL, 1268893687085518848, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (73, 1273519675519270912, NULL, 'RoundRobin', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (74, NULL, 1273527659565547520, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (75, NULL, 1273542336509079552, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (76, NULL, 1273542755520049152, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (77, NULL, 1273543111322857472, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (78, NULL, 1273543850526994432, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (79, NULL, 1273544135009857536, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (80, NULL, 1273544377432240128, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (81, NULL, 1273544549834911744, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (82, NULL, 1273545100509278208, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (83, NULL, 1273545462146363392, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (84, NULL, 1273545765801390080, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (85, NULL, 1273877904709361664, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (86, NULL, 1273878097483767808, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (87, NULL, 1273878425839050752, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (88, NULL, 1273879014778052608, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (89, NULL, 1273879265417076736, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (90, NULL, 1273879533101752320, 'LeastConnection', '', 6000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (91, NULL, 1274294160109314048, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (92, NULL, 1274524600855441408, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (93, NULL, 1274543888438525952, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (94, NULL, 1285579388652576768, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (95, NULL, 1285580096881778688, 'LeastConnection', '', 60000);
INSERT INTO `appapigatewaybalanceroptions` VALUES (96, NULL, 1285582774663864320, 'LeastConnection', '', 60000);
@ -309,6 +271,10 @@ INSERT INTO `appapigatewaybalanceroptions` VALUES (100, NULL, 128865830515696435
INSERT INTO `appapigatewaybalanceroptions` VALUES (101, NULL, 1288658491216289792, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (102, NULL, 1288658638302142464, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (103, NULL, 1288658791784308736, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (104, NULL, 1290849478956199936, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (105, NULL, 1290849628051124224, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (106, NULL, 1290849798553776128, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (107, NULL, 1290849978032238592, '', '', 0);
-- ----------------------------
-- Table structure for appapigatewaycacheoptions
@ -392,26 +358,6 @@ INSERT INTO `appapigatewaycacheoptions` VALUES (67, 1267383367629807616, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (68, 1267817055527632896, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (69, 1267817221286526976, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (70, 1268893687085518848, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (71, 1273527659565547520, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (72, 1273542336509079552, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (73, 1273542755520049152, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (74, 1273543111322857472, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (75, 1273543850526994432, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (76, 1273544135009857536, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (77, 1273544377432240128, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (78, 1273544549834911744, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (79, 1273545100509278208, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (80, 1273545462146363392, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (81, 1273545765801390080, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (82, 1273877904709361664, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (83, 1273878097483767808, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (84, 1273878425839050752, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (85, 1273879014778052608, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (86, 1273879265417076736, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (87, 1273879533101752320, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (88, 1274294160109314048, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (89, 1274524600855441408, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (90, 1274543888438525952, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (91, 1285579388652576768, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (92, 1285580096881778688, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (93, 1285582774663864320, 0, '');
@ -422,6 +368,10 @@ INSERT INTO `appapigatewaycacheoptions` VALUES (97, 1288658305156964352, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (98, 1288658491216289792, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (99, 1288658638302142464, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (100, 1288658791784308736, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (101, 1290849478956199936, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (102, 1290849628051124224, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (103, 1290849798553776128, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (104, 1290849978032238592, 0, '');
-- ----------------------------
-- Table structure for appapigatewaydiscovery
@ -447,8 +397,6 @@ CREATE TABLE `appapigatewaydiscovery` (
-- Records of appapigatewaydiscovery
-- ----------------------------
INSERT INTO `appapigatewaydiscovery` VALUES (1, 1260841964962947072, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `appapigatewaydiscovery` VALUES (2, 1265168245423443968, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `appapigatewaydiscovery` VALUES (3, 1273519675519270912, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-- ----------------------------
-- Table structure for appapigatewaydynamicreroute
@ -599,33 +547,11 @@ INSERT INTO `appapigatewayhttpoptions` VALUES (63, NULL, 1263305430536855552, 0,
INSERT INTO `appapigatewayhttpoptions` VALUES (64, NULL, 1263639172959174656, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (65, NULL, 1264799968944640000, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (66, NULL, 1264800070161584128, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (67, 1265168245423443968, NULL, 1000, 0, 0, 1, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (68, NULL, 1267360794414161920, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (69, NULL, 1267383367629807616, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (70, NULL, 1267817055527632896, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (71, NULL, 1267817221286526976, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (72, NULL, 1268893687085518848, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (73, 1273519675519270912, NULL, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (74, NULL, 1273527659565547520, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (75, NULL, 1273542336509079552, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (76, NULL, 1273542755520049152, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (77, NULL, 1273543111322857472, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (78, NULL, 1273543850526994432, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (79, NULL, 1273544135009857536, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (80, NULL, 1273544377432240128, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (81, NULL, 1273544549834911744, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (82, NULL, 1273545100509278208, 10000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (83, NULL, 1273545462146363392, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (84, NULL, 1273545765801390080, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (85, NULL, 1273877904709361664, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (86, NULL, 1273878097483767808, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (87, NULL, 1273878425839050752, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (88, NULL, 1273879014778052608, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (89, NULL, 1273879265417076736, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (90, NULL, 1273879533101752320, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (91, NULL, 1274294160109314048, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (92, NULL, 1274524600855441408, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (93, NULL, 1274543888438525952, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (94, NULL, 1285579388652576768, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (95, NULL, 1285580096881778688, 1000, 0, 0, 1, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (96, NULL, 1285582774663864320, 1000, 0, 0, 1, 0);
@ -636,6 +562,10 @@ INSERT INTO `appapigatewayhttpoptions` VALUES (100, NULL, 1288658305156964352, 1
INSERT INTO `appapigatewayhttpoptions` VALUES (101, NULL, 1288658491216289792, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (102, NULL, 1288658638302142464, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (103, NULL, 1288658791784308736, 1000, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (104, NULL, 1290849478956199936, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (105, NULL, 1290849628051124224, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (106, NULL, 1290849798553776128, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (107, NULL, 1290849978032238592, 0, 0, 0, 0, 0);
-- ----------------------------
-- Table structure for appapigatewayqosoptions
@ -719,33 +649,11 @@ INSERT INTO `appapigatewayqosoptions` VALUES (63, NULL, 1263305430536855552, 50,
INSERT INTO `appapigatewayqosoptions` VALUES (64, NULL, 1263639172959174656, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (65, NULL, 1264799968944640000, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (66, NULL, 1264800070161584128, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (67, 1265168245423443968, NULL, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (68, NULL, 1267360794414161920, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (69, NULL, 1267383367629807616, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (70, NULL, 1267817055527632896, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (71, NULL, 1267817221286526976, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (72, NULL, 1268893687085518848, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (73, 1273519675519270912, NULL, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (74, NULL, 1273527659565547520, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (75, NULL, 1273542336509079552, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (76, NULL, 1273542755520049152, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (77, NULL, 1273543111322857472, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (78, NULL, 1273543850526994432, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (79, NULL, 1273544135009857536, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (80, NULL, 1273544377432240128, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (81, NULL, 1273544549834911744, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (82, NULL, 1273545100509278208, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (83, NULL, 1273545462146363392, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (84, NULL, 1273545765801390080, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (85, NULL, 1273877904709361664, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (86, NULL, 1273878097483767808, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (87, NULL, 1273878425839050752, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (88, NULL, 1273879014778052608, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (89, NULL, 1273879265417076736, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (90, NULL, 1273879533101752320, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (91, NULL, 1274294160109314048, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (92, NULL, 1274524600855441408, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (93, NULL, 1274543888438525952, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (94, NULL, 1285579388652576768, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (95, NULL, 1285580096881778688, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (96, NULL, 1285582774663864320, 50, 60000, 30000);
@ -756,6 +664,10 @@ INSERT INTO `appapigatewayqosoptions` VALUES (100, NULL, 1288658305156964352, 50
INSERT INTO `appapigatewayqosoptions` VALUES (101, NULL, 1288658491216289792, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (102, NULL, 1288658638302142464, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (103, NULL, 1288658791784308736, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (104, NULL, 1290849478956199936, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (105, NULL, 1290849628051124224, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (106, NULL, 1290849798553776128, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (107, NULL, 1290849978032238592, 50, 60000, 30000);
-- ----------------------------
-- Table structure for appapigatewayratelimitoptions
@ -778,8 +690,6 @@ CREATE TABLE `appapigatewayratelimitoptions` (
-- Records of appapigatewayratelimitoptions
-- ----------------------------
INSERT INTO `appapigatewayratelimitoptions` VALUES (1, 1260841964962947072, 'ClientId', '您的操作过快,请稍后再试!', 'ocelot', 1, 429);
INSERT INTO `appapigatewayratelimitoptions` VALUES (2, 1265168245423443968, 'ClientId', '{\n \"error\": {\n \"code\": \"429\",\n \"message\": \"对不起,在处理您的请求期间出现了一个服务器内部错误!\",\n \"details\": \"您的操作过快,请稍后再试!\",\n \"validationErrors\": []\n }\n}', 'ocelot', 1, 429);
INSERT INTO `appapigatewayratelimitoptions` VALUES (3, 1273519675519270912, 'ClientId', NULL, 'ocelot', 1, 429);
-- ----------------------------
-- Table structure for appapigatewayratelimitrule
@ -869,26 +779,6 @@ INSERT INTO `appapigatewayratelimitrule` VALUES (67, 1267383367629807616, NULL,
INSERT INTO `appapigatewayratelimitrule` VALUES (68, 1267817055527632896, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (69, 1267817221286526976, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (70, 1268893687085518848, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (71, 1273527659565547520, NULL, 'apigateway-host-client,apigateway-admin-client', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (72, 1273542336509079552, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (73, 1273542755520049152, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (74, 1273543111322857472, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (75, 1273543850526994432, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (76, 1273544135009857536, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (77, 1273544377432240128, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (78, 1273544549834911744, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (79, 1273545100509278208, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (80, 1273545462146363392, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (81, 1273545765801390080, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (82, 1273877904709361664, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (83, 1273878097483767808, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (84, 1273878425839050752, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (85, 1273879014778052608, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (86, 1273879265417076736, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (87, 1273879533101752320, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (88, 1274294160109314048, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (89, 1274524600855441408, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (90, 1274543888438525952, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (91, 1285579388652576768, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (92, 1285580096881778688, NULL, '', 1, '1m', 60, 200);
INSERT INTO `appapigatewayratelimitrule` VALUES (93, 1285582774663864320, NULL, '', 1, '1m', 60, 200);
@ -899,6 +789,10 @@ INSERT INTO `appapigatewayratelimitrule` VALUES (97, 1288658305156964352, NULL,
INSERT INTO `appapigatewayratelimitrule` VALUES (98, 1288658491216289792, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (99, 1288658638302142464, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (100, 1288658791784308736, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (101, 1290849478956199936, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (102, 1290849628051124224, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (103, 1290849798553776128, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (104, 1290849978032238592, NULL, '', 0, NULL, NULL, NULL);
-- ----------------------------
-- Table structure for appapigatewayreroute
@ -1000,7 +894,7 @@ INSERT INTO `appapigatewayreroute` VALUES (62, '{}', '9810656b884947e3897e776b47
INSERT INTO `appapigatewayreroute` VALUES (63, '{}', '12254ca25e15420faa694f62148dd694', 1263305106250047488, '平台服务-特定租户管理', '/api/multi-tenancy/tenants/{id}', '', '', '/api/multi-tenancy/tenants/{id}', 'GET,PUT,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (64, '{}', '27761205c6344bfebbafbc077781ab76', 1263305244594970624, '平台服务-租户连接字符串', '/api/multi-tenancy/tenants/{id}/connection-string', '', '', '/api/multi-tenancy/tenants/{id}/concatenation', 'GET,PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 2, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (65, '{}', 'af470c53a25340fd9248fd0309ad41ef', 1263305430536855552, '平台服务-特定租户连接字符串', '/api/multi-tenancy/tenants/{id}/connection-string/{name}', '', '', '/api/multi-tenancy/tenants/{id}/concatenation/{name}', 'GET,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 1, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (66, '{}', 'a7a61cb210484794a5ad380938630058', 1263639172959174656, '平台服务-配置管理', '/api/abp/setting', '', '', '/api/abp/setting', 'GET,PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (66, '{}', '50b18f8d4ddb4540b142877a7852f20d', 1263639172959174656, '平台服务- 公共配置', '/api/settings/by-global', '', '', '/api/settings/by-global', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (67, '{}', '858056ce80b8420084b60d62ef4aa25c', 1264799968944640000, '平台服务-验证手机号', '/api/account/phone/verify', '', '', '/api/account/phone/verify', 'POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (68, '{}', 'd460979de403436e840de179767ed770', 1264800070161584128, '平台服务-手机号注册', '/api/account/phone/register', '', '', '/api/account/phone/register', 'POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (69, '{}', 'd2329516ff954ab68f29c69da8db725a', 1267360794414161920, '即时通讯-通知', '/signalr-hubs/notifications/{everything}', '', '', '/signalr-hubs/notifications/{everything}', 'POST,GET,OPTIONS,PUT,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:30020,', '', '', '', 1, 30000, 1, '', 'TEST-APP');
@ -1018,6 +912,10 @@ INSERT INTO `appapigatewayreroute` VALUES (104, '{}', '3515e75becf9447492ad60466
INSERT INTO `appapigatewayreroute` VALUES (105, '{}', 'aab0a24d930f4f9687497e5ccaac2a31', 1288658491216289792, '【身份认证服务】- 查询组织机构最后一个子节点', '/api/identity/organization-units/last-children', '', '', '/api/identity/organization-units/last-children', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (106, '{}', 'edf67e297c6d494baf3ea66465418faf', 1288658638302142464, '【身份认证服务】- 组织机构角色管理', '/api/identity/organization-units/management-roles', '', '', '/api/identity/organization-units/management-roles', 'GET,POST,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (107, '{}', '21bcb13e71c648a98861ce9b6fb3e7b0', 1288658791784308736, '【身份认证服务】- 组织机构用户管理', '/api/identity/organization-units/management-users', '', '', '/api/identity/organization-units/management-users', 'GET,POST,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (108, '{}', '417a4518e0da4db0a2704511d6a8c343', 1290849478956199936, '【平台服务】- 当前租户配置', '/api/settings/by-tenant', '', '', '/api/settings/by-tenant', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (109, '{}', 'e937ff4ea11e4f0ca39d079c7a83b960', 1290849628051124224, '【平台服务】- 用户配置', '/api/settings/by-user', '', '', '/api/settings/by-user', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (110, '{}', '22212bc751b743678d9c2f095d05ce25', 1290849798553776128, '【平台服务】- 当前用户配置', '/api/settings/by-current-user', '', '', '/api/settings/by-current-user', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (111, '{}', '8dfa430d752a4b4a869ad401b3802a62', 1290849978032238592, '【平台服务】- 配置管理', '/api/settings', '', '', '/api/settings', 'GET,PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
-- ----------------------------
-- Table structure for appapigatewayroutegroup
@ -1047,7 +945,7 @@ CREATE TABLE `appapigatewayroutegroup` (
-- ----------------------------
-- Records of appapigatewayroutegroup
-- ----------------------------
INSERT INTO `appapigatewayroutegroup` VALUES ('08d7f735-a83b-49ab-8cee-5d602502bea8', '{}', '8484f6852d3b4252a0b6bf278f9afd48', '2020-05-13 20:03:32.524271', NULL, '2020-05-13 21:34:30.407974', NULL, 0, NULL, NULL, '测试组', 'TEST-APP', '测试网关分组', '127.0.0.1', '测试网关分组', 1);
INSERT INTO `appapigatewayroutegroup` VALUES ('08d7f735-a83b-49ab-8cee-5d602502bea8', '{}', '83cac848676f4b658d5c9f7d802a497a', '2020-05-13 20:03:32.524271', NULL, '2020-08-05 15:43:28.205288', 'bf289dbb-838e-a89b-c622-39f51dcc4f43', 0, NULL, NULL, 'abp后台管理', 'TEST-APP', 'abp后台管理', '127.0.0.1', 'abp后台管理项目网关', 1);
-- ----------------------------
-- Table structure for appapigatewaysecurityoptions
@ -1131,26 +1029,6 @@ INSERT INTO `appapigatewaysecurityoptions` VALUES (67, 1267383367629807616, '',
INSERT INTO `appapigatewaysecurityoptions` VALUES (68, 1267817055527632896, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (69, 1267817221286526976, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (70, 1268893687085518848, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (71, 1273527659565547520, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (72, 1273542336509079552, '127.0.0.1', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (73, 1273542755520049152, '127.0.0.1', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (74, 1273543111322857472, '127.0.0.1', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (75, 1273543850526994432, '127.0.0.1', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (76, 1273544135009857536, '127.0.0.1', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (77, 1273544377432240128, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (78, 1273544549834911744, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (79, 1273545100509278208, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (80, 1273545462146363392, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (81, 1273545765801390080, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (82, 1273877904709361664, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (83, 1273878097483767808, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (84, 1273878425839050752, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (85, 1273879014778052608, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (86, 1273879265417076736, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (87, 1273879533101752320, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (88, 1274294160109314048, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (89, 1274524600855441408, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (90, 1274543888438525952, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (91, 1285579388652576768, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (92, 1285580096881778688, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (93, 1285582774663864320, '', '');
@ -1161,6 +1039,10 @@ INSERT INTO `appapigatewaysecurityoptions` VALUES (97, 1288658305156964352, '',
INSERT INTO `appapigatewaysecurityoptions` VALUES (98, 1288658491216289792, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (99, 1288658638302142464, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (100, 1288658791784308736, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (101, 1290849478956199936, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (102, 1290849628051124224, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (103, 1290849798553776128, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (104, 1290849978032238592, '', '');
-- ----------------------------
-- Table structure for cap.published
@ -1179,17 +1061,6 @@ CREATE TABLE `cap.published` (
INDEX `IX_ExpiresAt`(`ExpiresAt`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of cap.published
-- ----------------------------
INSERT INTO `cap.published` VALUES (1288657615026184192, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1288657615026184192\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/7/30 10:08:12 +08:00\",\"cap-corr-id\":\"1288657615026184192\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-07-30T10:08:12.1765932+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-07-30 10:08:12', '2020-07-31 10:08:12', 'Succeeded');
INSERT INTO `cap.published` VALUES (1288657799890132992, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1288657799890132992\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/7/30 10:08:56 +08:00\",\"cap-corr-id\":\"1288657799890132992\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-07-30T10:08:56.2542+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Modify\",\"Object\":\"ReRoute\"}}', 0, '2020-07-30 10:08:56', '2020-07-31 10:08:56', 'Succeeded');
INSERT INTO `cap.published` VALUES (1288657941858934784, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1288657941858934784\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/7/30 10:09:30 +08:00\",\"cap-corr-id\":\"1288657941858934784\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-07-30T10:09:30.1028+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-07-30 10:09:30', '2020-07-31 10:09:30', 'Succeeded');
INSERT INTO `cap.published` VALUES (1288658134121635840, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1288658134121635840\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/7/30 10:10:15 +08:00\",\"cap-corr-id\":\"1288658134121635840\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-07-30T10:10:15.9418485+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-07-30 10:10:16', '2020-07-31 10:10:16', 'Succeeded');
INSERT INTO `cap.published` VALUES (1288658305198907392, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1288658305198907392\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/7/30 10:10:56 +08:00\",\"cap-corr-id\":\"1288658305198907392\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-07-30T10:10:56.7297211+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-07-30 10:10:57', '2020-07-31 10:10:57', 'Succeeded');
INSERT INTO `cap.published` VALUES (1288658491258232832, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1288658491258232832\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/7/30 10:11:41 +08:00\",\"cap-corr-id\":\"1288658491258232832\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-07-30T10:11:41.0897204+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-07-30 10:11:41', '2020-07-31 10:11:41', 'Succeeded');
INSERT INTO `cap.published` VALUES (1288658638331502592, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1288658638331502592\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/7/30 10:12:16 +08:00\",\"cap-corr-id\":\"1288658638331502592\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-07-30T10:12:16.1548814+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-07-30 10:12:16', '2020-07-31 10:12:16', 'Succeeded');
INSERT INTO `cap.published` VALUES (1288658791822057472, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1288658791822057472\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/7/30 10:12:52 +08:00\",\"cap-corr-id\":\"1288658791822057472\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-07-30T10:12:52.7491793+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-07-30 10:12:53', '2020-07-31 10:12:53', 'Succeeded');
-- ----------------------------
-- Table structure for cap.received

44
aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountSettingDefinitionProvider.cs

@ -16,14 +16,42 @@ namespace LINGYUN.Abp.Account
{
return new SettingDefinition[]
{
new SettingDefinition(AccountSettingNames.SmsRegisterTemplateCode,
"SMS_190728520", L("DisplayName:SmsRegisterTemplateCode"), L("Description:SmsRegisterTemplateCode")),
new SettingDefinition(AccountSettingNames.SmsSigninTemplateCode,
"SMS_190728516", L("DisplayName:SmsSigninTemplateCode"), L("Description:SmsSigninTemplateCode")),
new SettingDefinition(AccountSettingNames.SmsResetPasswordTemplateCode,
"SMS_192530831", L("DisplayName:SmsResetPasswordTemplateCode"), L("Description:SmsResetPasswordTemplateCode")),
new SettingDefinition(AccountSettingNames.PhoneVerifyCodeExpiration,
"3", L("DisplayName:PhoneVerifyCodeExpiration"), L("Description:PhoneVerifyCodeExpiration")),
new SettingDefinition(
name: AccountSettingNames.SmsRegisterTemplateCode,
defaultValue: "SMS_190728520",
displayName: L("DisplayName:SmsRegisterTemplateCode"),
description: L("Description:SmsRegisterTemplateCode"),
isVisibleToClients: true)
.WithProviders(
GlobalSettingValueProvider.ProviderName,
TenantSettingValueProvider.ProviderName),
new SettingDefinition(
name: AccountSettingNames.SmsSigninTemplateCode,
defaultValue: "SMS_190728516",
displayName: L("DisplayName:SmsSigninTemplateCode"),
description: L("Description:SmsSigninTemplateCode"),
isVisibleToClients: true)
.WithProviders(
GlobalSettingValueProvider.ProviderName,
TenantSettingValueProvider.ProviderName),
new SettingDefinition(
name: AccountSettingNames.SmsResetPasswordTemplateCode,
defaultValue: "SMS_192530831",
displayName: L("DisplayName:SmsResetPasswordTemplateCode"),
description: L("Description:SmsResetPasswordTemplateCode"),
isVisibleToClients: true)
.WithProviders(
GlobalSettingValueProvider.ProviderName,
TenantSettingValueProvider.ProviderName),
new SettingDefinition(
name: AccountSettingNames.PhoneVerifyCodeExpiration,
defaultValue: "3",
displayName: L("DisplayName:PhoneVerifyCodeExpiration"),
description: L("Description:PhoneVerifyCodeExpiration"),
isVisibleToClients: true)
.WithProviders(
GlobalSettingValueProvider.ProviderName,
TenantSettingValueProvider.ProviderName),
};
}

6
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN/ApiGateway/Ocelot/Dto/RouteGroupUpdateDto.cs

@ -8,6 +8,12 @@ namespace LINGYUN.ApiGateway.Ocelot
[StringLength(50)]
public string AppId { get; set; }
[StringLength(100)]
public string AppName { get; set; }
[StringLength(256)]
public string AppIpAddress { get; set; }
[StringLength(50)]
public string Name { get; set; }

4
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN/ApiGateway/Ocelot/RouteGroupAppService.cs

@ -75,6 +75,10 @@ namespace LINGYUN.ApiGateway.Ocelot
router.Name = routerUpdateDto.Name;
router.IsActive = routerUpdateDto.IsActive;
router.Description = routerUpdateDto.Description;
router.SwitchApp(routerUpdateDto.AppName, routerUpdateDto.AppIpAddress);
await RouterRepository.UpdateAsync(router);
await CurrentUnitOfWork.SaveChangesAsync();
return ObjectMapper.Map<RouteGroup, RouteGroupDto>(router);
}

6
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN/ApiGateway/Ocelot/RouteGroup/RouteGroup.cs

@ -23,5 +23,11 @@ namespace LINGYUN.ApiGateway.Ocelot
AppName = appName;
AppIpAddress = appIp;
}
public void SwitchApp(string appName, string appIp)
{
AppName = appName ?? AppName;
AppIpAddress = appIp ?? AppIpAddress;
}
}
}

20
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN/ApiGateway/EntityFrameworkCore/ApiGatewayDbContext.cs

@ -1,6 +1,9 @@
using LINGYUN.ApiGateway.Ocelot;
using LINGYUN.ApiGateway.Data.Filter;
using LINGYUN.ApiGateway.Ocelot;
using LINGYUN.ApiGateway.Settings;
using Microsoft.EntityFrameworkCore;
using System;
using System.Linq.Expressions;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
@ -9,6 +12,7 @@ namespace LINGYUN.ApiGateway.EntityFrameworkCore
[ConnectionStringName("Default")]
public class ApiGatewayDbContext : AbpDbContext<ApiGatewayDbContext>
{
protected virtual bool IsActivationFilterEnabled => DataFilter?.IsEnabled<IActivation>() ?? false;
public virtual DbSet<ReRoute> ReRoutes { get; set; }
@ -48,5 +52,19 @@ namespace LINGYUN.ApiGateway.EntityFrameworkCore
options.Schema = ApiGatewaySettingNames.DefaultDbSchema;
});
}
protected override Expression<Func<TEntity, bool>> CreateFilterExpression<TEntity>()
{
var expression = base.CreateFilterExpression<TEntity>();
if (typeof(IActivation).IsAssignableFrom(typeof(TEntity)))
{
Expression<Func<TEntity, bool>> expression2 = ((TEntity e) => !IsActivationFilterEnabled || EF.Property<bool>(e, "IsActive"));
expression = ((expression == null) ? expression2 : CombineExpressions(expression, expression2));
}
return expression;
}
}
}

24
aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN/ApiGateway/EntityFrameworkCore/ApiGatewayEfCoreRepositoryBase.cs

@ -1,5 +1,4 @@
using LINGYUN.ApiGateway.Data.Filter;
using System.Linq;
using System.Linq;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
@ -25,28 +24,7 @@ namespace LINGYUN.ApiGateway.EntityFrameworkCore
protected override IQueryable<TEntity> GetQueryable()
{
var query = base.GetQueryable();
query = ApplyDataFilters(query);
return query;
}
/// <summary>
/// 过滤器
/// </summary>
/// <typeparam name="TQueryable"></typeparam>
/// <param name="query"></param>
/// <returns></returns>
protected override TQueryable ApplyDataFilters<TQueryable>(TQueryable query)
{
query = base.ApplyDataFilters(query);
if (typeof(IActivation).IsAssignableFrom(typeof(TEntity)))
{
var enabledActivation = DataFilter.IsEnabled<IActivation>();
if (enabledActivation)
{
query = (TQueryable)query.Where(e => ((IActivation)e).IsActive);
}
}
return query;
}
}

22
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/Settings/PlatformSettingDefinitionProvider.cs

@ -16,10 +16,24 @@ namespace LINGYUN.Platform.Settings
{
return new SettingDefinition[]
{
new SettingDefinition(PlatformSettingNames.AppVersion.VersionFileLimitLength, AppVersionConsts.DefaultVersionFileLimitLength.ToString(),
L("DisplayName:VersionFileLimitLength"), L("Description:VersionFileLimitLength"), isVisibleToClients: true),
new SettingDefinition(PlatformSettingNames.AppVersion.AllowVersionFileExtensions, AppVersionConsts.DefaultAllowVersionFileExtensions,
L("DisplayName:AllowVersionFileExtensions"), L("Description:AllowVersionFileExtensions"), isVisibleToClients: true),
new SettingDefinition(
name: PlatformSettingNames.AppVersion.VersionFileLimitLength,
defaultValue: AppVersionConsts.DefaultVersionFileLimitLength.ToString(),
displayName: L("DisplayName:VersionFileLimitLength"),
description: L("Description:VersionFileLimitLength"),
isVisibleToClients: true)
.WithProviders(
GlobalSettingValueProvider.ProviderName,
TenantSettingValueProvider.ProviderName),
new SettingDefinition(
name: PlatformSettingNames.AppVersion.AllowVersionFileExtensions,
defaultValue: AppVersionConsts.DefaultAllowVersionFileExtensions,
displayName: L("DisplayName:AllowVersionFileExtensions"),
description: L("Description:AllowVersionFileExtensions"),
isVisibleToClients: true)
.WithProviders(
GlobalSettingValueProvider.ProviderName,
TenantSettingValueProvider.ProviderName),
};
}

1
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/AbpSettingManagementPermissionProvider.cs

@ -15,6 +15,7 @@ namespace LINGYUN.Abp.SettingManagement
var settingPermissions = settingPermissionGroup.AddPermission(AbpSettingManagementPermissions.Settings.Default, L("Permission:Settings"));
settingPermissions.AddChild(AbpSettingManagementPermissions.Settings.Update, L("Permission:Update"));
settingPermissions.AddChild(AbpSettingManagementPermissions.Settings.Manager, L("Permission:Manager"));
}
private static LocalizableString L(string name)

7
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/AbpSettingManagementPermissions.cs

@ -1,4 +1,6 @@
namespace LINGYUN.Abp.SettingManagement
using System;
namespace LINGYUN.Abp.SettingManagement
{
public class AbpSettingManagementPermissions
{
@ -8,7 +10,10 @@
{
public const string Default = GroupName + ".Settings";
[Obsolete("The best way to do this is to enable the configuration administrator privileges")]
public const string Update = GroupName + ".Update";
public const string Manager = GroupName + ".Manager";
}
}
}

11
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/ISettingAppService.cs

@ -1,4 +1,6 @@
using JetBrains.Annotations;
using System;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
@ -7,6 +9,15 @@ namespace LINGYUN.Abp.SettingManagement
{
public interface ISettingAppService : IApplicationService
{
Task<ListResultDto<SettingDto>> GetAllGlobalAsync();
Task<ListResultDto<SettingDto>> GetAllForTenantAsync();
Task<ListResultDto<SettingDto>> GetAllForUserAsync([Required] Guid userId);
Task<ListResultDto<SettingDto>> GetAllForCurrentUserAsync();
[Obsolete("The best way to do this is to separate the individual configurations")]
Task<ListResultDto<SettingDto>> GetAsync([NotNull] string providerName, [NotNull] string providerKey);
Task UpdateAsync([NotNull] string providerName, [NotNull] string providerKey, UpdateSettingsDto input);

3
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Localization/ApplicationContracts/en.json

@ -3,6 +3,7 @@
"texts": {
"Permission:SettingManagement": "SettingManagement",
"Permission:Settings": "Settings",
"Permission:Update": "Update"
"Permission:Update": "Update",
"Permission:Manager": "Manager"
}
}

3
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Localization/ApplicationContracts/zh-Hans.json

@ -3,6 +3,7 @@
"texts": {
"Permission:SettingManagement": "系统设置",
"Permission:Settings": "配置管理",
"Permission:Update": "变更"
"Permission:Update": "变更",
"Permission:Manager": "管理"
}
}

91
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs

@ -1,6 +1,8 @@
using JetBrains.Annotations;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
@ -31,21 +33,69 @@ namespace LINGYUN.Abp.SettingManagement
}
public virtual async Task<ListResultDto<SettingDto>> GetAsync([NotNull] string providerName, [NotNull] string providerKey)
{
return await GetAllSettingAsync(providerName, providerKey);
}
[Authorize(AbpSettingManagementPermissions.Settings.Manager)]
public virtual async Task UpdateAsync([NotNull] string providerName, [NotNull] string providerKey, UpdateSettingsDto input)
{
foreach (var setting in input.Settings)
{
await SettingManager.SetAsync(setting.Name, setting.Value, providerName, providerKey);
// 同步变更缓存配置
var settingCacheKey = CalculateCacheKey(setting.Name, providerName, providerKey);
var settignCacheItem = new SettingCacheItem(setting.Value);
await Cache.SetAsync(settingCacheKey, settignCacheItem);
}
}
[AllowAnonymous]
public virtual async Task<ListResultDto<SettingDto>> GetAllGlobalAsync()
{
var globalSettings = await SettingManager.GetAllGlobalAsync();
return GetAllSetting(globalSettings);
}
public virtual async Task<ListResultDto<SettingDto>> GetAllForTenantAsync()
{
if (CurrentTenant.IsAvailable)
{
var tenantSettings = await SettingManager.GetAllForTenantAsync(CurrentTenant.Id.Value);
return GetAllSetting(tenantSettings);
}
return new ListResultDto<SettingDto>();
}
public virtual async Task<ListResultDto<SettingDto>> GetAllForUserAsync([Required] Guid userId)
{
var userSettings = await SettingManager.GetAllForUserAsync(userId);
return GetAllSetting(userSettings);
}
public virtual async Task<ListResultDto<SettingDto>> GetAllForCurrentUserAsync()
{
var userSettings = await SettingManager.GetAllForUserAsync(CurrentUser.Id.Value);
return GetAllSetting(userSettings);
}
protected virtual async Task<ListResultDto<SettingDto>> GetAllSettingAsync(
string providerName, string providerKey)
{
var settingsDto = new List<SettingDto>();
var settingDefinitions = SettingDefinitionManager.GetAll();
foreach(var setting in settingDefinitions)
foreach (var setting in settingDefinitions)
{
if (setting.Providers.Any() && !setting.Providers.Contains(providerName))
{
continue;
}
// TODO: 是否遵循框架的限制?
//if (!setting.IsVisibleToClients)
//{
// continue;
//}
if (!setting.IsVisibleToClients)
{
continue;
}
var settingValue = await SettingManager.GetOrNullAsync(setting.Name, providerName, providerKey);
var settingInfo = new SettingDto
@ -61,17 +111,30 @@ namespace LINGYUN.Abp.SettingManagement
return new ListResultDto<SettingDto>(settingsDto);
}
[Authorize(AbpSettingManagementPermissions.Settings.Update)]
public virtual async Task UpdateAsync([NotNull] string providerName, [NotNull] string providerKey, UpdateSettingsDto input)
protected virtual ListResultDto<SettingDto> GetAllSetting(
List<SettingValue> settings)
{
foreach (var setting in input.Settings)
var settingsDto = new List<SettingDto>();
foreach (var setting in settings)
{
await SettingManager.SetAsync(setting.Name, setting.Value, providerName, providerKey);
// 同步变更缓存配置
var settingCacheKey = CalculateCacheKey(setting.Name, providerName, providerKey);
var settignCacheItem = new SettingCacheItem(setting.Value);
await Cache.SetAsync(settingCacheKey, settignCacheItem);
var settingDefinition = SettingDefinitionManager.Get(setting.Name);
if (!settingDefinition.IsVisibleToClients)
{
continue;
}
var settingInfo = new SettingDto
{
Name = setting.Name,
Value = setting.Value,
DefaultValue = settingDefinition.DefaultValue,
Description = settingDefinition.Description.Localize(StringLocalizerFactory),
DisplayName = settingDefinition.DisplayName.Localize(StringLocalizerFactory)
};
settingsDto.Add(settingInfo);
}
return new ListResultDto<SettingDto>(settingsDto);
}
protected virtual string CalculateCacheKey(string name, string providerName, string providerKey)

35
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs

@ -1,5 +1,7 @@
using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc;
using System;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
@ -8,7 +10,8 @@ using Volo.Abp.AspNetCore.Mvc;
namespace LINGYUN.Abp.SettingManagement
{
[RemoteService(Name = AbpSettingManagementRemoteServiceConsts.RemoteServiceName)]
[Area("abp")]
[Area("settings")]
[Route("api/settings")]
public class SettingController : AbpController, ISettingAppService
{
private readonly ISettingAppService _settingAppService;
@ -17,11 +20,41 @@ namespace LINGYUN.Abp.SettingManagement
_settingAppService = settingAppService;
}
[HttpGet]
[Route("by-current-user")]
public virtual async Task<ListResultDto<SettingDto>> GetAllForCurrentUserAsync()
{
return await _settingAppService.GetAllForCurrentUserAsync();
}
[HttpGet]
[Route("by-tenant")]
public virtual async Task<ListResultDto<SettingDto>> GetAllForTenantAsync()
{
return await _settingAppService.GetAllForTenantAsync();
}
[HttpGet]
[Route("by-user")]
public virtual async Task<ListResultDto<SettingDto>> GetAllForUserAsync([Required] Guid userId)
{
return await _settingAppService.GetAllForUserAsync(userId);
}
[HttpGet]
[Route("by-global")]
public virtual async Task<ListResultDto<SettingDto>> GetAllGlobalAsync()
{
return await _settingAppService.GetAllGlobalAsync();
}
[HttpGet]
public virtual async Task<ListResultDto<SettingDto>> GetAsync([NotNull] string providerName, [NotNull] string providerKey)
{
return await _settingAppService.GetAsync(providerName, providerKey);
}
[HttpPut]
public virtual async Task UpdateAsync([NotNull] string providerName, [NotNull] string providerKey, UpdateSettingsDto input)
{
await _settingAppService.UpdateAsync(providerName, providerKey, input);

4
aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj

@ -39,10 +39,6 @@
<ProjectReference Include="..\..\..\modules\tenants\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1development_1json__JsonSchema="http://json.schemastore.org/avro-avsc" /></VisualStudio></ProjectExtensions>
</Project>

1
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/LINGYUN.BackendAdminApp.Host.csproj

@ -78,6 +78,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<Folder Include="SignalR\" />
</ItemGroup>

13
aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/ApiGatewayHttpApiHostModule.cs

@ -18,6 +18,7 @@ using System.Text;
using Volo.Abp;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.Localization;
@ -28,6 +29,7 @@ using Volo.Abp.Security.Claims;
using Volo.Abp.Security.Encryption;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.Threading;
namespace LINGYUN.ApiGateway
{
@ -164,6 +166,17 @@ namespace LINGYUN.ApiGateway
app.UseAuditing();
// 路由
app.UseConfiguredEndpoints();
SeedData(context);
}
private void SeedData(ApplicationInitializationContext context)
{
AsyncHelper.RunSync(async () =>
{
using var scope = context.ServiceProvider.CreateScope();
await scope.ServiceProvider.GetRequiredService<IDataSeeder>().SeedAsync();
});
}
}
}

43
aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/DataSeeder/ApiGatewayAdminDataSeedContributor.cs

@ -0,0 +1,43 @@
using Microsoft.Extensions.Configuration;
using MySql.Data.MySqlClient;
using System;
using System.IO;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.IO;
namespace DataSeeder
{
public class ApiGatewayAdminDataSeedContributor : IDataSeedContributor, IScopedDependency
{
protected IConfiguration Configuration { get; }
public ApiGatewayAdminDataSeedContributor(
IConfiguration configuration)
{
Configuration = configuration;
}
public virtual async Task SeedAsync(DataSeedContext context)
{
// Search file: ApiGateway-init.sql
var scriptCommandFilePath = Path.Combine(Directory.GetCurrentDirectory(), "../../../database");
var scriptCommandFile = Path.Combine(scriptCommandFilePath, "ApiGateway-Init.sql");
if (File.Exists(scriptCommandFile))
{
// read all script
var apigatewayInitScript = await FileHelper.ReadAllTextAsync(scriptCommandFile);
if (!apigatewayInitScript.IsNullOrWhiteSpace())
{
// open connection and excute the apigateway-init script
var connectionString = Configuration.GetConnectionString("ApiGateway");
using var connection = new MySqlConnection(connectionString);
await connection.OpenAsync();
var sqlTransaction = connection.BeginTransaction();
var sqlCommand = new MySqlCommand(apigatewayInitScript, connection, sqlTransaction);
await sqlCommand.ExecuteNonQueryAsync();
}
}
}
}
}

10
vueJs/src/api/apigateway.ts

@ -30,8 +30,8 @@ export default class ApiGateWay {
}
public static deleteGlobalConfiguration(appId: number) {
let _url = '/api/ApiGateway/Globals/'
_url += appId
let _url = '/api/ApiGateway/Globals'
_url += '?appId=' + appId
return ApiService.Delete(_url, serviceUrl)
}
@ -66,8 +66,8 @@ export default class ApiGateWay {
}
public static deleteRouteGroup(appId: string) {
let _url = '/api/ApiGateway/RouteGroups/'
_url += appId
let _url = '/api/ApiGateway/RouteGroups'
_url += '?appId=' + appId
return ApiService.Delete(_url, serviceUrl)
}
@ -326,7 +326,9 @@ export class RouteGroupCreateDto {
export class RouteGroupUpdateDto {
name = ''
appId = ''
appName = ''
isActive = true
appIpAddress?: string = ''
description?: string = ''
}

37
vueJs/src/api/settings.ts

@ -11,12 +11,45 @@ export default class SettingApiService {
* @returns ListResultDto<SettingDto>
*/
public static getSettings(providerName: string, providerKey: string) {
let _url = '/api/abp/setting'
let _url = '/api/settings'
_url += '?providerName=' + providerName
_url += '&providerKey=' + providerKey
return ApiService.Get<ListResultDto<Setting>>(_url, IdentityService)
}
/**
*
*/
public static getGlobalSettings() {
const _url = '/api/settings/by-global'
return ApiService.Get<ListResultDto<Setting>>(_url, IdentityService)
}
/**
*
*/
public static getCurrentTenantSettings() {
const _url = '/api/settings/by-current-tenant'
return ApiService.Get<ListResultDto<Setting>>(_url, IdentityService)
}
/**
*
*/
public static getCurrentUserSettings() {
const _url = '/api/settings/by-current-user'
return ApiService.Get<ListResultDto<Setting>>(_url, IdentityService)
}
/**
*
*/
public static getUserSettings(userId: string) {
let _url = '/api/settings/by-user'
_url += '?userId=' + userId
return ApiService.Get<ListResultDto<Setting>>(_url, IdentityService)
}
/**
*
* @param providerName
@ -25,7 +58,7 @@ export default class SettingApiService {
* @returns Promise对象
*/
public static setSettings(providerName: string, providerKey: string, payload: SettingsUpdate) {
let _url = '/api/abp/setting'
let _url = '/api/settings'
_url += '?providerName=' + providerName
_url += '&providerKey=' + providerKey
return ApiService.Put<any>(_url, payload, IdentityService)

8
vueJs/src/views/admin/apigateway/components/RouteGroupCreateOrEditForm.vue

@ -20,6 +20,7 @@
>
<el-input
v-model="apiGateWayRouteGroup.appId"
:disabled="isEditRouteGroup"
:placeholder="$t('apiGateWay.pleaseInputAppId')"
/>
</el-form-item>
@ -103,6 +104,10 @@ export default class extends Vue {
]
}
get isEditRouteGroup() {
return this.appId !== ''
}
constructor() {
super()
this.apiGateWayRouteGroup = new RouteGroupDto()
@ -112,6 +117,7 @@ export default class extends Vue {
private handleAppIdChange(val: any) {
if (val) {
ApiGateWayService.getRouteGroupByAppId(val).then(router => {
console.log(router)
this.apiGateWayRouteGroup = router
})
}
@ -125,7 +131,9 @@ export default class extends Vue {
const updateRouterDto = new RouteGroupUpdateDto()
updateRouterDto.name = this.apiGateWayRouteGroup.name
updateRouterDto.appId = this.apiGateWayRouteGroup.appId
updateRouterDto.appName = this.apiGateWayRouteGroup.appName
updateRouterDto.isActive = this.apiGateWayRouteGroup.isActive
updateRouterDto.appIpAddress = this.apiGateWayRouteGroup.appIpAddress
updateRouterDto.description = this.apiGateWayRouteGroup.description
this.apiGateWayRouteGroup = await ApiGateWayService.updateRouteGroup(updateRouterDto)
} else {

3
vueJs/src/views/admin/apigateway/global.vue

@ -130,7 +130,7 @@
:disabled="!checkPermission(['ApiGateway.Global.Delete'])"
size="mini"
type="warning"
@click="handleDeleteGlobalConfiguration(row.itemId)"
@click="handleDeleteGlobalConfiguration(row.appId)"
>
{{ $t('apiGateWay.deleteGlobal') }}
</el-button>
@ -238,6 +238,7 @@ export default class extends Vue {
await ApiGatewayService.deleteGlobalConfiguration(itemId)
const successMessage = this.$t('dataHasBeenDeleted', { name: appId }).toString()
this.$message.success(successMessage)
this.handledGetGlobalConfigurations()
}
}
})

1
vueJs/src/views/admin/apigateway/group.vue

@ -264,6 +264,7 @@ export default class extends Vue {
await ApiGatewayService.deleteRouteGroup(appId)
const successMessage = this.$t('dataHasBeenDeleted', { name: appName }).toString()
this.$message.success(successMessage)
this.handleGetRouteGroups()
}
}
})

740
vueJs/src/views/admin/settings/components/GlobalSettingEditForm.vue

@ -1,740 +1,18 @@
<template>
<div>
<el-form
ref="formGlobalSetting"
v-model="globalSetting"
label-width="180px"
style="width: 96%"
>
<el-tabs>
<el-tab-pane :label="$t('settings.systemSetting')">
<el-form-item
v-if="hasSettingExistsed('Abp.Localization.DefaultLanguage')"
v-popover:DefaultLanguage
prop="globalSetting['Abp.Localization.DefaultLanguage'].value"
>
<el-popover
ref="DefaultLanguage"
trigger="hover"
:title="globalSetting['Abp.Localization.DefaultLanguage'].displayName"
:content="globalSetting['Abp.Localization.DefaultLanguage'].description"
/>
<span
slot="label"
v-popover:DefaultLanguage
>{{ globalSetting['Abp.Localization.DefaultLanguage'].displayName }}</span>
<el-select
v-model="globalSetting['Abp.Localization.DefaultLanguage'].value"
style="width: 100%;"
@change="(value) => handleSettingValueChanged('Abp.Localization.DefaultLanguage', value)"
>
<el-option
v-for="language in definedLanguages"
:key="language"
:label="language"
:value="language"
:disabled="language===globalSetting['Abp.Localization.DefaultLanguage'].value"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Timing.TimeZone')"
prop="Abp.Timing.TimeZone'].value"
>
<el-popover
ref="TimeZone"
trigger="hover"
:title="globalSetting['Abp.Timing.TimeZone'].displayName"
:content="globalSetting['Abp.Timing.TimeZone'].description"
/>
<span
slot="label"
v-popover:TimeZone
>{{ globalSetting['Abp.Timing.TimeZone'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Timing.TimeZone'].value"
:placeholder="globalSetting['Abp.Timing.TimeZone'].description"
@input="(value) => handleSettingValueChanged('Abp.Timing.TimeZone', value)"
/>
</el-form-item>
</el-tab-pane>
<el-tab-pane
:label="$t('settings.passwordSecurity')"
>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequiredLength')"
>
<el-popover
ref="PasswordRequiredLength"
trigger="hover"
:title="globalSetting['Abp.Identity.Password.RequiredLength'].displayName"
:content="globalSetting['Abp.Identity.Password.RequiredLength'].description"
/>
<span
slot="label"
v-popover:PasswordRequiredLength
>{{ globalSetting['Abp.Identity.Password.RequiredLength'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Identity.Password.RequiredLength'].value"
:placeholder="globalSetting['Abp.Identity.Password.RequiredLength'].description"
type="number"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequiredLength', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequiredUniqueChars')"
>
<el-popover
ref="PasswordRequiredUniqueChars"
trigger="hover"
:title="globalSetting['Abp.Identity.Password.RequiredUniqueChars'].displayName"
:content="globalSetting['Abp.Identity.Password.RequiredUniqueChars'].description"
/>
<span
slot="label"
v-popover:PasswordRequiredUniqueChars
>{{ globalSetting['Abp.Identity.Password.RequiredUniqueChars'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Identity.Password.RequiredUniqueChars'].value"
type="number"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequiredUniqueChars', value)"
/>
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequireNonAlphanumeric')"
>
<el-popover
ref="PasswordRequireNonAlphanumeric"
trigger="hover"
:title="globalSetting['Abp.Identity.Password.RequireNonAlphanumeric'].displayName"
:content="globalSetting['Abp.Identity.Password.RequireNonAlphanumeric'].description"
/>
<span
slot="label"
v-popover:PasswordRequireNonAlphanumeric
>{{ globalSetting['Abp.Identity.Password.RequireNonAlphanumeric'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.Password.RequireNonAlphanumeric'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequireNonAlphanumeric', value)"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequireLowercase')"
>
<el-popover
ref="PasswordRequireLowercase"
trigger="hover"
:title="globalSetting['Abp.Identity.Password.RequireLowercase'].displayName"
:content="globalSetting['Abp.Identity.Password.RequireLowercase'].description"
/>
<span
slot="label"
v-popover:PasswordRequireLowercase
>{{ globalSetting['Abp.Identity.Password.RequireLowercase'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.Password.RequireLowercase'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequireLowercase', value)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequireUppercase')"
>
<el-popover
ref="PasswordRequireUppercase"
trigger="hover"
:title="globalSetting['Abp.Identity.Password.RequireUppercase'].displayName"
:content="globalSetting['Abp.Identity.Password.RequireUppercase'].description"
/>
<span
slot="label"
v-popover:PasswordRequireUppercase
>{{ globalSetting['Abp.Identity.Password.RequireUppercase'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.Password.RequireUppercase'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequireUppercase', value)"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequireDigit')"
>
<el-popover
ref="PasswordRequireDigit"
trigger="hover"
:title="globalSetting['Abp.Identity.Password.RequireDigit'].displayName"
:content="globalSetting['Abp.Identity.Password.RequireDigit'].description"
/>
<span
slot="label"
v-popover:PasswordRequireDigit
>{{ globalSetting['Abp.Identity.Password.RequireDigit'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.Password.RequireDigit'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequireDigit', value)"
/>
</el-form-item>
</el-col>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Lockout.AllowedForNewUsers')"
>
<el-popover
ref="LockoutAllowedForNewUsers"
trigger="hover"
:title="globalSetting['Abp.Identity.Lockout.AllowedForNewUsers'].displayName"
:content="globalSetting['Abp.Identity.Lockout.AllowedForNewUsers'].description"
/>
<span
slot="label"
v-popover:LockoutAllowedForNewUsers
>{{ globalSetting['Abp.Identity.Lockout.AllowedForNewUsers'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.Lockout.AllowedForNewUsers'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Lockout.AllowedForNewUsers', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Lockout.MaxFailedAccessAttempts')"
>
<el-popover
ref="LockoutMaxFailedAccessAttempts"
trigger="hover"
:title="globalSetting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].displayName"
:content="globalSetting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].description"
/>
<span
slot="label"
v-popover:LockoutMaxFailedAccessAttempts
>{{ globalSetting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].value"
:placeholder="globalSetting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].description"
type="number"
@input="(value) => handleSettingValueChanged('Abp.Identity.Lockout.MaxFailedAccessAttempts', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Lockout.LockoutDuration')"
>
<el-popover
ref="LockoutLockoutDuration"
trigger="hover"
:title="globalSetting['Abp.Identity.Lockout.LockoutDuration'].displayName"
:content="globalSetting['Abp.Identity.Lockout.LockoutDuration'].description"
/>
<span
slot="label"
v-popover:LockoutLockoutDuration
>{{ globalSetting['Abp.Identity.Lockout.LockoutDuration'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Identity.Lockout.LockoutDuration'].value"
:placeholder="globalSetting['Abp.Identity.Lockout.LockoutDuration'].description"
type="number"
@input="(value) => handleSettingValueChanged('Abp.Identity.Lockout.LockoutDuration', value)"
/>
</el-form-item>
</el-row>
</el-tab-pane>
<el-tab-pane
:label="$t('settings.userAccount')"
>
<el-row>
<el-col :span="8">
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.SignIn.RequireConfirmedEmail')"
>
<el-popover
ref="SignInRequireConfirmedEmail"
trigger="hover"
:title="globalSetting['Abp.Identity.SignIn.RequireConfirmedEmail'].displayName"
:content="globalSetting['Abp.Identity.SignIn.RequireConfirmedEmail'].description"
/>
<span
slot="label"
v-popover:SignInRequireConfirmedEmail
>{{ globalSetting['Abp.Identity.SignIn.RequireConfirmedEmail'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.SignIn.RequireConfirmedEmail'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.SignIn.RequireConfirmedEmail', value)"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.SignIn.EnablePhoneNumberConfirmation')"
>
<el-popover
ref="SignInEnablePhoneNumberConfirmation"
trigger="hover"
:title="globalSetting['Abp.Identity.SignIn.EnablePhoneNumberConfirmation'].displayName"
:content="globalSetting['Abp.Identity.SignIn.EnablePhoneNumberConfirmation'].description"
/>
<span
slot="label"
v-popover:SignInEnablePhoneNumberConfirmation
>{{ globalSetting['Abp.Identity.SignIn.EnablePhoneNumberConfirmation'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.SignIn.EnablePhoneNumberConfirmation'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.SignIn.EnablePhoneNumberConfirmation', value)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.SignIn.RequireConfirmedPhoneNumber')"
>
<el-popover
ref="SignInRequireConfirmedPhoneNumber"
trigger="hover"
:title="globalSetting['Abp.Identity.SignIn.RequireConfirmedPhoneNumber'].displayName"
:content="globalSetting['Abp.Identity.SignIn.RequireConfirmedPhoneNumber'].description"
/>
<span
slot="label"
v-popover:SignInRequireConfirmedPhoneNumber
>{{ globalSetting['Abp.Identity.SignIn.RequireConfirmedPhoneNumber'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.SignIn.RequireConfirmedPhoneNumber'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.SignIn.RequireConfirmedPhoneNumber', value)"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.User.IsUserNameUpdateEnabled')"
>
<el-popover
ref="UserIsUserNameUpdateEnabled"
trigger="hover"
:title="globalSetting['Abp.Identity.User.IsUserNameUpdateEnabled'].displayName"
:content="globalSetting['Abp.Identity.User.IsUserNameUpdateEnabled'].description"
/>
<span
slot="label"
v-popover:UserIsUserNameUpdateEnabled
>{{ globalSetting['Abp.Identity.User.IsUserNameUpdateEnabled'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.User.IsUserNameUpdateEnabled'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.User.IsUserNameUpdateEnabled', value)"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.User.IsEmailUpdateEnabled')"
>
<el-popover
ref="UserIsEmailUpdateEnabled"
trigger="hover"
:title="globalSetting['Abp.Identity.User.IsEmailUpdateEnabled'].displayName"
:content="globalSetting['Abp.Identity.User.IsEmailUpdateEnabled'].description"
/>
<span
slot="label"
v-popover:UserIsEmailUpdateEnabled
>{{ globalSetting['Abp.Identity.User.IsEmailUpdateEnabled'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Identity.User.IsEmailUpdateEnabled'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.User.IsEmailUpdateEnabled', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.OrganizationUnit.MaxUserMembershipCount')"
>
<el-popover
ref="OrganizationUnitMaxUserMembershipCount"
trigger="hover"
:title="globalSetting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].displayName"
:content="globalSetting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].description"
/>
<span
slot="label"
v-popover:OrganizationUnitMaxUserMembershipCount
>{{ globalSetting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].value"
:placeholder="globalSetting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].description"
@input="(value) => handleSettingValueChanged('Abp.Identity.OrganizationUnit.MaxUserMembershipCount', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.SmsRegisterTemplateCode')"
>
<el-popover
ref="AccountSmsRegisterTemplateCode"
trigger="hover"
:title="globalSetting['Abp.Account.SmsRegisterTemplateCode'].displayName"
:content="globalSetting['Abp.Account.SmsRegisterTemplateCode'].description"
/>
<span
slot="label"
v-popover:AccountSmsRegisterTemplateCode
>{{ globalSetting['Abp.Account.SmsRegisterTemplateCode'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Account.SmsRegisterTemplateCode'].value"
:placeholder="globalSetting['Abp.Account.SmsRegisterTemplateCode'].description"
@input="(value) => handleSettingValueChanged('Abp.Account.SmsRegisterTemplateCode', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.SmsSigninTemplateCode')"
>
<el-popover
ref="AccountSmsSigninTemplateCode"
trigger="hover"
:title="globalSetting['Abp.Account.SmsSigninTemplateCode'].displayName"
:content="globalSetting['Abp.Account.SmsSigninTemplateCode'].description"
/>
<span
slot="label"
v-popover:AccountSmsSigninTemplateCode
>{{ globalSetting['Abp.Account.SmsSigninTemplateCode'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Account.SmsSigninTemplateCode'].value"
:placeholder="globalSetting['Abp.Account.SmsSigninTemplateCode'].description"
@input="(value) => handleSettingValueChanged('Abp.Account.SmsSigninTemplateCode', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.SmsResetPasswordTemplateCode')"
>
<el-popover
ref="AccountSmsResetPasswordTemplateCode"
trigger="hover"
:title="globalSetting['Abp.Account.SmsResetPasswordTemplateCode'].displayName"
:content="globalSetting['Abp.Account.SmsResetPasswordTemplateCode'].description"
/>
<span
slot="label"
v-popover:AccountSmsResetPasswordTemplateCode
>{{ globalSetting['Abp.Account.SmsResetPasswordTemplateCode'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Account.SmsResetPasswordTemplateCode'].value"
:placeholder="globalSetting['Abp.Account.SmsResetPasswordTemplateCode'].description"
@input="(value) => handleSettingValueChanged('Abp.Account.SmsResetPasswordTemplateCode', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.PhoneVerifyCodeExpiration')"
>
<el-popover
ref="AccountPhoneVerifyCodeExpiration"
trigger="hover"
:title="globalSetting['Abp.Account.PhoneVerifyCodeExpiration'].displayName"
:content="globalSetting['Abp.Account.PhoneVerifyCodeExpiration'].description"
/>
<span
slot="label"
v-popover:AccountPhoneVerifyCodeExpiration
>{{ globalSetting['Abp.Account.PhoneVerifyCodeExpiration'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Account.PhoneVerifyCodeExpiration'].value"
:placeholder="globalSetting['Abp.Account.PhoneVerifyCodeExpiration'].description"
@input="(value) => handleSettingValueChanged('Abp.Account.PhoneVerifyCodeExpiration', value)"
/>
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item
v-if="hasSettingExistsed('Abp.Account.IsSelfRegistrationEnabled')"
>
<el-popover
ref="AccountIsSelfRegistrationEnabled"
trigger="hover"
:title="globalSetting['Abp.Account.IsSelfRegistrationEnabled'].displayName"
:content="globalSetting['Abp.Account.IsSelfRegistrationEnabled'].description"
/>
<span
slot="label"
v-popover:AccountIsSelfRegistrationEnabled
>{{ globalSetting['Abp.Account.IsSelfRegistrationEnabled'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Account.IsSelfRegistrationEnabled'].value"
@input="(value) => handleSettingValueChanged('Abp.Account.IsSelfRegistrationEnabled', value)"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
v-if="hasSettingExistsed('Abp.Account.EnableLocalLogin')"
>
<el-popover
ref="AccountEnableLocalLogin"
trigger="hover"
:title="globalSetting['Abp.Account.EnableLocalLogin'].displayName"
:content="globalSetting['Abp.Account.EnableLocalLogin'].description"
/>
<span
slot="label"
v-popover:AccountEnableLocalLogin
>{{ globalSetting['Abp.Account.EnableLocalLogin'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Account.EnableLocalLogin'].value"
@input="(value) => handleSettingValueChanged('Abp.Account.EnableLocalLogin', value)"
/>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane
v-if="hasSettingExistsed('Abp.Mailing.Smtp.Host')"
:label="$t('settings.mailing')"
>
<el-form-item>
<el-popover
ref="SmtpHost"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.Host'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.Host'].description"
/>
<span
slot="label"
v-popover:SmtpHost
>{{ globalSetting['Abp.Mailing.Smtp.Host'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.Host'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.Host'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Host', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpPort"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.Port'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.Port'].description"
/>
<span
slot="label"
v-popover:SmtpPort
>{{ globalSetting['Abp.Mailing.Smtp.Port'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.Port'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.Port'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Port', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpUserName"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.UserName'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.UserName'].description"
/>
<span
slot="label"
v-popover:SmtpUserName
>{{ globalSetting['Abp.Mailing.Smtp.UserName'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.UserName'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.UserName'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.UserName', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpPassword"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.Password'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.Password'].description"
/>
<span
slot="label"
v-popover:SmtpPassword
>{{ globalSetting['Abp.Mailing.Smtp.Password'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.Password'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.Password'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Password', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpDomain"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.Domain'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.Domain'].description"
/>
<span
slot="label"
v-popover:SmtpDomain
>{{ globalSetting['Abp.Mailing.Smtp.Domain'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.Domain'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.Domain'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Domain', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpEnableSsl"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.EnableSsl'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.EnableSsl'].description"
/>
<span
slot="label"
v-popover:SmtpEnableSsl
>{{ globalSetting['Abp.Mailing.Smtp.EnableSsl'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Mailing.Smtp.EnableSsl'].value"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.EnableSsl', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpUseDefaultCredentials"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.UseDefaultCredentials'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.UseDefaultCredentials'].description"
/>
<span
slot="label"
v-popover:SmtpUseDefaultCredentials
>{{ globalSetting['Abp.Mailing.Smtp.UseDefaultCredentials'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Mailing.Smtp.UseDefaultCredentials'].value"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.UseDefaultCredentials', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="MailingDefaultFromAddress"
trigger="hover"
:title="globalSetting['Abp.Mailing.DefaultFromAddress'].displayName"
:content="globalSetting['Abp.Mailing.DefaultFromAddress'].description"
/>
<span
slot="label"
v-popover:MailingDefaultFromAddress
>{{ globalSetting['Abp.Mailing.DefaultFromAddress'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.DefaultFromAddress'].value"
:placeholder="globalSetting['Abp.Mailing.DefaultFromAddress'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.DefaultFromAddress', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="MailingDefaultFromDisplayName"
trigger="hover"
:title="globalSetting['Abp.Mailing.DefaultFromDisplayName'].displayName"
:content="globalSetting['Abp.Mailing.DefaultFromDisplayName'].description"
/>
<span
slot="label"
v-popover:MailingDefaultFromDisplayName
>{{ globalSetting['Abp.Mailing.DefaultFromDisplayName'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.DefaultFromDisplayName'].value"
:placeholder="globalSetting['Abp.Mailing.DefaultFromDisplayName'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.DefaultFromDisplayName', value)"
/>
</el-form-item>
</el-tab-pane>
</el-tabs>
<el-form-item>
<el-button
type="primary"
style="width:200px;margin:inherit;"
@click="onSaveGlobalSetting"
>
{{ $t('global.confirm') }}
</el-button>
</el-form-item>
</el-form>
</div>
<SettingEditForm
provider-name="G"
/>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { AbpConfigurationModule } from '@/store/modules/abp'
import SettingService, { Setting, SettingUpdate, SettingsUpdate } from '@/api/settings'
const booleanStrings = ['True', 'true', 'False', 'false']
import SettingEditForm from './SettingEditForm.vue'
@Component({
name: 'GlobalSettingEditForm'
})
export default class extends Vue {
private globalSettingLoaded = false
private globalSetting: {[key: string]: Setting} = {}
private globalSettingChangeKeys = new Array<string>()
get definedLanguages() {
const languages = AbpConfigurationModule.configuration.localization.languages.map((lang: any) => {
return lang.cultureName
})
return languages
}
private hasSettingExistsed(key: string) {
if (this.globalSetting[key]) {
return true
}
return false
}
mounted() {
this.handleGetGlobalSettings()
name: 'GlobalSettingEditForm',
components: {
SettingEditForm
}
private handleSettingValueChanged(key: string, value: any) {
if (!this.globalSettingChangeKeys.includes(key)) {
this.globalSettingChangeKeys.push(key)
}
this.$set(this.globalSetting[key], 'value', value)
this.$forceUpdate()
}
private handleGetGlobalSettings() {
SettingService.getSettings('G', '').then(settings => {
console.log(settings)
settings.items.forEach(setting => {
if (setting.value) {
const value = setting.value.toLowerCase()
if (booleanStrings.includes(value)) {
setting.value = value === 'true'
}
} else {
if (setting.defaultValue) {
const defaultValue = setting.defaultValue.toLowerCase()
if (booleanStrings.includes(defaultValue)) {
setting.value = defaultValue === 'true'
}
}
}
this.globalSetting[setting.name] = setting
})
this.globalSettingLoaded = true
this.$forceUpdate()
})
}
private onSaveGlobalSetting() {
const updateSettings = new SettingsUpdate()
this.globalSettingChangeKeys.forEach(key => {
const updateSetting = new SettingUpdate()
updateSetting.name = key
updateSetting.value = this.globalSetting[key].value
updateSettings.settings.push(updateSetting)
})
if (updateSettings.settings.length > 0) {
SettingService.setSettings('G', '', updateSettings).then(() => {
this.$message.success(this.$t('AbpSettingManagement.SuccessfullySaved').toString())
})
}
}
}
})
export default class extends Vue {}
</script>

717
vueJs/src/views/admin/settings/components/SettingEditForm.vue

@ -0,0 +1,717 @@
<template>
<div>
<el-form
ref="formsetting"
v-model="setting"
label-width="180px"
style="width: 96%"
>
<el-tabs>
<el-tab-pane
v-if="hasSettingExistsed('Abp.Localization.DefaultLanguage')"
:label="$t('settings.systemSetting')"
>
<el-form-item
v-popover:DefaultLanguage
prop="setting['Abp.Localization.DefaultLanguage'].value"
>
<el-popover
ref="DefaultLanguage"
trigger="hover"
:title="setting['Abp.Localization.DefaultLanguage'].displayName"
:content="setting['Abp.Localization.DefaultLanguage'].description"
/>
<span
slot="label"
v-popover:DefaultLanguage
>{{ setting['Abp.Localization.DefaultLanguage'].displayName }}</span>
<el-select
v-model="setting['Abp.Localization.DefaultLanguage'].value"
style="width: 100%;"
@change="(value) => handleSettingValueChanged('Abp.Localization.DefaultLanguage', value)"
>
<el-option
v-for="language in definedLanguages"
:key="language"
:label="language"
:value="language"
:disabled="language===setting['Abp.Localization.DefaultLanguage'].value"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Timing.TimeZone')"
prop="Abp.Timing.TimeZone'].value"
>
<el-popover
ref="TimeZone"
trigger="hover"
:title="setting['Abp.Timing.TimeZone'].displayName"
:content="setting['Abp.Timing.TimeZone'].description"
/>
<span
slot="label"
v-popover:TimeZone
>{{ setting['Abp.Timing.TimeZone'].displayName }}</span>
<el-input
v-model="setting['Abp.Timing.TimeZone'].value"
:placeholder="setting['Abp.Timing.TimeZone'].description"
@input="(value) => handleSettingValueChanged('Abp.Timing.TimeZone', value)"
/>
</el-form-item>
</el-tab-pane>
<el-tab-pane
v-if="hasSettingExistsed('Abp.Identity.Password.RequiredLength')"
:label="$t('settings.passwordSecurity')"
>
<el-form-item>
<el-popover
ref="PasswordRequiredLength"
trigger="hover"
:title="setting['Abp.Identity.Password.RequiredLength'].displayName"
:content="setting['Abp.Identity.Password.RequiredLength'].description"
/>
<span
slot="label"
v-popover:PasswordRequiredLength
>{{ setting['Abp.Identity.Password.RequiredLength'].displayName }}</span>
<el-input
v-model="setting['Abp.Identity.Password.RequiredLength'].value"
:placeholder="setting['Abp.Identity.Password.RequiredLength'].description"
type="number"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequiredLength', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequiredUniqueChars')"
>
<el-popover
ref="PasswordRequiredUniqueChars"
trigger="hover"
:title="setting['Abp.Identity.Password.RequiredUniqueChars'].displayName"
:content="setting['Abp.Identity.Password.RequiredUniqueChars'].description"
/>
<span
slot="label"
v-popover:PasswordRequiredUniqueChars
>{{ setting['Abp.Identity.Password.RequiredUniqueChars'].displayName }}</span>
<el-input
v-model="setting['Abp.Identity.Password.RequiredUniqueChars'].value"
type="number"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequiredUniqueChars', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequireNonAlphanumeric')"
>
<el-popover
ref="PasswordRequireNonAlphanumeric"
trigger="hover"
:title="setting['Abp.Identity.Password.RequireNonAlphanumeric'].displayName"
:content="setting['Abp.Identity.Password.RequireNonAlphanumeric'].description"
/>
<span
slot="label"
v-popover:PasswordRequireNonAlphanumeric
>{{ setting['Abp.Identity.Password.RequireNonAlphanumeric'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.Password.RequireNonAlphanumeric'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequireNonAlphanumeric', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequireLowercase')"
>
<el-popover
ref="PasswordRequireLowercase"
trigger="hover"
:title="setting['Abp.Identity.Password.RequireLowercase'].displayName"
:content="setting['Abp.Identity.Password.RequireLowercase'].description"
/>
<span
slot="label"
v-popover:PasswordRequireLowercase
>{{ setting['Abp.Identity.Password.RequireLowercase'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.Password.RequireLowercase'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequireLowercase', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequireUppercase')"
>
<el-popover
ref="PasswordRequireUppercase"
trigger="hover"
:title="setting['Abp.Identity.Password.RequireUppercase'].displayName"
:content="setting['Abp.Identity.Password.RequireUppercase'].description"
/>
<span
slot="label"
v-popover:PasswordRequireUppercase
>{{ setting['Abp.Identity.Password.RequireUppercase'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.Password.RequireUppercase'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequireUppercase', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Password.RequireDigit')"
>
<el-popover
ref="PasswordRequireDigit"
trigger="hover"
:title="setting['Abp.Identity.Password.RequireDigit'].displayName"
:content="setting['Abp.Identity.Password.RequireDigit'].description"
/>
<span
slot="label"
v-popover:PasswordRequireDigit
>{{ setting['Abp.Identity.Password.RequireDigit'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.Password.RequireDigit'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Password.RequireDigit', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Lockout.AllowedForNewUsers')"
>
<el-popover
ref="LockoutAllowedForNewUsers"
trigger="hover"
:title="setting['Abp.Identity.Lockout.AllowedForNewUsers'].displayName"
:content="setting['Abp.Identity.Lockout.AllowedForNewUsers'].description"
/>
<span
slot="label"
v-popover:LockoutAllowedForNewUsers
>{{ setting['Abp.Identity.Lockout.AllowedForNewUsers'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.Lockout.AllowedForNewUsers'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.Lockout.AllowedForNewUsers', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Lockout.LockoutDuration')"
>
<el-popover
ref="LockoutLockoutDuration"
trigger="hover"
:title="setting['Abp.Identity.Lockout.LockoutDuration'].displayName"
:content="setting['Abp.Identity.Lockout.LockoutDuration'].description"
/>
<span
slot="label"
v-popover:LockoutLockoutDuration
>{{ setting['Abp.Identity.Lockout.LockoutDuration'].displayName }}</span>
<el-input
v-model="setting['Abp.Identity.Lockout.LockoutDuration'].value"
:placeholder="setting['Abp.Identity.Lockout.LockoutDuration'].description"
type="number"
@input="(value) => handleSettingValueChanged('Abp.Identity.Lockout.LockoutDuration', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.Lockout.MaxFailedAccessAttempts')"
>
<el-popover
ref="LockoutMaxFailedAccessAttempts"
trigger="hover"
:title="setting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].displayName"
:content="setting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].description"
/>
<span
slot="label"
v-popover:LockoutMaxFailedAccessAttempts
>{{ setting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].displayName }}</span>
<el-input
v-model="setting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].value"
:placeholder="setting['Abp.Identity.Lockout.MaxFailedAccessAttempts'].description"
type="number"
@input="(value) => handleSettingValueChanged('Abp.Identity.Lockout.MaxFailedAccessAttempts', value)"
/>
</el-form-item>
</el-tab-pane>
<el-tab-pane
v-if="hasSettingExistsed('Abp.Identity.SignIn.RequireConfirmedEmail')"
:label="$t('settings.userAccount')"
>
<el-form-item>
<el-popover
ref="SignInRequireConfirmedEmail"
trigger="hover"
:title="setting['Abp.Identity.SignIn.RequireConfirmedEmail'].displayName"
:content="setting['Abp.Identity.SignIn.RequireConfirmedEmail'].description"
/>
<span
slot="label"
v-popover:SignInRequireConfirmedEmail
>{{ setting['Abp.Identity.SignIn.RequireConfirmedEmail'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.SignIn.RequireConfirmedEmail'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.SignIn.RequireConfirmedEmail', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.SignIn.EnablePhoneNumberConfirmation')"
>
<el-popover
ref="SignInEnablePhoneNumberConfirmation"
trigger="hover"
:title="setting['Abp.Identity.SignIn.EnablePhoneNumberConfirmation'].displayName"
:content="setting['Abp.Identity.SignIn.EnablePhoneNumberConfirmation'].description"
/>
<span
slot="label"
v-popover:SignInEnablePhoneNumberConfirmation
>{{ setting['Abp.Identity.SignIn.EnablePhoneNumberConfirmation'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.SignIn.EnablePhoneNumberConfirmation'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.SignIn.EnablePhoneNumberConfirmation', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.SignIn.RequireConfirmedPhoneNumber')"
>
<el-popover
ref="SignInRequireConfirmedPhoneNumber"
trigger="hover"
:title="setting['Abp.Identity.SignIn.RequireConfirmedPhoneNumber'].displayName"
:content="setting['Abp.Identity.SignIn.RequireConfirmedPhoneNumber'].description"
/>
<span
slot="label"
v-popover:SignInRequireConfirmedPhoneNumber
>{{ setting['Abp.Identity.SignIn.RequireConfirmedPhoneNumber'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.SignIn.RequireConfirmedPhoneNumber'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.SignIn.RequireConfirmedPhoneNumber', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.User.IsUserNameUpdateEnabled')"
>
<el-popover
ref="UserIsUserNameUpdateEnabled"
trigger="hover"
:title="setting['Abp.Identity.User.IsUserNameUpdateEnabled'].displayName"
:content="setting['Abp.Identity.User.IsUserNameUpdateEnabled'].description"
/>
<span
slot="label"
v-popover:UserIsUserNameUpdateEnabled
>{{ setting['Abp.Identity.User.IsUserNameUpdateEnabled'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.User.IsUserNameUpdateEnabled'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.User.IsUserNameUpdateEnabled', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.User.IsEmailUpdateEnabled')"
>
<el-popover
ref="UserIsEmailUpdateEnabled"
trigger="hover"
:title="setting['Abp.Identity.User.IsEmailUpdateEnabled'].displayName"
:content="setting['Abp.Identity.User.IsEmailUpdateEnabled'].description"
/>
<span
slot="label"
v-popover:UserIsEmailUpdateEnabled
>{{ setting['Abp.Identity.User.IsEmailUpdateEnabled'].displayName }}</span>
<el-switch
v-model="setting['Abp.Identity.User.IsEmailUpdateEnabled'].value"
@input="(value) => handleSettingValueChanged('Abp.Identity.User.IsEmailUpdateEnabled', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Identity.OrganizationUnit.MaxUserMembershipCount')"
>
<el-popover
ref="OrganizationUnitMaxUserMembershipCount"
trigger="hover"
:title="setting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].displayName"
:content="setting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].description"
/>
<span
slot="label"
v-popover:OrganizationUnitMaxUserMembershipCount
>{{ setting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].displayName }}</span>
<el-input
v-model="setting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].value"
:placeholder="setting['Abp.Identity.OrganizationUnit.MaxUserMembershipCount'].description"
type="number"
@input="(value) => handleSettingValueChanged('Abp.Identity.OrganizationUnit.MaxUserMembershipCount', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.SmsRegisterTemplateCode')"
>
<el-popover
ref="AccountSmsRegisterTemplateCode"
trigger="hover"
:title="setting['Abp.Account.SmsRegisterTemplateCode'].displayName"
:content="setting['Abp.Account.SmsRegisterTemplateCode'].description"
/>
<span
slot="label"
v-popover:AccountSmsRegisterTemplateCode
>{{ setting['Abp.Account.SmsRegisterTemplateCode'].displayName }}</span>
<el-input
v-model="setting['Abp.Account.SmsRegisterTemplateCode'].value"
:placeholder="setting['Abp.Account.SmsRegisterTemplateCode'].description"
@input="(value) => handleSettingValueChanged('Abp.Account.SmsRegisterTemplateCode', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.SmsSigninTemplateCode')"
>
<el-popover
ref="AccountSmsSigninTemplateCode"
trigger="hover"
:title="setting['Abp.Account.SmsSigninTemplateCode'].displayName"
:content="setting['Abp.Account.SmsSigninTemplateCode'].description"
/>
<span
slot="label"
v-popover:AccountSmsSigninTemplateCode
>{{ setting['Abp.Account.SmsSigninTemplateCode'].displayName }}</span>
<el-input
v-model="setting['Abp.Account.SmsSigninTemplateCode'].value"
:placeholder="setting['Abp.Account.SmsSigninTemplateCode'].description"
@input="(value) => handleSettingValueChanged('Abp.Account.SmsSigninTemplateCode', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.SmsResetPasswordTemplateCode')"
>
<el-popover
ref="AccountSmsResetPasswordTemplateCode"
trigger="hover"
:title="setting['Abp.Account.SmsResetPasswordTemplateCode'].displayName"
:content="setting['Abp.Account.SmsResetPasswordTemplateCode'].description"
/>
<span
slot="label"
v-popover:AccountSmsResetPasswordTemplateCode
>{{ setting['Abp.Account.SmsResetPasswordTemplateCode'].displayName }}</span>
<el-input
v-model="setting['Abp.Account.SmsResetPasswordTemplateCode'].value"
:placeholder="setting['Abp.Account.SmsResetPasswordTemplateCode'].description"
@input="(value) => handleSettingValueChanged('Abp.Account.SmsResetPasswordTemplateCode', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.PhoneVerifyCodeExpiration')"
>
<el-popover
ref="AccountPhoneVerifyCodeExpiration"
trigger="hover"
:title="setting['Abp.Account.PhoneVerifyCodeExpiration'].displayName"
:content="setting['Abp.Account.PhoneVerifyCodeExpiration'].description"
/>
<span
slot="label"
v-popover:AccountPhoneVerifyCodeExpiration
>{{ setting['Abp.Account.PhoneVerifyCodeExpiration'].displayName }}</span>
<el-input
v-model="setting['Abp.Account.PhoneVerifyCodeExpiration'].value"
:placeholder="setting['Abp.Account.PhoneVerifyCodeExpiration'].description"
@input="(value) => handleSettingValueChanged('Abp.Account.PhoneVerifyCodeExpiration', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.IsSelfRegistrationEnabled')"
>
<el-popover
ref="AccountIsSelfRegistrationEnabled"
trigger="hover"
:title="setting['Abp.Account.IsSelfRegistrationEnabled'].displayName"
:content="setting['Abp.Account.IsSelfRegistrationEnabled'].description"
/>
<span
slot="label"
v-popover:AccountIsSelfRegistrationEnabled
>{{ setting['Abp.Account.IsSelfRegistrationEnabled'].displayName }}</span>
<el-switch
v-model="setting['Abp.Account.IsSelfRegistrationEnabled'].value"
@input="(value) => handleSettingValueChanged('Abp.Account.IsSelfRegistrationEnabled', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.Account.EnableLocalLogin')"
>
<el-popover
ref="AccountEnableLocalLogin"
trigger="hover"
:title="setting['Abp.Account.EnableLocalLogin'].displayName"
:content="setting['Abp.Account.EnableLocalLogin'].description"
/>
<span
slot="label"
v-popover:AccountEnableLocalLogin
>{{ setting['Abp.Account.EnableLocalLogin'].displayName }}</span>
<el-switch
v-model="setting['Abp.Account.EnableLocalLogin'].value"
@input="(value) => handleSettingValueChanged('Abp.Account.EnableLocalLogin', value)"
/>
</el-form-item>
</el-tab-pane>
<el-tab-pane
v-if="hasSettingExistsed('Abp.Mailing.Smtp.Host')"
:label="$t('settings.mailing')"
>
<el-form-item>
<el-popover
ref="SmtpHost"
trigger="hover"
:title="setting['Abp.Mailing.Smtp.Host'].displayName"
:content="setting['Abp.Mailing.Smtp.Host'].description"
/>
<span
slot="label"
v-popover:SmtpHost
>{{ setting['Abp.Mailing.Smtp.Host'].displayName }}</span>
<el-input
v-model="setting['Abp.Mailing.Smtp.Host'].value"
:placeholder="setting['Abp.Mailing.Smtp.Host'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Host', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpPort"
trigger="hover"
:title="setting['Abp.Mailing.Smtp.Port'].displayName"
:content="setting['Abp.Mailing.Smtp.Port'].description"
/>
<span
slot="label"
v-popover:SmtpPort
>{{ setting['Abp.Mailing.Smtp.Port'].displayName }}</span>
<el-input
v-model="setting['Abp.Mailing.Smtp.Port'].value"
:placeholder="setting['Abp.Mailing.Smtp.Port'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Port', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpUserName"
trigger="hover"
:title="setting['Abp.Mailing.Smtp.UserName'].displayName"
:content="setting['Abp.Mailing.Smtp.UserName'].description"
/>
<span
slot="label"
v-popover:SmtpUserName
>{{ setting['Abp.Mailing.Smtp.UserName'].displayName }}</span>
<el-input
v-model="setting['Abp.Mailing.Smtp.UserName'].value"
:placeholder="setting['Abp.Mailing.Smtp.UserName'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.UserName', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpPassword"
trigger="hover"
:title="setting['Abp.Mailing.Smtp.Password'].displayName"
:content="setting['Abp.Mailing.Smtp.Password'].description"
/>
<span
slot="label"
v-popover:SmtpPassword
>{{ setting['Abp.Mailing.Smtp.Password'].displayName }}</span>
<el-input
v-model="setting['Abp.Mailing.Smtp.Password'].value"
:placeholder="setting['Abp.Mailing.Smtp.Password'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Password', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpDomain"
trigger="hover"
:title="setting['Abp.Mailing.Smtp.Domain'].displayName"
:content="setting['Abp.Mailing.Smtp.Domain'].description"
/>
<span
slot="label"
v-popover:SmtpDomain
>{{ setting['Abp.Mailing.Smtp.Domain'].displayName }}</span>
<el-input
v-model="setting['Abp.Mailing.Smtp.Domain'].value"
:placeholder="setting['Abp.Mailing.Smtp.Domain'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Domain', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpEnableSsl"
trigger="hover"
:title="setting['Abp.Mailing.Smtp.EnableSsl'].displayName"
:content="setting['Abp.Mailing.Smtp.EnableSsl'].description"
/>
<span
slot="label"
v-popover:SmtpEnableSsl
>{{ setting['Abp.Mailing.Smtp.EnableSsl'].displayName }}</span>
<el-switch
v-model="setting['Abp.Mailing.Smtp.EnableSsl'].value"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.EnableSsl', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpUseDefaultCredentials"
trigger="hover"
:title="setting['Abp.Mailing.Smtp.UseDefaultCredentials'].displayName"
:content="setting['Abp.Mailing.Smtp.UseDefaultCredentials'].description"
/>
<span
slot="label"
v-popover:SmtpUseDefaultCredentials
>{{ setting['Abp.Mailing.Smtp.UseDefaultCredentials'].displayName }}</span>
<el-switch
v-model="setting['Abp.Mailing.Smtp.UseDefaultCredentials'].value"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.UseDefaultCredentials', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="MailingDefaultFromAddress"
trigger="hover"
:title="setting['Abp.Mailing.DefaultFromAddress'].displayName"
:content="setting['Abp.Mailing.DefaultFromAddress'].description"
/>
<span
slot="label"
v-popover:MailingDefaultFromAddress
>{{ setting['Abp.Mailing.DefaultFromAddress'].displayName }}</span>
<el-input
v-model="setting['Abp.Mailing.DefaultFromAddress'].value"
:placeholder="setting['Abp.Mailing.DefaultFromAddress'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.DefaultFromAddress', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="MailingDefaultFromDisplayName"
trigger="hover"
:title="setting['Abp.Mailing.DefaultFromDisplayName'].displayName"
:content="setting['Abp.Mailing.DefaultFromDisplayName'].description"
/>
<span
slot="label"
v-popover:MailingDefaultFromDisplayName
>{{ setting['Abp.Mailing.DefaultFromDisplayName'].displayName }}</span>
<el-input
v-model="setting['Abp.Mailing.DefaultFromDisplayName'].value"
:placeholder="setting['Abp.Mailing.DefaultFromDisplayName'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.DefaultFromDisplayName', value)"
/>
</el-form-item>
</el-tab-pane>
</el-tabs>
<el-form-item
v-if="setting"
>
<el-button
type="primary"
style="width:200px;margin:inherit;"
@click="onSavesetting"
>
{{ $t('global.confirm') }}
</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import { AbpConfigurationModule } from '@/store/modules/abp'
import SettingService, { Setting, SettingUpdate, SettingsUpdate } from '@/api/settings'
const booleanStrings = ['True', 'true', 'False', 'false']
@Component({
name: 'TenantSettingEditForm'
})
export default class extends Vue {
@Prop({ default: '' })
private providerName!: string
@Prop({ default: '' })
private providerKey!: string
private setting: {[key: string]: Setting} = {}
private settingChangeKeys = new Array<string>()
get definedLanguages() {
const languages = AbpConfigurationModule.configuration.localization.languages.map((lang: any) => {
return lang.cultureName
})
return languages
}
mounted() {
this.handleGetSettings()
}
private handleGetSettings() {
SettingService.getSettings(this.providerName, this.providerKey).then(settings => {
settings.items.forEach(setting => {
if (setting.value) {
const value = setting.value.toLowerCase()
if (booleanStrings.includes(value)) {
setting.value = (value === 'true')
}
} else {
if (setting.defaultValue) {
const defaultValue = setting.defaultValue.toLowerCase()
if (booleanStrings.includes(defaultValue)) {
setting.value = (defaultValue === 'true')
}
}
}
this.setting[setting.name] = setting
})
this.$forceUpdate()
})
}
private hasSettingExistsed(key: string) {
if (this.setting[key]) {
return true
}
return false
}
private handleSettingValueChanged(key: string, value: any) {
if (!this.settingChangeKeys.includes(key)) {
this.settingChangeKeys.push(key)
}
this.$set(this.setting[key], 'value', value)
this.$forceUpdate()
}
private onSavesetting() {
const updateSettings = new SettingsUpdate()
this.settingChangeKeys.forEach(key => {
const updateSetting = new SettingUpdate()
updateSetting.name = key
updateSetting.value = this.setting[key].value
updateSettings.settings.push(updateSetting)
})
if (updateSettings.settings.length > 0) {
SettingService.setSettings(this.providerName, this.providerKey, updateSettings).then(() => {
this.$message.success(this.$t('AbpSettingManagement.SuccessfullySaved').toString())
})
}
}
}
</script>

22
vueJs/src/views/admin/settings/components/TenantSettingEditForm.vue

@ -0,0 +1,22 @@
<template>
<SettingEditForm
provider-name="T"
:provider-key="tenantId"
/>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import SettingEditForm from './SettingEditForm.vue'
@Component({
name: 'TenantSettingEditForm',
components: {
SettingEditForm
}
})
export default class extends Vue {
@Prop({ default: '' })
private tenantId?: string
}
</script>

22
vueJs/src/views/admin/settings/components/UserSettingEditForm.vue

@ -0,0 +1,22 @@
<template>
<SettingEditForm
provider-name="U"
:provider-key="userId"
/>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import SettingEditForm from './SettingEditForm.vue'
@Component({
name: 'TenantSettingEditForm',
components: {
SettingEditForm
}
})
export default class extends Vue {
@Prop({ default: '' })
private userId?: string
}
</script>

29
vueJs/src/views/admin/settings/index.vue

@ -8,30 +8,51 @@
<GlobalSettingEditForm />
</el-tab-pane>
<el-tab-pane
v-if="currentTenantId"
:label="$t('settings.tenantSetting')"
>
{{ $t('settings.tenantSetting') }}
<TenantSettingEditForm
:tenant-id="currentTenantId"
/>
</el-tab-pane>
<el-tab-pane
:label="$t('settings.userSetting')"
>
{{ $t('settings.userSetting') }}
<UserSettingEditForm
:user-id="currentUserId"
/>
</el-tab-pane>
</el-tabs>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { UserModule } from '@/store/modules/user'
import { AbpConfigurationModule } from '@/store/modules/abp'
import UserSettingEditForm from './components/UserSettingEditForm.vue'
import TenantSettingEditForm from './components/TenantSettingEditForm.vue'
import GlobalSettingEditForm from './components/GlobalSettingEditForm.vue'
@Component({
name: 'Settings',
components: {
UserSettingEditForm,
TenantSettingEditForm,
GlobalSettingEditForm
}
})
export default class extends Vue {}
export default class extends Vue {
get currentTenantId() {
if (AbpConfigurationModule.configuration.currentTenant.isAvailable) {
return AbpConfigurationModule.configuration.currentTenant.id
}
return ''
}
get currentUserId() {
return UserModule.id
}
}
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save