mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-09 04:49:02 +08:00
nacos 1.2.1
This commit is contained in:
1 parent
93e8c14766
commit
6231887d25
64 files changed
+1526
-3697
No files matched your search
+121
-109
@@ -9,41 +9,41 @@ SET FOREIGN_KEY_CHECKS = 0;
|
||||
DROP TABLE IF EXISTS `config_info`;
|
||||
CREATE TABLE `config_info` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`data_id` varchar(255) DEFAULT NULL,
|
||||
`group_id` varchar(255) DEFAULT NULL,
|
||||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'content',
|
||||
`md5` varchar(32) DEFAULT NULL,
|
||||
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
|
||||
`group_id` varchar(255) COLLATE utf8_bin DEFAULT NULL,
|
||||
`content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
|
||||
`md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
|
||||
`gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
|
||||
`gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
|
||||
`src_user` mediumtext,
|
||||
`src_ip` varchar(20) DEFAULT NULL,
|
||||
`app_name` varchar(128) DEFAULT NULL,
|
||||
`tenant_id` varchar(128) DEFAULT NULL,
|
||||
`c_desc` varchar(256) DEFAULT NULL,
|
||||
`c_use` varchar(64) DEFAULT NULL,
|
||||
`effect` varchar(64) DEFAULT NULL,
|
||||
`type` varchar(64) DEFAULT NULL,
|
||||
`c_schema` mediumtext,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT='config_info';
|
||||
`src_user` text COLLATE utf8_bin COMMENT 'source user',
|
||||
`src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
|
||||
`app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
|
||||
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
|
||||
`c_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL,
|
||||
`c_use` varchar(64) COLLATE utf8_bin DEFAULT NULL,
|
||||
`effect` varchar(64) COLLATE utf8_bin DEFAULT NULL,
|
||||
`type` varchar(64) COLLATE utf8_bin DEFAULT NULL,
|
||||
`c_schema` text COLLATE utf8_bin,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of config_info
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `config_info` VALUES (1, 'application-dev.yml', 'DEFAULT_GROUP', 'jasypt:\n encryptor:\n password: pigx\n \nspring:\n redis:\n host: pigx-redis\n servlet:\n multipart:\n max-file-size: 100MB\n max-request-size: 100MB\n cloud:\n sentinel:\n eager: true\n filter:\n url-patterns: /** \n transport:\n dashboard: pigx-sentinel:5020\n \nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\nribbon:\n ReadTimeout: 10000\n ConnectTimeout: 10000\n\n#开启灰度\ngray:\n rule:\n enabled: true\n\nmybatis-plus:\n tenant-enable: ture\n mapper-locations: classpath:/mapper/*Mapper.xml\n global-config:\n banner: false\n db-config:\n id-type: auto\n field-strategy: NOT_EMPTY\n type-handlers-package: com.pig4cloud.pigx.common.data.handler\n\nswagger:\n title: PigX Swagger API\n license: Powered By PigX\n licenseUrl: https://pig4cloud.com/\n terms-of-service-url: https://pig4cloud.com/\n contact:\n email: wangiegie@gmail.com\n url: https://pig4cloud.com/about.html\n authorization:\n name: pigX OAuth\n auth-regex: ^.*$\n authorization-scope-list:\n - scope: server\n description: server all\n token-url-list:\n - http://${GATEWAY_HOST:pigx-gateway}:${GATEWAY_PORT:9999}/auth/oauth/token\n\nsecurity:\n oauth2:\n client:\n ignore-urls:\n - /actuator/**\n - /v2/api-docs\n resource:\n loadBalanced: true\n token-info-uri: http://pigx-auth/oauth/check_token', '954b56ac77f2691529aad5c497591b28', '2019-04-18 02:10:20', '2020-02-24 13:58:21', NULL, '172.17.0.125', '', '', '通用配置文件', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (2, 'pigx-auth-dev.yml', 'DEFAULT_GROUP', '# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n freemarker:\n allow-request-override: false\n allow-session-override: false\n cache: true\n charset: UTF-8\n check-template-location: true\n content-type: text/html\n enabled: true\n expose-request-attributes: false\n expose-session-attributes: false\n expose-spring-macro-helpers: true\n prefer-file-system-access: true\n suffix: .ftl\n template-loader-path: classpath:/templates/', 'a6674e6747c1a0bb6c6d78e13706f8f0', '2019-04-18 02:11:32', '2019-08-27 18:24:04', NULL, '127.0.0.1', '', '', '认证中心配置文件', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (3, 'pigx-codegen-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL-DB:pigxx_codegen}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\npigx:\n tenant:\n column: tenant_id\n tables:\n - gen_datasource_conf', 'b7d132a3ecdfac4252c994adbb65b23a', '2019-04-18 02:12:10', '2019-08-27 18:24:18', NULL, '127.0.0.1', '', '', '代码生成', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (4, 'pigx-daemon-elastic-job-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n## 定时任务\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL-DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n\nxxl:\n job:\n admin:\n addresses: http://${XXL-HOST:pigx-xxl}:${XXL-HOST:9080}/xxl-job-admin\n executor:\n port: 9988\n appName: test-xxl', '9ce58242d57b57f737dcb59a41ee6e55', '2019-04-18 02:12:57', '2019-10-04 11:22:56', NULL, '127.0.0.1', '', '', '定时任务-elastic-job配置', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (2, 'pigx-auth-dev.yml', 'DEFAULT_GROUP', '# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n freemarker:\n allow-request-override: false\n allow-session-override: false\n cache: true\n charset: UTF-8\n check-template-location: true\n content-type: text/html\n enabled: true\n expose-request-attributes: false\n expose-session-attributes: false\n expose-spring-macro-helpers: true\n prefer-file-system-access: true\n suffix: .ftl\n template-loader-path: classpath:/templates/', 'a6674e6747c1a0bb6c6d78e13706f8f0', '2019-04-18 02:11:32', '2019-08-27 18:24:04', NULL, '127.0.0.1', '', '', '认证中心配置文件', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (3, 'pigx-codegen-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_codegen}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\npigx:\n tenant:\n column: tenant_id\n tables:\n - gen_datasource_conf', 'b7d132a3ecdfac4252c994adbb65b23a', '2019-04-18 02:12:10', '2019-08-27 18:24:18', NULL, '127.0.0.1', '', '', '代码生成', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (4, 'pigx-daemon-elastic-job-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n## 定时任务\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n\nxxl:\n job:\n admin:\n addresses: http://${XXL-HOST:pigx-xxl}:${XXL-HOST:9080}/xxl-job-admin\n executor:\n port: 9988\n appName: test-xxl', '9ce58242d57b57f737dcb59a41ee6e55', '2019-04-18 02:12:57', '2019-10-04 11:22:56', NULL, '127.0.0.1', '', '', '定时任务-elastic-job配置', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (5, 'pigx-gateway-dev.yml', 'DEFAULT_GROUP', 'security:\n encode:\n key: \'pigxpigxpigxpigx\'\n\nignore:\n clients:\n - test\n swagger-providers:\n - pigx-auth\n - pigx-tx-manager\n\nribbon:\n rule:\n gray-enabled: true', '24403a5b205b1e9d320078e309584bbc', '2019-04-18 02:13:52', '2019-10-20 17:07:42', NULL, '127.0.0.1', '', '', '网关配置文件', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (6, 'pigx-monitor-dev.yml', 'DEFAULT_GROUP', 'spring:\n # 安全配置\n security:\n user:\n name: ENC(rZHA4LW5hHmhLAAzJoFNag==) # pigx\n password: ENC(bjeyh+Aeii3kHXkoo00ZUw==) # pigx\n boot:\n admin:\n ui:\n title: \'pigx 服务状态监控\'\n brand: \'pigx 服务状态监控\'\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n endpoint:\n health:\n show-details: ALWAYS #显示详细信息', '7925a0c734460526262319b6a189e39d', '2019-04-18 02:14:17', '2019-12-31 19:04:00', NULL, '172.17.0.157', '', '', '监控配置文件', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (7, 'pigx-upms-biz-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n client-secret: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n scope: server\n ignore-urls:\n - /druid/**\n - /actuator/**\n - /v2/api-docs\n\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n stat-view-servlet:\n enabled: true\n url-pattern: /druid/*\n #login-username: admin\n #login-password: admin\n filter:\n stat:\n enabled: true\n log-slow-sql: true\n slow-sql-millis: 10000\n merge-sql: false\n wall:\n config:\n multi-statement-allow: true\n\n# 文件系统 (提供测试环境,不要乱传)\nminio:\n url: http://minio.pig4cloud.com\n access-key: lengleng\n secret-key: lengleng\n\n# Logger Config\nlogging:\n level:\n com.pig4cloud.pigx.admin.mapper: debug\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - sys_user\n - sys_role\n - sys_menu\n - sys_dept\n - sys_log\n - sys_social_details\n - sys_dict\n - sys_dict_item\n - sys_public_param\n - sys_log\n - sys_file\n - sys_oauth_client_details', 'fab3a6b4cb292954d9841b22a41e3dab', '2019-04-18 02:32:44', '2019-11-01 12:22:38', NULL, '127.0.0.1', '', '', 'admin 服务配置', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (7, 'pigx-upms-biz-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n client-secret: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n scope: server\n ignore-urls:\n - /druid/**\n - /actuator/**\n - /v2/api-docs\n\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n stat-view-servlet:\n enabled: true\n url-pattern: /druid/*\n #login-username: admin\n #login-password: admin\n filter:\n stat:\n enabled: true\n log-slow-sql: true\n slow-sql-millis: 10000\n merge-sql: false\n wall:\n config:\n multi-statement-allow: true\n\n# 文件系统 (提供测试环境,不要乱传)\nminio:\n url: http://minio.pig4cloud.com\n access-key: lengleng\n secret-key: lengleng\n\n# Logger Config\nlogging:\n level:\n com.pig4cloud.pigx.admin.mapper: debug\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - sys_user\n - sys_role\n - sys_menu\n - sys_dept\n - sys_log\n - sys_social_details\n - sys_dict\n - sys_dict_item\n - sys_public_param\n - sys_log\n - sys_file\n - sys_oauth_client_details', 'fab3a6b4cb292954d9841b22a41e3dab', '2019-04-18 02:32:44', '2019-11-01 12:22:38', NULL, '127.0.0.1', '', '', 'admin 服务配置', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (8, 'pigx-tx-manager-dev.yml', 'DEFAULT_GROUP', '# 页面配置\nspring:\n mvc:\n static-path-pattern: /**\n resources:\n static-locations: classpath:/static/\n\n\n# LCN 配置\ntm:\n transaction:\n netty:\n delaytime: 5 # 客户端链接最大通讯时间 (秒)\n hearttime: 15 # 客户端心跳时间 (秒)\n redis:\n savemaxtime: 30 # redis 保存时间 (秒)\n socket:\n port: 9998 # 通讯端口\n maxconnection: 1000 #最大链接数\n compensate:\n auto: false #是否自动补偿\n notifyUrl: http://ip:port/path #补偿结果通知(配消息总线里面)\n tryTime: 30 # z再次重试时间间隔\n maxWaitTime: 5000 # 请求超时的最大时间 (毫秒)', '885f5c125f2df7a08692929ccce154be', '2019-04-18 02:54:03', '2019-04-18 02:54:03', NULL, '127.0.0.1', '', '', '分布式事务协调模块', NULL, NULL, 'yaml', NULL);
|
||||
INSERT INTO `config_info` VALUES (9, 'pigx-daemon-quartz-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL-DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n quartz:\n #相关属性配置\n properties:\n org:\n quartz:\n scheduler:\n instanceName: clusteredScheduler\n instanceId: AUTO\n jobStore:\n class: org.quartz.impl.jdbcjobstore.JobStoreTX\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n clusterCheckinInterval: 10000\n useProperties: false\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 50\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n #数据库方式\n job-store-type: jdbc\n #初始化表结构\n #jdbc:\n #initialize-schema: never\n\n', '276cf549fb8b084e35dc07d1eb309932', '2019-04-18 03:08:34', '2019-08-27 18:25:41', NULL, '127.0.0.1', '', '', 'quartz 配置文件', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (10, 'pigx-pay-platform-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL-DB:pigxx_pay}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n\n# 租户表维护\npigx:\n pay:\n test: lengleng\n aliPayConfig:\n expire-time: 30\n return-url: http://pig4cloud.com\n notify-url: https://admin.pig4cloud.com/pay/notify/ali/callbak\n wxPayConfig:\n notify-url: https://admin.pig4cloud.com/pay/notify/wx/callbak\n xsequence: #发号器相关配置\n db:\n retry-times: 3\n table-name: pay_sequence\n tenant:\n column: tenant_id\n tables:\n - pay_channel\n - pay_trade_order\n - pay_goods_order\n - pay_notify_record', 'bf185a74bb9af224bfe7f8f52ae3c9cb', '2019-05-28 11:46:27', '2019-08-27 18:26:01', NULL, '127.0.0.1', '', '', '支付模块配置', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (11, 'pigx-oa-platform-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n ignore-urls:\n - \'/actuator/**\'\n - \'/v2/api-docs\'\n - \'/editor-app/**\'\n - \'/modeler.html\'\n - \'/ws/**\'\nspring:\n autoconfigure:\n exclude: org.activiti.spring.boot.SecurityAutoConfiguration\n activiti:\n check-process-definitions: false\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL-DB:pigxx_ac}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - oa_leave_bill', 'bb2ee29e458875b0334e9f204f958272', '2019-10-16 16:38:52', '2019-10-16 16:38:52', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, 'yaml', NULL);
|
||||
INSERT INTO `config_info` VALUES (12, 'pigx-mp-platform-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(vW+Nup9LaTfIFwgufUBsYg==)\n client-secret: ENC(vW+Nup9LaTfIFwgufUBsYg==)\n scope: server\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL-DB:pigxx_mp}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - wx_mp_menu\n - wx_account\n - wx_account_fans\n - wx_fans_msg_res', 'bf4f6943566ce47a98551923bc4c4f80', '2019-10-21 08:58:24', '2019-10-21 08:58:24', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, 'yaml', NULL);
|
||||
INSERT INTO `config_info` VALUES (9, 'pigx-daemon-quartz-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n quartz:\n #相关属性配置\n properties:\n org:\n quartz:\n scheduler:\n instanceName: clusteredScheduler\n instanceId: AUTO\n jobStore:\n class: org.quartz.impl.jdbcjobstore.JobStoreTX\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n clusterCheckinInterval: 10000\n useProperties: false\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 50\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n #数据库方式\n job-store-type: jdbc\n #初始化表结构\n #jdbc:\n #initialize-schema: never\n\n', '276cf549fb8b084e35dc07d1eb309932', '2019-04-18 03:08:34', '2019-08-27 18:25:41', NULL, '127.0.0.1', '', '', 'quartz 配置文件', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (10, 'pigx-pay-platform-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_pay}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n\n# 租户表维护\npigx:\n pay:\n test: lengleng\n aliPayConfig:\n expire-time: 30\n return-url: http://pig4cloud.com\n notify-url: https://admin.pig4cloud.com/pay/notify/ali/callbak\n wxPayConfig:\n notify-url: https://admin.pig4cloud.com/pay/notify/wx/callbak\n xsequence: #发号器相关配置\n db:\n retry-times: 3\n table-name: pay_sequence\n tenant:\n column: tenant_id\n tables:\n - pay_channel\n - pay_trade_order\n - pay_goods_order\n - pay_notify_record', 'bf185a74bb9af224bfe7f8f52ae3c9cb', '2019-05-28 11:46:27', '2019-08-27 18:26:01', NULL, '127.0.0.1', '', '', '支付模块配置', 'null', 'null', 'yaml', 'null');
|
||||
INSERT INTO `config_info` VALUES (11, 'pigx-oa-platform-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n ignore-urls:\n - \'/actuator/**\'\n - \'/v2/api-docs\'\n - \'/editor-app/**\'\n - \'/modeler.html\'\n - \'/ws/**\'\nspring:\n autoconfigure:\n exclude: org.activiti.spring.boot.SecurityAutoConfiguration\n activiti:\n check-process-definitions: false\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_ac}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - oa_leave_bill', 'bb2ee29e458875b0334e9f204f958272', '2019-10-16 16:38:52', '2019-10-16 16:38:52', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, 'yaml', NULL);
|
||||
INSERT INTO `config_info` VALUES (12, 'pigx-mp-platform-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(vW+Nup9LaTfIFwgufUBsYg==)\n client-secret: ENC(vW+Nup9LaTfIFwgufUBsYg==)\n scope: server\n# 数据源\nspring:\n datasource:\n type: com.alibaba.druid.pool.DruidDataSource\n druid:\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL_USER:root}\n password: ${MYSQL_PWD:root}\n url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_mp}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - wx_mp_menu\n - wx_account\n - wx_account_fans\n - wx_fans_msg_res', 'bf4f6943566ce47a98551923bc4c4f80', '2019-10-21 08:58:24', '2019-10-21 08:58:24', NULL, '127.0.0.1', '', '', NULL, NULL, NULL, 'yaml', NULL);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@@ -52,16 +52,16 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `config_info_aggr`;
|
||||
CREATE TABLE `config_info_aggr` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`data_id` varchar(255) DEFAULT NULL,
|
||||
`group_id` varchar(128) DEFAULT NULL,
|
||||
`datum_id` varchar(255) DEFAULT NULL,
|
||||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '内容',
|
||||
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
|
||||
`group_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
|
||||
`datum_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'datum_id',
|
||||
`content` longtext COLLATE utf8_bin NOT NULL COMMENT '内容',
|
||||
`gmt_modified` datetime NOT NULL COMMENT '修改时间',
|
||||
`app_name` varchar(128) DEFAULT NULL,
|
||||
`tenant_id` varchar(128) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='增加租户字段';
|
||||
`app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
|
||||
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for config_info_beta
|
||||
@@ -69,20 +69,20 @@ CREATE TABLE `config_info_aggr` (
|
||||
DROP TABLE IF EXISTS `config_info_beta`;
|
||||
CREATE TABLE `config_info_beta` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`data_id` varchar(255) DEFAULT NULL,
|
||||
`group_id` varchar(128) DEFAULT NULL,
|
||||
`app_name` varchar(128) DEFAULT NULL,
|
||||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'content',
|
||||
`beta_ips` varchar(1024) DEFAULT NULL,
|
||||
`md5` varchar(32) DEFAULT NULL,
|
||||
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
|
||||
`group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
|
||||
`app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
|
||||
`content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
|
||||
`beta_ips` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT 'betaIps',
|
||||
`md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
|
||||
`gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
|
||||
`gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
|
||||
`src_user` mediumtext,
|
||||
`src_ip` varchar(20) DEFAULT NULL,
|
||||
`tenant_id` varchar(128) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='config_info_beta';
|
||||
`src_user` text COLLATE utf8_bin COMMENT 'source user',
|
||||
`src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
|
||||
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for config_info_tag
|
||||
@@ -90,20 +90,20 @@ CREATE TABLE `config_info_beta` (
|
||||
DROP TABLE IF EXISTS `config_info_tag`;
|
||||
CREATE TABLE `config_info_tag` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`data_id` varchar(255) DEFAULT NULL,
|
||||
`group_id` varchar(128) DEFAULT NULL,
|
||||
`tenant_id` varchar(128) DEFAULT NULL,
|
||||
`tag_id` varchar(128) DEFAULT NULL,
|
||||
`app_name` varchar(128) DEFAULT NULL,
|
||||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'content',
|
||||
`md5` varchar(32) DEFAULT NULL,
|
||||
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
|
||||
`group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
|
||||
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
|
||||
`tag_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_id',
|
||||
`app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
|
||||
`content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
|
||||
`md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
|
||||
`gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
|
||||
`gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
|
||||
`src_user` mediumtext,
|
||||
`src_ip` varchar(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='config_info_tag';
|
||||
`src_user` text COLLATE utf8_bin COMMENT 'source user',
|
||||
`src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for config_tags_relation
|
||||
@@ -111,16 +111,16 @@ CREATE TABLE `config_info_tag` (
|
||||
DROP TABLE IF EXISTS `config_tags_relation`;
|
||||
CREATE TABLE `config_tags_relation` (
|
||||
`id` bigint(20) NOT NULL COMMENT 'id',
|
||||
`tag_name` varchar(128) DEFAULT NULL,
|
||||
`tag_type` varchar(64) DEFAULT NULL,
|
||||
`data_id` varchar(255) DEFAULT NULL,
|
||||
`group_id` varchar(128) DEFAULT NULL,
|
||||
`tenant_id` varchar(128) DEFAULT NULL,
|
||||
`tag_name` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_name',
|
||||
`tag_type` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'tag_type',
|
||||
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
|
||||
`group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
|
||||
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
|
||||
`nid` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`nid`) USING BTREE,
|
||||
UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`) USING BTREE,
|
||||
KEY `idx_tenant_id` (`tenant_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='config_tag_relation';
|
||||
PRIMARY KEY (`nid`),
|
||||
UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
|
||||
KEY `idx_tenant_id` (`tenant_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for group_capacity
|
||||
@@ -128,7 +128,7 @@ CREATE TABLE `config_tags_relation` (
|
||||
DROP TABLE IF EXISTS `group_capacity`;
|
||||
CREATE TABLE `group_capacity` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`group_id` varchar(128) DEFAULT NULL,
|
||||
`group_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群',
|
||||
`quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
|
||||
`usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
|
||||
`max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
|
||||
@@ -137,9 +137,9 @@ CREATE TABLE `group_capacity` (
|
||||
`max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
|
||||
`gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
|
||||
`gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_group_id` (`group_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集群、各Group容量信息表';
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_group_id` (`group_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for his_config_info
|
||||
@@ -148,39 +148,58 @@ DROP TABLE IF EXISTS `his_config_info`;
|
||||
CREATE TABLE `his_config_info` (
|
||||
`id` bigint(64) unsigned NOT NULL,
|
||||
`nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`data_id` varchar(255) DEFAULT NULL,
|
||||
`group_id` varchar(128) DEFAULT NULL,
|
||||
`app_name` varchar(128) DEFAULT NULL,
|
||||
`content` longtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
||||
`md5` varchar(32) DEFAULT NULL,
|
||||
`data_id` varchar(255) COLLATE utf8_bin NOT NULL,
|
||||
`group_id` varchar(128) COLLATE utf8_bin NOT NULL,
|
||||
`app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
|
||||
`content` longtext COLLATE utf8_bin NOT NULL,
|
||||
`md5` varchar(32) COLLATE utf8_bin DEFAULT NULL,
|
||||
`gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00',
|
||||
`gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00',
|
||||
`src_user` mediumtext,
|
||||
`src_ip` varchar(20) DEFAULT NULL,
|
||||
`op_type` char(10) DEFAULT NULL,
|
||||
`tenant_id` varchar(128) DEFAULT NULL,
|
||||
PRIMARY KEY (`nid`) USING BTREE,
|
||||
KEY `idx_gmt_create` (`gmt_create`) USING BTREE,
|
||||
KEY `idx_gmt_modified` (`gmt_modified`) USING BTREE,
|
||||
KEY `idx_did` (`data_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='多租户改造';
|
||||
`src_user` text COLLATE utf8_bin,
|
||||
`src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL,
|
||||
`op_type` char(10) COLLATE utf8_bin DEFAULT NULL,
|
||||
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
|
||||
PRIMARY KEY (`nid`),
|
||||
KEY `idx_gmt_create` (`gmt_create`),
|
||||
KEY `idx_gmt_modified` (`gmt_modified`),
|
||||
KEY `idx_did` (`data_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for permissions
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `permissions`;
|
||||
CREATE TABLE `permissions` (
|
||||
`role` varchar(50) NOT NULL,
|
||||
`resource` varchar(512) NOT NULL,
|
||||
`action` varchar(8) NOT NULL,
|
||||
UNIQUE KEY `uk_role_permission` (`role`,`resource`,`action`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for roles
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `roles`;
|
||||
CREATE TABLE `roles` (
|
||||
`username` varchar(50) DEFAULT NULL,
|
||||
`role` varchar(50) DEFAULT NULL
|
||||
`username` varchar(50) NOT NULL,
|
||||
`role` varchar(50) NOT NULL,
|
||||
UNIQUE KEY `uk_username_role` (`username`,`role`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of roles
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `roles` VALUES ('nacos', 'ROLE_ADMIN');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for tenant_capacity
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tenant_capacity`;
|
||||
CREATE TABLE `tenant_capacity` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`tenant_id` varchar(128) DEFAULT NULL,
|
||||
`tenant_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID',
|
||||
`quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
|
||||
`usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
|
||||
`max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
|
||||
@@ -189,9 +208,9 @@ CREATE TABLE `tenant_capacity` (
|
||||
`max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
|
||||
`gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
|
||||
`gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_tenant_id` (`tenant_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='租户容量信息表';
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_tenant_id` (`tenant_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for tenant_info
|
||||
@@ -199,24 +218,17 @@ CREATE TABLE `tenant_capacity` (
|
||||
DROP TABLE IF EXISTS `tenant_info`;
|
||||
CREATE TABLE `tenant_info` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`kp` varchar(128) DEFAULT NULL,
|
||||
`tenant_id` varchar(128) DEFAULT NULL,
|
||||
`tenant_name` varchar(128) DEFAULT NULL,
|
||||
`tenant_desc` varchar(256) DEFAULT NULL,
|
||||
`create_source` varchar(32) DEFAULT NULL,
|
||||
`kp` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'kp',
|
||||
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
|
||||
`tenant_name` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_name',
|
||||
`tenant_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL COMMENT 'tenant_desc',
|
||||
`create_source` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'create_source',
|
||||
`gmt_create` bigint(20) NOT NULL COMMENT '创建时间',
|
||||
`gmt_modified` bigint(20) NOT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`) USING BTREE,
|
||||
KEY `idx_tenant_id` (`tenant_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='tenant_info';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tenant_info
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `tenant_info` VALUES (1, '1', '3bd14074-1dc5-4afc-ad04-506230b73923', 'SENTINEL_GROUP', 'sentinel 相关', 'nacos', 1570872049054, 1570872049054);
|
||||
COMMIT;
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),
|
||||
KEY `idx_tenant_id` (`tenant_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for users
|
||||
@@ -224,16 +236,16 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `users`;
|
||||
CREATE TABLE `users` (
|
||||
`username` varchar(50) NOT NULL,
|
||||
`password` varchar(500) DEFAULT NULL,
|
||||
`password` varchar(500) NOT NULL,
|
||||
`enabled` tinyint(1) NOT NULL,
|
||||
PRIMARY KEY (`username`) USING BTREE
|
||||
PRIMARY KEY (`username`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of users
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `users` VALUES ('nacos', '$2a$10$1fXDf9q5CKAA.Fe4rjTzzONGDI4cXFvMfPx9Yribr9OQC2.JDe/wK', 1);
|
||||
INSERT INTO `users` VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', 1);
|
||||
COMMIT;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
@@ -47,7 +47,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-nacos-discovery</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
+11
-10
@@ -17,6 +17,7 @@
|
||||
|
||||
package com.pig4cloud.pigx.common.security.component;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.pig4cloud.pigx.common.core.constant.CommonConstants;
|
||||
import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
|
||||
@@ -76,10 +77,10 @@ public class PigxUserAuthenticationConverter implements UserAuthenticationConver
|
||||
if (map.containsKey(USERNAME)) {
|
||||
validateTenantId(map);
|
||||
Collection<? extends GrantedAuthority> authorities = getAuthorities(map);
|
||||
String username = (String) map.get(USERNAME);
|
||||
Integer id = (Integer) map.get(SecurityConstants.DETAILS_USER_ID);
|
||||
Integer deptId = (Integer) map.get(SecurityConstants.DETAILS_DEPT_ID);
|
||||
Integer tenantId = (Integer) map.get(SecurityConstants.DETAILS_TENANT_ID);
|
||||
String username = MapUtil.getStr(map, USERNAME);
|
||||
Integer id = MapUtil.getInt(map, SecurityConstants.DETAILS_USER_ID);
|
||||
Integer deptId = MapUtil.getInt(map, SecurityConstants.DETAILS_DEPT_ID);
|
||||
Integer tenantId = MapUtil.getInt(map, SecurityConstants.DETAILS_TENANT_ID);
|
||||
PigxUser user = new PigxUser(id, deptId, tenantId, username, N_A, true
|
||||
, true, true, true, authorities);
|
||||
return new UsernamePasswordAuthenticationToken(user, N_A, authorities);
|
||||
@@ -99,13 +100,13 @@ public class PigxUserAuthenticationConverter implements UserAuthenticationConver
|
||||
throw new IllegalArgumentException("Authorities must be either a String or a Collection");
|
||||
}
|
||||
|
||||
private void validateTenantId(Map<String, ?> map){
|
||||
String headerValue = getCurrentTenantId();
|
||||
Integer userValue = (Integer) map.get(SecurityConstants.DETAILS_TENANT_ID);
|
||||
if(StrUtil.isNotBlank(headerValue) && !userValue.toString().equals(headerValue)){
|
||||
log.warn("请求头中的租户ID({})和用户的租户ID({})不一致",headerValue,userValue);
|
||||
private void validateTenantId(Map<String, ?> map) {
|
||||
String headerValue = getCurrentTenantId();
|
||||
Integer userValue = MapUtil.getInt(map, SecurityConstants.DETAILS_TENANT_ID);
|
||||
if (StrUtil.isNotBlank(headerValue) && !userValue.toString().equals(headerValue)) {
|
||||
log.warn("请求头中的租户ID({})和用户的租户ID({})不一致", headerValue, userValue);
|
||||
// TODO: 不要提示租户ID不对,可能被穷举
|
||||
throw new PigxAuth2Exception(SpringSecurityMessageSource.getAccessor().getMessage("AbstractUserDetailsAuthenticationProvider.badTenantId","Bad tenant ID"));
|
||||
throw new PigxAuth2Exception(SpringSecurityMessageSource.getAccessor().getMessage("AbstractUserDetailsAuthenticationProvider.badTenantId", "Bad tenant ID"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+14
-7
@@ -30,14 +30,25 @@
|
||||
<dependency>
|
||||
<groupId>com.pig4cloud.nacos</groupId>
|
||||
<artifactId>nacos-config</artifactId>
|
||||
<version>1.1.4</version>
|
||||
<version>1.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-jasper</artifactId>
|
||||
<version>7.0.59</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.pig4cloud.nacos</groupId>
|
||||
<artifactId>nacos-naming</artifactId>
|
||||
<version>1.1.4</version>
|
||||
<version>1.2.1</version>
|
||||
</dependency>
|
||||
<!-- log -->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.pig4cloud.nacos</groupId>
|
||||
<artifactId>nacos-istio</artifactId>
|
||||
<version>1.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
@@ -59,10 +70,6 @@
|
||||
<version>0.10.5</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -32,9 +32,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
public class PigxNacosApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.setProperty(ConfigConstants.TOMCAT_DIR, "logs");
|
||||
System.setProperty(ConfigConstants.TOMCAT_ACCESS_LOG, "false");
|
||||
System.setProperty(ConfigConstants.STANDALONE_MODE, "true");
|
||||
System.setProperty(ConfigConstants.AUTH_ENABLED, "false");
|
||||
SpringApplication.run(PigxNacosApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -30,12 +30,7 @@ public interface ConfigConstants {
|
||||
String STANDALONE_MODE = "nacos.standalone";
|
||||
|
||||
/**
|
||||
* tomcat 目录
|
||||
* 是否开启认证
|
||||
*/
|
||||
String TOMCAT_DIR = "server.tomcat.basedir";
|
||||
|
||||
/**
|
||||
* tomcat 日志配置
|
||||
*/
|
||||
String TOMCAT_ACCESS_LOG = "server.tomcat.accesslog.enabled";
|
||||
String AUTH_ENABLED = "nacos.core.auth.enabled";
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.nacos.console.config;
|
||||
|
||||
import com.alibaba.nacos.console.filter.JwtAuthenticationTokenFilter;
|
||||
import com.alibaba.nacos.console.security.CustomUserDetailsServiceImpl;
|
||||
import com.alibaba.nacos.console.security.JwtAuthenticationEntryPoint;
|
||||
import com.alibaba.nacos.console.utils.JwtTokenUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.config.BeanIds;
|
||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.WebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
|
||||
/**
|
||||
* Spring security config
|
||||
*
|
||||
* @author Nacos
|
||||
*/
|
||||
@Configuration
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true)
|
||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
public static final String AUTHORIZATION_HEADER = "Authorization";
|
||||
|
||||
public static final String AUTHORIZATION_TOKEN = "access_token";
|
||||
|
||||
public static final String SECURITY_IGNORE_URLS_SPILT_CHAR = ",";
|
||||
|
||||
@Autowired
|
||||
private CustomUserDetailsServiceImpl userDetailsService;
|
||||
|
||||
@Autowired
|
||||
private JwtAuthenticationEntryPoint unauthorizedHandler;
|
||||
|
||||
@Autowired
|
||||
private JwtTokenUtils tokenProvider;
|
||||
|
||||
@Autowired
|
||||
private Environment env;
|
||||
|
||||
@Bean(name = BeanIds.AUTHENTICATION_MANAGER)
|
||||
@Override
|
||||
public AuthenticationManager authenticationManagerBean() throws Exception {
|
||||
return super.authenticationManagerBean();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(WebSecurity web) {
|
||||
String ignoreURLs = env.getProperty("nacos.security.ignore.urls", "/**");
|
||||
for (String ignoreURL : ignoreURLs.trim().split(SECURITY_IGNORE_URLS_SPILT_CHAR)) {
|
||||
web.ignoring().antMatchers(ignoreURL.trim());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http
|
||||
.authorizeRequests()
|
||||
.anyRequest().authenticated().and()
|
||||
// custom token authorize exception handler
|
||||
.exceptionHandling()
|
||||
.authenticationEntryPoint(unauthorizedHandler).and()
|
||||
// since we use jwt, session is not necessary
|
||||
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
|
||||
// since we use jwt, csrf is not necessary
|
||||
.csrf().disable();
|
||||
http.addFilterBefore(new JwtAuthenticationTokenFilter(tokenProvider), UsernamePasswordAuthenticationFilter.class);
|
||||
|
||||
// disable cache
|
||||
http.headers().cacheControl();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PasswordEncoder passwordEncoder() {
|
||||
return new BCryptPasswordEncoder();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.nacos.console.controller;
|
||||
|
||||
import com.alibaba.nacos.config.server.model.RestResult;
|
||||
import com.alibaba.nacos.console.config.WebSecurityConfig;
|
||||
import com.alibaba.nacos.console.security.CustomUserDetailsServiceImpl;
|
||||
import com.alibaba.nacos.console.utils.JwtTokenUtils;
|
||||
import com.alibaba.nacos.console.utils.PasswordEncoderUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* auth
|
||||
*
|
||||
* @author wfnuser
|
||||
*/
|
||||
@RestController("auth")
|
||||
@RequestMapping("/v1/auth")
|
||||
public class AuthController {
|
||||
|
||||
@Autowired
|
||||
private JwtTokenUtils jwtTokenUtils;
|
||||
@Autowired
|
||||
private AuthenticationManager authenticationManager;
|
||||
@Autowired
|
||||
private CustomUserDetailsServiceImpl userDetailsService;
|
||||
|
||||
/**
|
||||
* Whether the Nacos is in broken states or not, and cannot recover except by being restarted
|
||||
*
|
||||
* @return HTTP code equal to 200 indicates that Nacos is in right states. HTTP code equal to 500 indicates that
|
||||
* Nacos is in broken states.
|
||||
*/
|
||||
|
||||
@PostMapping("login")
|
||||
public RestResult<String> login(@RequestParam String username, @RequestParam String password, HttpServletResponse response) {
|
||||
|
||||
// 通过用户名和密码创建一个 Authentication 认证对象,实现类为 UsernamePasswordAuthenticationToken
|
||||
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
|
||||
RestResult<String> rr = new RestResult<String>();
|
||||
|
||||
try {
|
||||
//通过 AuthenticationManager(默认实现为ProviderManager)的authenticate方法验证 Authentication 对象
|
||||
Authentication authentication = authenticationManager.authenticate(authenticationToken);
|
||||
//将 Authentication 绑定到 SecurityContext
|
||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||
//生成Token
|
||||
String token = jwtTokenUtils.createToken(authentication);
|
||||
//将Token写入到Http头部
|
||||
response.addHeader(WebSecurityConfig.AUTHORIZATION_HEADER, "Bearer " + token);
|
||||
rr.setCode(200);
|
||||
rr.setData("Bearer " + token);
|
||||
return rr;
|
||||
} catch (BadCredentialsException authentication) {
|
||||
rr.setCode(401);
|
||||
rr.setMessage("Login failed");
|
||||
return rr;
|
||||
}
|
||||
}
|
||||
|
||||
@PutMapping("password")
|
||||
public RestResult<String> updatePassword(@RequestParam(value = "oldPassword") String oldPassword,
|
||||
@RequestParam(value = "newPassword") String newPassword) {
|
||||
|
||||
RestResult<String> rr = new RestResult<String>();
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
String username = ((UserDetails) principal).getUsername();
|
||||
UserDetails userDetails = userDetailsService.loadUserByUsername(username);
|
||||
String password = userDetails.getPassword();
|
||||
|
||||
// TODO: throw out more fine grained exceptions
|
||||
try {
|
||||
if (PasswordEncoderUtil.matches(oldPassword, password)) {
|
||||
userDetailsService.updateUserPassword(username, PasswordEncoderUtil.encode(newPassword));
|
||||
rr.setCode(200);
|
||||
rr.setMessage("Update password success");
|
||||
} else {
|
||||
rr.setCode(401);
|
||||
rr.setMessage("Old password is invalid");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
rr.setCode(500);
|
||||
rr.setMessage("Update userpassword failed");
|
||||
}
|
||||
return rr;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -51,7 +51,7 @@ public class HealthController {
|
||||
* @return HTTP code equal to 200 indicates that Nacos is in right states. HTTP code equal to 500 indicates that
|
||||
* Nacos is in broken states.
|
||||
*/
|
||||
@GetMapping("liveness")
|
||||
@GetMapping("/liveness")
|
||||
public ResponseEntity liveness() {
|
||||
return ResponseEntity.ok().body("OK");
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class HealthController {
|
||||
* @return HTTP code equal to 200 indicates that Nacos is ready. HTTP code equal to 500 indicates that Nacos is not
|
||||
* ready.
|
||||
*/
|
||||
@GetMapping("readiness")
|
||||
@GetMapping("/readiness")
|
||||
public ResponseEntity readiness(HttpServletRequest request) {
|
||||
boolean isConfigReadiness = isConfigReadiness();
|
||||
boolean isNamingReadiness = isNamingReadiness(request);
|
||||
|
||||
+41
-1
@@ -20,6 +20,9 @@ import com.alibaba.nacos.config.server.model.TenantInfo;
|
||||
import com.alibaba.nacos.config.server.service.PersistService;
|
||||
import com.alibaba.nacos.console.model.Namespace;
|
||||
import com.alibaba.nacos.console.model.NamespaceAllInfo;
|
||||
import com.alibaba.nacos.console.security.nacos.NacosAuthConfig;
|
||||
import com.alibaba.nacos.core.auth.ActionTypes;
|
||||
import com.alibaba.nacos.core.auth.Secured;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -29,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* namespace service
|
||||
@@ -42,6 +46,10 @@ public class NamespaceController {
|
||||
@Autowired
|
||||
private PersistService persistService;
|
||||
|
||||
private Pattern namespaceIdCheckPattern = Pattern.compile("^[\\w-]+");
|
||||
|
||||
private static final int NAMESPACE_ID_MAX_LENGTH = 128;
|
||||
|
||||
/**
|
||||
* Get namespace list
|
||||
*
|
||||
@@ -101,16 +109,46 @@ public class NamespaceController {
|
||||
* @return whether create ok
|
||||
*/
|
||||
@PostMapping
|
||||
@Secured(resource = NacosAuthConfig.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.WRITE)
|
||||
public Boolean createNamespace(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam("customNamespaceId") String namespaceId,
|
||||
@RequestParam("namespaceName") String namespaceName,
|
||||
@RequestParam(value = "namespaceDesc", required = false) String namespaceDesc) {
|
||||
// TODO 获取用kp
|
||||
String namespaceId = UUID.randomUUID().toString();
|
||||
if(StringUtils.isBlank(namespaceId)){
|
||||
namespaceId = UUID.randomUUID().toString();
|
||||
} else {
|
||||
namespaceId = namespaceId.trim();
|
||||
if (!namespaceIdCheckPattern.matcher(namespaceId).matches()) {
|
||||
return false;
|
||||
}
|
||||
if (namespaceId.length() > NAMESPACE_ID_MAX_LENGTH) {
|
||||
return false;
|
||||
}
|
||||
if(persistService.tenantInfoCountByTenantId(namespaceId) > 0){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
persistService.insertTenantInfoAtomic("1", namespaceId, namespaceName, namespaceDesc, "nacos",
|
||||
System.currentTimeMillis());
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author klw(213539@qq.com)
|
||||
* @Description: check namespaceId exist
|
||||
* @Date 2019/12/10 21:41
|
||||
* @param: namespaceId
|
||||
* @return java.lang.Boolean
|
||||
*/
|
||||
@GetMapping(params = "checkNamespaceIdExist=true")
|
||||
public Boolean checkNamespaceIdExist(@RequestParam("customNamespaceId") String namespaceId){
|
||||
if(StringUtils.isBlank(namespaceId)){
|
||||
return false;
|
||||
}
|
||||
return (persistService.tenantInfoCountByTenantId(namespaceId) > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* edit namespace
|
||||
*
|
||||
@@ -120,6 +158,7 @@ public class NamespaceController {
|
||||
* @return whether edit ok
|
||||
*/
|
||||
@PutMapping
|
||||
@Secured(resource = NacosAuthConfig.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.WRITE)
|
||||
public Boolean editNamespace(@RequestParam("namespace") String namespace,
|
||||
@RequestParam("namespaceShowName") String namespaceShowName,
|
||||
@RequestParam(value = "namespaceDesc", required = false) String namespaceDesc) {
|
||||
@@ -137,6 +176,7 @@ public class NamespaceController {
|
||||
* @return whether del ok
|
||||
*/
|
||||
@DeleteMapping
|
||||
@Secured(resource = NacosAuthConfig.CONSOLE_RESOURCE_NAME_PREFIX + "namespaces", action = ActionTypes.WRITE)
|
||||
public Boolean deleteConfig(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam("namespaceId") String namespaceId) {
|
||||
persistService.removeTenantInfoAtomic("1", namespaceId);
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
package com.alibaba.nacos.console.controller;
|
||||
|
||||
|
||||
import com.alibaba.nacos.common.util.VersionUtils;
|
||||
import com.alibaba.nacos.common.utils.VersionUtils;
|
||||
import com.alibaba.nacos.core.utils.SystemUtils;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -34,7 +34,7 @@ import java.util.Map;
|
||||
@RequestMapping("/v1/console/server")
|
||||
public class ServerStateController {
|
||||
|
||||
@GetMapping("state")
|
||||
@GetMapping("/state")
|
||||
public ResponseEntity serverState() {
|
||||
Map<String,String> serverState = new HashMap<>(3);
|
||||
serverState.put("standalone_mode",SystemUtils.STANDALONE_MODE ?
|
||||
|
||||
+19
-24
@@ -15,11 +15,12 @@
|
||||
*/
|
||||
package com.alibaba.nacos.console.filter;
|
||||
|
||||
import com.alibaba.nacos.console.config.WebSecurityConfig;
|
||||
import com.alibaba.nacos.console.utils.JwtTokenUtils;
|
||||
import com.alibaba.nacos.api.common.Constants;
|
||||
import com.alibaba.nacos.console.security.nacos.JwtTokenManager;
|
||||
import com.alibaba.nacos.console.security.nacos.NacosAuthConfig;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
@@ -37,29 +38,23 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
||||
|
||||
private static final String TOKEN_PREFIX = "Bearer ";
|
||||
|
||||
private JwtTokenUtils tokenProvider;
|
||||
private JwtTokenManager tokenManager;
|
||||
|
||||
public JwtAuthenticationTokenFilter(JwtTokenUtils tokenProvider) {
|
||||
this.tokenProvider = tokenProvider;
|
||||
public JwtAuthenticationTokenFilter(JwtTokenManager tokenManager) {
|
||||
this.tokenManager = tokenManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
|
||||
throws IOException, ServletException {
|
||||
|
||||
String jwt = resolveToken(request);
|
||||
|
||||
if (jwt != null && !"".equals(jwt.trim()) && SecurityContextHolder.getContext().getAuthentication() == null) {
|
||||
if (this.tokenProvider.validateToken(jwt)) {
|
||||
/**
|
||||
* get auth info
|
||||
*/
|
||||
Authentication authentication = this.tokenProvider.getAuthentication(jwt);
|
||||
/**
|
||||
* save user info to securityContext
|
||||
*/
|
||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||
}
|
||||
if (StringUtils.isNotBlank(jwt) && SecurityContextHolder.getContext().getAuthentication() == null) {
|
||||
this.tokenManager.validateToken(jwt);
|
||||
Authentication authentication = this.tokenManager.getAuthentication(jwt);
|
||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||
}
|
||||
|
||||
chain.doFilter(request, response);
|
||||
}
|
||||
|
||||
@@ -67,12 +62,12 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
||||
* Get token from header
|
||||
*/
|
||||
private String resolveToken(HttpServletRequest request) {
|
||||
String bearerToken = request.getHeader(WebSecurityConfig.AUTHORIZATION_HEADER);
|
||||
if (StringUtils.hasText(bearerToken) && bearerToken.startsWith(TOKEN_PREFIX)) {
|
||||
return bearerToken.substring(7, bearerToken.length());
|
||||
String bearerToken = request.getHeader(NacosAuthConfig.AUTHORIZATION_HEADER);
|
||||
if (StringUtils.isNotBlank(bearerToken) && bearerToken.startsWith(TOKEN_PREFIX)) {
|
||||
return bearerToken.substring(7);
|
||||
}
|
||||
String jwt = request.getParameter(WebSecurityConfig.AUTHORIZATION_TOKEN);
|
||||
if (StringUtils.hasText(jwt)) {
|
||||
String jwt = request.getParameter(Constants.ACCESS_TOKEN);
|
||||
if (StringUtils.isNotBlank(jwt)) {
|
||||
return jwt;
|
||||
}
|
||||
return null;
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.nacos.console.security;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.authentication.AuthenticationProvider;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* auth provider
|
||||
*
|
||||
* @author wfnuser
|
||||
*/
|
||||
@Component
|
||||
public class CustomAuthenticationProvider implements AuthenticationProvider {
|
||||
|
||||
@Autowired
|
||||
private CustomUserDetailsServiceImpl userDetailsService;
|
||||
|
||||
@Override
|
||||
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
|
||||
|
||||
String username = (String) authentication.getPrincipal();
|
||||
String password = (String) authentication.getCredentials();
|
||||
UserDetails userDetails = userDetailsService.loadUserByUsername(username);
|
||||
|
||||
if (!password.equals(userDetails.getPassword())) {
|
||||
return new UsernamePasswordAuthenticationToken(username, null, null);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supports(Class<?> aClass) {
|
||||
return aClass.equals(UsernamePasswordAuthenticationToken.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.nacos.console.security;
|
||||
|
||||
import com.alibaba.nacos.config.server.model.User;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* custem user
|
||||
*
|
||||
* @author wfnuser
|
||||
*/
|
||||
public class CustomUserDetails implements UserDetails {
|
||||
|
||||
private User user;
|
||||
|
||||
public CustomUserDetails(User user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||
// TODO: get authorities
|
||||
return AuthorityUtils.commaSeparatedStringToAuthorityList("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPassword() {
|
||||
return user.getPassword();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsername() {
|
||||
return user.getUsername();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAccountNonExpired() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAccountNonLocked() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCredentialsNonExpired() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.nacos.console.security;
|
||||
|
||||
|
||||
import com.alibaba.nacos.config.server.model.User;
|
||||
import com.alibaba.nacos.config.server.service.PersistService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* Custem user service
|
||||
*
|
||||
* @author wfnuser
|
||||
*/
|
||||
@Service
|
||||
public class CustomUserDetailsServiceImpl implements UserDetailsService {
|
||||
|
||||
@Autowired
|
||||
private transient PersistService persistService;
|
||||
|
||||
@Override
|
||||
public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException {
|
||||
User user = persistService.findUserByUsername(userName);
|
||||
if (user == null) {
|
||||
throw new UsernameNotFoundException(userName);
|
||||
}
|
||||
return new CustomUserDetails(user);
|
||||
}
|
||||
|
||||
public void updateUserPassword(String username, String password) throws Exception {
|
||||
persistService.updateUserPassword(username, password);
|
||||
}
|
||||
}
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.alibaba.nacos.console.security;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* jwt auth fail point
|
||||
*
|
||||
* @author wfnuser
|
||||
*/
|
||||
@Component
|
||||
public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(JwtAuthenticationEntryPoint.class);
|
||||
|
||||
@Override
|
||||
public void commence(HttpServletRequest httpServletRequest,
|
||||
HttpServletResponse httpServletResponse,
|
||||
AuthenticationException e) throws IOException, ServletException {
|
||||
logger.error("Responding with unauthorized error. Message - {}", e.getMessage());
|
||||
httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized");
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,10 @@
|
||||
package com.alibaba.nacos.console.utils;
|
||||
|
||||
import io.jsonwebtoken.*;
|
||||
import io.jsonwebtoken.security.Keys;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
@@ -26,6 +28,7 @@ import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.crypto.SecretKey;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -42,10 +45,26 @@ public class JwtTokenUtils {
|
||||
|
||||
private static final String AUTHORITIES_KEY = "auth";
|
||||
|
||||
/**
|
||||
* minimum SHA_256 secretKey string length
|
||||
*/
|
||||
private static final int SHA_256_SECRET_CHAR_SIZE = 256 / 8;
|
||||
|
||||
/**
|
||||
* default SHA_256 secretKey flag
|
||||
*/
|
||||
private static final String DEFAULT_SECRET_FLAG = "default";
|
||||
|
||||
/**
|
||||
* custom SHA_256 secretKey from config property
|
||||
*/
|
||||
@Value("${nacos.security.token.secret-key:default}")
|
||||
private String customSecretKeyStr;
|
||||
|
||||
/**
|
||||
* secret key
|
||||
*/
|
||||
private String secretKey;
|
||||
private SecretKey secretKey;
|
||||
|
||||
/**
|
||||
* Token validity time(ms)
|
||||
@@ -54,7 +73,24 @@ public class JwtTokenUtils {
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
this.secretKey = "SecretKey012345678901234567890123456789012345678901234567890123456789";
|
||||
//use default secretKey for SHA-256
|
||||
if (customSecretKeyStr == null || DEFAULT_SECRET_FLAG.equals(customSecretKeyStr)) {
|
||||
this.secretKey = Keys.secretKeyFor(SignatureAlgorithm.HS256);
|
||||
} else {
|
||||
//use custom secretKey
|
||||
int size = customSecretKeyStr.length();
|
||||
int left = SHA_256_SECRET_CHAR_SIZE - size;
|
||||
if (left > 0) {
|
||||
//character for padding
|
||||
StringBuilder stringBuilder = new StringBuilder(customSecretKeyStr);
|
||||
for (int i = 0 ;i < left ; i ++){
|
||||
stringBuilder.append(i%10);
|
||||
}
|
||||
this.secretKey = Keys.hmacShaKeyFor(stringBuilder.toString().getBytes());
|
||||
}else {
|
||||
this.secretKey = Keys.hmacShaKeyFor(customSecretKeyStr.getBytes());
|
||||
}
|
||||
}
|
||||
this.tokenValidityInMilliseconds = 1000 * 60 * 30L;
|
||||
}
|
||||
|
||||
@@ -82,7 +118,7 @@ public class JwtTokenUtils {
|
||||
.setSubject(authentication.getName())
|
||||
.claim(AUTHORITIES_KEY, "")
|
||||
.setExpiration(validity)
|
||||
.signWith(SignatureAlgorithm.HS256, secretKey)
|
||||
.signWith(secretKey, SignatureAlgorithm.HS256)
|
||||
.compact();
|
||||
}
|
||||
|
||||
|
||||
+16
-13
@@ -1,19 +1,24 @@
|
||||
nacos:
|
||||
cmdb:
|
||||
dumpTaskInterval: 3600
|
||||
eventTaskInterval: 10
|
||||
labelTaskInterval: 300
|
||||
loadDataAtStart: false
|
||||
security: # 删除此配置无需登录验证
|
||||
ignore:
|
||||
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/login,/v1/console/health/**,/v1/cs/**,/v1/ns/**,/v1/cmdb/**,/actuator/**,/v1/console/server/**
|
||||
server:
|
||||
port: 8848
|
||||
tomcat:
|
||||
basedir: logs
|
||||
|
||||
db:
|
||||
num: 1
|
||||
user: ${MYSQL-USER:root}
|
||||
password: ${MYSQL-PWD:root}
|
||||
url:
|
||||
0: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL-DB:pigxx_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
0: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
|
||||
|
||||
nacos:
|
||||
core:
|
||||
auth:
|
||||
system.type: nacos
|
||||
default.token.secret.key: SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||
security:
|
||||
ignore:
|
||||
urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
@@ -21,7 +26,5 @@ spring:
|
||||
security:
|
||||
enabled: true
|
||||
|
||||
server:
|
||||
tomcat:
|
||||
basedir: logs
|
||||
useAddressServer: true
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
"generator-star-spacing": "off",
|
||||
"wrap-iife": "off",
|
||||
"arrow-parens": "off",
|
||||
"indent": "off"
|
||||
"indent": "off",
|
||||
"comma-dangle": "off"
|
||||
}
|
||||
}
|
||||
@@ -27,55 +27,56 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alifd/next-theme-loader": "^1.3.1",
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/plugin-proposal-decorators": "^7.2.3",
|
||||
"@babel/preset-env": "^7.2.3",
|
||||
"@babel/runtime": "^7.2.0",
|
||||
"@babel/cli": "^7.7.7",
|
||||
"@babel/core": "^7.7.7",
|
||||
"@babel/plugin-proposal-decorators": "^7.7.4",
|
||||
"@babel/preset-env": "^7.7.7",
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-loader": "^8.0.4",
|
||||
"babel-plugin-import": "^1.12.0",
|
||||
"babel-preset-react-app": "^6.1.0",
|
||||
"clean-webpack-plugin": "^0.1.19",
|
||||
"copy-webpack-plugin": "^4.6.0",
|
||||
"cross-env": "^5.2.0",
|
||||
"css-loader": "^2.0.2",
|
||||
"eslint": "^5.11.0",
|
||||
"eslint-config-ali": "^4.1.0",
|
||||
"eslint-config-prettier": "^3.3.0",
|
||||
"eslint-loader": "^2.1.1",
|
||||
"babel-plugin-import": "^1.13.0",
|
||||
"babel-preset-react-app": "^9.1.0",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^5.1.1 ",
|
||||
"cross-env": "^6.0.3",
|
||||
"css-loader": "^3.4.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-ali": "^9.0.2",
|
||||
"eslint-config-prettier": "^6.8.0",
|
||||
"eslint-loader": "^3.0.3",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"eslint-plugin-prettier": "^3.0.0",
|
||||
"eslint-plugin-react": "^7.11.1",
|
||||
"file-loader": "^2.0.0",
|
||||
"eslint-plugin-react": "^7.17.0",
|
||||
"eslint-plugin-react-hooks": "^2.3.0",
|
||||
"file-loader": "^5.0.2",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"husky": "^1.1.4",
|
||||
"lint-staged": "^8.0.4",
|
||||
"mini-css-extract-plugin": "^0.5.0",
|
||||
"node-sass": "^4.11.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
||||
"prettier": "1.15.2",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"uglifyjs-webpack-plugin": "^2.1.0",
|
||||
"url-loader": "^1.1.2",
|
||||
"webpack": "^4.28.2",
|
||||
"webpack-cli": "^3.1.2",
|
||||
"webpack-dev-server": "^3.1.13"
|
||||
"husky": "^3.1.0",
|
||||
"lint-staged": "^9.5.0",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
"node-sass": "^4.13.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
||||
"prettier": "1.19.1",
|
||||
"sass-loader": "^8.0.0",
|
||||
"style-loader": "^1.1.2",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"url-loader": "^3.0.0",
|
||||
"webpack": "^4.41.4",
|
||||
"webpack-cli": "^3.3.10",
|
||||
"webpack-dev-server": "^3.10.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alifd/next": "^1.15.12",
|
||||
"@alifd/next": "^1.17.4",
|
||||
"axios": "^0.18.0",
|
||||
"jquery": "^3.3.1",
|
||||
"moment": "^2.23.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.7.0",
|
||||
"react-dom": "^16.7.0",
|
||||
"react-redux": "^5.1.1",
|
||||
"react-router": "^4.3.1",
|
||||
"react-router-dom": "^4.3.1",
|
||||
"react": "^16.12.0",
|
||||
"react-dom": "^16.12.0",
|
||||
"react-redux": "^7.1.3",
|
||||
"react-router": "^5.1.2",
|
||||
"react-router-dom": "^5.1.2",
|
||||
"react-router-redux": "^4.0.8",
|
||||
"redux": "^4.0.1",
|
||||
"redux": "^4.0.5",
|
||||
"redux-thunk": "^2.3.0",
|
||||
"yamljs": "^0.3.0"
|
||||
}
|
||||
|
||||
+71
-9
@@ -109,14 +109,17 @@ class NewNameSpace extends React.Component {
|
||||
this.setState({
|
||||
disabled: true,
|
||||
});
|
||||
let { customNamespaceId } = values;
|
||||
if (!customNamespaceId) {
|
||||
customNamespaceId = '';
|
||||
}
|
||||
request({
|
||||
type: 'post',
|
||||
url: 'v1/console/namespaces',
|
||||
type: 'get',
|
||||
url: 'v1/console/namespaces?checkNamespaceIdExist=true',
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
beforeSend: () => this.openLoading(),
|
||||
data: {
|
||||
namespaceName: values.namespaceShowName,
|
||||
namespaceDesc: values.namespaceDesc,
|
||||
customNamespaceId,
|
||||
},
|
||||
success: res => {
|
||||
this.disabled = false;
|
||||
@@ -124,13 +127,38 @@ class NewNameSpace extends React.Component {
|
||||
disabled: false,
|
||||
});
|
||||
if (res === true) {
|
||||
this.closeDialog();
|
||||
this.props.getNameSpaces();
|
||||
this.refreshNameSpace(); // 刷新全局namespace
|
||||
} else {
|
||||
Dialog.alert({
|
||||
title: locale.notice,
|
||||
content: res.message,
|
||||
content: locale.namespaceIdAlreadyExist,
|
||||
});
|
||||
} else {
|
||||
request({
|
||||
type: 'post',
|
||||
url: 'v1/console/namespaces',
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
beforeSend: () => this.openLoading(),
|
||||
data: {
|
||||
customNamespaceId,
|
||||
namespaceName: values.namespaceShowName,
|
||||
namespaceDesc: values.namespaceDesc,
|
||||
},
|
||||
success: res => {
|
||||
this.disabled = false;
|
||||
this.setState({
|
||||
disabled: false,
|
||||
});
|
||||
if (res === true) {
|
||||
this.closeDialog();
|
||||
this.props.getNameSpaces();
|
||||
this.refreshNameSpace(); // 刷新全局namespace
|
||||
} else {
|
||||
Dialog.alert({
|
||||
title: locale.notice,
|
||||
content: locale.newnamespceFailedMessage,
|
||||
});
|
||||
}
|
||||
},
|
||||
complete: () => this.closeLoading(),
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -164,6 +192,32 @@ class NewNameSpace extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
validateNamespzecId(rule, value, callback) {
|
||||
if (!value || value.trim() === '') {
|
||||
callback();
|
||||
} else {
|
||||
const { locale = {} } = this.props;
|
||||
if (value.length > 128) {
|
||||
callback(locale.namespaceIdTooLong);
|
||||
}
|
||||
const chartReg = /^[\w-]+/g;
|
||||
const matchResult = value.match(chartReg);
|
||||
if (matchResult) {
|
||||
if (matchResult.length > 1) {
|
||||
callback(locale.input);
|
||||
} else {
|
||||
if (value.length !== matchResult[0].length) {
|
||||
callback(locale.input);
|
||||
return;
|
||||
}
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback(locale.input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { locale = {} } = this.props;
|
||||
const footer = (
|
||||
@@ -193,6 +247,14 @@ class NewNameSpace extends React.Component {
|
||||
style={{ width: '100%', position: 'relative' }}
|
||||
visible={this.state.loading}
|
||||
>
|
||||
<FormItem label={locale.namespaceId} {...formItemLayout}>
|
||||
<Input
|
||||
{...this.field.init('customNamespaceId', {
|
||||
rules: [{ validator: this.validateNamespzecId.bind(this) }],
|
||||
})}
|
||||
style={{ width: '100%' }}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label={locale.name} required {...formItemLayout}>
|
||||
<Input
|
||||
{...this.field.init('namespaceShowName', {
|
||||
|
||||
+1
-3
@@ -125,9 +125,7 @@ class RegionGroup extends React.Component {
|
||||
? false
|
||||
: window.location.search.indexOf('hideTopbar=') === -1,
|
||||
},
|
||||
() => {
|
||||
this.setRegionWidth();
|
||||
}
|
||||
() => this.setRegionWidth()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,3 +23,15 @@ export const GET_STATE = 'GET_STATE';
|
||||
|
||||
export const GET_SUBSCRIBERS = 'GET_SUBSCRIBERS';
|
||||
export const REMOVE_SUBSCRIBERS = 'REMOVE_SUBSCRIBERS';
|
||||
|
||||
export const UPDATE_USER = 'UPDATE_USER';
|
||||
export const SIGN_IN = 'SIGN_IN';
|
||||
export const USER_LIST = 'USER_LIST';
|
||||
|
||||
export const ROLE_LIST = 'ROLE_LIST';
|
||||
|
||||
export const PERMISSIONS_LIST = 'PERMISSIONS_LIST';
|
||||
|
||||
export const GET_NAMESPACES = 'GET_NAMESPACES';
|
||||
|
||||
export const GET_CONFIGURATION = 'GET_CONFIGURATION';
|
||||
@@ -12,9 +12,16 @@
|
||||
*/
|
||||
|
||||
import projectConfig from './config';
|
||||
import moment from 'moment';
|
||||
import $ from 'jquery';
|
||||
import i18DocObj from './i18ndoc';
|
||||
import { Message } from '@alifd/next';
|
||||
|
||||
function goLogin() {
|
||||
const url = window.location.href;
|
||||
localStorage.removeItem('token');
|
||||
const base_url = url.split('#')[0];
|
||||
console.log('base_url', base_url);
|
||||
window.location = `${base_url}#/login`;
|
||||
}
|
||||
|
||||
const global = window;
|
||||
|
||||
@@ -205,120 +212,6 @@ const nacosUtils = (function(_global) {
|
||||
};
|
||||
})(global);
|
||||
|
||||
const aliwareIntl = (function(_global) {
|
||||
/**
|
||||
* 国际化构造方法
|
||||
* @param {Object} options 配置信息
|
||||
*/
|
||||
function AliwareI18n(options) {
|
||||
// let currentLocal = options.currentLocal || navigator.language || navigator.userLanguage;
|
||||
|
||||
const nowData = options.locals;
|
||||
this.nowData = nowData;
|
||||
this.setMomentLocale(this.currentLanguageCode);
|
||||
}
|
||||
|
||||
let aliwareLocal = aliwareGetCookieByKeyName('aliyun_lang') || 'zh';
|
||||
let aliwareLocalSite = aliwareGetCookieByKeyName('aliyun_country') || 'cn';
|
||||
aliwareLocal = aliwareLocal.toLowerCase();
|
||||
aliwareLocalSite = aliwareLocalSite.toLowerCase();
|
||||
// 当前语言
|
||||
AliwareI18n.prototype.currentLocal = aliwareLocal;
|
||||
// 当前地区
|
||||
AliwareI18n.prototype.currentSite = aliwareLocalSite;
|
||||
// 当前语言-地区
|
||||
AliwareI18n.prototype.currentLanguageCode =
|
||||
aliwareGetCookieByKeyName('docsite_language') || `${aliwareLocal}-${aliwareLocalSite}`;
|
||||
/**
|
||||
* 通过key获取对应国际化文案
|
||||
* @param {String} key 国际化key
|
||||
*/
|
||||
AliwareI18n.prototype.get = function(key) {
|
||||
return this.nowData[key];
|
||||
};
|
||||
/**
|
||||
* 修改国际化文案数据
|
||||
* @param {String} local 语言信息
|
||||
*/
|
||||
AliwareI18n.prototype.changeLanguage = function(local) {
|
||||
this.nowData = i18DocObj[local] || {};
|
||||
};
|
||||
/**
|
||||
* 数字国际化
|
||||
* @param {Number} num 数字
|
||||
*/
|
||||
AliwareI18n.prototype.intlNumberFormat = function(num) {
|
||||
if (typeof Intl !== 'object' || typeof Intl.NumberFormat !== 'function') {
|
||||
return num;
|
||||
}
|
||||
try {
|
||||
return new Intl.NumberFormat(this.currentLanguageCode).format(num || 0);
|
||||
} catch (error) {
|
||||
return num;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 时间戳格式化
|
||||
* @param {Number} num 时间戳
|
||||
* @param {Object} initOption 配置信息
|
||||
*/
|
||||
AliwareI18n.prototype.intlTimeFormat = function(num = Date.now(), initOption = {}) {
|
||||
try {
|
||||
const date = Object.prototype.toString.call(num) === '[object Date]' ? num : new Date(num);
|
||||
const options = Object.assign(
|
||||
{},
|
||||
{
|
||||
// weekday: "short",
|
||||
hour12: false,
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
second: 'numeric',
|
||||
},
|
||||
initOption
|
||||
);
|
||||
return date.toLocaleDateString(this.currentLanguageCode, options);
|
||||
} catch (error) {
|
||||
return typeof moment === 'function' ? moment(num).format() : '--';
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 获取当前时间格式
|
||||
* @param {String} language 语言信息: zh/en
|
||||
*/
|
||||
AliwareI18n.prototype.getIntlTimeFormat = function(_language) {
|
||||
const language = _language || aliwareLocal;
|
||||
const langObj = {
|
||||
zh: 'YYYY年M月D日 HH:mm:ss',
|
||||
en: 'MMM D, YYYY, h:mm:ss A',
|
||||
default: 'YYYY-MM-DD HH:mm:ss',
|
||||
};
|
||||
return langObj[language] ? langObj[language] : langObj.default;
|
||||
};
|
||||
/**
|
||||
* 设置moment的locale
|
||||
* @param {String} languageCode 语言信息: zh-ch/en-us
|
||||
*/
|
||||
AliwareI18n.prototype.setMomentLocale = function(languageCode) {
|
||||
if (Object.prototype.toString.call(moment) === '[object Function]') {
|
||||
moment.locale(languageCode || this.currentLanguageCode);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return new AliwareI18n({
|
||||
currentLocal: `${aliwareLocal}`,
|
||||
locals:
|
||||
i18DocObj[AliwareI18n.prototype.currentLanguageCode] ||
|
||||
i18DocObj['en-us'] ||
|
||||
i18DocObj['zh-cn'] ||
|
||||
{},
|
||||
});
|
||||
})(global);
|
||||
|
||||
/**
|
||||
* 获取url中的参数
|
||||
*/
|
||||
@@ -561,7 +454,7 @@ const request = (function(_global) {
|
||||
} catch (e) {}
|
||||
// 设置自动loading效果
|
||||
if (serviceObj.autoLoading) {
|
||||
nacosUtils.openLoading();
|
||||
// nacosUtils.openLoading();
|
||||
const prevComplete = config.complete;
|
||||
config.complete = function() {
|
||||
nacosUtils.closeLoading();
|
||||
@@ -597,11 +490,22 @@ const request = (function(_global) {
|
||||
|
||||
// 处理后置中间件
|
||||
config = handleMiddleWare.apply(this, [config, ...args, middlewareBackList]);
|
||||
let token = {};
|
||||
try {
|
||||
token = JSON.parse(localStorage.token);
|
||||
} catch (e) {
|
||||
console.log('Token Erro', localStorage.token, e);
|
||||
goLogin();
|
||||
}
|
||||
const { accessToken = '' } = token;
|
||||
const [url, paramsStr = ''] = config.url.split('?');
|
||||
const params = paramsStr.split('&');
|
||||
params.push(`accessToken=${accessToken}`);
|
||||
|
||||
return $.ajax(
|
||||
Object.assign({}, config, {
|
||||
type: config.type,
|
||||
url: config.url,
|
||||
url: [url, params.join('&')].join('?'),
|
||||
data: config.data || '',
|
||||
dataType: config.dataType || 'json',
|
||||
beforeSend(xhr) {
|
||||
@@ -615,17 +519,17 @@ const request = (function(_global) {
|
||||
success => {},
|
||||
error => {
|
||||
// 处理403 forbidden
|
||||
if (error && (error.status === 403 || error.status === 401)) {
|
||||
// 跳转至login页
|
||||
// TODO: 用 react-router 重写,改造成本比较高,这里先hack
|
||||
const url = window.location.href;
|
||||
// TODO: 后端返回细致的错误码,如果原始密码不对 不应该直接跳到登陆页
|
||||
if (url.includes('password')) {
|
||||
return;
|
||||
}
|
||||
const base_url = url.split('#')[0];
|
||||
window.location = `${base_url}#/login`;
|
||||
const { status, responseJSON = {} } = error || {};
|
||||
if (responseJSON.message) {
|
||||
Message.error(responseJSON.message);
|
||||
}
|
||||
if (
|
||||
[401, 403].includes(status) &&
|
||||
['unknown user!', 'token invalid', 'token expired!'].includes(responseJSON.message)
|
||||
) {
|
||||
goLogin();
|
||||
}
|
||||
return error;
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -645,10 +549,9 @@ export {
|
||||
nacosEvent,
|
||||
nacosUtils,
|
||||
aliwareGetCookieByKeyName,
|
||||
aliwareIntl,
|
||||
removeParams,
|
||||
getParams,
|
||||
setParam,
|
||||
setParams,
|
||||
removeParams,
|
||||
request,
|
||||
};
|
||||
File diff suppressed because it is too large.
Load diff
@@ -30,7 +30,6 @@ import { LANGUAGE_KEY, REDUX_DEVTOOLS } from './constants';
|
||||
|
||||
import Login from './pages/Login';
|
||||
import Namespace from './pages/NameSpace';
|
||||
import Password from './pages/Password';
|
||||
import Newconfig from './pages/ConfigurationManagement/NewConfig';
|
||||
import Configsync from './pages/ConfigurationManagement/ConfigSync';
|
||||
import Configdetail from './pages/ConfigurationManagement/ConfigDetail';
|
||||
@@ -44,6 +43,9 @@ import ServiceList from './pages/ServiceManagement/ServiceList';
|
||||
import ServiceDetail from './pages/ServiceManagement/ServiceDetail';
|
||||
import SubscriberList from './pages/ServiceManagement/SubscriberList';
|
||||
import ClusterNodeList from './pages/ClusterManagement/ClusterNodeList';
|
||||
import UserManagement from './pages/AuthorityControl/UserManagement';
|
||||
import PermissionsManagement from './pages/AuthorityControl/PermissionsManagement';
|
||||
import RolesManagement from './pages/AuthorityControl/RolesManagement';
|
||||
import Welcome from './pages/Welcome/Welcome';
|
||||
|
||||
import reducers from './reducers';
|
||||
@@ -65,17 +67,13 @@ const reducer = combineReducers({
|
||||
|
||||
const store = createStore(
|
||||
reducer,
|
||||
compose(
|
||||
applyMiddleware(thunk),
|
||||
window[REDUX_DEVTOOLS] ? window[REDUX_DEVTOOLS]() : f => f
|
||||
)
|
||||
compose(applyMiddleware(thunk), window[REDUX_DEVTOOLS] ? window[REDUX_DEVTOOLS]() : f => f)
|
||||
);
|
||||
|
||||
const MENU = [
|
||||
{ path: '/', exact: true, render: () => <Redirect to="/welcome" /> },
|
||||
{ path: '/welcome', component: Welcome },
|
||||
{ path: '/namespace', component: Namespace },
|
||||
{ path: '/password', component: Password },
|
||||
{ path: '/newconfig', component: Newconfig },
|
||||
{ path: '/configsync', component: Configsync },
|
||||
{ path: '/configdetail', component: Configdetail },
|
||||
@@ -89,12 +87,12 @@ const MENU = [
|
||||
{ path: '/serviceDetail', component: ServiceDetail },
|
||||
{ path: '/subscriberList', component: SubscriberList },
|
||||
{ path: '/clusterManagement', component: ClusterNodeList },
|
||||
{ path: '/userManagement', component: UserManagement },
|
||||
{ path: '/rolesManagement', component: RolesManagement },
|
||||
{ path: '/permissionsManagement', component: PermissionsManagement },
|
||||
];
|
||||
|
||||
@connect(
|
||||
state => ({ ...state.locale }),
|
||||
{ changeLanguage }
|
||||
)
|
||||
@connect(state => ({ ...state.locale }), { changeLanguage })
|
||||
class App extends React.Component {
|
||||
static propTypes = {
|
||||
locale: PropTypes.object,
|
||||
|
||||
@@ -1217,10 +1217,6 @@ form.vertical-margin-lg .form-group {
|
||||
border-color: #e0e0e0 !important;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.row-bg-green {
|
||||
background-color: #e4fdda;
|
||||
}
|
||||
|
||||
@@ -18,14 +18,13 @@ import { connect } from 'react-redux';
|
||||
import { ConfigProvider, Dropdown, Menu } from '@alifd/next';
|
||||
import siteConfig from '../config';
|
||||
import { changeLanguage } from '@/reducers/locale';
|
||||
import PasswordReset from '../pages/AuthorityControl/UserManagement/PasswordReset';
|
||||
import { passwordReset } from '../reducers/authority';
|
||||
|
||||
import './index.scss';
|
||||
|
||||
@withRouter
|
||||
@connect(
|
||||
state => ({ ...state.locale }),
|
||||
{ changeLanguage }
|
||||
)
|
||||
@connect(state => ({ ...state.locale }), { changeLanguage })
|
||||
@ConfigProvider.config
|
||||
class Header extends React.Component {
|
||||
static displayName = 'Header';
|
||||
@@ -38,6 +37,8 @@ class Header extends React.Component {
|
||||
changeLanguage: PropTypes.func,
|
||||
};
|
||||
|
||||
state = { passwordResetUser: '' };
|
||||
|
||||
switchLang = () => {
|
||||
const { language = 'en-US', changeLanguage } = this.props;
|
||||
const currentLanguage = language === 'en-US' ? 'zh-CN' : 'en-US';
|
||||
@@ -50,16 +51,23 @@ class Header extends React.Component {
|
||||
};
|
||||
|
||||
changePassword = () => {
|
||||
this.props.history.push('/password');
|
||||
this.setState({
|
||||
passwordResetUser: this.getUsername(),
|
||||
});
|
||||
};
|
||||
|
||||
getUsername = () => {
|
||||
const token = window.localStorage.getItem('token');
|
||||
if (token) {
|
||||
const base64Url = token.split('.')[1];
|
||||
const [, base64Url = ''] = token.split('.');
|
||||
const base64 = base64Url.replace('-', '+').replace('_', '/');
|
||||
const parsedToken = JSON.parse(window.atob(base64));
|
||||
return parsedToken.sub;
|
||||
try {
|
||||
const parsedToken = JSON.parse(window.atob(base64));
|
||||
return parsedToken.sub;
|
||||
} catch (e) {
|
||||
delete localStorage.token;
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
@@ -71,6 +79,7 @@ class Header extends React.Component {
|
||||
location: { pathname },
|
||||
} = this.props;
|
||||
const { home, docs, blog, community, languageSwitchButton } = locale;
|
||||
const { passwordResetUser = '' } = this.state;
|
||||
const BASE_URL = `https://nacos.io/${language.toLocaleLowerCase()}/`;
|
||||
const NAV_MENU = [
|
||||
{ id: 1, title: home, link: BASE_URL },
|
||||
@@ -79,45 +88,56 @@ class Header extends React.Component {
|
||||
{ id: 4, title: community, link: `${BASE_URL}community/index.html` },
|
||||
];
|
||||
return (
|
||||
<header className="header-container header-container-primary">
|
||||
<div className="header-body">
|
||||
<a
|
||||
href={`https://nacos.io/${language.toLocaleLowerCase()}/`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<img
|
||||
src="img/logo-2000-390.svg"
|
||||
className="logo"
|
||||
alt={siteConfig.name}
|
||||
title={siteConfig.name}
|
||||
/>
|
||||
</a>
|
||||
{/* if is login page, we will show logout */}
|
||||
{pathname !== '/login' && (
|
||||
<Dropdown trigger={<div className="logout">{this.getUsername()}</div>}>
|
||||
<Menu>
|
||||
<Menu.Item onClick={this.logout}>{locale.logout}</Menu.Item>
|
||||
<Menu.Item onClick={this.changePassword}>{locale.changePassword}</Menu.Item>
|
||||
</Menu>
|
||||
</Dropdown>
|
||||
)}
|
||||
<span className="language-switch language-switch-primary" onClick={this.switchLang}>
|
||||
{languageSwitchButton}
|
||||
</span>
|
||||
<div className="header-menu header-menu-open">
|
||||
<ul>
|
||||
{NAV_MENU.map(item => (
|
||||
<li key={item.id} className="menu-item menu-item-primary">
|
||||
<a href={item.link} target="_blank" rel="noopener noreferrer">
|
||||
{item.title}
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<>
|
||||
<header className="header-container header-container-primary">
|
||||
<div className="header-body">
|
||||
<a
|
||||
href={`https://nacos.io/${language.toLocaleLowerCase()}/`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<img
|
||||
src="img/logo-2000-390.svg"
|
||||
className="logo"
|
||||
alt={siteConfig.name}
|
||||
title={siteConfig.name}
|
||||
/>
|
||||
</a>
|
||||
{/* if is login page, we will show logout */}
|
||||
{pathname !== '/login' && (
|
||||
<Dropdown trigger={<div className="logout">{this.getUsername()}</div>}>
|
||||
<Menu>
|
||||
<Menu.Item onClick={this.logout}>{locale.logout}</Menu.Item>
|
||||
<Menu.Item onClick={this.changePassword}>{locale.changePassword}</Menu.Item>
|
||||
</Menu>
|
||||
</Dropdown>
|
||||
)}
|
||||
<span className="language-switch language-switch-primary" onClick={this.switchLang}>
|
||||
{languageSwitchButton}
|
||||
</span>
|
||||
<div className="header-menu header-menu-open">
|
||||
<ul>
|
||||
{NAV_MENU.map(item => (
|
||||
<li key={item.id} className="menu-item menu-item-primary">
|
||||
<a href={item.link} target="_blank" rel="noopener noreferrer">
|
||||
{item.title}
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</header>
|
||||
<PasswordReset
|
||||
username={passwordResetUser}
|
||||
onOk={user =>
|
||||
passwordReset(user).then(res => {
|
||||
return res;
|
||||
})
|
||||
}
|
||||
onCancel={() => this.setState({ passwordResetUser: undefined })}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,506 +13,127 @@
|
||||
|
||||
import React from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ConfigProvider, Icon } from '@alifd/next';
|
||||
import Header from './Header';
|
||||
import $ from 'jquery';
|
||||
import { connect } from 'react-redux';
|
||||
import { setParams } from '../globalLib';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ConfigProvider, Icon, Menu } from '@alifd/next';
|
||||
import Header from './Header';
|
||||
import { getState } from '../reducers/base';
|
||||
import _menu from '../menu';
|
||||
import getMenuData from './menu';
|
||||
|
||||
import './index.scss';
|
||||
const { SubMenu, Item } = Menu;
|
||||
|
||||
@withRouter
|
||||
@connect(
|
||||
state => ({ ...state.locale, ...state.base }),
|
||||
{ getState }
|
||||
)
|
||||
@connect(state => ({ ...state.locale, ...state.base }), { getState })
|
||||
@ConfigProvider.config
|
||||
class MainLayout extends React.Component {
|
||||
static displayName = 'MainLayout';
|
||||
|
||||
static propTypes = {
|
||||
history: PropTypes.object,
|
||||
location: PropTypes.object,
|
||||
locale: PropTypes.object,
|
||||
children: PropTypes.any,
|
||||
location: PropTypes.object,
|
||||
history: PropTypes.object,
|
||||
version: PropTypes.any,
|
||||
functionMode: PropTypes.any,
|
||||
getState: PropTypes.func,
|
||||
functionMode: PropTypes.string,
|
||||
children: PropTypes.object,
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.deepNav = [];
|
||||
this.oneLevelNavArr = {}; // 平行导航map
|
||||
this.state = {
|
||||
navList: [..._menu.data],
|
||||
leftBarClose: false,
|
||||
showLink: null,
|
||||
navRow: [],
|
||||
noChild: false,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.props.getState();
|
||||
this.refreshNav();
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.props.history.goBack();
|
||||
}
|
||||
|
||||
nacosToggleNav(id, event) {
|
||||
event.preventDefault();
|
||||
const nowNav = document.getElementById(id);
|
||||
const iconClass = nowNav.querySelector('.iconshow');
|
||||
const subNav = nowNav.querySelector('.subnavlist');
|
||||
const { classList } = iconClass;
|
||||
let tmpClassName = 'iconshow ';
|
||||
for (let i = 0; i < classList.length; i++) {
|
||||
if (classList[i] === 'icon-arrow-down') {
|
||||
subNav.style.display = 'none';
|
||||
subNav.className += ' hidden';
|
||||
tmpClassName += 'icon-arrow-right';
|
||||
}
|
||||
if (classList[i] === 'icon-arrow-right') {
|
||||
tmpClassName += 'icon-arrow-down';
|
||||
subNav.className = subNav.className.replace(/hidden/g, '');
|
||||
subNav.style.display = 'block';
|
||||
}
|
||||
}
|
||||
iconClass.className = tmpClassName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Click the back button
|
||||
* TODO: this.props.history.goBack(); ???
|
||||
* @param url
|
||||
*/
|
||||
nacosGoBack(url) {
|
||||
const params = window.location.hash.split('?')[1];
|
||||
const urlArr = params.split('&') || [];
|
||||
const queryParams = [];
|
||||
for (let i = 0; i < urlArr.length; i++) {
|
||||
if (
|
||||
urlArr[i].split('=')[0] !== '_k' &&
|
||||
urlArr[i].split('=')[0] !== 'dataId' &&
|
||||
urlArr[i].split('=')[0] !== 'group'
|
||||
) {
|
||||
if (urlArr[i].split('=')[0] === 'searchDataId') {
|
||||
queryParams.push(`dataId=${urlArr[i].split('=')[1]}`);
|
||||
} else if (urlArr[i].split('=')[0] === 'searchGroup') {
|
||||
queryParams.push(`group=${urlArr[i].split('=')[1]}`);
|
||||
} else {
|
||||
queryParams.push(urlArr[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (localStorage.getItem('namespace')) {
|
||||
queryParams.push(`namespace=${localStorage.getItem('namespace')}`);
|
||||
}
|
||||
this.props.history.push(`/${url}?${queryParams.join('&')}`);
|
||||
}
|
||||
|
||||
nacosEnterBack() {
|
||||
document.getElementById('backarrow').style.color = '#09c';
|
||||
}
|
||||
|
||||
nacosOutBack() {
|
||||
document.getElementById('backarrow').style.color = '#546478';
|
||||
}
|
||||
|
||||
nacosToggleLeftBar() {
|
||||
if (!this.nacosOutDom) return;
|
||||
if (!this.state.leftBarClose) {
|
||||
// 关闭
|
||||
this.nacosOutDom.className = 'viewFramework-product';
|
||||
this.nacosLeftBarDom.style.width = 0;
|
||||
this.nacosBodyDom.style.left = 0;
|
||||
this.nacosToggleIconDom.style.left = 0;
|
||||
} else {
|
||||
this.nacosOutDom.className = 'viewFramework-product viewFramework-product-col-1';
|
||||
this.nacosLeftBarDom.style.width = '180px';
|
||||
this.nacosBodyDom.style.left = '180px';
|
||||
this.nacosToggleIconDom.style.left = '160px';
|
||||
}
|
||||
|
||||
this.setState({
|
||||
leftBarClose: !this.state.leftBarClose,
|
||||
});
|
||||
}
|
||||
|
||||
navTo(url) {
|
||||
if (url !== '/configdetail' && url !== '/configeditor') {
|
||||
// 二级菜单不清空
|
||||
setParams({
|
||||
dataId: '',
|
||||
group: '',
|
||||
});
|
||||
}
|
||||
|
||||
const params = window.location.hash.split('?')[1];
|
||||
const urlArr = params.split('&') || [];
|
||||
const queryParams = [];
|
||||
for (let i = 0; i < urlArr.length; i++) {
|
||||
if (urlArr[i].split('=')[0] !== '_k') {
|
||||
queryParams.push(urlArr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
this.props.history.push(`${url}?${queryParams.join('&')}`);
|
||||
const { search } = this.props.location;
|
||||
this.props.history.push([url, search].join(''));
|
||||
}
|
||||
|
||||
nacosSetSpecialNav(item) {
|
||||
item.children.forEach(_item => {
|
||||
const obj = _item;
|
||||
isCurrentPath(url) {
|
||||
const { location } = this.props;
|
||||
return url === location.pathname ? 'current-path' : undefined;
|
||||
}
|
||||
|
||||
if (obj.dontUseChild === true) {
|
||||
obj.parentName = item.title;
|
||||
obj.parentId = item.id;
|
||||
obj.parentPath = `/${item.id}`;
|
||||
this.deepNav.push(obj);
|
||||
}
|
||||
if (_item.children) {
|
||||
this.nacosSetSpecialNav(_item);
|
||||
defaultOpenKeys() {
|
||||
const MenuData = getMenuData(this.props.functionMode);
|
||||
for (let i = 0, len = MenuData.length; i < len; i++) {
|
||||
const { children } = MenuData[i];
|
||||
if (children && children.filter(({ url }) => url === this.props.location.pathname).length) {
|
||||
return String(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
isShowGoBack() {
|
||||
const urls = [];
|
||||
const MenuData = getMenuData(this.props.functionMode);
|
||||
MenuData.forEach(item => {
|
||||
if (item.url) urls.push(item.url);
|
||||
if (item.children) item.children.forEach(({ url }) => urls.push(url));
|
||||
});
|
||||
}
|
||||
|
||||
nacosNavAct(serviceName, match, location) {
|
||||
if (!match) {
|
||||
const formatpath = location.pathname.substr(1); // 得到当前路径
|
||||
const nowpathobj = this.oneLevelNavArr[formatpath]; // 根据平行导航匹配父类
|
||||
if (nowpathobj) {
|
||||
if (nowpathobj.parent === serviceName) {
|
||||
// 如果父类等于当前的导航则高亮
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
nacosLoopNavDeeply(data, parentServiceName) {
|
||||
// 深度遍历获取所有的导航数据
|
||||
data.forEach(item => {
|
||||
if (item) {
|
||||
const navObj = item;
|
||||
|
||||
const _parentServiceName = item.serviceName;
|
||||
navObj.parentServiceName = parentServiceName;
|
||||
this.oneLevelNavArr[item.serviceName] = navObj; // 得到每一个层级的导航映射
|
||||
if (item.children && item.children.length > 0) {
|
||||
this.nacosLoopNavDeeply(item.children, _parentServiceName);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
activeNav(id) {
|
||||
if (this.preActNav) {
|
||||
this.preActNav.removeClass('active');
|
||||
}
|
||||
const nowNav = $(`#${id}`);
|
||||
nowNav.addClass('active');
|
||||
this.preActNav = nowNav;
|
||||
}
|
||||
|
||||
nacosLoopNav(data, _index = 0, parent) {
|
||||
const { locale = {}, location = {} } = this.props;
|
||||
const { pathname } = location;
|
||||
let index = _index;
|
||||
// 遍历导航,只显示2级
|
||||
const self = this;
|
||||
return data.map(item => {
|
||||
if (!item) return '';
|
||||
index++;
|
||||
if (item.dontUseChild === true) return '';
|
||||
if (item.children && item.children.length > 0) {
|
||||
if (item.isVirtual) {
|
||||
// 如果是虚拟菜单需要增加展开箭头
|
||||
const icon = item.isExtend ? (
|
||||
<span className="icon-arrow-down iconshow" />
|
||||
) : (
|
||||
<span className="icon-arrow-right iconshow" />
|
||||
);
|
||||
const hiddenClass = item.isExtend ? '' : 'hidden';
|
||||
return (
|
||||
<li
|
||||
style={{ display: item.enable ? 'block' : 'none' }}
|
||||
key={`${item.serviceName}`}
|
||||
data-spm-click={`gostr=/aliyun;locaid=${item.serviceName}`}
|
||||
id={`${item.serviceName}`}
|
||||
>
|
||||
<div>
|
||||
<a href="" onClick={this.nacosToggleNav.bind(this, item.serviceName)}>
|
||||
<div className="nav-icon">{icon}</div>
|
||||
<div className="nav-title">{locale[item.serviceName]}</div>
|
||||
</a>
|
||||
</div>
|
||||
<ul className={`subnavlist ${hiddenClass}`}>
|
||||
{self.nacosLoopNav(item.children, index)}
|
||||
</ul>
|
||||
</li>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<li
|
||||
className={pathname === `/${item.serviceName}` ? 'selected' : ''}
|
||||
key={`${item.serviceName}`}
|
||||
data-spm-click={`gostr=/aliyun;locaid=${item.serviceName}`}
|
||||
onClick={this.navTo.bind(this, `/${item.serviceName}`)}
|
||||
>
|
||||
<a
|
||||
href="javascript:;"
|
||||
id={`${item.serviceName}`}
|
||||
onClick={this.activeNav.bind(this, `nav${index}`)}
|
||||
>
|
||||
<div className="nav-icon" />
|
||||
<div className="nav-title">{locale[item.serviceName]}</div>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
}
|
||||
return (
|
||||
<li
|
||||
className={pathname === `/${item.serviceName}` ? 'selected' : ''}
|
||||
key={`${item.serviceName}`}
|
||||
data-spm-click={`gostr=/aliyun;locaid=${item.serviceName}`}
|
||||
onClick={this.navTo.bind(this, `/${item.serviceName}`)}
|
||||
>
|
||||
<a
|
||||
href={'javascript:;'}
|
||||
id={`${item.serviceName}`}
|
||||
onClick={this.activeNav.bind(this, `nav${index}`)}
|
||||
>
|
||||
<div className="nav-icon" />
|
||||
<div className="nav-title">{locale[item.serviceName]}</div>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
nacosGetNav(navList) {
|
||||
let navRow = ''; // 导航
|
||||
if (navList.length > 0) {
|
||||
navRow = <ul>{this.nacosLoopNav(navList)}</ul>;
|
||||
this.nacosLoopNavDeeply(navList); // 深度遍历导航树获得平行map
|
||||
}
|
||||
return navRow;
|
||||
}
|
||||
|
||||
renderNav() {
|
||||
const { navList } = this.state;
|
||||
this.nacosLeftBarDom = document.getElementById('viewFramework-product-navbar');
|
||||
this.nacosBodyDom = document.getElementById('viewFramework-product-body');
|
||||
this.nacosToggleIconDom = document.getElementById('viewFramework-product-navbar-collapse');
|
||||
this.nacosOutDom = document.getElementById('page-header-mask');
|
||||
const defaultNav = '/configurationManagement';
|
||||
this.props.history.listen(location => {
|
||||
if (this.preSimplePath && this.preSimplePath !== '/') {
|
||||
if (location.pathname.indexOf(this.preSimplePath) !== -1) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const simplePath = window.location.hash.split('?')[0];
|
||||
const navName = simplePath.substr('2');
|
||||
this.preSimplePath = simplePath;
|
||||
|
||||
if (navName === '') {
|
||||
this.props.history.push(defaultNav);
|
||||
setTimeout(() => {
|
||||
this.activeNav('configurationManagement');
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const nowNavObj = this.oneLevelNavArr[navName];
|
||||
if (!nowNavObj) {
|
||||
this.setState({
|
||||
noChild: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
const { parentServiceName } = nowNavObj;
|
||||
|
||||
const parentNav = this.oneLevelNavArr[parentServiceName];
|
||||
if (simplePath !== '/' && nowNavObj && parentNav && !parentNav.isVirtual) {
|
||||
this.setState({
|
||||
showLink: (
|
||||
<div>
|
||||
<Icon
|
||||
type="arrow-left"
|
||||
onClick={this.nacosGoBack.bind(this, parentServiceName)}
|
||||
id={'backarrow'}
|
||||
onMouseOver={this.nacosEnterBack.bind(this)}
|
||||
onMouseLeave={this.nacosOutBack.bind(this)}
|
||||
style={{
|
||||
marginLeft: 77,
|
||||
marginTop: 0,
|
||||
fontWeight: 'bold',
|
||||
cursor: 'pointer',
|
||||
color: '#546478',
|
||||
fontSize: '20px',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
|
||||
navRow: <ul>{this.nacosLoopNav([nowNavObj])}</ul>,
|
||||
});
|
||||
setTimeout(() => {
|
||||
const navid = navName;
|
||||
this.activeNav(navid);
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
showLink: null,
|
||||
navRow: <ul>{this.nacosLoopNav(navList)}</ul>,
|
||||
});
|
||||
setTimeout(() => {
|
||||
const navid = navName;
|
||||
this.activeNav(navid);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
refreshNav() {
|
||||
const { navList } = this.state;
|
||||
const { location, history, functionMode } = this.props;
|
||||
const [configUrl, serviceUrl, clusterUrl] = [
|
||||
'/configurationManagement',
|
||||
'/serviceManagement',
|
||||
'/clusterManagement',
|
||||
];
|
||||
this.setState(
|
||||
{
|
||||
navList: navList.map(item => {
|
||||
if (
|
||||
item.serviceName === 'configurationManagementVirtual' &&
|
||||
(functionMode === null || functionMode === 'config')
|
||||
) {
|
||||
item.enable = true;
|
||||
}
|
||||
if (
|
||||
item.serviceName === 'serviceManagementVirtual' &&
|
||||
(functionMode === null || functionMode === 'naming')
|
||||
) {
|
||||
item.enable = true;
|
||||
}
|
||||
if (
|
||||
item.serviceName === 'clusterManagementVirtual' &&
|
||||
(functionMode === null || functionMode === 'cluster')
|
||||
) {
|
||||
item.enable = true;
|
||||
}
|
||||
return item;
|
||||
}),
|
||||
},
|
||||
() => this.setState({ navRow: this.nacosGetNav(navList) }, () => this.renderNav())
|
||||
);
|
||||
if (functionMode === 'config' && location.pathname === serviceUrl) {
|
||||
history.push(configUrl);
|
||||
}
|
||||
if (functionMode === 'naming' && location.pathname === configUrl) {
|
||||
history.push(serviceUrl);
|
||||
}
|
||||
if (functionMode === 'cluster' && location.pathname === clusterUrl) {
|
||||
history.push(clusterUrl);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps() {
|
||||
setTimeout(() => this.refreshNav());
|
||||
return !urls.includes(this.props.location.pathname);
|
||||
}
|
||||
|
||||
render() {
|
||||
const { locale = {}, version } = this.props;
|
||||
const { nacosName, doesNotExist } = locale;
|
||||
const { showLink, navRow, leftBarClose, noChild } = this.state;
|
||||
const { locale = {}, version, functionMode } = this.props;
|
||||
const MenuData = getMenuData(functionMode);
|
||||
return (
|
||||
<div className="viewFramework-product" style={{ top: 66 }}>
|
||||
<>
|
||||
<Header />
|
||||
<div
|
||||
className="viewFramework-product-navbar"
|
||||
style={{ width: 180, marginLeft: 0 }}
|
||||
id="viewFramework-product-navbar"
|
||||
data-spm="acm_nav"
|
||||
>
|
||||
<div className="viewFramework-product-navbar-removed">
|
||||
<div>
|
||||
<div className="product-nav-scene product-nav-main-scene">
|
||||
{showLink ? (
|
||||
<div className="product-nav-icon env" style={{ height: 80, paddingTop: 25 }}>
|
||||
{showLink}
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
style={{ textIndent: 0, display: !version ? 'none' : 'block' }}
|
||||
className="product-nav-title"
|
||||
title={nacosName}
|
||||
>
|
||||
<span>{nacosName}</span>
|
||||
<span style={{ marginLeft: 5 }}>{version}</span>
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
className="product-nav-list"
|
||||
style={{ position: 'relative', top: 0, height: '100%' }}
|
||||
>
|
||||
{navRow}
|
||||
</div>
|
||||
<div className="main-container">
|
||||
<div className="left-panel">
|
||||
{this.isShowGoBack() ? (
|
||||
<div className="go-back" onClick={() => this.goBack()}>
|
||||
<Icon type="arrow-left" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="viewFramework-product-navbar-collapse"
|
||||
id="viewFramework-product-navbar-collapse"
|
||||
onClick={this.nacosToggleLeftBar.bind(this)}
|
||||
>
|
||||
<div className="product-navbar-collapse-inner">
|
||||
<div className="product-navbar-collapse-bg" />
|
||||
<div className="product-navbar-collapse">
|
||||
{leftBarClose ? (
|
||||
<span className="icon-collapse-right" style={{ display: 'block' }} />
|
||||
) : (
|
||||
<span className="icon-collapse-left" />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="viewFramework-product-body"
|
||||
style={{ marginLeft: 180 }}
|
||||
id="viewFramework-product-body"
|
||||
>
|
||||
<div>
|
||||
{!noChild ? (
|
||||
<div>{this.props.children}</div>
|
||||
) : (
|
||||
<div
|
||||
style={{
|
||||
height: 300,
|
||||
lineHeight: 300,
|
||||
textAlign: 'center',
|
||||
fontSize: 18,
|
||||
}}
|
||||
>
|
||||
{doesNotExist}
|
||||
</div>
|
||||
<>
|
||||
<h1 className="nav-title">
|
||||
{locale.nacosName}
|
||||
<span>{version}</span>
|
||||
</h1>
|
||||
<Menu
|
||||
defaultOpenKeys={this.defaultOpenKeys()}
|
||||
className="nav-menu"
|
||||
openMode="single"
|
||||
>
|
||||
{MenuData.map((subMenu, idx) => {
|
||||
if (subMenu.children) {
|
||||
return (
|
||||
<SubMenu key={String(idx)} label={locale[subMenu.key]}>
|
||||
{subMenu.children.map((item, i) => (
|
||||
<Item
|
||||
key={[idx, i].join('-')}
|
||||
onClick={() => this.navTo(item.url)}
|
||||
className={this.isCurrentPath(item.url)}
|
||||
>
|
||||
{locale[item.key]}
|
||||
</Item>
|
||||
))}
|
||||
</SubMenu>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Item
|
||||
key={idx}
|
||||
className={['first-menu', this.isCurrentPath(subMenu.url)]
|
||||
.filter(c => c)
|
||||
.join(' ')}
|
||||
onClick={() => this.navTo(subMenu.url)}
|
||||
>
|
||||
{locale[subMenu.key]}
|
||||
</Item>
|
||||
);
|
||||
})}
|
||||
</Menu>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<div className="right-panel">{this.props.children}</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,14 +11,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
.header-container {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
background-color: #fff;
|
||||
}
|
||||
.header-container-primary {
|
||||
background: #252a2f;
|
||||
}
|
||||
@@ -1396,5 +1388,63 @@ h6 {
|
||||
}
|
||||
|
||||
.product-nav-list li.selected a {
|
||||
background-color: #F4F6F8;
|
||||
background-color: #f4f6f8;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
height: calc(100vh - 66px);
|
||||
.left-panel,
|
||||
.right-panel {
|
||||
float: left;
|
||||
height: 100%;
|
||||
}
|
||||
.left-panel {
|
||||
width: 180px;
|
||||
background-color: #eaedf1;
|
||||
}
|
||||
.right-panel {
|
||||
width: calc(100% - 180px);
|
||||
padding: 10px;
|
||||
overflow: scroll;
|
||||
}
|
||||
.nav-title {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
line-height: 70px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
background-color: #d9dee4;
|
||||
span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.nav-menu {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
line-height: 40px;
|
||||
div.next-menu-item,
|
||||
.first-menu > .next-menu-item-inner {
|
||||
color: #333;
|
||||
}
|
||||
.next-menu-item-inner {
|
||||
height: 40px;
|
||||
color: #666;
|
||||
}
|
||||
.current-path {
|
||||
background-color: #f2f3f7;
|
||||
}
|
||||
}
|
||||
.go-back {
|
||||
text-align: center;
|
||||
color: rgb(84, 100, 120);
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding: 10px 0;
|
||||
margin-top: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,10 @@ const I18N_CONF = {
|
||||
namespace: 'Namespace',
|
||||
clusterManagementVirtual: 'ClusterManagement',
|
||||
clusterManagement: 'Cluster Node List',
|
||||
authorityControl: 'Authority Control',
|
||||
userList: 'User List',
|
||||
roleManagement: 'Role Management',
|
||||
privilegeManagement: 'Privilege Management',
|
||||
},
|
||||
Password: {
|
||||
passwordNotConsistent: 'The passwords are not consistent',
|
||||
@@ -277,6 +281,7 @@ const I18N_CONF = {
|
||||
importSuccBegin: 'The import was successful,with ',
|
||||
importSuccEnd: 'configuration items imported',
|
||||
importFail: 'Import failed',
|
||||
importFail403: 'Unauthorized!',
|
||||
importDataValidationError: 'No legitimate data was read, please check the imported data file.',
|
||||
metadataIllegal: 'The imported metadata file is illegal',
|
||||
namespaceNotExist: 'namespace does not exist',
|
||||
@@ -313,6 +318,7 @@ const I18N_CONF = {
|
||||
delSelectedAlertTitle: 'Delete config',
|
||||
delSelectedAlertContent: 'please select the configuration to delete',
|
||||
delSuccessMsg: 'delete successful',
|
||||
cloneEditableTitle: 'Modify Data Id and Group (optional)',
|
||||
},
|
||||
NewConfig: {
|
||||
newListingMain: 'Create Configuration',
|
||||
@@ -463,9 +469,14 @@ const I18N_CONF = {
|
||||
newnamespce: 'Create Namespace',
|
||||
loading: 'Loading...',
|
||||
name: 'Namespace:',
|
||||
namespaceId: 'Namespace ID(automatically generated if not filled):',
|
||||
namespaceIdTooLong: 'The namespace ID length cannot exceed 128',
|
||||
namespacenotnull: 'Namespace cannot be empty',
|
||||
namespacedescnotnull: 'Namespace description cannot be empty',
|
||||
description: 'Description:',
|
||||
namespaceIdAlreadyExist: 'namespaceId already exist',
|
||||
newnamespceFailedMessage:
|
||||
'namespaceId format is incorrect/namespaceId length greater than 128/namespaceId already exist',
|
||||
},
|
||||
NameSpaceList: {
|
||||
notice: 'Notice',
|
||||
@@ -499,6 +510,86 @@ const I18N_CONF = {
|
||||
update: 'Update',
|
||||
insert: 'Insert',
|
||||
},
|
||||
UserManagement: {
|
||||
userManagement: 'User Management',
|
||||
createUser: 'Create user',
|
||||
resetPassword: 'Edit',
|
||||
deleteUser: 'Delete',
|
||||
deleteUserTip: 'Do you want to delete this user?',
|
||||
username: 'Username',
|
||||
password: 'Password',
|
||||
operation: 'Operation',
|
||||
},
|
||||
NewUser: {
|
||||
createUser: 'Create user',
|
||||
username: 'Username',
|
||||
password: 'Password',
|
||||
rePassword: 'Repeat',
|
||||
usernamePlaceholder: 'Please Enter Username',
|
||||
passwordPlaceholder: 'Please Enter Password',
|
||||
rePasswordPlaceholder: 'Please Enter Repeat Password',
|
||||
usernameError: 'User name cannot be empty!',
|
||||
passwordError: 'Password cannot be empty!',
|
||||
rePasswordError: 'Repeat Password cannot be empty!',
|
||||
rePasswordError2: 'Passwords are inconsistent!',
|
||||
},
|
||||
PasswordReset: {
|
||||
resetPassword: 'Password Reset',
|
||||
username: 'Username',
|
||||
password: 'Password',
|
||||
rePassword: 'Repeat',
|
||||
passwordPlaceholder: 'Please Enter Password',
|
||||
rePasswordPlaceholder: 'Please Enter Repeat Password',
|
||||
passwordError: 'Password cannot be empty!',
|
||||
rePasswordError: 'Repeat Password cannot be empty!',
|
||||
rePasswordError2: 'Passwords are inconsistent!',
|
||||
},
|
||||
RolesManagement: {
|
||||
roleManagement: 'Role management',
|
||||
bindingRoles: 'Binding roles',
|
||||
role: 'Role',
|
||||
username: 'Username',
|
||||
operation: 'Operation',
|
||||
deleteRole: 'Delete',
|
||||
deleteRoleTip: 'Do you want to delete this role?',
|
||||
},
|
||||
NewRole: {
|
||||
bindingRoles: 'Binding roles',
|
||||
username: 'Username',
|
||||
role: 'Role',
|
||||
usernamePlaceholder: 'Please Enter Username',
|
||||
rolePlaceholder: 'Please Enter Role',
|
||||
usernameError: 'User name cannot be empty!',
|
||||
roleError: 'Role cannot be empty!',
|
||||
},
|
||||
PermissionsManagement: {
|
||||
privilegeManagement: 'Permissions Management',
|
||||
addPermission: 'Add Permission',
|
||||
role: 'Role',
|
||||
resource: 'Resource',
|
||||
action: 'Action',
|
||||
operation: 'Operation',
|
||||
deletePermission: 'Delete',
|
||||
deletePermissionTip: 'Do you want to delete this permission?',
|
||||
readOnly: 'read only',
|
||||
writeOnly: 'write only',
|
||||
readWrite: 'Read and write',
|
||||
},
|
||||
NewPermissions: {
|
||||
addPermission: 'Add Permission',
|
||||
role: 'Role',
|
||||
resource: 'Resource',
|
||||
action: 'Action',
|
||||
resourcePlaceholder: 'Please select resources',
|
||||
rolePlaceholder: 'Please enter Role',
|
||||
actionPlaceholder: 'Please select Action',
|
||||
resourceError: 'Resource cannot be empty!',
|
||||
roleError: 'Role cannot be empty!',
|
||||
actionError: 'Action cannot be empty!',
|
||||
readOnly: 'read only',
|
||||
writeOnly: 'write only',
|
||||
readWrite: 'Read and write',
|
||||
},
|
||||
};
|
||||
|
||||
export default I18N_CONF;
|
||||
@@ -50,6 +50,10 @@ const I18N_CONF = {
|
||||
namespace: '命名空间',
|
||||
clusterManagementVirtual: '集群管理',
|
||||
clusterManagement: '节点列表',
|
||||
authorityControl: '权限控制',
|
||||
userList: '用户列表',
|
||||
roleManagement: '角色管理',
|
||||
privilegeManagement: '权限管理',
|
||||
},
|
||||
Password: {
|
||||
passwordNotConsistent: '两次输入密码不一致',
|
||||
@@ -276,6 +280,7 @@ const I18N_CONF = {
|
||||
importSuccBegin: '导入成功,导入了',
|
||||
importSuccEnd: '项配置',
|
||||
importFail: '导入失败',
|
||||
importFail403: '没有权限!',
|
||||
importDataValidationError: '未读取到合法数据,请检查导入的数据文件。',
|
||||
metadataIllegal: '导入的元数据文件非法',
|
||||
namespaceNotExist: 'namespace 不存在',
|
||||
@@ -311,6 +316,7 @@ const I18N_CONF = {
|
||||
delSelectedAlertTitle: '配置删除',
|
||||
delSelectedAlertContent: '请选择要删除的配置',
|
||||
delSuccessMsg: '删除成功',
|
||||
cloneEditableTitle: '修改 Data Id 和 Group (可选操作)',
|
||||
},
|
||||
NewConfig: {
|
||||
newListingMain: '新建配置',
|
||||
@@ -461,9 +467,13 @@ const I18N_CONF = {
|
||||
newnamespce: '新建命名空间',
|
||||
loading: '加载中...',
|
||||
name: '命名空间名:',
|
||||
namespaceId: '命名空间ID(不填则自动生成):',
|
||||
namespaceIdTooLong: '命名空间ID长度不能超过128',
|
||||
namespacenotnull: '命名空间不能为空',
|
||||
namespacedescnotnull: '命名空间描述不能为空',
|
||||
description: '描述:',
|
||||
namespaceIdAlreadyExist: 'namespaceId已存在',
|
||||
newnamespceFailedMessage: 'namespaceId格式不正确/namespaceId长度大于128/namespaceId已存在',
|
||||
},
|
||||
NameSpaceList: {
|
||||
notice: '提示',
|
||||
@@ -497,6 +507,86 @@ const I18N_CONF = {
|
||||
update: '更新',
|
||||
insert: '插入',
|
||||
},
|
||||
UserManagement: {
|
||||
userManagement: '用户管理',
|
||||
createUser: '创建用户',
|
||||
resetPassword: '修改',
|
||||
deleteUser: '删除',
|
||||
deleteUserTip: '是否要删除该用户?',
|
||||
username: '用户名',
|
||||
password: '密码',
|
||||
operation: '操作',
|
||||
},
|
||||
NewUser: {
|
||||
createUser: '创建用户',
|
||||
username: '用户名',
|
||||
password: '密码',
|
||||
rePassword: '确认密码',
|
||||
usernamePlaceholder: '请输入用户名',
|
||||
passwordPlaceholder: '请输入密码',
|
||||
rePasswordPlaceholder: '请输入确认密码',
|
||||
usernameError: '用户名不能为空!',
|
||||
passwordError: '密码不能为空!',
|
||||
rePasswordError: '确认密码不能为空!',
|
||||
rePasswordError2: '两次输入密码不一致!',
|
||||
},
|
||||
PasswordReset: {
|
||||
resetPassword: '密码重置',
|
||||
username: '用户名',
|
||||
password: '密码',
|
||||
rePassword: '确认密码',
|
||||
passwordError: '密码不能为空!',
|
||||
passwordPlaceholder: '请输入密码',
|
||||
rePasswordPlaceholder: '请输入确认密码',
|
||||
rePasswordError: '确认密码不能为空!',
|
||||
rePasswordError2: '两次输入密码不一致!',
|
||||
},
|
||||
RolesManagement: {
|
||||
roleManagement: '角色管理',
|
||||
bindingRoles: '绑定角色',
|
||||
role: '角色名',
|
||||
username: '用户名',
|
||||
operation: '操作',
|
||||
deleteRole: '删除',
|
||||
deleteRoleTip: '是否要删除该角色?',
|
||||
},
|
||||
NewRole: {
|
||||
bindingRoles: '绑定角色',
|
||||
username: '用户名',
|
||||
role: '角色名',
|
||||
usernamePlaceholder: '请输入用户名',
|
||||
rolePlaceholder: '请输入角色名',
|
||||
usernameError: '用户名不能为空!',
|
||||
roleError: '角色名不能为空!',
|
||||
},
|
||||
PermissionsManagement: {
|
||||
privilegeManagement: '权限管理',
|
||||
addPermission: '添加权限',
|
||||
role: '角色名',
|
||||
resource: '资源',
|
||||
action: '动作',
|
||||
operation: '操作',
|
||||
deletePermission: '删除',
|
||||
deletePermissionTip: '是否要删除该权限?',
|
||||
readOnly: '只读',
|
||||
writeOnly: '只写',
|
||||
readWrite: '读写',
|
||||
},
|
||||
NewPermissions: {
|
||||
addPermission: '添加权限',
|
||||
role: '角色名',
|
||||
resource: '资源',
|
||||
action: '动作',
|
||||
resourcePlaceholder: '请选择资源',
|
||||
rolePlaceholder: '请输入角色名',
|
||||
actionPlaceholder: '请选择动作',
|
||||
resourceError: '资源不能为空!',
|
||||
roleError: '角色名不能为空!',
|
||||
actionError: '动作不能为空!',
|
||||
readOnly: '只读',
|
||||
writeOnly: '只写',
|
||||
readWrite: '读写',
|
||||
},
|
||||
};
|
||||
|
||||
export default I18N_CONF;
|
||||
@@ -1,295 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
data: [
|
||||
{
|
||||
enable: false,
|
||||
isExtend: true,
|
||||
name: '配置管理',
|
||||
title: '配置管理',
|
||||
isVirtual: true,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'configurationManagementVirtual',
|
||||
link: 'configurationManagementVirtual',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.configurationManagementVirtual',
|
||||
useRouter: false,
|
||||
id: 'com.alibaba.nacos.page.configurationManagementVirtual',
|
||||
children: [
|
||||
{
|
||||
isExtend: false,
|
||||
name: '配置列表',
|
||||
title: '配置列表',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'configurationManagement',
|
||||
link: 'configurationManagement',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
dontUseChild: false,
|
||||
registerName: 'com.alibaba.nacos.page.configurationManagement',
|
||||
useRouter: false,
|
||||
id: 'configurationManagement',
|
||||
children: [
|
||||
{
|
||||
isExtend: false,
|
||||
name: '配置详情',
|
||||
title: '配置详情',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'configdetail',
|
||||
link: 'Configdetail',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
dontUseChild: false,
|
||||
registerName: 'com.alibaba.nacos.page.configdetail',
|
||||
useRouter: false,
|
||||
id: 'configdetail',
|
||||
},
|
||||
{
|
||||
isExtend: false,
|
||||
name: '同步配置',
|
||||
title: '同步配置',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'configsync',
|
||||
link: 'configsync',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
dontUseChild: true,
|
||||
registerName: 'com.alibaba.nacos.page.configsync',
|
||||
useRouter: false,
|
||||
id: 'configsync',
|
||||
},
|
||||
{
|
||||
isExtend: false,
|
||||
name: '配置编辑',
|
||||
title: '配置编辑',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'configeditor',
|
||||
link: 'configeditor',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.configeditor',
|
||||
useRouter: false,
|
||||
id: 'configeditor',
|
||||
},
|
||||
{
|
||||
isExtend: false,
|
||||
name: '新建配置',
|
||||
title: '新建配置',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'newconfig',
|
||||
link: 'newconfig',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.newconfig',
|
||||
useRouter: false,
|
||||
id: 'newconfig',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
isExtend: false,
|
||||
name: '历史版本',
|
||||
title: '历史版本',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
children: [
|
||||
{
|
||||
isExtend: false,
|
||||
name: '配置回滚',
|
||||
title: '配置回滚',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'configRollback',
|
||||
link: 'configRollback',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.configRollback',
|
||||
useRouter: false,
|
||||
id: 'configRollback',
|
||||
},
|
||||
{
|
||||
isExtend: false,
|
||||
name: '历史详情',
|
||||
title: '历史详情',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'historyDetail',
|
||||
link: 'historyDetail',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.historyDetail',
|
||||
useRouter: false,
|
||||
id: 'historyDetail',
|
||||
},
|
||||
],
|
||||
serviceName: 'historyRollback',
|
||||
link: 'historyRollback',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
dontUseChild: false,
|
||||
registerName: 'com.alibaba.nacos.page.historyRollback',
|
||||
useRouter: false,
|
||||
id: 'historyRollback',
|
||||
},
|
||||
{
|
||||
isExtend: false,
|
||||
name: '监听查询',
|
||||
title: '监听查询',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'listeningToQuery',
|
||||
link: 'listeningToQuery',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.listeningToQuery',
|
||||
useRouter: false,
|
||||
id: 'listeningToQuery',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
enable: false,
|
||||
isExtend: true,
|
||||
name: '服务管理',
|
||||
title: '服务管理',
|
||||
isVirtual: true,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'serviceManagementVirtual',
|
||||
link: 'serviceManagementVirtual',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.serviceManagementVirtual',
|
||||
useRouter: false,
|
||||
id: 'com.alibaba.nacos.page.serviceManagementVirtual',
|
||||
children: [
|
||||
{
|
||||
isExtend: false,
|
||||
name: '服务列表',
|
||||
title: '服务列表',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'serviceManagement',
|
||||
link: 'serviceManagement',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.serviceManagement',
|
||||
useRouter: false,
|
||||
id: 'serviceManagement',
|
||||
children: [
|
||||
{
|
||||
isExtend: true,
|
||||
name: '服务详情',
|
||||
title: '服务详情',
|
||||
isVirtual: true,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'serviceDetail',
|
||||
link: 'serviceDetail',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.ServiceDetail',
|
||||
useRouter: false,
|
||||
id: 'serviceDetail',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
isExtend: false,
|
||||
name: '订阅者列表',
|
||||
title: '订阅者列表',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'subscriberList',
|
||||
link: 'subscriberList',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.subscriberList',
|
||||
useRouter: false,
|
||||
id: 'subscriberList',
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
enable: true,
|
||||
isExtend: false,
|
||||
name: '命名空间',
|
||||
title: '命名空间',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'namespace',
|
||||
link: 'namespace',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
dontUseChild: false,
|
||||
registerName: 'com.alibaba.nacos.page.namespace',
|
||||
useRouter: false,
|
||||
id: 'namespace',
|
||||
},
|
||||
{
|
||||
enable: true,
|
||||
isExtend: false,
|
||||
name: '修改密码',
|
||||
title: '修改密码',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'password',
|
||||
link: 'password',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
dontUseChild: true,
|
||||
registerName: 'com.alibaba.nacos.page.password',
|
||||
useRouter: false,
|
||||
id: 'password',
|
||||
},
|
||||
{
|
||||
enable: false,
|
||||
isExtend: true,
|
||||
name: '集群管理',
|
||||
title: '集群管理',
|
||||
isVirtual: true,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'clusterManagementVirtual',
|
||||
link: 'clusterManagementVirtual',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.clusterManagementVirtual',
|
||||
useRouter: false,
|
||||
id: 'com.alibaba.nacos.page.clusterManagementVirtual',
|
||||
children: [
|
||||
{
|
||||
isExtend: false,
|
||||
name: '节点状态',
|
||||
title: '节点状态',
|
||||
isVirtual: false,
|
||||
projectName: 'nacos',
|
||||
serviceName: 'clusterManagement',
|
||||
link: 'clusterManagement',
|
||||
hasFusion: true,
|
||||
template: '',
|
||||
registerName: 'com.alibaba.nacos.page.clusterManagement',
|
||||
useRouter: false,
|
||||
id: 'clusterManagement',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
defaultKey: 'configurationManagement',
|
||||
projectName: 'nacos',
|
||||
};
|
||||
+7
-3
@@ -14,6 +14,7 @@
|
||||
import React from 'react';
|
||||
import { Button, ConfigProvider, Dialog, Field, Form, Input, Loading, Tab } from '@alifd/next';
|
||||
import { getParams, request } from '../../../globalLib';
|
||||
import { generateUrl } from '../../../utils/nacosutil';
|
||||
|
||||
import './index.scss';
|
||||
import PropTypes from 'prop-types';
|
||||
@@ -140,9 +141,12 @@ class ConfigDetail extends React.Component {
|
||||
|
||||
goList() {
|
||||
this.props.history.push(
|
||||
`/configurationManagement?serverId=${this.serverId}&group=${this.searchGroup}&dataId=${
|
||||
this.searchDataId
|
||||
}&namespace=${this.tenant}`
|
||||
generateUrl('/configurationManagement', {
|
||||
serverId: this.serverId,
|
||||
group: this.searchGroup,
|
||||
dataId: this.searchDataId,
|
||||
namespace: this.tenant,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+13
-18
@@ -14,6 +14,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { getParams } from '../../../globalLib';
|
||||
import { generateUrl } from '../../../utils/nacosutil';
|
||||
import request from '../../../utils/request';
|
||||
import validateContent from 'utils/validateContent';
|
||||
import SuccessDialog from '../../../components/SuccessDialog';
|
||||
@@ -96,7 +97,7 @@ class ConfigEditor extends React.Component {
|
||||
dataId: getParams('dataId').trim(),
|
||||
group,
|
||||
},
|
||||
() =>
|
||||
() => {
|
||||
this.getConfig(true).then(res => {
|
||||
if (!res) {
|
||||
this.getConfig();
|
||||
@@ -107,7 +108,8 @@ class ConfigEditor extends React.Component {
|
||||
tabActiveKey: 'beta',
|
||||
betaPublishSuccess: true,
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
);
|
||||
} else {
|
||||
if (group) {
|
||||
@@ -173,7 +175,6 @@ class ConfigEditor extends React.Component {
|
||||
}
|
||||
|
||||
clickTab(tabActiveKey) {
|
||||
console.log('tabActiveKey', tabActiveKey, tabActiveKey === 'beta');
|
||||
this.setState({ tabActiveKey }, () => this.getConfig(tabActiveKey === 'beta'));
|
||||
}
|
||||
|
||||
@@ -215,26 +216,20 @@ class ConfigEditor extends React.Component {
|
||||
}
|
||||
|
||||
_publishConfig(beta = false) {
|
||||
const { locale } = this.props;
|
||||
const { betaIps, isNewConfig } = this.state;
|
||||
const headers = { 'Content-Type': 'application/x-www-form-urlencoded' };
|
||||
if (beta) {
|
||||
headers.betaIps = betaIps;
|
||||
}
|
||||
const data = { ...this.state.form, content: this.getCodeVal() };
|
||||
const form = { ...this.state.form, content: this.getCodeVal() };
|
||||
const data = new FormData();
|
||||
Object.keys(form).forEach(key => {
|
||||
data.append(key, form[key]);
|
||||
});
|
||||
return request({
|
||||
url: 'v1/cs/configs',
|
||||
method: 'post',
|
||||
data,
|
||||
transformRequest: [
|
||||
function(data) {
|
||||
let ret = '';
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&';
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
],
|
||||
headers,
|
||||
}).then(res => {
|
||||
if (res) {
|
||||
@@ -315,11 +310,11 @@ class ConfigEditor extends React.Component {
|
||||
|
||||
goBack() {
|
||||
const serverId = getParams('serverId') || '';
|
||||
const tenant = getParams('namespace');
|
||||
const searchGroup = getParams('searchGroup') || '';
|
||||
const searchDataId = getParams('searchDataId') || '';
|
||||
const namespace = getParams('namespace');
|
||||
const group = getParams('searchGroup') || '';
|
||||
const dataId = getParams('searchDataId') || '';
|
||||
this.props.history.push(
|
||||
`/configurationManagement?serverId=${serverId}&group=${searchGroup}&dataId=${searchDataId}&namespace=${tenant}`
|
||||
generateUrl('/configurationManagement', { serverId, group, dataId, namespace })
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -14,6 +14,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { getParams, request } from '../../../globalLib';
|
||||
import { generateUrl } from '../../../utils/nacosutil';
|
||||
import { Button, ConfigProvider, Dialog, Field, Form, Input } from '@alifd/next';
|
||||
|
||||
import './index.scss';
|
||||
@@ -96,11 +97,10 @@ class ConfigRollback extends React.Component {
|
||||
}
|
||||
|
||||
goList() {
|
||||
const tenant = getParams('namespace');
|
||||
const namespace = getParams('namespace');
|
||||
const { serverId, dataId, group } = this;
|
||||
this.props.history.push(
|
||||
`/historyRollback?serverId=${this.serverId}&group=${this.group}&dataId=${
|
||||
this.dataId
|
||||
}&namespace=${tenant}`
|
||||
generateUrl('/historyRollback', { serverId, dataId, group, namespace })
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+7
-13
@@ -16,6 +16,7 @@ import PropTypes from 'prop-types';
|
||||
import { Button, Checkbox, ConfigProvider, Dialog, Field, Form, Input, Loading } from '@alifd/next';
|
||||
import SuccessDialog from '../../../components/SuccessDialog';
|
||||
import { getParams, request } from '../../../globalLib';
|
||||
import { generateUrl } from '../../../utils/nacosutil';
|
||||
|
||||
import './index.scss';
|
||||
|
||||
@@ -91,13 +92,9 @@ class ConfigSync extends React.Component {
|
||||
const { locale = {} } = this.props;
|
||||
this.tenant = getParams('namespace') || '';
|
||||
this.serverId = getParams('serverId') || 'center';
|
||||
let url = `/diamond-ops/configList/detail/serverId/${this.serverId}/dataId/${
|
||||
this.dataId
|
||||
}/group/${this.group}/tenant/${this.tenant}?id=`;
|
||||
let url = `/diamond-ops/configList/detail/serverId/${this.serverId}/dataId/${this.dataId}/group/${this.group}/tenant/${this.tenant}?id=`;
|
||||
if (this.tenant === 'global' || !this.tenant) {
|
||||
url = `/diamond-ops/configList/detail/serverId/${this.serverId}/dataId/${this.dataId}/group/${
|
||||
this.group
|
||||
}?id=`;
|
||||
url = `/diamond-ops/configList/detail/serverId/${this.serverId}/dataId/${this.dataId}/group/${this.group}?id=`;
|
||||
}
|
||||
request({
|
||||
url,
|
||||
@@ -168,9 +165,7 @@ class ConfigSync extends React.Component {
|
||||
request({
|
||||
type: 'put',
|
||||
contentType: 'application/json',
|
||||
url: `/diamond-ops/configList/serverId/${this.serverId}/dataId/${payload.dataId}/group/${
|
||||
payload.group
|
||||
}?id=`,
|
||||
url: `/diamond-ops/configList/serverId/${this.serverId}/dataId/${payload.dataId}/group/${payload.group}?id=`,
|
||||
data: JSON.stringify(payload),
|
||||
success(res) {
|
||||
const _payload = {};
|
||||
@@ -193,7 +188,7 @@ class ConfigSync extends React.Component {
|
||||
const dataId = this.field.getValue('dataId');
|
||||
const gruop = this.field.getValue('group');
|
||||
this.props.history.push(
|
||||
`/diamond-ops/static/pages/config-sync/index.html?serverId=center&dataId=${dataId}&group=${gruop}`
|
||||
generateUrl('/diamond-ops/static/pages/config-sync/index.html', { dataId, gruop })
|
||||
);
|
||||
}
|
||||
|
||||
@@ -209,9 +204,8 @@ class ConfigSync extends React.Component {
|
||||
}
|
||||
|
||||
goResult() {
|
||||
this.props.history.push(
|
||||
`/consistencyEfficacy?serverId=${this.serverId}&dataId=${this.dataId}&group=${this.group}`
|
||||
);
|
||||
const { serverId, dataId, group } = this;
|
||||
this.props.history.push(generateUrl('/consistencyEfficacy', { serverId, dataId, group }));
|
||||
}
|
||||
|
||||
openLoading() {
|
||||
|
||||
+440
-400
File diff suppressed because it is too large.
Load diff
+2
-1
@@ -46,10 +46,11 @@ class DashboardCard extends React.Component {
|
||||
</strong>
|
||||
<strong>
|
||||
<span>
|
||||
{/* eslint-disable */}
|
||||
<a
|
||||
style={{ marginLeft: 10, color: '#33cde5' }}
|
||||
href={item.url}
|
||||
target={'_blank'}
|
||||
target="_blank"
|
||||
>
|
||||
{locale.viewDetails1}
|
||||
</a>
|
||||
|
||||
+7
@@ -10,3 +10,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
.next-pagination-size-selector {
|
||||
position: static !important;
|
||||
}
|
||||
.configuration-table {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
+1
-3
@@ -81,9 +81,7 @@ class HistoryDetail extends React.Component {
|
||||
|
||||
goList() {
|
||||
this.props.history.push(
|
||||
`/historyRollback?serverId=${this.serverId}&group=${this.group}&dataId=${
|
||||
this.dataId
|
||||
}&namespace=${this.tenant}`
|
||||
`/historyRollback?serverId=${this.serverId}&group=${this.group}&dataId=${this.dataId}&namespace=${this.tenant}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+14
-85
@@ -15,7 +15,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ConfigProvider, Field, Form, Input, Loading, Pagination, Table } from '@alifd/next';
|
||||
import RegionGroup from 'components/RegionGroup';
|
||||
import { getParams, setParams, request, aliwareIntl } from '@/globalLib';
|
||||
import { getParams, setParams, request } from '@/globalLib';
|
||||
|
||||
import './index.scss';
|
||||
|
||||
@@ -83,31 +83,6 @@ class HistoryRollback extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 回车事件
|
||||
*/
|
||||
keyDownSearch(e) {
|
||||
const theEvent = e || window.event;
|
||||
const code = theEvent.keyCode || theEvent.which || theEvent.charCode;
|
||||
if (code === 13) {
|
||||
this.getData();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
UNSAFE_componentWillMount() {
|
||||
window.addEventListener('keydown', this.keyDownSearch.bind(this), false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.keyDownSearch.bind(this));
|
||||
}
|
||||
|
||||
onSearch() {}
|
||||
|
||||
onChange() {}
|
||||
|
||||
cleanAndGetData(needclean = false) {
|
||||
if (needclean) {
|
||||
this.dataId = '';
|
||||
@@ -133,9 +108,7 @@ class HistoryRollback extends React.Component {
|
||||
beforeSend() {
|
||||
self.openLoading();
|
||||
},
|
||||
url: `v1/cs/history?search=accurate&dataId=${this.dataId}&group=${
|
||||
this.group
|
||||
}&&pageNo=${pageNo}&pageSize=${this.state.pageSize}`,
|
||||
url: `v1/cs/history?search=accurate&dataId=${this.dataId}&group=${this.group}&&pageNo=${pageNo}&pageSize=${this.state.pageSize}`,
|
||||
success(data) {
|
||||
if (data != null) {
|
||||
self.setState({
|
||||
@@ -151,8 +124,6 @@ class HistoryRollback extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
showMore() {}
|
||||
|
||||
renderCol(value, index, record) {
|
||||
const { locale = {} } = this.props;
|
||||
return (
|
||||
@@ -175,60 +146,12 @@ class HistoryRollback extends React.Component {
|
||||
this.getData(value);
|
||||
}
|
||||
|
||||
onInputUpdate() {}
|
||||
|
||||
chooseFieldChange(fieldValue) {
|
||||
this.setState({
|
||||
fieldValue,
|
||||
});
|
||||
}
|
||||
|
||||
showSelect(value) {
|
||||
this.setState({
|
||||
selectValue: value,
|
||||
});
|
||||
if (value.indexOf('appName') !== -1) {
|
||||
this.setState({
|
||||
showAppName: true,
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
showAppName: false,
|
||||
});
|
||||
}
|
||||
if (value.indexOf('group') !== -1) {
|
||||
this.setState({
|
||||
showgroup: true,
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
showgroup: false,
|
||||
});
|
||||
}
|
||||
this.chooseFieldChange(value);
|
||||
}
|
||||
|
||||
getAppName(value) {
|
||||
this.appName = value;
|
||||
this.setState({
|
||||
appName: value,
|
||||
});
|
||||
}
|
||||
|
||||
getDataId(value) {
|
||||
this.dataId = value;
|
||||
this.setState({
|
||||
dataId: value,
|
||||
});
|
||||
}
|
||||
|
||||
getGroup(value) {
|
||||
this.group = value;
|
||||
this.setState({
|
||||
group: value,
|
||||
});
|
||||
}
|
||||
|
||||
selectAll() {
|
||||
this.dataId = this.field.getValue('dataId');
|
||||
this.group = this.field.getValue('group');
|
||||
@@ -265,10 +188,6 @@ class HistoryRollback extends React.Component {
|
||||
|
||||
chooseEnv(value) {}
|
||||
|
||||
renderLastTime(value, index, record) {
|
||||
return aliwareIntl.intlTimeFormat(record.lastModifiedTime);
|
||||
}
|
||||
|
||||
goDetail(record) {
|
||||
this.serverId = getParams('serverId') || 'center';
|
||||
this.tenant = getParams('namespace') || ''; // 为当前实例保存tenant参数
|
||||
@@ -373,8 +292,18 @@ class HistoryRollback extends React.Component {
|
||||
<Table.Column title="Group" dataIndex="group" />
|
||||
<Table.Column
|
||||
title={locale.lastUpdateTime}
|
||||
dataIndex="time"
|
||||
cell={this.renderLastTime.bind(this)}
|
||||
dataIndex="lastModifiedTime"
|
||||
cell={val => {
|
||||
if (!val) {
|
||||
return '';
|
||||
}
|
||||
try {
|
||||
const date = new Date(val);
|
||||
return date.toLocaleString();
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Table.Column title={locale.operation} cell={this.renderCol.bind(this)} />
|
||||
</Table>
|
||||
|
||||
+2
-2
@@ -183,7 +183,7 @@ class ListeningToQuery extends React.Component {
|
||||
},
|
||||
];
|
||||
return (
|
||||
<div style={{ padding: 10 }}>
|
||||
<>
|
||||
<Loading
|
||||
shape="flower"
|
||||
style={{ position: 'relative' }}
|
||||
@@ -320,7 +320,7 @@ class ListeningToQuery extends React.Component {
|
||||
,
|
||||
</div>
|
||||
</Loading>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+21
-7
@@ -16,6 +16,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import SuccessDialog from '../../../components/SuccessDialog';
|
||||
import { getParams, setParams, request, aliwareIntl } from '../../../globalLib';
|
||||
import { generateUrl } from '../../../utils/nacosutil';
|
||||
import {
|
||||
Balloon,
|
||||
Button,
|
||||
@@ -144,6 +145,13 @@ class NewConfig extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
tagSearch(value) {
|
||||
const { tagLst } = this.state;
|
||||
if (!tagLst.includes(value)) {
|
||||
this.setState({ tagLst: [value, ...tagLst] });
|
||||
}
|
||||
}
|
||||
|
||||
setConfigTags(value) {
|
||||
if (value.length > 5) {
|
||||
value.pop();
|
||||
@@ -154,6 +162,7 @@ class NewConfig extends React.Component {
|
||||
}
|
||||
});
|
||||
this.setState({
|
||||
tagLst: value,
|
||||
config_tags: value,
|
||||
});
|
||||
}
|
||||
@@ -192,9 +201,12 @@ class NewConfig extends React.Component {
|
||||
this.tenant = getParams('namespace') || '';
|
||||
this.serverId = getParams('serverId') || '';
|
||||
this.props.history.push(
|
||||
`/configurationManagement?serverId=${this.serverId}&group=${this.searchGroup}&dataId=${
|
||||
this.searchDataId
|
||||
}&namespace=${this.tenant}`
|
||||
generateUrl('/configurationManagement', {
|
||||
serverId: this.serverId,
|
||||
group: this.searchGroup,
|
||||
dataId: this.searchDataId,
|
||||
namespace: this.tenant,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -331,15 +343,15 @@ class NewConfig extends React.Component {
|
||||
}
|
||||
self.successDialog.current.getInstance().openDialog(_payload);
|
||||
},
|
||||
complete() {
|
||||
self.closeLoading();
|
||||
complete: () => {
|
||||
this.closeLoading();
|
||||
},
|
||||
error(res) {
|
||||
error: res => {
|
||||
this.closeLoading();
|
||||
Dialog.alert({
|
||||
language: aliwareIntl.currentLanguageCode || 'zh-cn',
|
||||
content: locale.publishFailed,
|
||||
});
|
||||
self.closeLoading();
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -493,6 +505,7 @@ class NewConfig extends React.Component {
|
||||
>
|
||||
<Select
|
||||
size={'medium'}
|
||||
showSearch
|
||||
hasArrow
|
||||
style={{ width: '100%', height: '100%!important' }}
|
||||
autoWidth
|
||||
@@ -503,6 +516,7 @@ class NewConfig extends React.Component {
|
||||
dataSource={this.state.tagLst}
|
||||
value={this.state.config_tags}
|
||||
onChange={this.setConfigTags.bind(this)}
|
||||
onSearch={val => this.tagSearch(val)}
|
||||
hasClear
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
@@ -4,8 +4,8 @@ import { withRouter } from 'react-router-dom';
|
||||
|
||||
import './index.scss';
|
||||
import Header from '../../layouts/Header';
|
||||
import { request } from '../../globalLib';
|
||||
import PropTypes from 'prop-types';
|
||||
import { login } from '../../reducers/base';
|
||||
|
||||
const FormItem = Form.Item;
|
||||
|
||||
@@ -24,35 +24,29 @@ class Login extends React.Component {
|
||||
this.field = new Field(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (localStorage.getItem('token')) {
|
||||
const [baseUrl] = location.href.split('#');
|
||||
location.href = `${baseUrl}#/`;
|
||||
}
|
||||
}
|
||||
|
||||
handleSubmit = () => {
|
||||
const { locale = {} } = this.props;
|
||||
this.field.validate((errors, values) => {
|
||||
if (errors) {
|
||||
return;
|
||||
}
|
||||
request({
|
||||
type: 'post',
|
||||
url: 'v1/auth/login',
|
||||
data: values,
|
||||
success: ({ code, data }) => {
|
||||
if (code === 200) {
|
||||
// TODO: 封装一个方法存储、读取token
|
||||
localStorage.setItem('token', data);
|
||||
// TODO: 使用react router
|
||||
this.props.history.push('/');
|
||||
}
|
||||
if (code === 401) {
|
||||
Message.error({
|
||||
content: locale.invalidUsernameOrPassword,
|
||||
});
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
login(values)
|
||||
.then(res => {
|
||||
localStorage.setItem('token', JSON.stringify(res));
|
||||
this.props.history.push('/');
|
||||
})
|
||||
.catch(() => {
|
||||
Message.error({
|
||||
content: locale.invalidUsernameOrPassword,
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
+3
-17
@@ -281,14 +281,6 @@ class NameSpace extends React.Component {
|
||||
return <div>{name}</div>;
|
||||
}
|
||||
|
||||
renderConfigCount(value, index, record) {
|
||||
return (
|
||||
<div>
|
||||
{value} / {record.quota}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
const { locale = {} } = this.props;
|
||||
const {
|
||||
@@ -301,7 +293,7 @@ class NameSpace extends React.Component {
|
||||
namespaceOperation,
|
||||
} = locale;
|
||||
return (
|
||||
<div style={{ padding: 10 }} className="clearfix">
|
||||
<>
|
||||
<RegionGroup left={namespace} />
|
||||
<div className="fusion-demo">
|
||||
<Loading
|
||||
@@ -329,12 +321,7 @@ class NameSpace extends React.Component {
|
||||
cell={this.renderName.bind(this)}
|
||||
/>
|
||||
<Table.Column title={namespaceNumber} dataIndex="namespace" />
|
||||
<Table.Column
|
||||
title={configuration}
|
||||
dataIndex="configCount"
|
||||
cell={this.renderConfigCount.bind(this)}
|
||||
/>
|
||||
|
||||
<Table.Column title={configuration} dataIndex="configCount" />
|
||||
<Table.Column
|
||||
title={namespaceOperation}
|
||||
dataIndex="time"
|
||||
@@ -343,12 +330,11 @@ class NameSpace extends React.Component {
|
||||
</Table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<NewNameSpace ref={this.newnamespace} getNameSpaces={this.getNameSpaces.bind(this)} />
|
||||
<EditorNameSpace ref={this.editgroup} getNameSpaces={this.getNameSpaces.bind(this)} />
|
||||
</Loading>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,178 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import RegionGroup from 'components/RegionGroup';
|
||||
import { ConfigProvider, Input, Field, Form, Message } from '@alifd/next';
|
||||
import { getParams, setParams, request } from '../../globalLib';
|
||||
|
||||
import './index.scss';
|
||||
|
||||
const FormItem = Form.Item;
|
||||
|
||||
@ConfigProvider.config
|
||||
class Password extends React.Component {
|
||||
static displayName = 'Password';
|
||||
|
||||
static propTypes = {
|
||||
locale: PropTypes.object,
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.field = new Field(this);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
componentDidMount() {}
|
||||
|
||||
validatePassword(rule, value, callback) {
|
||||
const { locale = {} } = this.props;
|
||||
if (this.field.getValue('newPassword') !== this.field.getValue('confirmNewPassword')) {
|
||||
callback(locale.passwordNotConsistent);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
handleSubmit = () => {
|
||||
const { locale = {} } = this.props;
|
||||
this.field.validate((errors, values) => {
|
||||
if (errors) {
|
||||
return;
|
||||
}
|
||||
request({
|
||||
type: 'post',
|
||||
url: 'v1/auth/login',
|
||||
data: values,
|
||||
success: ({ code, data }) => {
|
||||
if (code === 200) {
|
||||
// TODO: 封装一个方法存储、读取token
|
||||
localStorage.setItem('token', data);
|
||||
// TODO: 使用react router
|
||||
this.props.history.push('/');
|
||||
}
|
||||
if (code === 401) {
|
||||
Message.error({
|
||||
content: locale.invalidUsernameOrPassword,
|
||||
});
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
Message.error({
|
||||
content: locale.invalidUsernameOrPassword,
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
changePassword() {
|
||||
const { locale = {} } = this.props;
|
||||
this.field.validate((errors, values) => {
|
||||
if (errors) {
|
||||
return;
|
||||
}
|
||||
request({
|
||||
type: 'put',
|
||||
url: 'v1/auth/password',
|
||||
data: values,
|
||||
success: ({ code, data }) => {
|
||||
if (code === 200) {
|
||||
window.localStorage.clear();
|
||||
this.props.history.push('/login');
|
||||
}
|
||||
if (code === 401) {
|
||||
Message.error({
|
||||
content: locale.invalidPassword,
|
||||
});
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
Message.error({
|
||||
content: locale.invalidPassword,
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { locale = {} } = this.props;
|
||||
const formItemLayout = {
|
||||
labelCol: { fixedSpan: 6 },
|
||||
wrapperCol: { span: 18 },
|
||||
};
|
||||
return (
|
||||
<div style={{ padding: 10 }}>
|
||||
<RegionGroup left={locale.changePassword} />
|
||||
<Form style={{ width: '300px' }} field={this.field}>
|
||||
<FormItem label={locale.oldPassword} required {...formItemLayout}>
|
||||
<Input
|
||||
htmlType="password"
|
||||
placeholder={locale.pleaseInputOldPassword}
|
||||
{...this.field.init('oldPassword', {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: locale.passwordRequired,
|
||||
},
|
||||
],
|
||||
})}
|
||||
disabled={this.state.type === 0}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label={locale.newPassword} required {...formItemLayout}>
|
||||
<Input
|
||||
htmlType="password"
|
||||
placeholder={locale.pleaseInputNewPassword}
|
||||
{...this.field.init('newPassword', {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: locale.passwordRequired,
|
||||
},
|
||||
],
|
||||
})}
|
||||
disabled={this.state.type === 0}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label={locale.checkPassword} required {...formItemLayout}>
|
||||
<Input
|
||||
htmlType="password"
|
||||
placeholder={locale.pleaseInputNewPasswordAgain}
|
||||
{...this.field.init('confirmNewPassword', {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: locale.passwordRequired,
|
||||
},
|
||||
{ validator: this.validatePassword.bind(this) },
|
||||
],
|
||||
})}
|
||||
disabled={this.state.type === 0}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label=" " {...formItemLayout}>
|
||||
<Form.Submit type="primary" onClick={this.changePassword.bind(this)}>
|
||||
{locale.changePassword}
|
||||
</Form.Submit>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Password;
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Password from './Password';
|
||||
|
||||
export default Password;
|
||||
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
+6
-6
@@ -28,6 +28,7 @@ import {
|
||||
Switch,
|
||||
} from '@alifd/next';
|
||||
import { request } from '../../../globalLib';
|
||||
import { generateUrl } from '../../../utils/nacosutil';
|
||||
import RegionGroup from '../../../components/RegionGroup';
|
||||
import EditServiceDialog from '../ServiceDetail/EditServiceDialog';
|
||||
import ShowServiceCodeing from 'components/ShowCodeing/ShowServiceCodeing';
|
||||
@@ -92,7 +93,6 @@ class ServiceList extends React.Component {
|
||||
];
|
||||
request({
|
||||
url: `v1/ns/catalog/services?${parameter.join('&')}`,
|
||||
beforeSend: () => this.openLoading(),
|
||||
success: ({ count = 0, serviceList = [] } = {}) => {
|
||||
this.setState({
|
||||
dataSource: serviceList,
|
||||
@@ -105,7 +105,6 @@ class ServiceList extends React.Component {
|
||||
total: 0,
|
||||
currentPage: 0,
|
||||
}),
|
||||
complete: () => this.closeLoading(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -293,11 +292,12 @@ class ServiceList extends React.Component {
|
||||
*/
|
||||
<div>
|
||||
<a
|
||||
onClick={() =>
|
||||
onClick={() => {
|
||||
const { name, groupName } = record;
|
||||
this.props.history.push(
|
||||
`/serviceDetail?name=${record.name}&groupName=${record.groupName}`
|
||||
)
|
||||
}
|
||||
generateUrl('/serviceDetail', { name, groupName })
|
||||
);
|
||||
}}
|
||||
style={{ marginRight: 5 }}
|
||||
>
|
||||
{detail}
|
||||
|
||||
+1
-4
@@ -37,10 +37,7 @@ const FormItem = Form.Item;
|
||||
const { Row, Col } = Grid;
|
||||
const { Column } = Table;
|
||||
|
||||
@connect(
|
||||
state => ({ subscriberData: state.subscribers }),
|
||||
{ getSubscribers, removeSubscribers }
|
||||
)
|
||||
@connect(state => ({ subscriberData: state.subscribers }), { getSubscribers, removeSubscribers })
|
||||
@ConfigProvider.config
|
||||
class SubscriberList extends React.Component {
|
||||
static displayName = 'SubscriberList';
|
||||
|
||||
@@ -24,15 +24,8 @@ class Welcome extends React.Component {
|
||||
|
||||
render() {
|
||||
const { functionMode } = this.props;
|
||||
return (
|
||||
<div>
|
||||
{functionMode !== '' && (
|
||||
<Redirect
|
||||
to={`/${functionMode === 'naming' ? 'serviceManagement' : 'configurationManagement'}`}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
const path = functionMode === 'naming' ? 'serviceManagement' : 'configurationManagement';
|
||||
return <>{functionMode !== '' && <Redirect to={`/${path}`} />}</>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,12 @@ const initialState = {
|
||||
functionMode: '',
|
||||
};
|
||||
|
||||
/**
|
||||
* 用户登录
|
||||
* @param {*} param0
|
||||
*/
|
||||
const login = user => request.post('v1/auth/users/login', user);
|
||||
|
||||
const getState = () => dispatch =>
|
||||
request
|
||||
.get('v1/console/server/state')
|
||||
@@ -52,4 +58,4 @@ export default (state = initialState, action) => {
|
||||
}
|
||||
};
|
||||
|
||||
export { getState };
|
||||
export { getState, login };
|
||||
@@ -14,5 +14,8 @@
|
||||
import locale from './locale';
|
||||
import base from './base';
|
||||
import subscribers from './subscribers';
|
||||
import authority from './authority';
|
||||
import namespace from './namespace';
|
||||
import configuration from './configuration';
|
||||
|
||||
export default { locale, base, subscribers };
|
||||
export default { locale, base, subscribers, authority, namespace, configuration };
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import $ from 'jquery';
|
||||
|
||||
export default function ajaxrequest(options) {
|
||||
const promise = $.ajax({
|
||||
url: options.url,
|
||||
timeout: options.timeout, // 超时时间设置,单位毫秒设置为1小时
|
||||
dataType: options.dataType, // 返回的数据格式
|
||||
type: options.type,
|
||||
});
|
||||
return promise.done(data => ({ data }));
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
function getValue(key) {
|
||||
if (!document.cookie) return null;
|
||||
const list = document.cookie.split(';') || [];
|
||||
for (const item of list) {
|
||||
const [k = '', v = ''] = item.split('=');
|
||||
if (k.trim() === key) return v;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function setValue(key, value) {
|
||||
document.cookie = `${key}=${value}`;
|
||||
}
|
||||
|
||||
export default { getValue, setValue };
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright 1999-2018 Alibaba Group Holding Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
set(key, value) {
|
||||
window.localStorage.setItem(key, value);
|
||||
},
|
||||
get(key) {
|
||||
return window.localStorage.getItem(key);
|
||||
},
|
||||
remove(key) {
|
||||
window.localStorage.removeItem(key);
|
||||
},
|
||||
};
|
||||
@@ -46,3 +46,26 @@ export const getParameter = (search, name) => {
|
||||
const [, value = ''] = hit.split('=');
|
||||
return value;
|
||||
};
|
||||
|
||||
export const isJsonString = str => {
|
||||
try {
|
||||
if (typeof JSON.parse(str) === 'object') {
|
||||
return true;
|
||||
}
|
||||
} catch (e) {}
|
||||
return false;
|
||||
};
|
||||
|
||||
export const generateUrl = (url, params) => {
|
||||
return [
|
||||
url,
|
||||
'?',
|
||||
Object.keys(params)
|
||||
.map(key => [key, params[key]].join('='))
|
||||
.join('&'),
|
||||
].join('');
|
||||
};
|
||||
|
||||
export const isPlainObject = obj => {
|
||||
return Object.prototype.toString.call(obj) === '[object Object]';
|
||||
};
|
||||
@@ -1,12 +1,52 @@
|
||||
import axios from 'axios';
|
||||
import qs from 'qs';
|
||||
import { Message } from '@alifd/next';
|
||||
import { browserHistory } from 'react-router';
|
||||
import { isPlainObject } from './nacosutil';
|
||||
// import { SUCCESS_RESULT_CODE } from '../constants';
|
||||
|
||||
const API_GENERAL_ERROR_MESSAGE = 'Request error, please try again later!';
|
||||
|
||||
function goLogin() {
|
||||
const url = window.location.href;
|
||||
localStorage.removeItem('token');
|
||||
const base_url = url.split('#')[0];
|
||||
window.location.href = `${base_url}#/login`;
|
||||
}
|
||||
|
||||
const request = () => {
|
||||
const instance = axios.create();
|
||||
|
||||
instance.interceptors.request.use(
|
||||
config => {
|
||||
const { url, params, data, method, headers } = config;
|
||||
if (!params) {
|
||||
config.params = {};
|
||||
}
|
||||
if (!url.includes('auth/users/login')) {
|
||||
let token = {};
|
||||
try {
|
||||
token = JSON.parse(localStorage.token);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
goLogin();
|
||||
}
|
||||
const { accessToken = '' } = token;
|
||||
config.params.accessToken = accessToken;
|
||||
config.headers = Object.assign({}, headers, { accessToken });
|
||||
}
|
||||
if (data && isPlainObject(data) && ['post', 'put'].includes(method)) {
|
||||
config.data = qs.stringify(data);
|
||||
if (!headers) {
|
||||
config.headers = {};
|
||||
}
|
||||
config.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||
}
|
||||
return config;
|
||||
},
|
||||
error => Promise.reject(error)
|
||||
);
|
||||
|
||||
instance.interceptors.response.use(
|
||||
response => {
|
||||
const { success, resultCode, resultMessage = API_GENERAL_ERROR_MESSAGE } = response.data;
|
||||
@@ -18,11 +58,24 @@ const request = () => {
|
||||
},
|
||||
error => {
|
||||
if (error.response) {
|
||||
const { data, status } = error.response;
|
||||
Message.error(data && typeof data === 'string' ? data : `HTTP ERROR: ${status}`);
|
||||
} else {
|
||||
Message.error(API_GENERAL_ERROR_MESSAGE);
|
||||
const { data = {}, status } = error.response;
|
||||
let message = `HTTP ERROR: ${status}`;
|
||||
if (typeof data === 'string') {
|
||||
message = data;
|
||||
} else if (typeof data === 'object') {
|
||||
message = data.message;
|
||||
}
|
||||
Message.error(message);
|
||||
|
||||
if (
|
||||
[401, 403].includes(status) &&
|
||||
['unknown user!', 'token invalid', 'token expired!'].includes(message)
|
||||
) {
|
||||
goLogin();
|
||||
}
|
||||
return Promise.reject(error.response);
|
||||
}
|
||||
Message.error(API_GENERAL_ERROR_MESSAGE);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1 +1 @@
|
||||
@charset "UTF-8";.next-icon[dir=rtl]:before{transform:rotateY(180deg)}@font-face{font-family:NextIcon;src:url(/nacos/console-fe/public/icons/icon-font.eot);src:url(/nacos/console-fe/public/icons/icon-font.eot?#iefix) format("embedded-opentype"),url(/nacos/console-fe/public/icons/icon-font.woff) format("woff"),url(/nacos/console-fe/public/icons/icon-font.ttf) format("truetype"),url(/nacos/console-fe/public/icons/icon-font.svg#NextIcon) format("svg")}.next-icon{display:inline-block;font-family:NextIcon;font-style:normal;font-weight:400;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.next-icon:before{display:inline-block;vertical-align:middle;text-align:center}.next-icon-smile:before{content:""}.next-icon-cry:before{content:""}.next-icon-success:before{content:""}.next-icon-warning:before{content:""}.next-icon-prompt:before{content:""}.next-icon-error:before{content:""}.next-icon-help:before{content:""}.next-icon-clock:before{content:""}.next-icon-success-filling:before{content:""}.next-icon-delete-filling:before{content:""}.next-icon-favorites-filling:before{content:""}.next-icon-add:before{content:""}.next-icon-minus:before{content:""}.next-icon-arrow-up:before{content:""}.next-icon-arrow-down:before{content:""}.next-icon-arrow-left:before{content:""}.next-icon-arrow-right:before{content:""}.next-icon-arrow-double-left:before{content:""}.next-icon-arrow-double-right:before{content:""}.next-icon-switch:before{content:""}.next-icon-sorting:before{content:""}.next-icon-descending:before{content:""}.next-icon-ascending:before{content:""}.next-icon-select:before{content:""}.next-icon-semi-select:before{content:""}.next-icon-search:before{content:""}.next-icon-close:before{content:""}.next-icon-ellipsis:before{content:""}.next-icon-picture:before{content:""}.next-icon-calendar:before{content:""}.next-icon-ashbin:before{content:""}.next-icon-upload:before{content:""}.next-icon-download:before{content:""}.next-icon-set:before{content:""}.next-icon-edit:before{content:""}.next-icon-refresh:before{content:""}.next-icon-filter:before{content:""}.next-icon-attachment:before{content:""}.next-icon-account:before{content:""}.next-icon-email:before{content:""}.next-icon-atm:before{content:""}.next-icon-loading:before{content:"";animation:loadingCircle 1s linear infinite}.next-icon.next-xxs:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.next-icon.next-xxs{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-icon.next-xxs:before{width:16px;font-size:16px}}.next-icon.next-xs:before{width:12px;font-size:12px;line-height:inherit}.next-icon.next-small:before{width:16px;font-size:16px;line-height:inherit}.next-icon.next-medium:before{width:20px;font-size:20px;line-height:inherit}.next-icon.next-large:before{width:24px;font-size:24px;line-height:inherit}.next-icon.next-xl:before{width:32px;font-size:32px;line-height:inherit}.next-icon.next-xxl:before{width:48px;font-size:48px;line-height:inherit}.next-icon.next-xxxl:before{width:64px;font-size:64px;line-height:inherit}.next-icon.next-inherit:before{width:inherit;font-size:inherit;line-height:inherit}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-ms-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-o-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transforLine truncated
|
||||
.next-icon[dir=rtl]:before{transform:rotateY(180deg)}@font-face{font-family:NextIcon;src:url(/nacos/console-fe/public/icons/icon-font.eot);src:url(/nacos/console-fe/public/icons/icon-font.eot?#iefix) format("embedded-opentype"),url(/nacos/console-fe/public/icons/icon-font.woff2) format("woff2"),url(/nacos/console-fe/public/icons/icon-font.woff) format("woff"),url(/nacos/console-fe/public/icons/icon-font.ttf) format("truetype"),url(/nacos/console-fe/public/icons/icon-font.svg#NextIcon) format("svg")}.next-icon{display:inline-block;font-family:NextIcon;font-style:normal;font-weight:400;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.next-icon:before{display:inline-block;vertical-align:middle;text-align:center}.next-icon-smile:before{content:""}.next-icon-cry:before{content:""}.next-icon-success:before{content:""}.next-icon-warning:before{content:""}.next-icon-prompt:before{content:""}.next-icon-error:before{content:""}.next-icon-help:before{content:""}.next-icon-clock:before{content:""}.next-icon-success-filling:before{content:""}.next-icon-delete-filling:before{content:""}.next-icon-favorites-filling:before{content:""}.next-icon-add:before{content:""}.next-icon-minus:before{content:""}.next-icon-arrow-up:before{content:""}.next-icon-arrow-down:before{content:""}.next-icon-arrow-left:before{content:""}.next-icon-arrow-right:before{content:""}.next-icon-arrow-double-left:before{content:""}.next-icon-arrow-double-right:before{content:""}.next-icon-switch:before{content:""}.next-icon-sorting:before{content:""}.next-icon-descending:before{content:""}.next-icon-ascending:before{content:""}.next-icon-select:before{content:""}.next-icon-semi-select:before{content:""}.next-icon-search:before{content:""}.next-icon-close:before{content:""}.next-icon-ellipsis:before{content:""}.next-icon-picture:before{content:""}.next-icon-calendar:before{content:""}.next-icon-ashbin:before{content:""}.next-icon-upload:before{content:""}.next-icon-download:before{content:""}.next-icon-set:before{content:""}.next-icon-edit:before{content:""}.next-icon-refresh:before{content:""}.next-icon-filter:before{content:""}.next-icon-attachment:before{content:""}.next-icon-account:before{content:""}.next-icon-email:before{content:""}.next-icon-atm:before{content:""}.next-icon-loading:before{content:"";animation:loadingCircle 1s linear infinite}.next-icon-eye:before{content:""}.next-icon-copy:before{content:""}.next-icon-toggle-left:before{content:""}.next-icon-toggle-right:before{content:""}.next-icon-eye-close:before{content:""}.next-icon-unlock:before{content:""}.next-icon-lock:before{content:""}.next-icon-exit:before{content:""}.next-icon-chart-bar:before{content:""}.next-icon-chart-pie:before{content:""}.next-icon.next-xxs .next-icon-remote,.next-icon.next-xxs:before{width:8px;font-size:8px;line-height:inherit}@media (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.next-icon.next-xxs{transform:scale(.5);margin-left:-4px;margin-right:-4px}.next-icon.next-xxs:before{width:16px;font-size:16px}}.next-icon.next-xs .next-icon-remote,.next-icon.next-xs:before{width:12px;font-size:12px;line-height:inherit}.next-icon.next-small .next-icon-remote,.next-icon.next-small:before{width:16px;font-size:16px;line-height:inherit}.next-icon.next-medium .next-icon-remote,.next-icon.next-medium:before{width:20px;font-size:20px;line-height:inherit}.next-icon.next-large .next-icon-remote,.next-icon.next-large:before{width:24px;font-size:24px;line-height:inherit}.next-icon.next-xl .next-icon-remote,.next-icon.next-xl:before{width:32px;font-size:32px;line-height:inherit}.next-icon.next-xxl .next-icon-remote,.next-icon.next-xxl:before{width:48px;font-size:48px;line-height:inherit}.next-icon.next-xxxl .next-icon-remote,.next-icon.next-xxxl:before{width:64px;font-size:64px;line-height:inherit}.next-icon.next-inherit .next-icon-remote,.next-icon.next-inherit:before{width:inherit;font-size:inherit;line-height:inherit}.next-icon .next-icon-remote,.next-icon.next-inherit .next-icon-remote{width:1em;height:1em;vertical-align:-.15em;fill:currentColor}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transform:translateY(-100px);-o-transform:translateY(-100px);transform:translateY(-100px)}to{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}}@-moz-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-100px);-moz-transform:translateY(-100px);-ms-transfLine truncated
|
||||
@@ -1,15 +1,11 @@
|
||||
!function(n){var a={};function o(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=n,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)o.d(n,a,function(e){return t[e]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=387)}([function(e,t,n){"use strict";e.exports=n(429)},function(e,t,n){"use strict";n.d(t,"a",function(){return T}),n.d(t,"b",function(){return R}),n.d(t,"d",function(){return H}),n.d(t,"c",function(){return F});function i(s){var l="";return(document.cookie&&document.cookie.split(";")||[]).forEach(function(e){var t=e.split("=")||[],n=Object(f.a)(t,2),a=n[0],o=void 0===a?"":a,r=n[1],i=void 0===r?"":r;-1!==o.trim().indexOf(s)&&(l=i)}),l.trim()}var s,l,a,o,r,u,c=n(72),d=n(86),p=n(56),f=n(66),h=n(87),m=n.n(h),g=n(3),y=n.n(g),_=n(46),v=n.n(_),b=n(98),M=n.n(b),w=window,k=(s={},l={},{once:function(e,t){this.listen.call(this,e,t,!0)},listen:function(e,t,n){var a=2<arguments.length&&void 0!==n&&n;e&&t&&(s[e]||(s[e]=[]),s[e].push({callback:t,once:a}))},listenAllTask:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=Array.prototype.slice.call(t),o=a[0];if(o&&(this.listen.apply(this,Object(p.a)(a)),l[o]&&0<l[o].length)){var r=l[o].pop();this.trigger.apply(r.self,r.argsList)}},trigger:function(){for(var n=this,e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var o=Array.prototype.slice.call(t),r=o.shift();if(!s[r])return l[r]||(l[r]=[]),void l[r].push({argsList:Array.prototype.slice.call(t),self:n});var i=[];s[r].forEach(function(e,t){"[object Function]"===Object.prototype.toString.call(e.callback)&&(e.callback.apply(n,o),e.once||i.push(e))}),s[r]=i},remove:function(e,n){if(e&&s[e])if(n){var a=[];s[e].forEach(function(e,t){e.callback!==n&&a.push(e)}),s[e]=a.length?a:null}else s[e]=null}}),S=(a=0,o={visible:!1,shape:"flower",tip:"loading..."},{changeLoadingAttr:function(e){"[object Object]"===Object.prototype.toString.call(e)&&(o=Object.assign({},a,e))},openLoading:function(){a++,k.trigger("nacosLoadingEvent",Object.assign(o,{visible:!0,spinning:!0}))},closeLoading:function(){--a<=0&&(a=0,k.trigger("nacosLoadingEvent",Object.assign(o,{visible:!1,spinning:!1})))},closeAllLoading:function(){a=0,k.trigger("nacosLoadingEvent",Object.assign(o,{visible:!1,spinning:!1}))},getURISource:function(e){return e}}),T=(r=i("aliyun_lang")||"zh",u=i("aliyun_country")||"cn",r=r.toLowerCase(),u=u.toLowerCase(),C.prototype.currentLocal=r,C.prototype.currentSite=u,C.prototype.currentLanguageCode=i("docsite_language")||"".concat(r,"-").concat(u),C.prototype.get=function(e){return this.nowData[e]},C.prototype.changeLanguage=function(e){this.nowData=M.a[e]||{}},C.prototype.intlNumberFormat=function(t){if("object"!==("undefined"==typeof Intl?"undefined":Object(d.a)(Intl))||"function"!=typeof Intl.NumberFormat)return t;try{return new Intl.NumberFormat(this.currentLanguageCode).format(t||0)}catch(e){return t}},C.prototype.intlTimeFormat=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Date.now(),e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};try{var n="[object Date]"===Object.prototype.toString.call(t)?t:new Date(t),a=Object.assign({},{hour12:!1,year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},e);return n.toLocaleDateString(this.currentLanguageCode,a)}catch(e){return"function"==typeof y.a?y()(t).format():"--"}},C.prototype.getIntlTimeFormat=function(e){var t=e||r,n={zh:"YYYY年M月D日 HH:mm:ss",en:"MMM D, YYYY, h:mm:ss A",default:"YYYY-MM-DD HH:mm:ss"};return n[t]?n[t]:n.default},C.prototype.setMomentLocale=function(e){return"[object Function]"===Object.prototype.toString.call(y.a)&&(y.a.locale(e||this.currentLanguageCode),!0)},new C({currentLocal:"".concat(r),locals:M.a[C.prototype.currentLanguageCode]||M.a["en-us"]||M.a["zh-cn"]||{}}));function C(e){var t=e.locals;this.nowData=t,this.setMomentLocale(this.currentLanguageCode)}var x,E,L,D,N,O,Y,P,j,I,A,R=(x=w,function(e){var t=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)"),"i"),n=[];if(1===(n=""!==x.location.hash?x.location.hash.split("?"):x.location.href.split("?")).length&&(n=x.parent.location.hash.split("?")),1<n.length){var a=n[1].match(t);if(null!=a)return decodeURIComponent(a[2])}return null}),H=(L=(E=w).location.href.split("#")[0],function(e,t){if(e){var n={};"string"==tLine truncated
|
||||
!function(n){var a={};function r(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=n,r.c=a,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=410)}([function(e,t,n){"use strict";e.exports=n(416)},function(e,t,n){"use strict";n.d(t,"b",function(){return N}),n.d(t,"d",function(){return P}),n.d(t,"c",function(){return j});n(51);var a=n(28),g=n.n(a),u=n(71),d=n(81),y=n(58),v=n(37),r=n(97),c=n.n(r),o=n(62),_=n.n(o);function b(){var e=window.location.href;localStorage.removeItem("token");var t=e.split("#")[0];console.log("base_url",t),window.location="".concat(t,"#/login")}var s,l,i,f,p,h,m,w,M,k,S,x,E,T,L,C=window,D=(s={},{once:function(e,t){this.listen.call(this,e,t,!0)},listen:function(e,t,n){var a=2<arguments.length&&void 0!==n&&n;e&&t&&(s[e]||(s[e]=[]),s[e].push({callback:t,once:a}))},listenAllTask:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=Array.prototype.slice.call(t),r=a[0];if(r&&(this.listen.apply(this,Object(y.a)(a)),l[r]&&0<l[r].length)){var o=l[r].pop();this.trigger.apply(o.self,o.argsList)}},trigger:function(){for(var n=this,e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var r=Array.prototype.slice.call(t),o=r.shift();if(!s[o])return l[o]||(l[o]=[]),void l[o].push({argsList:Array.prototype.slice.call(t),self:n});var i=[];s[o].forEach(function(e,t){"[object Function]"===Object.prototype.toString.call(e.callback)&&(e.callback.apply(n,r),e.once||i.push(e))}),s[o]=i},remove:function(e,n){if(e&&s[e])if(n){var a=[];s[e].forEach(function(e,t){e.callback!==n&&a.push(e)}),s[e]=a.length?a:null}else s[e]=null}}),O=(i=0,f={visible:!(l={}),shape:"flower",tip:"loading..."},{changeLoadingAttr:function(e){"[object Object]"===Object.prototype.toString.call(e)&&(f=Object.assign({},i,e))},openLoading:function(){i++,D.trigger("nacosLoadingEvent",Object.assign(f,{visible:!0,spinning:!0}))},closeLoading:function(){--i<=0&&(i=0,D.trigger("nacosLoadingEvent",Object.assign(f,{visible:!1,spinning:!1})))},closeAllLoading:function(){i=0,D.trigger("nacosLoadingEvent",Object.assign(f,{visible:!1,spinning:!1}))},getURISource:function(e){return e}}),N=function(e){var t=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)"),"i"),n=[];if(1===(n=""!==p.location.hash?p.location.hash.split("?"):p.location.href.split("?")).length&&(n=p.parent.location.hash.split("?")),1<n.length){var a=n[1].match(t);if(null!=a)return decodeURIComponent(a[2])}return null},P=(m=(h=p=C).location.href.split("#")[0],function(e,t){if(e){var n={};"string"==typeof e&&(n=Object(d.a)({},e,t)),"[object Object]"===Object.prototype.toString.call(e)&&(n=e);var a=[];h.location.hash&&(a=h.location.hash.split("?"));var r=a[1]&&a[1].split("&")||[],o={};r.forEach(function(e){var t=e.split("=");o[t[0]]=decodeURIComponent(t[1]||"")}),o=Object.assign({},o,n);var i=Object.keys(o).map(function(e){return"".concat(e,"=").concat(encodeURIComponent(o[e]||""))})||[];a[1]=i.join("&");var s=a.join("?");if(h.history.replaceState){var l=m+s;h.history.replaceState(null,"",l)}else h.location.hash=s}}),j=(M=(w=C).location.href.split("#")[0],k=[],S=[],x={},T=[],(E=[]).forEach(function(e){x[e.registerName]=e}),L=function(e){var t=x[e];return t?(t.methodType=T[t.method],t):null},A.handleCustomService=I,A.handleMiddleWare=Y,A.NacosRealUrlMapper=L,A.serviceList=E,A.serviceMap=x,A.middleWare=function(e){return 1<arguments.length&&void 0!==arguments[1]&&!arguments[1]?k.push(e):S.push(e),this},A);function Y(){for(var n=this,e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var r=t[0],o=t.slice(1),i=o.pop()||[];return i&&0<i.length&&(r=i.reduce(function(e,t){return"function"==typeof t&&t.apply(n,[e].concat(Object(y.a)(o)))||e},r)),r}function I(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=t[0];if(a&&a.url&&0===a.url.indexOf("com.alibaba.")){var r=a.url,o=L(r);if(o&&o.url&&o.url.replace){if(c.a.is_preview&&o.is_mock&&a.success){var i=null;try{i=JSON.parse(o.defaults)}catch(e){}return void a.success(i)}a.url=o.url.replace(/{([^\}]+)}/g,function(e,t){return a.$data[t]});try{o.is_param&&"object"===Object(u.a)(a.data)&&(a.data=Object.assign({},JSON.parse(o.params),a.data))}catch(e){}o.method&&!a.type&&(a.type=o.methodType),o.isJsonData&&"object"===ObjecLine truncated
|
||||
Fo.exports=function(){"use strict";var t,r;function u(){return t.apply(null,arguments)}function e(e){t=e}function i(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function s(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function l(e){if(Object.getOwnPropertyNames){return Object.getOwnPropertyNames(e).length===0}else{var t;for(t in e){if(e.hasOwnProperty(t)){return false}}return true}}function o(e){return e===void 0}function d(e){return typeof e==="number"||Object.prototype.toString.call(e)==="[object Number]"}function c(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function n(e,t){var n=[],a;for(a=0;a<e.length;++a){n.push(t(e[a],a))}return n}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){for(var n in t){if(f(t,n)){e[n]=t[n]}}if(f(t,"toString")){e.toString=t.toString}if(f(t,"valueOf")){e.valueOf=t.valueOf}return e}function h(e,t,n,a){return Kn(e,t,n,a,true).utc()}function a(){return{empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],meridiem:null,rfc2822:false,weekdayMismatch:false}}function m(e){if(e._pf==null){e._pf=a()}return e._pf}if(Array.prototype.some){r=Array.prototype.some}else{r=function(e){var t=Object(this);var n=t.length>>>0;for(var a=0;a<n;a++){if(a in t&&e.call(this,t[a],a,t)){return true}}return false}}function g(e){if(e._isValid==null){var t=m(e);var n=r.call(t.parsedDateParts,function(e){return e!=null});var a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict){a=a&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===undefined}if(Object.isFrozen==null||!Object.isFrozen(e)){e._isValid=a}else{return a}}return e._isValid}function y(e){var t=h(NaN);if(e!=null){p(m(t),e)}else{m(t).userInvalidated=true}return t}var v=u.momentProperties=[];function _(e,t){var n,a,r;if(!o(t._isAMomentObject)){e._isAMomentObject=t._isAMomentObject}if(!o(t._i)){e._i=t._i}if(!o(t._f)){e._f=t._f}if(!o(t._l)){e._l=t._l}if(!o(t._strict)){e._strict=t._strict}if(!o(t._tzm)){e._tzm=t._tzm}if(!o(t._isUTC)){e._isUTC=t._isUTC}if(!o(t._offset)){e._offset=t._offset}if(!o(t._pf)){e._pf=m(t)}if(!o(t._locale)){e._locale=t._locale}if(v.length>0){for(n=0;n<v.length;n++){a=v[n];r=t[a];if(!o(r)){e[a]=r}}}return e}var b=false;function w(e){_(this,e);this._d=new Date(e._d!=null?e._d.getTime():NaN);if(!this.isValid()){this._d=new Date(NaN)}if(b===false){b=true;u.updateOffset(this);b=false}}function M(e){return e instanceof w||e!=null&&e._isAMomentObject!=null}function k(e){if(e<0){return Math.ceil(e)||0}else{return Math.floor(e)}}function S(e){var t=+e,n=0;if(t!==0&&isFinite(t)){n=k(t)}return n}function x(e,t,n){var a=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),o=0,i;for(i=0;i<a;i++){if(n&&e[i]!==t[i]||!n&&S(e[i])!==S(t[i])){o++}}return o+r}function E(e){if(u.suppressDeprecationWarnings===false&&typeof console!=="undefined"&&console.warn){console.warn("Deprecation warning: "+e)}}function T(r,o){var i=true;return p(function(){if(u.deprecationHandler!=null){u.deprecationHandler(null,r)}if(i){var e=[];var t;for(var n=0;n<arguments.length;n++){t="";if(typeof arguments[n]==="object"){t+="\n["+n+"] ";for(var a in arguments[0]){t+=a+": "+arguments[0][a]+", "}t=t.slice(0,-2)}else{t=arguments[n]}e.push(t)}E(r+"\nArguments: "+Array.prototype.slice.call(e).join("")+"\n"+(new Error).stack);i=false}return o.apply(this,arguments)},o)}var L={},C;function D(e,t){if(u.deprecationHandler!=null){u.deprecationHandler(e,t)}if(!L[e]){E(t);L[e]=true}}function O(e){return e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function N(e){var t,n;for(n in e){t=e[n];if(O(t)){this[n]=t}else{this["_"+n]=t}}this._config=e;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(e,t){var n=p({},e),a;for(a in t){if(f(t,a)){if(s(e[a])&&s(t[a])){n[a]={};p(n[a],e[a]);p(n[a],t[a])}else if(t[a]!=null){n[a]=t[a]}else{delete n[a]}}}for(a in e){if(f(e,a)&&!f(t,a)&&s(e[a])){n[a]=p({},n[a])}}return n}function j(e){if(e!=null){this.set(e)}}if(u.suppressDeprecationWarnings=false,u.deprecationHandler=null,Object.keys){C=Object.keys}else{C=function(e){var t,n=[];for(t in e){if(f(e,t)){n.push(t)}}return n}}var Y={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function I(e,t,n){var a=this._calendar[e]||this._calendar["sameElse"];return O(a)?a.call(t,n):a}var A={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function R(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperLine truncated
|
||||
/*!
|
||||
Copyright (c) 2017 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
/*!
|
||||
Copyright (c) 2017 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
!function(){"use strict";var i={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"==a||"number"==a)e.push(n);else if(Array.isArray(n)&&n.length){var o=s.apply(null,n);o&&e.push(o)}else if("object"==a)for(var r in n)i.call(n,r)&&n[r]&&e.push(r)}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(a=function(){return s}.apply(t,[]))||(e.exports=a)}()},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var a in e)0<=t.indexOf(a)||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return a})},function(e,t,n){"use strict";function a(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function o(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}n.d(t,"a",function(){return o})},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var a=n(86),o=n(22);function r(e,t){return!t||"object"!==Object(a.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},function(e,t,n){"use strict";function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return a})},function(e,t,n){"use strict";function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}n.d(t,"a",function(){return o})},function(e,t,n){"use strict";t.__esModule=!0;var c=r(n(5)),d=r(n(13)),a=r(n(9)),p=r(n(499)),o=r(n(500));function r(e){return e&&e.__esModule?e:{default:e}}p.default.Group=o.default,t.default=a.default.config(p.default,{transform:function(e,t){if("shape"in e){t("shape","text | warning | ghost","Button");var n=e,a=n.shape,o=n.type,r=(0,d.default)(n,["shape","type"]),i=o;("light"===o||"dark"===o||"secondary"===o&&"warning"===a)&&(i="normal");var s=void 0;"ghost"===a&&(s={primary:"dark",secondary:"dark",normal:"light",dark:"dark",light:"light"}[o||p.default.defaultProps.type]);var l="text"===a,u="warning"===a;e=(0,c.default)({type:i,ghost:s,text:l,warning:u},r)}return e}}),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var x=m(n(5)),E=m(n(13)),a=m(n(9)),o=m(n(526)),r=m(n(531)),i=m(n(534)),s=m(n(535)),l=m(n(536)),u=m(n(537)),c=m(n(539)),d=m(n(542)),p=m(n(545)),f=m(n(335)),h=m(n(336));function m(e){return e&&e.__esModule?e:{default:e}}var g=[i.default,c.default,s.default,l.default,r.default,u.default,d.default,p.default].reduce(function(e,t){return e=t(e)},o.default);g.Base=o.default,g.fixed=i.default,g.lock=c.default,g.selection=s.default,g.expanded=l.default,g.tree=r.default,g.virtual=u.default,g.list=d.default,g.sticky=p.default,g.GroupHeader=f.default,g.GroupFooter=h.default,t.default=a.default.config(g,{componentName:"Table",transform:function(e,t){if("expandedRowKeys"in e){t("expandedRowKeys","openRowKeys","Table");var n=e,a=n.expandedRowKeys,o=(0,E.default)(n,["expandedRowKeys"]);e=(0,x.default)({openRowKeys:a},o)}if("onExpandedChange"in e){t("onExpandedChange","onRowOpen","Table");var r=e,i=r.onExpandedChange,s=(0,E.default)(r,["onExpandedChange"]);e=(0,x.default)({onRowOpen:i},s)}if("isLoading"in e){t("isLoading","loading","Table");var l=e,u=l.isLoading,c=(0,E.default)(l,["isLoading"]);e=(0,x.default)({loading:u},c)}if("indentSize"in e){t("indentSize","indent","Table");var d=e,p=d.indentSize,f=(0,E.default)(d,["indentSize"]);e=(0,x.default)({indent:p},f)}if("optimization"in e){t("optimization","pure","Table");var h=e,m=h.optimization,g=(0,E.default)(h,["optimization"]);e=(0,x.default)({pure:m},g)}if("getRowClassName"in e){t("getRowClassName","getRowProps","Table");var y=e,_=y.getRowClassName,v=y.getRowProps,b=(0,E.default)(y,["getRowClassName","getRowProps"]);if(_){e=(0,x.default)({getRowProps:function(){return(0,x.default)({className:_.apply(void 0,arguments)},v?v.apply(void 0,arguments):{})}},b)}else e=(0,x.default)({getRowProps:v},b)}if("getRowProps"in e){t("getRowProps","rowProps","Table in 1.15.0");var M=e,w=M.getRowProps,k=(0,E.default)(M,["getRowProps"]);e=(0,x.default)({rowProps:w},k)}if("getCellProps"in e){t("getCellProps","cellProps","Table in 1.15.0");var S=e,T=S.getCellProps,C=(0,E.default)(S,["getCellProps"]);e=(0,x.default)({cellProps:T},C)}return e}}),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var l=c(n(5)),u=c(n(13)),a=c(n(9)),o=n(11),r=c(n(337)),i=c(n(338)),s=n(550);function c(e){return e&&e.__esModule?e:{default:e}}function d(i,s){if("closable"in i){s("closable","closeable","Dialog");var e=i,t=e.closable,n=(0,u.default)(e,["closable"]);i=(0,l.default)({closeable:t},n)}return["taLine truncated
|
||||
!function(){"use strict";var i={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"==a||"number"==a)e.push(n);else if(Array.isArray(n)&&n.length){var r=s.apply(null,n);r&&e.push(r)}else if("object"==a)for(var o in n)i.call(n,o)&&n[o]&&e.push(o)}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(a=function(){return s}.apply(t,[]))||(e.exports=a)}()},function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return a})},function(e,t,n){"use strict";function a(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function r(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var a=n(71),r=n(22);function o(e,t){return!t||"object"!==Object(a.a)(t)&&"function"!=typeof t?Object(r.a)(e):t}},function(e,t,n){"use strict";function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return a})},function(e,t,n){"use strict";function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";t.__esModule=!0;var _=m(n(4)),b=m(n(19)),a=m(n(7)),r=m(n(575)),o=m(n(580)),i=m(n(583)),s=m(n(584)),l=m(n(585)),u=m(n(586)),d=m(n(588)),c=m(n(591)),f=m(n(594)),p=m(n(361)),h=m(n(362));function m(e){return e&&e.__esModule?e:{default:e}}var g=[i.default,d.default,s.default,l.default,o.default,u.default,c.default,f.default].reduce(function(e,t){return e=t(e)},r.default);g.Base=r.default,g.fixed=i.default,g.lock=d.default,g.selection=s.default,g.expanded=l.default,g.tree=o.default,g.virtual=u.default,g.list=c.default,g.sticky=f.default,g.GroupHeader=p.default,g.GroupFooter=h.default,t.default=a.default.config(g,{componentName:"Table",transform:function(e,t){if("expandedRowKeys"in e){t("expandedRowKeys","openRowKeys","Table");var n=e.expandedRowKeys,a=(0,b.default)(e,["expandedRowKeys"]);e=(0,_.default)({openRowKeys:n},a)}if("onExpandedChange"in e){t("onExpandedChange","onRowOpen","Table");var r=e.onExpandedChange,o=(0,b.default)(e,["onExpandedChange"]);e=(0,_.default)({onRowOpen:r},o)}if("isLoading"in e){t("isLoading","loading","Table");var i=e.isLoading,s=(0,b.default)(e,["isLoading"]);e=(0,_.default)({loading:i},s)}if("indentSize"in e){t("indentSize","indent","Table");var l=e.indentSize,u=(0,b.default)(e,["indentSize"]);e=(0,_.default)({indent:l},u)}if("optimization"in e){t("optimization","pure","Table");var d=e.optimization,c=(0,b.default)(e,["optimization"]);e=(0,_.default)({pure:d},c)}if("getRowClassName"in e){t("getRowClassName","getRowProps","Table");var f=e.getRowClassName,p=e.getRowProps,h=(0,b.default)(e,["getRowClassName","getRowProps"]);if(f){e=(0,_.default)({getRowProps:function(){return(0,_.default)({className:f.apply(void 0,arguments)},p?p.apply(void 0,arguments):{})}},h)}else e=(0,_.default)({getRowProps:p},h)}if("getRowProps"in e){t("getRowProps","rowProps","Table in 1.15.0");var m=e.getRowProps,g=(0,b.default)(e,["getRowProps"]);e=(0,_.default)({rowProps:m},g)}if("getCellProps"in e){t("getCellProps","cellProps","Table in 1.15.0");var y=e.getCellProps,v=(0,b.default)(e,["getCellProps"]);e=(0,_.default)({cellProps:y},v)}return e}}),e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var a in e)0<=t.indexOf(a)||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}},function(e,t,n){"use strict";t.__esModule=!0;var s=d(n(4)),l=d(n(19)),a=d(n(7)),r=n(11),o=d(n(329)),i=d(n(330)),u=n(530);function d(e){return e&&e.__esModule?e:{default:e}}function c(o,i){if("closable"in o){i("closable","closeable","Dialog");var e=o.closable,t=(0,l.default)(o,["closable"]);o=(0,s.default)({closeable:e},t)}return["target","offset","beforeOpen","onOpen","afterOpen","beforePosition","onPosition","cache","safeNode","wrapperClassName","container"].forEach(function(e){if(e in o){var t;i(e,"overlayProps."+e,"Dialog");var n=o.overlayProps,a=(0,l.default)(o,["overlayProps"]),r=(0,s.default)(((t={})[e]=o[e],t),n||{});delete a[e],o=(0,s.default)({overlayProps:r},a)}}),o}o.default.Inner=i.default,o.default.show=function(e){return!1!==a.default.getContextProps(e,"Dialog").warning&&(e=c(e,r.log.deprecated)),(0,u.show)(e)},o.default.alert=function(e){return!1!==a.default.getContextProps(e,"Dialog").warning&&(e=c(e,r.log.deprecated)),(0,u.alert)(e)},o.default.confirm=function(e){return!1!==a.default.getContextProps(e,"Dialog").warning&&(e=c(e,r.log.depLine truncated
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.4.1
|
||||
* https://jquery.com/
|
||||
@@ -23,20 +19,7 @@
|
||||
*
|
||||
* Date: 2019-05-01T21:04Z
|
||||
*/
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.4.1
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2019-05-01T21:04Z
|
||||
*/
|
||||
!function(e,t){"use strict";"object"==typeof sn.exports?sn.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(k,e){"use strict";function m(e){return null!=e&&e===e.window}var t=[],S=k.document,a=Object.getPrototypeOf,s=t.slice,g=t.concat,l=t.push,o=t.indexOf,n={},r=n.toString,y=n.hasOwnProperty,i=y.toString,u=i.call(Object),_={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var a,o,r=(n=n||S).createElement("script");if(r.text=e,t)for(a in c)(o=t[a]||t.getAttribute&&t.getAttribute(a))&&r.setAttribute(a,o);n.head.appendChild(r).parentNode.removeChild(r)}function M(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[r.call(e)]||"object":typeof e}var T=function(e,t){return new T.fn.init(e,t)},d=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function p(e){var t=!!e&&"length"in e&&e.length,n=M(e);return!v(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}T.fn=T.prototype={jquery:"3.4.1",constructor:T,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(n){return this.pushStack(T.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:t.sort,splice:t.splice},T.extend=T.fn.extend=function(){var e,t,n,a,o,r,i=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof i&&(u=i,i=arguments[s]||{},s++),"object"==typeof i||v(i)||(i={}),s===l&&(i=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)a=e[t],"__proto__"!==t&&i!==a&&(u&&a&&(T.isPlainObject(a)||(o=Array.isArray(a)))?(n=i[t],r=o&&!Array.isArray(n)?[]:o||T.isPlainObject(n)?n:{},o=!1,i[t]=T.extend(u,r,a)):void 0!==a&&(i[t]=a));return i},T.extend({expando:"jQuery"+("3.4.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==r.call(e))&&(!(t=a(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&i.call(n)===u)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,a=0;if(p(e))for(n=e.length;a<n&&!1!==t.call(e[a],a,e[a]);a++);else for(a in e)if(!1===t.call(e[a],a,e[a]))break;return e},trim:function(e){return null==e?"":(e+"").replace(d,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?T.merge(n,"string"==typeof e?[e]:e):l.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:o.call(t,e,n)},merge:function(e,t){for(var n=+t.length,a=0,o=e.length;a<n;a++)e[o++]=t[a];return e.length=o,e},grep:function(e,t,n){for(var a=[],o=0,r=e.length,i=!n;o<r;o++)!t(e[o],o)!=i&&a.push(e[o]);return a},map:function(e,t,n){var a,o,r=0,i=[];if(p(e))for(a=e.length;r<a;r++)null!=(o=t(e[r],r,n))&&i.push(o);else for(r in e)null!=(o=t(e[r],r,n))&&i.push(o);return g.apply([],i)},guid:1,support:_}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=t[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var f=
|
||||
!function(e,t){"use strict";"object"==typeof sn.exports?sn.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(k,e){"use strict";function m(e){return null!=e&&e===e.window}var t=[],S=k.document,a=Object.getPrototypeOf,s=t.slice,g=t.concat,l=t.push,r=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,i=y.toString,u=i.call(Object),v={},_=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},d={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var a,r,o=(n=n||S).createElement("script");if(o.text=e,t)for(a in d)(r=t[a]||t.getAttribute&&t.getAttribute(a))&&o.setAttribute(a,r);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var x=function(e,t){return new x.fn.init(e,t)},c=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function f(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!_(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}x.fn=x.prototype={jquery:"3.4.1",constructor:x,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return x.each(this,e)},map:function(n){return this.pushStack(x.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:t.sort,splice:t.splice},x.extend=x.fn.extend=function(){var e,t,n,a,r,o,i=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof i&&(u=i,i=arguments[s]||{},s++),"object"==typeof i||_(i)||(i={}),s===l&&(i=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)a=e[t],"__proto__"!==t&&i!==a&&(u&&a&&(x.isPlainObject(a)||(r=Array.isArray(a)))?(n=i[t],o=r&&!Array.isArray(n)?[]:r||x.isPlainObject(n)?n:{},r=!1,i[t]=x.extend(u,o,a)):void 0!==a&&(i[t]=a));return i},x.extend({expando:"jQuery"+("3.4.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=a(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&i.call(n)===u)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,a=0;if(f(e))for(n=e.length;a<n&&!1!==t.call(e[a],a,e[a]);a++);else for(a in e)if(!1===t.call(e[a],a,e[a]))break;return e},trim:function(e){return null==e?"":(e+"").replace(c,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(f(Object(e))?x.merge(n,"string"==typeof e?[e]:e):l.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:r.call(t,e,n)},merge:function(e,t){for(var n=+t.length,a=0,r=e.length;a<n;a++)e[r++]=t[a];return e.length=r,e},grep:function(e,t,n){for(var a=[],r=0,o=e.length,i=!n;r<o;r++)!t(e[r],r)!=i&&a.push(e[r]);return a},map:function(e,t,n){var a,r,o=0,i=[];if(f(e))for(a=e.length;o<a;o++)null!=(r=t(e[o],o,n))&&i.push(r);else for(o in e)null!=(r=t(e[o],o,n))&&i.push(r);return g.apply([],i)},guid:1,support:v}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=t[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var p=
|
||||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.4
|
||||
* https://sizzlejs.com/
|
||||
@@ -47,49 +30,48 @@
|
||||
*
|
||||
* Date: 2019-04-08
|
||||
*/
|
||||
function(n){function d(e,t,n){var a="0x"+t-65536;return a!=a||n?t:a<0?String.fromCharCode(65536+a):String.fromCharCode(a>>10|55296,1023&a|56320)}function o(){w()}var e,f,b,r,i,h,p,m,M,l,u,w,k,s,S,g,c,y,_,T="sizzle"+1*new Date,v=n.document,C=0,a=0,x=le(),E=le(),L=le(),D=le(),N=function(e,t){return e===t&&(u=!0),0},O={}.hasOwnProperty,t=[],Y=t.pop,P=t.push,j=t.push,I=t.slice,A=function(e,t){for(var n=0,a=e.length;n<a;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",z="\\["+H+"*("+F+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+H+"*\\]",W=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",B=new RegExp(H+"+","g"),V=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),U=new RegExp("^"+H+"*,"+H+"*"),K=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),q=new RegExp(H+"|>"),G=new RegExp(W),J=new RegExp("^"+F+"$"),$={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,ee=/^[^{]+\{\s*\[native \w/,te=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ne=/[+~]/,ae=new RegExp("\\\\([\\da-f]{1,6}"+H+"?|("+H+")|.)","ig"),oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{j.apply(t=I.call(v.childNodes),v.childNodes),t[v.childNodes.length].nodeType}catch(e){j={apply:t.length?function(e,t){P.apply(e,I.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function se(t,e,n,a){var o,r,i,s,l,u,c,d=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!a&&((e?e.ownerDocument||e:v)!==k&&w(e),e=e||k,S)){if(11!==p&&(l=te.exec(t)))if(o=l[1]){if(9===p){if(!(i=e.getElementById(o)))return n;if(i.id===o)return n.push(i),n}else if(d&&(i=d.getElementById(o))&&_(e,i)&&i.id===o)return n.push(i),n}else{if(l[2])return j.apply(n,e.getElementsByTagName(t)),n;if((o=l[3])&&f.getElementsByClassName&&e.getElementsByClassName)return j.apply(n,e.getElementsByClassName(o)),n}if(f.qsa&&!D[t+" "]&&(!g||!g.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,d=e,1===p&&q.test(t)){for((s=e.getAttribute("id"))?s=s.replace(oe,re):e.setAttribute("id",s=T),r=(u=h(t)).length;r--;)u[r]="#"+s+" "+ve(u[r]);c=u.join(","),d=ne.test(t)&&ye(e.parentNode)||e}try{return j.apply(n,d.querySelectorAll(c)),n}catch(e){D(t,!0)}finally{s===T&&e.removeAttribute("id")}}}return m(t.replace(V,"$1"),e,n,a)}function le(){var a=[];return function e(t,n){return a.push(t+" ")>b.cacheLength&&delete e[a.shift()],e[t+" "]=n}}function ue(e){return e[T]=!0,e}function ce(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),a=n.length;a--;)b.attrHandle[n[a]]=t}function pe(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function me(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ie(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ge(i){return ue(function(r){return r=+r,ue(function(e,t){for(var n,a=i([],e.length,r),o=a.length;o--;)e[n=a[o]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in f=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Q.test(t||n&&n.nodeName||"HTML")},w=se.setDocument=function(e){var t,n,a=e?e.ownerDocument||e:v;return a!==k&&9===a.nodeType&&a.documentElement&&(s=(k=a).documentElement,S=!i(k),v!==k&&(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",o,!1):n.attachEvent&&n.attachEvent("onunload",o)),f.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),f.getElementsByTagName=ce(function(e){return e.appendChild(k.createComment("")),!e.getElLine truncated
|
||||
function(n){function c(e,t,n){var a="0x"+t-65536;return a!=a||n?t:a<0?String.fromCharCode(65536+a):String.fromCharCode(a>>10|55296,1023&a|56320)}function r(){M()}var e,p,b,o,i,h,f,m,w,l,u,M,k,s,S,g,d,y,v,x="sizzle"+ +new Date,_=n.document,E=0,a=0,T=le(),L=le(),C=le(),D=le(),O=function(e,t){return e===t&&(u=!0),0},N={}.hasOwnProperty,t=[],P=t.pop,j=t.push,Y=t.push,I=t.slice,A=function(e,t){for(var n=0,a=e.length;n<a;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",z="\\["+H+"*("+F+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+H+"*\\]",W=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",V=new RegExp(H+"+","g"),B=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),U=new RegExp("^"+H+"*,"+H+"*"),K=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),q=new RegExp(H+"|>"),G=new RegExp(W),J=new RegExp("^"+F+"$"),$={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,ee=/^[^{]+\{\s*\[native \w/,te=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ne=/[+~]/,ae=new RegExp("\\\\([\\da-f]{1,6}"+H+"?|("+H+")|.)","ig"),re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{Y.apply(t=I.call(_.childNodes),_.childNodes),t[_.childNodes.length].nodeType}catch(e){Y={apply:t.length?function(e,t){j.apply(e,I.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function se(t,e,n,a){var r,o,i,s,l,u,d,c=e&&e.ownerDocument,f=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==f&&9!==f&&11!==f)return n;if(!a&&((e?e.ownerDocument||e:_)!==k&&M(e),e=e||k,S)){if(11!==f&&(l=te.exec(t)))if(r=l[1]){if(9===f){if(!(i=e.getElementById(r)))return n;if(i.id===r)return n.push(i),n}else if(c&&(i=c.getElementById(r))&&v(e,i)&&i.id===r)return n.push(i),n}else{if(l[2])return Y.apply(n,e.getElementsByTagName(t)),n;if((r=l[3])&&p.getElementsByClassName&&e.getElementsByClassName)return Y.apply(n,e.getElementsByClassName(r)),n}if(p.qsa&&!D[t+" "]&&(!g||!g.test(t))&&(1!==f||"object"!==e.nodeName.toLowerCase())){if(d=t,c=e,1===f&&q.test(t)){for((s=e.getAttribute("id"))?s=s.replace(re,oe):e.setAttribute("id",s=x),o=(u=h(t)).length;o--;)u[o]="#"+s+" "+_e(u[o]);d=u.join(","),c=ne.test(t)&&ye(e.parentNode)||e}try{return Y.apply(n,c.querySelectorAll(d)),n}catch(e){D(t,!0)}finally{s===x&&e.removeAttribute("id")}}}return m(t.replace(B,"$1"),e,n,a)}function le(){var a=[];return function e(t,n){return a.push(t+" ")>b.cacheLength&&delete e[a.shift()],e[t+" "]=n}}function ue(e){return e[x]=!0,e}function de(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),a=n.length;a--;)b.attrHandle[n[a]]=t}function fe(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function me(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ie(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ge(i){return ue(function(o){return o=+o,ue(function(e,t){for(var n,a=i([],e.length,o),r=a.length;r--;)e[n=a[r]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},M=se.setDocument=function(e){var t,n,a=e?e.ownerDocument||e:_;return a!==k&&9===a.nodeType&&a.documentElement&&(s=(k=a).documentElement,S=!i(k),_!==k&&(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",r,!1):n.attachEvent&&n.attachEvent("onunload",r)),p.attributes=de(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=de(function(e){return e.appendChild(k.createComment("")),!e.getElLine truncated
|
||||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/var l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),r=1;r<arguments.length;r++){for(var i in n=Object(arguments[r]))u.call(n,i)&&(o[i]=n[i]);if(l){a=l(n);for(var s=0;s<a.length;s++)c.call(n,a[s])&&(o[a[s]]=n[a[s]])}}return o}},function(e,t,n){"use strict";t.__esModule=!0;var b=a(n(5));t.default=function(e,t,n){var a=e.prefix,o=e.locale,r=e.pure,i=e.rtl,s=e.errorBoundary,l=t.nextPrefix,u=t.nextLocale,c=t.nextPure,d=t.nextWarning,p=t.nextRtl,f=t.nextErrorBoundary,h=a||l,m=void 0;u&&(m=u[n])&&(m.momentLocale=u.momentLocale);var g=void 0;o?g=w.obj.deepMerge({},M.default[n],m,o):m&&(g=w.obj.deepMerge({},M.default[n],m));var y="boolean"==typeof r?r:c,_="boolean"==typeof i?i:p,v=(0,b.default)({},k(f),k(s));"open"in v||(v.open=!1);return{prefix:h,locale:g,pure:y,rtl:_,warning:d,errorBoundary:v}};var M=a(n(35)),w=n(11);function a(e){return e&&e.__esModule?e:{default:e}}var k=function(e){return null==e?{}:"boolean"==typeof e?{open:e}:(0,b.default)({open:!0},e)};e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.matches=t.hasDOM=void 0;var a,o=n(47),r=(a=o)&&a.__esModule?a:{default:a};t.hasClass=u,t.addClass=c,t.removeClass=d,t.toggleClass=function(e,t){if(!l||!e)return!1;{if(e.classList)return e.classList.toggle(t);var n=u(e,t);return n?d(e,t,!0):c(e,t,!0),!n}},t.getStyle=function(e,t){if(!l||!e)return null;var n=function(e){return e&&1===e.nodeType?window.getComputedStyle(e,null):{}}(e);return 1!==arguments.length?(t=h[t]?"cssFloat"in e.style?"cssFloat":"styleFloat":t,function(e,t,n){if(t=t.toLowerCase(),"auto"===n){if("height"===t)return e.offsetHeight||0;if("width"===t)return e.offsetWidth||0}t in f||(f[t]=p.test(t));return f[t]?parseFloat(n)||0:n}(e,t,n.getPropertyValue((0,i.hyphenate)(t))||e.style[(0,i.camelcase)(t)])):n},t.setStyle=m,t.scrollbar=function(){var e=document.createElement("div");m(e,{position:"absolute",width:"100px",height:"100px",overflow:"scroll",top:"-9999px"}),document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),{width:t,height:n}},t.getOffset=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView;return{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}};var i=n(167),s=n(79);var l=t.hasDOM="undefined"!=typeof window&&!!window.document&&!!document.createElement;function u(e,t){return!(!l||!e)&&(e.classList?e.classList.contains(t):-1<e.className.indexOf(t))}function c(e,t,n){l&&e&&(e.classList?e.classList.add(t):!0!==n&&u(e,t)||(e.className+=" "+t))}function d(e,t,n){l&&e&&(e.classList?e.classList.remove(t):!0!==n&&!u(e,t)||(e.className=e.className.replace(t,"").replace(/\s+/g," ").trim()))}t.matches=function(){var n=null;if(l){var e=document.body||document.head;n=e.matches?"matches":e.webkitMatchesSelector?"webkitMatchesSelector":e.msMatchesSelector?"msMatchesSelector":e.mozMatchesSelector?"mozMatchesSelector":null}return function(e,t){return!(!l||!e)&&(!!n&&e[n](t))}}();var p=/margin|padding|width|height|max|min|offset|size/i,f={left:1,top:1,right:1,bottom:1};var h={cssFloat:1,styleFloat:1,float:1};function m(n,e,t){if(!l||!n)return!1;"object"===(void 0===e?"undefined":(0,r.default)(e))&&2===arguments.length?(0,s.each)(e,function(e,t){return m(n,t,e)}):(e=h[e]?"cssFloat"in n.style?"cssFloat":"styleFloat":e,"number"==typeof t&&p.test(e)&&(t+="px"),n.style[(0,i.camelcase)(e)]=t)}},function(e,t,n){"use strict";t.__esModule=!0,t.camelcase=function(e){return/-/.test(e)?e.toLowerCase().replace(/-([a-z])/g,function(e,t){return t.toUpperCase()}):e||""},t.hyphenate=function(e){var t=(0,o.typeOf)(e);return"String"===t?e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}):((0,a.warning)("[ hyphenate(str: string): string ] Expected arguments[0] to be a string but get a "+t+".It will return an empty string without any processing."),"")},t.template=function(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=(0,o.typeOf)(e);return"String"===t?e.replace(/\{[a-z]*\}/g,function(e){var t=e.substring(1,e.length-1);return n[t]||""}):((0,a.warning)("[ template(tpl: string, object: object): string ] Expected arguments[0] to be a string but get a "+t+".It will return an empty string without any processing."),"")};var a=n(168),o=n(79)},function(e,t,n){"use strict";t.__esModule=!0,t.deprecated=function(e,t,n){if(!(Line truncated
|
||||
/** @license React v16.8.6
|
||||
*/var l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},a)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var n,a,r=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in n=Object(arguments[o]))u.call(n,i)&&(r[i]=n[i]);if(l){a=l(n);for(var s=0;s<a.length;s++)d.call(n,a[s])&&(r[a[s]]=n[a[s]])}}return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e};t.routerReducer=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:i,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.type,a=t.payload;return n!==o?e:r({},e,{locationBeforeTransitions:a})};var o=t.LOCATION_CHANGE="@@router/LOCATION_CHANGE",i={locationBeforeTransitions:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.CALL_HISTORY_METHOD="@@router/CALL_HISTORY_METHOD";function a(a){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{type:r,payload:{method:a,args:t}}}}var o=t.push=a("push"),i=t.replace=a("replace"),s=t.go=a("go"),l=t.goBack=a("goBack"),u=t.goForward=a("goForward");t.routerActions={push:o,replace:i,go:s,goBack:l,goForward:u}},function(e,t,n){var o=n(430);e.exports=function(a,r,e){if(o(a),void 0===r)return a;switch(e){case 1:return function(e){return a.call(r,e)};case 2:return function(e,t){return a.call(r,e,t)};case 3:return function(e,t,n){return a.call(r,e,t,n)}}return function(){return a.apply(r,arguments)}}},function(e,t,n){e.exports=!n(76)&&!n(100)(function(){return 7!=Object.defineProperty(n(171)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var a=n(85),r=n(72).document,o=a(r)&&a(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}},function(e,t,n){var i=n(77),s=n(86),l=n(432)(!1),u=n(134)("IE_PROTO");e.exports=function(e,t){var n,a=s(e),r=0,o=[];for(n in a)n!=u&&i(a,n)&&o.push(n);for(;t.length>r;)i(a,n=t[r++])&&(~l(o,n)||o.push(n));return o}},function(e,t,n){var a=n(174);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==a(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";function _(){return this}var b=n(111),w=n(98),M=n(176),k=n(83),S=n(139),x=n(439),E=n(141),T=n(442),L=n(87)("iterator"),C=!([].keys&&"next"in[].keys()),D="values";e.exports=function(e,t,n,a,r,o,i){x(n,t,a);function s(e){if(!C&&e in h)return h[e];switch(e){case"keys":case D:return function(){return new n(this,e)}}return function(){return new n(this,e)}}var l,u,d,c=t+" Iterator",f=r==D,p=!1,h=e.prototype,m=h[L]||h["@@iterator"]||r&&h[r],g=m||s(r),y=r?f?s("entries"):g:void 0,v="Array"==t&&h.entries||m;if(v&&(d=T(v.call(new e)))!==Object.prototype&&d.next&&(E(d,c,!0),b||"function"==typeof d[L]||k(d,L,_)),f&&m&&m.name!==D&&(p=!0,g=function(){return m.call(this)}),b&&!i||!C&&!p&&h[L]||k(h,L,g),S[t]=g,S[c]=_,r)if(l={values:f?g:s(D),keys:o?g:s("keys"),entries:y},i)for(u in l)u in h||M(h,u,l[u]);else w(w.P+w.F*(C||p),t,l);return l}},function(e,t,n){e.exports=n(83)},function(e,t,n){var a=n(172),r=n(136).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,r)}},function(e,t,n){var a=n(113),r=n(109),o=n(86),i=n(131),s=n(77),l=n(170),u=Object.getOwnPropertyDescriptor;t.f=n(76)?u:function(e,t){if(e=o(e),t=i(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return r(!a.f.call(e,t),e[t])}},function(e,t,n){"use strict";t.__esModule=!0;var S=a(n(4));t.default=function(e,t,n){var a=e.prefix,r=e.locale,o=e.pure,i=e.rtl,s=e.device,l=e.popupContainer,u=e.errorBoundary,d=t.nextPrefix,c=t.nextLocale,f=t.nextPure,p=t.nextWarning,h=t.nextRtl,m=t.nextDevice,g=t.nextPopupContainer,y=t.nextErrorBoundary,v=a||d,_=void 0;c&&(_=c[n])&&(_.momentLocale=c.momentLocale);var b=void 0;r?b=E.obj.deepMerge({},x.default[n],_,r):_&&(b=E.obj.deepMerge({},x.default[n],_));var w="boolean"==typeof o?o:f,M="boolean"==typeof i?i:h,k=(0,S.default)({},T(y),T(u));"open"in k||(k.open=!1);return{prefix:v,locale:b,pure:w,rtl:M,warning:p,device:s||m||void 0,popupContainer:l||g,errorBoundary:k}};var x=a(n(41)),E=n(11);function a(e){return e&&e.__esModule?e:{default:e}}var T=function(e){return null==e?{}:"boolean"==typeof e?{open:e}:(0,S.default)({opLine truncated
|
||||
/** @license React v16.13.0
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var c=n(164),a="function"==typeof Symbol&&Symbol.for,d=a?Symbol.for("react.element"):60103,u=a?Symbol.for("react.portal"):60106,o=a?Symbol.for("react.fragment"):60107,r=a?Symbol.for("react.strict_mode"):60108,i=a?Symbol.for("react.profiler"):60114,s=a?Symbol.for("react.provider"):60109,l=a?Symbol.for("react.context"):60110,p=a?Symbol.for("react.concurrent_mode"):60111,f=a?Symbol.for("react.forward_ref"):60112,h=a?Symbol.for("react.suspense"):60113,m=a?Symbol.for("react.memo"):60115,g=a?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function _(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=0;a<t;a++)n+="&args[]="+encodeURIComponent(arguments[a+1]);!function(e,t,n,a,o,r,i,s){if(!e){if((e=void 0)===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,a,o,r,i,s],u=0;(e=Error(t.replace(/%s/g,function(){return l[u++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function M(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||v}function w(){}function k(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||v}M.prototype.isReactComponent={},M.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&_("85"),this.updater.enqueueSetState(this,e,t,"setState")},M.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=M.prototype;var S=k.prototype=new w;S.constructor=k,c(S,M.prototype),S.isPureReactComponent=!0;var T={current:null},C={current:null},x=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function L(e,t,n){var a=void 0,o={},r=null,i=null;if(null!=t)for(a in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(r=""+t.key),t)x.call(t,a)&&!E.hasOwnProperty(a)&&(o[a]=t[a]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(a in s=e.defaultProps)void 0===o[a]&&(o[a]=s[a]);return{$$typeof:d,type:e,key:r,ref:i,props:o,_owner:C.current}}function D(e){return"object"==typeof e&&null!==e&&e.$$typeof===d}var N=/\/+/g,O=[];function Y(e,t,n,a){if(O.length){var o=O.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=a,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:a,count:0}}function P(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,O.length<10&&O.push(e)}function j(e,t,n){return null==e?0:function e(t,n,a,o){var r=typeof t;"undefined"!==r&&"boolean"!==r||(t=null);var i=!1;if(null===t)i=!0;else switch(r){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case d:case u:i=!0}}if(i)return a(o,t,""===n?"."+I(t,0):n),1;if(i=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var l=n+I(r=t[s],s);i+=e(r,l,a,o)}else if("function"==typeof(l=null===t||"object"!=typeof t?null:"function"==typeof(l=y&&t[y]||t["@@iterator"])?l:null))for(t=l.call(t),s=0;!(r=t.next()).done;)i+=e(r=r.value,l=n+I(r,s++),a,o);else"object"===r&&_("31","[object Object]"==(a=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":a,"");return i}(e,"",t,n)}function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function A(e,t){e.func.call(e.context,t,e.count++)}function R(e,t,n){var a=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?H(e,a,n,function(e){return e}):null!=e&&(D(e)&&(e=function(e,t){return{$$typeof:d,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(N,"$&/")+"/")+n)),a.push(e))}function H(e,t,n,a,o){var r="";null!=n&&(r=(""+n).replace(N,"$&/")+"/"),j(e,R,t=Y(t,r,a,o)),P(t)}function F(){var e=T.current;return null===e&&_("321"),e}var z={Children:{map:function(e,t,n){if(null==e)return e;var a=[];return H(e,a,null,t,n),a},forEach:function(e,t,n){if(null==e)return e;j(e,A,t=Y(null,null,t,n)),P(t)},count:function(e){return j(e,function(){return null},null)},toArray:function(e){var t=[];return H(e,t,null,function(e){return e}),t},only:function(e){return D(e)||_("143"),e}},createRef:function(){return{current:null}},Component:M,PureComponent:k,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:l,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:f,render:e}},lazy:function(e){return{$$typeof:g,_ctor:e,_status:-1,_result:null}},memo:function(e,t){returnLine truncated
|
||||
/** @license React v16.8.6
|
||||
*/var d=n(166),a="function"==typeof Symbol&&Symbol.for,c=a?Symbol.for("react.element"):60103,u=a?Symbol.for("react.portal"):60106,r=a?Symbol.for("react.fragment"):60107,o=a?Symbol.for("react.strict_mode"):60108,i=a?Symbol.for("react.profiler"):60114,s=a?Symbol.for("react.provider"):60109,l=a?Symbol.for("react.context"):60110,f=a?Symbol.for("react.forward_ref"):60112,p=a?Symbol.for("react.suspense"):60113,h=a?Symbol.for("react.memo"):60115,m=a?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_={};function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||v}function w(){}function M(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||v}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=b.prototype;var k=M.prototype=new w;k.constructor=M,d(k,b.prototype),k.isPureReactComponent=!0;var S={current:null},x=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var a,r={},o=null,i=null;if(null!=t)for(a in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)x.call(t,a)&&!E.hasOwnProperty(a)&&(r[a]=t[a]);var s=arguments.length-2;if(1===s)r.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];r.children=l}if(e&&e.defaultProps)for(a in s=e.defaultProps)void 0===r[a]&&(r[a]=s[a]);return{$$typeof:c,type:e,key:o,ref:i,props:r,_owner:S.current}}function L(e){return"object"==typeof e&&null!==e&&e.$$typeof===c}var C=/\/+/g,D=[];function O(e,t,n,a){if(D.length){var r=D.pop();return r.result=e,r.keyPrefix=t,r.func=n,r.context=a,r.count=0,r}return{result:e,keyPrefix:t,func:n,context:a,count:0}}function N(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,D.length<10&&D.push(e)}function P(e,t,n){return null==e?0:function e(t,n,a,r){var o=typeof t;"undefined"!==o&&"boolean"!==o||(t=null);var i=!1;if(null===t)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case c:case u:i=!0}}if(i)return a(r,t,""===n?"."+j(t,0):n),1;if(i=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var l=n+j(o=t[s],s);i+=e(o,l,a,r)}else if("function"==typeof(l=null!==t&&"object"==typeof t&&"function"==typeof(l=g&&t[g]||t["@@iterator"])?l:null))for(t=l.call(t),s=0;!(o=t.next()).done;)i+=e(o=o.value,l=n+j(o,s++),a,r);else if("object"===o)throw a=""+t,Error(y(31,"[object Object]"===a?"object with keys {"+Object.keys(t).join(", ")+"}":a,""));return i}(e,"",t,n)}function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=e.key,a={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,function(e){return a[e]})):t.toString(36);var n,a}function Y(e,t){e.func.call(e.context,t,e.count++)}function I(e,t,n){var a,r,o=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?A(e,o,n,function(e){return e}):null!=e&&(L(e)&&(r=i+(!(a=e).key||t&&t.key===e.key?"":(""+e.key).replace(C,"$&/")+"/")+n,e={$$typeof:c,type:a.type,key:r,ref:a.ref,props:a.props,_owner:a._owner}),o.push(e))}function A(e,t,n,a,r){var o="";null!=n&&(o=(""+n).replace(C,"$&/")+"/"),P(e,I,t=O(t,o,a,r)),N(t)}var R={current:null};function H(){var e=R.current;if(null===e)throw Error(y(321));return e}var F={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:d};t.Children={map:function(e,t,n){if(null==e)return e;var a=[];return A(e,a,null,t,n),a},forEach:function(e,t,n){if(null==e)return e;P(e,Y,t=O(null,null,t,n)),N(t)},count:function(e){return P(e,function(){return null},null)},toArray:function(e){var t=[];return A(e,t,null,function(e){return e}),t},only:function(e){if(!L(e))throw Error(y(143));return e}},t.Component=b,t.Fragment=r,t.Profiler=i,t.PureComponent=M,t.StrictMode=o,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var a=d({},e.props),r=e.key,o=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,i=S.current),void 0!==t.key&&(r=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)x.call(t,l)&&!E.hasOwnProperty(l)&&(a[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)a.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];a.children=s}return{$$typeof:c,type:e.type,key:r,ref:o,props:a,_owner:i}}Line truncated
|
||||
/** @license React v16.13.0
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var a=n(0),_=n(164),s=n(443);function v(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=0;a<t;a++)n+="&args[]="+encodeURIComponent(arguments[a+1]);!function(e,t,n,a,o,r,i,s){if(!e){if((e=void 0)===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,a,o,r,i,s],u=0;(e=Error(t.replace(/%s/g,function(){return l[u++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}a||v("227");var c=!1,d=null,p=!1,f=null,u={onError:function(e){c=!0,d=e}};function h(e,t,n,a,o,r,i,s,l){c=!1,d=null,function(e,t,n,a,o,r,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}.apply(u,arguments)}var m=null,g={};function o(){if(m)for(var e in g){var t=g[e],n=m.indexOf(e);if(-1<n||v("96",e),!b[n])for(var a in t.extractEvents||v("97",e),n=(b[n]=t).eventTypes){var o=void 0,r=n[a],i=t,s=a;M.hasOwnProperty(s)&&v("99",s);var l=(M[s]=r).phasedRegistrationNames;if(l){for(o in l)l.hasOwnProperty(o)&&y(l[o],i,s);o=!0}else o=!!r.registrationName&&(y(r.registrationName,i,s),!0);o||v("98",a,e)}}}function y(e,t,n){w[e]&&v("100",e),w[e]=t,l[e]=t.eventTypes[n].dependencies}var b=[],M={},w={},l={},r=null,i=null,k=null;function S(e,t,n){var a=e.type||"unknown-event";e.currentTarget=k(n),function(e,t,n,a,o,r,i,s,l){if(h.apply(this,arguments),c){if(c){var u=d;c=!1,d=null}else v("198"),u=void 0;p||(p=!0,f=u)}}(a,t,void 0,e),e.currentTarget=null}function T(e,t){return null==t&&v("30"),null==e?t:Array.isArray(e)?(Array.isArray(t)?e.push.apply(e,t):e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function C(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var x=null;function E(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var a=0;a<t.length&&!e.isPropagationStopped();a++)S(e,t[a],n[a]);else t&&S(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}var L={injectEventPluginOrder:function(e){m&&v("101"),m=Array.prototype.slice.call(e),o()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var a=e[t];g.hasOwnProperty(t)&&g[t]===a||(g[t]&&v("102",t),g[t]=a,n=!0)}n&&o()}};function D(e,t){var n=e.stateNode;if(!n)return null;var a=r(n);if(!a)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(a=!a.disabled)||(a=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!a;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&v("231",t,typeof n),n)}function N(e){if(null!==e&&(x=T(x,e)),e=x,x=null,e&&(C(e,E),x&&v("95"),p))throw e=f,p=!1,f=null,e}var O=Math.random().toString(36).slice(2),Y="__reactInternalInstance$"+O,P="__reactEventHandlers$"+O;function j(e){if(e[Y])return e[Y];for(;!e[Y];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[Y]).tag||6===e.tag?e:null}function I(e){return!(e=e[Y])||5!==e.tag&&6!==e.tag?null:e}function A(e){if(5===e.tag||6===e.tag)return e.stateNode;v("33")}function R(e){return e[P]||null}function H(e){for(;(e=e.return)&&5!==e.tag;);return e||null}function F(e,t,n){(t=D(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=T(n._dispatchListeners,t),n._dispatchInstances=T(n._dispatchInstances,e))}function z(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=H(t);for(t=n.length;0<t--;)F(n[t],"captured",e);for(t=0;t<n.length;t++)F(n[t],"bubbled",e)}}function W(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=D(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=T(n._dispatchListeners,t),n._dispatchInstances=T(n._dispatchInstances,e))}function B(e){e&&e.dispatchConfig.registrationName&&W(e._targetInst,null,e)}function V(e){C(e,z)}var U=!("undefined"==typeof window||!window.document||!window.document.createElement);function K(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var q={animationend:K("Animation","AnimationEnd"),animationiteration:K("Animation","AnimationIteration"),animationstart:K("Animation","AnimationStart"),transitionend:K("Transition","TransitionEnd")},G={},J={};function $(e){if(G[e])return G[e];if(!q[e])return e;var t,n=q[e];for(t in n)if(n.hasOwnProperty(t)&&t in J)return G[e]=n[t];return e}U&&(J=document.createElement("div").style,"AnimationEvent"in window||(delete q.animationend.animation,delete q.animationiteration.animation,delete q.animationstart.animation),"TransitionEvent"in window||delete q.transitionend.transition);var Q=$("animationend"),X=$("animationiteration"),Z=$("animationstart"),ee=$("transitionend"),Line truncated
|
||||
/** @license React v0.13.6
|
||||
*/var r=n(0),y=n(166),a=n(418);function x(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(x(227));var d=!1,c=null,f=!1,p=null,u={onError:function(e){d=!0,c=e}};function h(e,t,n,a,r,o,i,s,l){d=!1,c=null,function(e,t,n,a,r,o,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}.apply(u,arguments)}var o=null,i=null,s=null;function l(e,t,n){var a=e.type||"unknown-event";e.currentTarget=s(n),function(e,t,n,a,r,o,i,s,l){if(h.apply(this,arguments),d){if(!d)throw Error(x(198));var u=c;d=!1,c=null,f||(f=!0,p=u)}}(a,t,void 0,e),e.currentTarget=null}var m=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;m.hasOwnProperty("ReactCurrentDispatcher")||(m.ReactCurrentDispatcher={current:null}),m.hasOwnProperty("ReactCurrentBatchConfig")||(m.ReactCurrentBatchConfig={suspense:null});var g=/^(.*)[\\\/]/,v="function"==typeof Symbol&&Symbol.for,_=v?Symbol.for("react.element"):60103,b=v?Symbol.for("react.portal"):60106,w=v?Symbol.for("react.fragment"):60107,M=v?Symbol.for("react.strict_mode"):60108,k=v?Symbol.for("react.profiler"):60114,S=v?Symbol.for("react.provider"):60109,E=v?Symbol.for("react.context"):60110,T=v?Symbol.for("react.concurrent_mode"):60111,L=v?Symbol.for("react.forward_ref"):60112,C=v?Symbol.for("react.suspense"):60113,D=v?Symbol.for("react.suspense_list"):60120,O=v?Symbol.for("react.memo"):60115,N=v?Symbol.for("react.lazy"):60116,P=v?Symbol.for("react.block"):60121,j="function"==typeof Symbol&&Symbol.iterator;function Y(e){return null!==e&&"object"==typeof e&&"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}function I(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case w:return"Fragment";case b:return"Portal";case k:return"Profiler";case M:return"StrictMode";case C:return"Suspense";case D:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case E:return"Context.Consumer";case S:return"Context.Provider";case L:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case O:return I(e.type);case P:return I(e.render);case N:if(e=1===e._status?e._result:null)return I(e)}return null}function A(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var a=e._debugOwner,r=e._debugSource,o=I(e.type);n=null,a&&(n=I(a.type)),a=o,o="",r?o=" (at "+r.fileName.replace(g,"")+":"+r.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(a||"Unknown")+o}t+=n,e=e.return}while(e);return t}var R=null,H={};function F(){if(R)for(var e in H){var t=H[e],n=R.indexOf(e);if(!(-1<n))throw Error(x(96,e));if(!W[n]){if(!t.extractEvents)throw Error(x(97,e));for(var a in n=(W[n]=t).eventTypes){var r=void 0,o=n[a],i=t,s=a;if(V.hasOwnProperty(s))throw Error(x(99,s));var l=(V[s]=o).phasedRegistrationNames;if(l){for(r in l)l.hasOwnProperty(r)&&z(l[r],i,s);r=!0}else r=!!o.registrationName&&(z(o.registrationName,i,s),!0);if(!r)throw Error(x(98,a,e))}}}}function z(e,t,n){if(B[e])throw Error(x(100,e));B[e]=t,U[e]=t.eventTypes[n].dependencies}var W=[],V={},B={},U={};function K(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var a=e[t];if(!H.hasOwnProperty(t)||H[t]!==a){if(H[t])throw Error(x(102,t));H[t]=a,n=!0}}n&&F()}var q=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),G=null,J=null,$=null;function X(e){if(e=i(e)){if("function"!=typeof G)throw Error(x(280));var t=e.stateNode;t&&(t=o(t),G(e.stateNode,e.type,t))}}function Q(e){J?$?$.push(e):$=[e]:J=e}function Z(){if(J){var e=J,t=$;if($=J=null,X(e),t)for(e=0;e<t.length;e++)X(t[e])}}function ee(e,t){return e(t)}function te(e,t,n,a,r){return e(t,n,a,r)}function ne(){}var ae=ee,re=!1,oe=!1;function ie(){null===J&&null===$||(ne(),Z())}function se(e,t,n){if(oe)return e(t,n);oe=!0;try{return ae(e,t,n)}finally{oe=!1,ie()}}var le=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ue=Object.prototype.hasOwnProperty,de={},ce={};function fe(e,t,n,a){if(null==t||function(e,t,n,a){if(null===n||0!==n.type)switch(typeof t){case"function":case"symbol":return 1;case"boolean":return a?void 0:null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e;default:return}}(e,t,n,a))return 1;if(!a&&null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||t<1}}function pe(e,t,n,a,r,o){this.acceptsBooleans=2===t||Line truncated
|
||||
/** @license React v0.19.0
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
Object.defineProperty(H,"__esModule",{value:!0});var i=null,a=!1,s=3,o=-1,l=-1,r=!1,u=!1;function c(){if(!r){var e=i.expirationTime;u?w():u=!0,M(t,e)}}function d(){var e=i,t=i.next;if(i===t)i=null;else{var n=i.previous;i=n.next=t,t.previous=n}e.next=e.previous=null,n=e.callback,t=e.expirationTime,e=e.priorityLevel;var a=s,o=l;s=e,l=t;try{var r=n()}finally{s=a,l=o}if("function"==typeof r)if(r={callback:r,priorityLevel:e,expirationTime:t,next:null,previous:null},null===i)i=r.next=r.previous=r;else{n=null,e=i;do{if(e.expirationTime>=t){n=e;break}e=e.next}while(e!==i);null===n?n=i:n===i&&(i=r,c()),(t=n.previous).next=n.previous=r,r.next=n,r.previous=t}}function p(){if(-1===o&&null!==i&&1===i.priorityLevel){r=!0;try{for(;d(),null!==i&&1===i.priorityLevel;);}finally{r=!1,null!==i?c():u=!1}}}function t(e){r=!0;var t=a;a=e;try{if(e)for(;null!==i;){var n=H.unstable_now();if(!(i.expirationTime<=n))break;for(;d(),null!==i&&i.expirationTime<=n;);}else if(null!==i)for(;d(),null!==i&&!k(););}finally{r=!1,a=t,null!==i?c():u=!1,p()}}var n,f,h=Date,m="function"==typeof setTimeout?setTimeout:void 0,g="function"==typeof clearTimeout?clearTimeout:void 0,y="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,_="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function v(t){n=y(function(e){g(f),t(e)}),f=m(function(){_(n),t(H.unstable_now())},100)}if("object"==typeof performance&&"function"==typeof performance.now){var b=performance;H.unstable_now=function(){return b.now()}}else H.unstable_now=function(){return h.now()};var M,w,k,S=null;if("undefined"!=typeof window?S=window:void 0!==e&&(S=e),S&&S._schedMock){var T=S._schedMock;M=T[0],w=T[1],k=T[2],H.unstable_now=T[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var C=null,x=function(e){if(null!==C)try{C(e)}finally{C=null}};M=function(e){null!==C?setTimeout(M,0,e):(C=e,setTimeout(x,0,!1))},w=function(){C=null},k=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof _&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var E=null,L=!1,D=-1,N=!1,O=!1,Y=0,P=33,j=33;k=function(){return Y<=H.unstable_now()};var I=new MessageChannel,A=I.port2;I.port1.onmessage=function(){L=!1;var e=E,t=D;E=null,D=-1;var n=H.unstable_now(),a=!1;if(Y-n<=0){if(!(-1!==t&&t<=n))return N||(N=!0,v(R)),E=e,void(D=t);a=!0}if(null!==e){O=!0;try{e(a)}finally{O=!1}}};var R=function(e){if(null!==E){v(R);var t=e-Y+j;t<j&&P<j?(t<8&&(t=8),j=t<P?P:t):P=t,Y=e+j,L||(L=!0,A.postMessage(void 0))}else N=!1};M=function(e,t){E=e,D=t,O||t<0?A.postMessage(void 0):N||(N=!0,v(R))},w=function(){E=null,L=!1,D=-1}}H.unstable_ImmediatePriority=1,H.unstable_UserBlockingPriority=2,H.unstable_NormalPriority=3,H.unstable_IdlePriority=5,H.unstable_LowPriority=4,H.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=s,a=o;s=e,o=H.unstable_now();try{return t()}finally{s=n,o=a,p()}},H.unstable_next=function(e){switch(s){case 1:case 2:case 3:var t=3;break;default:t=s}var n=s,a=o;s=t,o=H.unstable_now();try{return e()}finally{s=n,o=a,p()}},H.unstable_scheduleCallback=function(e,t){var n=-1!==o?o:H.unstable_now();if("object"==typeof t&&null!==t&&"number"==typeof t.timeout)t=n+t.timeout;else switch(s){case 1:t=n+-1;break;case 2:t=n+250;break;case 5:t=n+1073741823;break;case 4:t=n+1e4;break;default:t=n+5e3}if(e={callback:e,priorityLevel:s,expirationTime:t,next:null,previous:null},null===i)i=e.next=e.previous=e,c();else{n=null;var a=i;do{if(a.expirationTime>t){n=a;break}a=a.next}while(a!==i);null===n?n=i:n===i&&(i=e,c()),(t=n.previous).next=n.previous=e,e.next=n,e.previous=t}return e},H.unstable_cancelCallback=function(e){var t=e.next;if(null!==t){if(t===e)i=null;else{e===i&&(i=t);var n=e.previous;(n.next=t).previous=n}e.next=e.previous=null}},H.unstable_wrapCallback=function(n){var a=s;return function(){var e=s,t=o;s=a,o=H.unstable_now();try{return n.apply(this,arguments)}finally{s=e,o=t,p()}}},H.unstable_getCurrentPriorityLevel=function(){return s},H.unstable_shouldYield=function(){return!a&&(null!==i&&i.expirationTime<l||k())},H.unstable_continueExecution=function(){null!==i&&c()},H.unstable_pauseExecution=function(){},H.unstable_getFirstCallbackNode=function(){return i}}).call(this,t(134))},function(e,t,n){"use strict";t.__esModule=!0;t.default={allOverlays:[],addOverlay:function(e){this.removeOverlay(e),this.allOverlays.unshift(e)},isCurrentOverlay:function(e){return e&&this.allOverlays[0]===e},removeOverlay:function(e){var t=this.allOverlays.indexOf(e);-1<t&&this.allOverlays.splice(t,1)}},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,r,i=n(4),s=(a=i)&&a.__esModule?a:{default:a},g=n(11);functLine truncated
|
||||
/** @license React v16.8.6
|
||||
*/var o,l,u,d,n;if("undefined"==typeof window||"function"!=typeof MessageChannel){var a=null,r=null,i=function(){if(null!==a)try{var e=s.unstable_now();a(!0,e),a=null}catch(e){throw setTimeout(i,0),e}},c=Date.now();s.unstable_now=function(){return Date.now()-c},o=function(e){null!==a?setTimeout(o,0,e):(a=e,setTimeout(i,0))},l=function(e,t){r=setTimeout(e,t)},u=function(){clearTimeout(r)},d=function(){return!1},n=s.unstable_forceFrameRate=function(){}}else{var f=window.performance,p=window.Date,h=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var g=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)s.unstable_now=function(){return f.now()};else{var y=p.now();s.unstable_now=function(){return p.now()-y}}var v=!1,_=null,b=-1,w=5,M=0;d=function(){return s.unstable_now()>=M},n=function(){},s.unstable_forceFrameRate=function(e){e<0||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,S=k.port2;k.port1.onmessage=function(){if(null!==_){var e=s.unstable_now();M=e+w;try{_(!0,e)?S.postMessage(null):(v=!1,_=null)}catch(e){throw S.postMessage(null),e}}else v=!1},o=function(e){_=e,v||(v=!0,S.postMessage(null))},l=function(e,t){b=h(function(){e(s.unstable_now())},t)},u=function(){m(b),b=-1}}function x(e,t){var n=e.length;e.push(t);e:for(;;){var a=n-1>>>1,r=e[a];if(!(void 0!==r&&0<L(r,t)))break e;e[a]=t,e[n]=r,n=a}}function E(e){return void 0===(e=e[0])?null:e}function T(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var a=0,r=e.length;a<r;){var o=2*(a+1)-1,i=e[o],s=1+o,l=e[s];if(void 0!==i&&L(i,n)<0)a=void 0!==l&&L(l,i)<0?(e[a]=l,e[s]=n,s):(e[a]=i,e[o]=n,o);else{if(!(void 0!==l&&L(l,n)<0))break e;e[a]=l,e[s]=n,a=s}}}return t}}function L(e,t){var n=e.sortIndex-t.sortIndex;return 0!=n?n:e.id-t.id}var C=[],D=[],O=1,N=null,P=3,j=!1,Y=!1,I=!1;function A(e){for(var t=E(D);null!==t;){if(null===t.callback)T(D);else{if(!(t.startTime<=e))break;T(D),t.sortIndex=t.expirationTime,x(C,t)}t=E(D)}}function R(e){if(I=!1,A(e),!Y)if(null!==E(C))Y=!0,o(H);else{var t=E(D);null!==t&&l(R,t.startTime-e)}}function H(e,t){Y=!1,I&&(I=!1,u()),j=!0;var n=P;try{for(A(t),N=E(C);null!==N&&(!(N.expirationTime>t)||e&&!d());){var a=N.callback;if(null!==a){N.callback=null,P=N.priorityLevel;var r=a(N.expirationTime<=t);t=s.unstable_now(),"function"==typeof r?N.callback=r:N===E(C)&&T(C),A(t)}else T(C);N=E(C)}if(null!==N)var o=!0;else{var i=E(D);null!==i&&l(R,i.startTime-t),o=!1}return o}finally{N=null,P=n,j=!1}}function F(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=n;s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(e){e.callback=null},s.unstable_continueExecution=function(){Y||j||(Y=!0,o(H))},s.unstable_getCurrentPriorityLevel=function(){return P},s.unstable_getFirstCallbackNode=function(){return E(C)},s.unstable_next=function(e){switch(P){case 1:case 2:case 3:var t=3;break;default:t=P}var n=P;P=t;try{return e()}finally{P=n}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=z,s.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=P;P=e;try{return t()}finally{P=n}},s.unstable_scheduleCallback=function(e,t,n){var a=s.unstable_now();if("object"==typeof n&&null!==n){var r=n.delay;r="number"==typeof r&&0<r?a+r:a,n="number"==typeof n.timeout?n.timeout:F(e)}else n=F(e),r=a;return e={id:O++,callback:t,priorityLevel:e,startTime:r,expirationTime:n=r+n,sortIndex:-1},a<r?(e.sortIndex=r,x(D,e),null===E(C)&&e===E(D)&&(I?u():I=!0,l(R,r-a))):(e.sortIndex=n,x(C,e),Y||j||(Y=!0,o(H))),e},s.unstable_shouldYield=function(){var e=s.unstable_now();A(e);var t=E(C);return t!==N&&null!==N&&null!==t&&null!==t.callback&&t.startTime<=e&&t.expirationTime<N.expirationTime||d()},s.unstable_wrapCallback=function(t){var n=P;return function(){var e=P;P=n;try{return t.apply(this,arguments)}finally{P=e}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e};t.default=function(r,o){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},t=e.selectLocationState,n=void 0===t?y:t,a=e.adjustUrlOnReplay,i=void 0===a||a;if(void 0===n(o.getSt
Line truncated
|
||||
/** @license React v16.13.0
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&Symbol.for,o=a?Symbol.for("react.element"):60103,r=a?Symbol.for("react.portal"):60106,i=a?Symbol.for("react.fragment"):60107,s=a?Symbol.for("react.strict_mode"):60108,l=a?Symbol.for("react.profiler"):60114,u=a?Symbol.for("react.provider"):60109,c=a?Symbol.for("react.context"):60110,d=a?Symbol.for("react.async_mode"):60111,p=a?Symbol.for("react.concurrent_mode"):60111,f=a?Symbol.for("react.forward_ref"):60112,h=a?Symbol.for("react.suspense"):60113,m=a?Symbol.for("react.memo"):60115,g=a?Symbol.for("react.lazy"):60116;function y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case p:case i:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case u:return e;default:return t}}case g:case m:case r:return t}}}function _(e){return y(e)===p}t.typeOf=y,t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=u,t.Element=o,t.ForwardRef=f,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=r,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===l||e===s||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f)},t.isAsyncMode=function(e){return _(e)||y(e)===d},t.isConcurrentMode=_,t.isContextConsumer=function(e){return y(e)===c},t.isContextProvider=function(e){return y(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return y(e)===f},t.isFragment=function(e){return y(e)===i},t.isLazy=function(e){return y(e)===g},t.isMemo=function(e){return y(e)===m},t.isPortal=function(e){return y(e)===r},t.isProfiler=function(e){return y(e)===l},t.isStrictMode=function(e){return y(e)===s},t.isSuspense=function(e){return y(e)===h}},function(e,t,n){"use strict";var l=n(1),a=void 0,u=!1;window.edasprefix="acm";var o;window.globalConfig={isParentEdas:function(){return window.parent&&-1!==window.parent.location.host.indexOf("edas")}},l.c.middleWare(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,a=localStorage.getItem("namespace")?localStorage.getItem("namespace"):"";e.data=-1===n.indexOf("namespaceId=")?Object.assign({},e.data,{namespaceId:a}):e.data;var o=window.nownamespace||Object(l.b)("namespace")||"";o="global"===o?"":o;var r=n.split("?");1<r.length&&-1!==r[1].indexOf("dataId")&&(n+="&tenant=".concat(o),e.url=n);var i=e.success,s=e.error;return e.success=function(e){"ConsoleNeedLogin"===e.code&&-1!==window.location.host.indexOf("acm")&&window.location.reload(),403!==e.code||u?"function"==typeof i&&i(e):(u=!0,window.Dialog.alert({language:l.a.currentLanguageCode||"zh-cn",style:{width:400},content:e.message,onOk:function(){u=!1},onCancel:function(){u=!1},onClose:function(){u=!1}}))},e.error=function(e){403!==e.status||u?"function"==typeof s&&s(e):(u=!0,window.Dialog.alert({language:l.a.currentLanguageCode||"zh-cn",style:{width:400},content:l.a.get("com.alibaba.nacos.pubshow"),onOk:function(){u=!1},onCancel:function(){u=!1},onClose:function(){u=!1}}))},e}),window.require.config({paths:{vs:"console-fe/public/js/vs"}}),window.require.config({"vs/nls":{availableLanguages:{"*":"zh-cn"}}}),window.require(["vs/editor/editor.main"],function(){window.monaco.languages.register({id:"properties"}),window.monaco.languages.setMonarchTokensProvider("properties",{tokenizer:{root:[[/^\#.*/,"comment"],[/.*\=/,"key"],[/^=.*/,"value"]]}}),window.monaco.editor.defineTheme("properties",{base:"vs",inherit:!1,rules:[{token:"key",foreground:"009968"},{token:"value",foreground:"009968"},{token:"comment",foreground:"666666"}]}),window.monaco.languages.registerCompletionItemProvider("properties",{provideCompletionItems:function(){return[{label:"simpleText",kind:window.monaco.languages.CompletionItemKind.Text},{label:"testing",kind:window.monaco.languages.CompletionItemKind.Keyword,insertText:{value:"testing(${1:condition})"}},{label:"ifelse",kind:window.monaco.languages.CompletionItemKind.Snippet,insertText:{value:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n")},documentation:"If-Else Statement"}]}})}),window.importEditor=function(e){window.require(["vs/editor/editor.main"],function(){e&&e()})},window._getLink=(window,o={},function(e){return o[e]||""}),window.addEventListener("resize",function(){try{a.timmer&&clearTimeout(a.timmer),a.timmer=setTimeout(function(){var e=document.body.clientHeight;e=800<e?e:800,window.parent.adjustHeight&&window.parent.adjustHeight(e)},500)}catch(e){}}),window.isIntel=function(){return-1!==window.location.host.indexOf("alibabacloud.com")}},function(e,t,n){},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a,o,r=h(n(5)),i=h(n(4)),s=h(n(6)),l=h(n(7)),u=n(0),c=h(u),d=h(n(2)),p=h(n(53)),f=n(11);function h(e){return e&&e.__esModule?e:{default:e}}var m,g=f.func.noop,y=f.func.makeChain,_=f.func.bLine truncated
|
||||
*/var a="function"==typeof Symbol&&Symbol.for,r=a?Symbol.for("react.element"):60103,o=a?Symbol.for("react.portal"):60106,i=a?Symbol.for("react.fragment"):60107,s=a?Symbol.for("react.strict_mode"):60108,l=a?Symbol.for("react.profiler"):60114,u=a?Symbol.for("react.provider"):60109,d=a?Symbol.for("react.context"):60110,c=a?Symbol.for("react.async_mode"):60111,f=a?Symbol.for("react.concurrent_mode"):60111,p=a?Symbol.for("react.forward_ref"):60112,h=a?Symbol.for("react.suspense"):60113,m=a?Symbol.for("react.suspense_list"):60120,g=a?Symbol.for("react.memo"):60115,y=a?Symbol.for("react.lazy"):60116,v=a?Symbol.for("react.block"):60121,_=a?Symbol.for("react.fundamental"):60117,b=a?Symbol.for("react.responder"):60118,w=a?Symbol.for("react.scope"):60119;function M(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case f:case i:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case d:case p:case y:case g:case u:return e;default:return t}}case o:return t}}}function k(e){return M(e)===f}t.AsyncMode=c,t.ConcurrentMode=f,t.ContextConsumer=d,t.ContextProvider=u,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=y,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return k(e)||M(e)===c},t.isConcurrentMode=k,t.isContextConsumer=function(e){return M(e)===d},t.isContextProvider=function(e){return M(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return M(e)===p},t.isFragment=function(e){return M(e)===i},t.isLazy=function(e){return M(e)===y},t.isMemo=function(e){return M(e)===g},t.isPortal=function(e){return M(e)===o},t.isProfiler=function(e){return M(e)===l},t.isStrictMode=function(e){return M(e)===s},t.isSuspense=function(e){return M(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===l||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===u||e.$$typeof===d||e.$$typeof===p||e.$$typeof===_||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=M},function(e,t,n){"use strict";var l=n(1),a=void 0,u=!1;window.edasprefix="acm";var r;window.globalConfig={isParentEdas:function(){return window.parent&&-1!==window.parent.location.host.indexOf("edas")}},l.c.middleWare(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,a=localStorage.getItem("namespace")?localStorage.getItem("namespace"):"";e.data=-1===n.indexOf("namespaceId=")?Object.assign({},e.data,{namespaceId:a}):e.data;var r=window.nownamespace||Object(l.b)("namespace")||"";r="global"===r?"":r;var o=n.split("?");1<o.length&&-1!==o[1].indexOf("dataId")&&(n+="&tenant=".concat(r),e.url=n);var i=e.success,s=e.error;return e.success=function(e){"ConsoleNeedLogin"===e.code&&-1!==window.location.host.indexOf("acm")&&window.location.reload(),403!==e.code||u?"function"==typeof i&&i(e):(u=!0,window.Dialog.alert({language:l.aliwareIntl.currentLanguageCode||"zh-cn",style:{width:400},content:e.message,onOk:function(){u=!1},onCancel:function(){u=!1},onClose:function(){u=!1}}))},e.error=function(e){403!==e.status||u?"function"==typeof s&&s(e):(u=!0,window.Dialog.alert({language:l.aliwareIntl.currentLanguageCode||"zh-cn",style:{width:400},content:l.aliwareIntl.get("com.alibaba.nacos.pubshow"),onOk:function(){u=!1},onCancel:function(){u=!1},onClose:function(){u=!1}}))},e}),window.require.config({paths:{vs:"console-fe/public/js/vs"}}),window.require.config({"vs/nls":{availableLanguages:{"*":"zh-cn"}}}),window.require(["vs/editor/editor.main"],function(){window.monaco.languages.register({id:"properties"}),window.monaco.languages.setMonarchTokensProvider("properties",{tokenizer:{root:[[/^\#.*/,"comment"],[/.*\=/,"key"],[/^=.*/,"value"]]}}),window.monaco.editor.defineTheme("properties",{base:"vs",inherit:!1,rules:[{token:"key",foreground:"009968"},{token:"value",foreground:"009968"},{token:"comment",foreground:"666666"}]}),window.monaco.languages.registerCompletionItemProvider("properties",{provideCompletionItems:function(){return[{label:"simpleText",kind:window.monaco.languages.CompletionItemKind.Text},{label:"testing",kind:window.monaco.languages.CompletionItemKind.Keyword,insertText:{value:"testing(${1:condition})"}},{label:"ifelse",kind:window.monaco.languages.CompletionItemKind.Snippet,insertText:{value:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n")},documentation:"If-Else Statement"}]}})}),window.importEditor=function(e){window.require(["vs/editor/editor.main"],function(){e&&e()})},window._getLink=(window,r={},function(e){return r[e]||""}),window.addEventListener("resize",function(){try{a.timmer&&clearTimeout(a.timmer),a.timmer=setTimeout(function(){var e=document.body.clientHeight;e=800<e?e:800,window.parent.adjustHeight&&window.parent.adjustHeight(e)},500)}catch(e){}}),window.isIntel=function(){return-1!==window.location.host.indexOf("alibabacloud.com")}},function(e,t,n){},funLine truncated
|
||||
/*!
|
||||
* Determine if an object is a Buffer
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var o=n(139),r=n(48),a=n(489),i=n(490);function s(e){this.defaults=e,this.interceptors={request:new a,response:new a}}s.prototype.request=function(e,t){"string"==typeof e&&(e=r.merge({url:arguments[0]},t)),(e=r.merge(o,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var n=[i,void 0],a=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){n.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){n.push(e.fulfilled,e.rejected)});n.length;)a=a.then(n.shift(),n.shift());return a},r.forEach(["delete","get","head","options"],function(n){s.prototype[n]=function(e,t){return this.request(r.merge(t||{},{method:n,url:e}))}}),r.forEach(["post","put","patch"],function(a){s.prototype[a]=function(e,t,n){return this.request(r.merge(n||{},{method:a,url:e,data:t}))}}),e.exports=s},function(e,t){var n,a,o=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(e){n=r}try{a="function"==typeof clearTimeout?clearTimeout:i}catch(e){a=i}}();var l,u=[],c=!1,d=-1;function p(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&f())}function f(){if(!c){var e=s(p);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(t){if(a===clearTimeout)return clearTimeout(t);if((a===i||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(t);try{a(t)}catch(e){try{return a.call(null,t)}catch(e){return a.call(this,t)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";var o=n(48);e.exports=function(n,a){o.forEach(n,function(e,t){t!==a&&t.toUpperCase()===a.toUpperCase()&&(n[a]=e,delete n[t])})}},function(e,t,n){"use strict";var o=n(320);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(o("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,a,o){return e.config=t,n&&(e.code=n),e.request=a,e.response=o,e}},function(e,t,n){"use strict";var r=n(48);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var o=[];r.forEach(t,function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))}))}),a=o.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,n){"use strict";var r=n(48),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,o={};return e&&r.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&0<=i.indexOf(t))return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}}),o}},function(e,t,n){"use strict";var a,o,r,i=n(48);function s(e){var t=e;return o&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}e.exports=i.isStandardBrowserEnv()?(o=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),a=s(window.location.href),function(e){var t=i.isString(e)?s(e):e;return t.protocol===a.protocol&&t.host===a.host}):function(){return!0}},function(e,t,n){"use strict";var s=n(48);e.exports=s.isStandardBLine truncated
|
||||
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var r=n(150),o=n(56),a=n(543),i=n(544);function s(e){this.defaults=e,this.interceptors={request:new a,response:new a}}s.prototype.request=function(e,t){"string"==typeof e&&(e=o.merge({url:arguments[0]},t)),(e=o.merge(r,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var n=[i,void 0],a=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){n.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){n.push(e.fulfilled,e.rejected)});n.length;)a=a.then(n.shift(),n.shift());return a},o.forEach(["delete","get","head","options"],function(n){s.prototype[n]=function(e,t){return this.request(o.merge(t||{},{method:n,url:e}))}}),o.forEach(["post","put","patch"],function(a){s.prototype[a]=function(e,t,n){return this.request(o.merge(n||{},{method:a,url:e,data:t}))}}),e.exports=s},function(e,t,n){"use strict";var r=n(56);e.exports=function(n,a){r.forEach(n,function(e,t){t!==a&&t.toUpperCase()===a.toUpperCase()&&(n[a]=e,delete n[t])})}},function(e,t,n){"use strict";var r=n(336);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,a,r){return e.config=t,n&&(e.code=n),e.request=a,e.response=r,e}},function(e,t,n){"use strict";var o=n(56);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(o.isURLSearchParams(t))a=t.toString();else{var r=[];o.forEach(t,function(e,t){null!=e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),r.push(i(t)+"="+i(e))}))}),a=r.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,n){"use strict";var o=n(56),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,r={};return e&&o.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=o.trim(e.substr(0,a)).toLowerCase(),n=o.trim(e.substr(a+1)),t){if(r[t]&&0<=i.indexOf(t))return;r[t]="set-cookie"===t?(r[t]?r[t]:[]).concat([n]):r[t]?r[t]+", "+n:n}}),r}},function(e,t,n){"use strict";var a,r,o,i=n(56);function s(e){var t=e;return r&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}e.exports=i.isStandardBrowserEnv()?(r=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a"),a=s(window.location.href),function(e){var t=i.isString(e)?s(e):e;return t.protocol===a.protocol&&t.host===a.host}):function(){return!0}},function(e,t,n){"use strict";var s=n(56);e.exports=s.isStandardBrowserEnv()?{write:function(e,t,n,a,r,o){var i=[];i.push(e+"="+encodeURIComponent(t)),s.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),s.isString(a)&&i.push("path="+a),s.isString(r)&&i.push("domain="+r),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var a=n(56);function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(t){a.forEach(this.handlers,function(e){null!==e&&t(e)})},e.exports=r},function(e,t,n){"use strict";var a=n(56),r=n(545),o=n(337),i=n(150),s=n(546),l=n(547);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(t){return u(t),t.baseURL&&!s(t.url)&&(t.url=l(t.baseURL,t.url)),t.headers=t.headers||{},t.data=r(t.data,t.headers,t.transformRequest),t.headers=a.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),a.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||i.adapter)(t).then(function(e){return u(t),e.data=r(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(u(t),e&&e.response&&(e.response.data=r(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(e,t,n){"use strict";var a=n(56);e.exports=function(t,n,e){return a.forLine truncated
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.admin.api.feign;
|
||||
|
||||
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018/6/28
|
||||
*/
|
||||
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.UPMS_SERVICE)
|
||||
public interface RemoteFileService {
|
||||
/**
|
||||
* 保存日志
|
||||
*
|
||||
* @return succes、false
|
||||
*/
|
||||
@PostMapping("/file/upload2")
|
||||
R<Boolean> saveLog(@RequestParam("file") MultipartFile file);
|
||||
}
|
||||
+8
@@ -20,6 +20,7 @@ package com.pig4cloud.pigx.admin.controller;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.pig4cloud.pigx.admin.api.entity.SysFile;
|
||||
import com.pig4cloud.pigx.admin.api.feign.RemoteFileService;
|
||||
import com.pig4cloud.pigx.admin.service.SysFileService;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import com.pig4cloud.pigx.common.log.annotation.SysLog;
|
||||
@@ -46,6 +47,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
@Api(value = "sys-file", tags = "文件管理")
|
||||
public class SysFileController {
|
||||
private final SysFileService sysFileService;
|
||||
private final RemoteFileService fileService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
@@ -84,6 +86,12 @@ public class SysFileController {
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
public R upload(@RequestParam("file") MultipartFile file) {
|
||||
return fileService.saveLog(file);
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/upload2")
|
||||
public R upload2(@RequestParam("file") MultipartFile file) {
|
||||
return sysFileService.uploadFile(file);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
<properties>
|
||||
<spring-boot.version>2.2.5.RELEASE</spring-boot.version>
|
||||
<spring-cloud.version>Hoxton.SR2</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2.2.0.RELEASE</spring-cloud-alibaba.version>
|
||||
<spring-cloud.version>Hoxton.SR3</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2.2.1.BUILD-SNAPSHOT</spring-cloud-alibaba.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
||||
Reference in new issue
Block a user