feat(XPack): 【企业版】【公共】License 认证机制

This commit is contained in:
fit2-zhao 2020-09-14 15:51:37 +08:00
parent ab4be0a23b
commit 1644a03cf6
13 changed files with 151 additions and 54 deletions

View File

@ -312,7 +312,7 @@
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>

View File

@ -0,0 +1,13 @@
CREATE TABLE `license` (
`id` varchar(50) NOT NULL COMMENT 'ID',
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
`corporation` varchar(500) NOT NULL COMMENT 'corporation ',
`expired` varchar(255) NOT NULL COMMENT 'expired ',
`product` varchar(500) DEFAULT NULL COMMENT 'product name',
`edition` varchar(255) COMMENT 'edition ',
`license_version` varchar(255) NOT NULL COMMENT 'licenseVersion',
`license_count` INT COMMENT 'license_count',
`license_code` longtext DEFAULT NULL COMMENT 'license_code',
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;

View File

@ -151,3 +151,5 @@ quota_max_threads_excess_workspace=The maximum number of concurrent threads exce
quota_max_threads_excess_organization=The maximum number of concurrent threads exceeds the organization quota
quota_duration_excess_workspace=The stress test duration exceeds the work space quota
quota_duration_excess_organization=The stress test duration exceeds the organization quota
license_valid_license_error=valid license error
license_valid_license_code=The authorization code already exists

View File

@ -151,6 +151,7 @@ quota_max_threads_excess_workspace=最大并发数超过工作空间限额
quota_max_threads_excess_organization=最大并发数超过组织限额
quota_duration_excess_workspace=压测时长超过工作空间限额
quota_duration_excess_organization=压测时长超过组织限额
license_valid_license_error=授权验证失败
license_valid_license_code=授权码已经存在

View File

@ -151,3 +151,6 @@ quota_max_threads_excess_workspace=最大並發數超過工作空間限額
quota_max_threads_excess_organization=最大並發數超過組織限額
quota_duration_excess_workspace=壓測時長超過工作空間限額
quota_duration_excess_organization=壓測時長超過組織限額
license_valid_license_error=授權驗證失敗
license_valid_license_code=授權碼已經存在

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -58,6 +58,7 @@ export default {
let menu = {index: Setting.path + "/" + child.path}
menu.title = child.meta.title;
menu.roles = child.meta.roles;
menu.valid = child.meta.valid;
menus.push(menu);
}
})
@ -73,8 +74,42 @@ export default {
}
},
mounted() {
this.valid();
this.isCurrentOrganizationAdmin = checkoutCurrentOrganization();
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
},
methods: {
valid() {
let _this = this;
this.result = this.$get("/license/valid", response => {
let data = response.data;
if (data === undefined || data != true) {
this.systems.forEach(item => {
if (item.valid != undefined && item.valid === true) {
_this.systems.splice(this.systems.indexOf(item), 1);
}
})
this.organizations.forEach(item => {
if (item.valid != undefined && item.valid === true) {
_this.organizations.splice(this.organizations.indexOf(item), 1);
}
})
this.workspaces.forEach(item => {
if (item.valid != undefined && item.valid === true) {
_this.workspaces.splice(this.workspaces.indexOf(item), 1);
}
})
this.persons.forEach(item => {
if (item.valid != undefined && item.valid === true) {
_this.persons.splice(this.persons.indexOf(item), 1);
}
})
}
})
}
}
}
</script>

View File

@ -32,7 +32,7 @@ export default {
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/system/SystemParameterSetting'),
meta: {system: true, title: 'commons.system_parameter_setting'}
},
...requireContext.keys().map(key => requireContext(key).system),
...requireContext.keys().map(key => requireContext(key).system),...requireContext.keys().map(key => requireContext(key).license),
{
path: 'organizationmember',
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/organization/OrganizationMember'),

View File

@ -110,6 +110,7 @@ export default {
please_save: 'Please save first',
formatErr: 'Format Error',
id: 'ID',
cannot_be_null: 'not null ',
millisecond: 'ms',
please_upload: 'Please upload file',
reference_documentation: "Reference documentation",
@ -153,6 +154,18 @@ export default {
}
}
},
license:{
title: 'Authorization management',
corporation: 'corporation',
expired: 'expired',
product: 'product',
edition: 'edition',
licenseVersion: 'licenseVersion',
count: 'count',
valid_license: 'valid license',
show_license: 'show license',
valid_license_error: 'validate license error',
},
workspace: {
create: 'Create Workspace',
update: 'Update Workspace',
@ -639,6 +652,7 @@ export default {
upload_limit_count: "Only one file can be uploaded at a time",
upload_limit_format: "Upload files can only be XLS, XLSX format!",
upload_limit_size: "Upload file size cannot exceed 20MB!",
upload_limit_other_size: "Upload file size cannot exceed",
success: "Import success",
importing: "Importing...",
},

View File

@ -113,6 +113,7 @@ export default {
reference_documentation: "参考文档",
id: 'ID',
millisecond: '毫秒',
cannot_be_null: '不能为空',
date: {
select_date: '选择日期',
start_date: '开始日期',
@ -153,6 +154,18 @@ export default {
}
}
},
license:{
title: '授权管理',
corporation: '客户名称',
expired: '授权时间',
product: '产品名称',
edition: '产品版本',
licenseVersion: '授权版本',
count: '授权数量',
valid_license: '授权验证',
show_license: '查看授权',
valid_license_error: '授权验证失败',
},
workspace: {
create: '创建工作空间',
update: '修改工作空间',
@ -639,6 +652,7 @@ export default {
download_template: "下载模版",
click_upload: "点击上传",
upload_limit: "只能上传xls/xlsx文件且不超过20M",
upload_limit_other_size: "上传文件大小不能超过",
upload_limit_count: "一次只能上传一个文件",
upload_limit_format: "上传文件只能是 xls、xlsx格式!",
upload_limit_size: "上传文件大小不能超过 20MB!",

View File

@ -108,6 +108,7 @@ export default {
formatErr: '格式錯誤',
please_save: '請先保存',
id: 'ID',
cannot_be_null: '不能为空',
millisecond: '毫秒',
reference_documentation: "參考文檔",
please_upload: '請上傳文件',
@ -151,6 +152,19 @@ export default {
}
}
},
license:{
title: '授權管理',
corporation: '客戶名稱',
expired: '授權時間',
product: '產品名稱',
edition: '產品版本',
licenseVersion: '授權版本',
count: '授權數量',
valid_license: '授權验证',
show_license: '查看授權',
valid_license_error: '授權验证失败',
},
workspace: {
create: '創建工作空間',
update: '修改工作空間',
@ -638,6 +652,7 @@ export default {
upload_limit_count: "一次只能上傳一個文件",
upload_limit_format: "上傳文件只能是 xls、xlsx格式!",
upload_limit_size: "上傳文件大小不能超過 20MB!",
upload_limit_other_size: "上傳文件大小不能超過",
success: "導入成功!",
importing: "導入中...",
},