feat(XPack): 【企业版】【公共】License 认证机制
This commit is contained in:
parent
ab4be0a23b
commit
1644a03cf6
|
@ -312,7 +312,7 @@
|
|||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.*</include>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
|
|
|
@ -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;
|
|
@ -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
|
||||
|
|
|
@ -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=授权码已经存在
|
||||
|
||||
|
||||
|
|
|
@ -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.
|
@ -45,64 +45,99 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {checkoutCurrentOrganization, checkoutCurrentWorkspace} from "@/common/js/utils";
|
||||
import Setting from "@/business/components/settings/router";
|
||||
import {checkoutCurrentOrganization, checkoutCurrentWorkspace} from "@/common/js/utils";
|
||||
import Setting from "@/business/components/settings/router";
|
||||
|
||||
export default {
|
||||
name: "MsSettingMenu",
|
||||
data() {
|
||||
let getMenus = function (group) {
|
||||
let menus = [];
|
||||
Setting.children.forEach(child => {
|
||||
if (child.meta[group] === true) {
|
||||
let menu = {index: Setting.path + "/" + child.path}
|
||||
menu.title = child.meta.title;
|
||||
menu.roles = child.meta.roles;
|
||||
menus.push(menu);
|
||||
}
|
||||
})
|
||||
return menus;
|
||||
export default {
|
||||
name: "MsSettingMenu",
|
||||
data() {
|
||||
let getMenus = function (group) {
|
||||
let menus = [];
|
||||
Setting.children.forEach(child => {
|
||||
if (child.meta[group] === true) {
|
||||
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);
|
||||
}
|
||||
})
|
||||
return menus;
|
||||
}
|
||||
return {
|
||||
systems: getMenus('system'),
|
||||
organizations: getMenus('organization'),
|
||||
workspaces: getMenus('workspace'),
|
||||
persons: getMenus('person'),
|
||||
isCurrentOrganizationAdmin: false,
|
||||
isCurrentWorkspaceUser: false,
|
||||
}
|
||||
},
|
||||
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);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
return {
|
||||
systems: getMenus('system'),
|
||||
organizations: getMenus('organization'),
|
||||
workspaces: getMenus('workspace'),
|
||||
persons: getMenus('person'),
|
||||
isCurrentOrganizationAdmin: false,
|
||||
isCurrentWorkspaceUser: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.isCurrentOrganizationAdmin = checkoutCurrentOrganization();
|
||||
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.setting {
|
||||
border-right: 0;
|
||||
}
|
||||
.setting {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.setting .setting-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.setting .setting-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 24px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.icon {
|
||||
width: 24px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.account {
|
||||
color: #5a78f0;
|
||||
}
|
||||
.account {
|
||||
color: #5a78f0;
|
||||
}
|
||||
|
||||
.organization {
|
||||
color: #b33a5b;
|
||||
}
|
||||
.organization {
|
||||
color: #b33a5b;
|
||||
}
|
||||
|
||||
.workspace {
|
||||
color: #44b349;
|
||||
}
|
||||
.workspace {
|
||||
color: #44b349;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -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...",
|
||||
},
|
||||
|
|
|
@ -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!",
|
||||
|
|
|
@ -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: "導入中...",
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue