mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 06:19:51 +00:00
[Update] 修改了翻译
This commit is contained in:
@@ -41,7 +41,7 @@ export default {
|
||||
moreActionsTitle: {
|
||||
type: String,
|
||||
default() {
|
||||
return this.$t('common.actions.MoreActions')
|
||||
return this.$t('common.MoreActions')
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -66,7 +66,7 @@ export default {
|
||||
return actions
|
||||
},
|
||||
iMoreActionsTitle() {
|
||||
return this.moreActionsTitle || this.$t('common.actions.MoreActions')
|
||||
return this.moreActionsTitle || this.$t('common.MoreActions')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -74,6 +74,8 @@ export default {
|
||||
const action = this.totalNamedActions[item]
|
||||
if (action && action.callback) {
|
||||
action.callback(action)
|
||||
} else {
|
||||
this.$log.debug('No callback found')
|
||||
}
|
||||
this.$emit('actionClick', item)
|
||||
},
|
||||
|
@@ -50,7 +50,7 @@ export default {
|
||||
case 'actions':
|
||||
col = {
|
||||
prop: 'id',
|
||||
label: this.$t('common.table.Actions'),
|
||||
label: this.$t('common.Actions'),
|
||||
align: 'center',
|
||||
formatter: ActionsFormatter,
|
||||
width: '150px',
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
}
|
||||
break
|
||||
case 'is_valid':
|
||||
col.label = this.$t('common.validity')
|
||||
col.label = this.$t('common.Validity')
|
||||
col.formatter = BooleanFormatter
|
||||
col.align = 'center'
|
||||
col.width = '80px'
|
||||
|
@@ -14,8 +14,8 @@
|
||||
|
||||
<el-form-item>
|
||||
<el-button v-for="button in moreButtons" :key="button.title" size="small" v-bind="button" @click="handleClick(button)">{{ button.title }}</el-button>
|
||||
<el-button v-if="defaultButton" size="small" @click="resetForm('form')">{{ $t('common.actions.Reset') }}</el-button>
|
||||
<el-button v-if="defaultButton" size="small" type="primary" @click="submitForm('form')">{{ $t('common.actions.Submit') }}</el-button>
|
||||
<el-button v-if="defaultButton" size="small" @click="resetForm('form')">{{ $t('common.Reset') }}</el-button>
|
||||
<el-button v-if="defaultButton" size="small" type="primary" @click="submitForm('form')">{{ $t('common.Submit') }}</el-button>
|
||||
</el-form-item>
|
||||
</ElFormRender>
|
||||
</template>
|
||||
|
@@ -23,7 +23,7 @@ export default {
|
||||
title: {
|
||||
type: String,
|
||||
default() {
|
||||
return this.$t('common.tabs.BasicInfo')
|
||||
return this.$t('common.BasicInfo')
|
||||
}
|
||||
},
|
||||
items: {
|
||||
|
@@ -7,8 +7,8 @@
|
||||
<slot />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<slot name="footer">
|
||||
<el-button size="small" @click="onCancel">{{ $t('common.actions.Cancel') }}</el-button>
|
||||
<el-button type="primary" size="small" @click="onConfirm">{{ $t('common.confirm') }}</el-button>
|
||||
<el-button size="small" @click="onCancel">{{ $t('common.Cancel') }}</el-button>
|
||||
<el-button type="primary" size="small" @click="onConfirm">{{ $t('common.Confirm') }}</el-button>
|
||||
</slot>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<Dialog :title="$t('common.export')" :visible.sync="showExportDialog" center @confirm="handleDialogConfirm('export')" @cancel="handleDialogCancel('export')">
|
||||
<Dialog :title="$t('common.Export')" :visible.sync="showExportDialog" center @confirm="handleDialogConfirm('export')" @cancel="handleDialogCancel('export')">
|
||||
<el-form>
|
||||
<el-form-item :label="this.$t('action.ExportRange')" :label-width="'100px'">
|
||||
<el-radio v-model="exportOption" class="export-item" label="1">{{ this.$t('action.ExportAll') }}</el-radio>
|
||||
@@ -12,8 +12,8 @@
|
||||
<Dialog :title="importTitle" :visible.sync="showImportDialog" center @confirm="handleDialogConfirm('import')" @cancel="handleDialogCancel('import')">
|
||||
<el-form>
|
||||
<el-form-item :label="importTitle" :label-width="'100px'">
|
||||
<el-radio v-model="importOption" class="export-item" label="1">{{ this.$t('common.import') }}</el-radio>
|
||||
<el-radio v-model="importOption" class="export-item" label="2">{{ this.$t('common.actions.Update') }}</el-radio>
|
||||
<el-radio v-model="importOption" class="export-item" label="1">{{ this.$t('common.Import') }}</el-radio>
|
||||
<el-radio v-model="importOption" class="export-item" label="2">{{ this.$t('common.Update') }}</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div v-if="importOption==='1'" style="margin-bottom:20px;margin-left: 55px;">{{ this.$t('action.downloadTheImportedTemplateOrUseTheExportedCSVFormat') }} <a style="color: #428bca;" :href="downloadImportTempUrl">{{ this.$t('action.DownloadImportTemplate') }}</a></div>
|
||||
@@ -69,9 +69,9 @@ export default {
|
||||
},
|
||||
importTitle() {
|
||||
if (this.importOption === '1') {
|
||||
return this.$t('common.import')
|
||||
return this.$t('common.Import')
|
||||
} else {
|
||||
return this.$t('common.actions.Update')
|
||||
return this.$t('common.Update')
|
||||
}
|
||||
},
|
||||
upLoadUrl() {
|
||||
|
@@ -65,10 +65,10 @@ export default {
|
||||
},
|
||||
{
|
||||
prop: 'systemUsers',
|
||||
label: this.$t('assets.systemUsers'),
|
||||
label: this.$t('assets.SystemUsers'),
|
||||
align: 'center',
|
||||
formatter: (row, col, value) => {
|
||||
const title = this.$t('common.show')
|
||||
const title = this.$t('common.Show')
|
||||
// Todo: 显示真正的系统用户
|
||||
const show = function() {
|
||||
console.log('hello: ', value)
|
||||
|
@@ -102,7 +102,7 @@ export default {
|
||||
defaultActions: [
|
||||
{
|
||||
name: 'actionCreate',
|
||||
title: this.$t('common.actions.Create'),
|
||||
title: this.$t('common.Create'),
|
||||
type: 'primary',
|
||||
has: this.hasCreate,
|
||||
can: true,
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
],
|
||||
defaultMoreActions: [
|
||||
{
|
||||
title: this.$t('common.actions.deleteSelected'),
|
||||
title: this.$t('common.deleteSelected'),
|
||||
name: 'actionDeleteSelected',
|
||||
has: this.hasBulkDelete,
|
||||
callback: this.defaultBulkDeleteCallback
|
||||
@@ -163,8 +163,8 @@ export default {
|
||||
this.$log.debug('handle create')
|
||||
},
|
||||
defaultBulkDeleteCallback(rows) {
|
||||
const msg = this.$tc('Are you sure to delete') + ' ' + rows.length + ' ' + this.$tc('rows')
|
||||
const title = this.$t('common.info')
|
||||
const msg = this.$tc('deleteWarningMsg') + ' ' + rows.length + ' ' + this.$t('common.rows')
|
||||
const title = this.$t('common.Info')
|
||||
const performDelete = this.performBulkDelete || this.defaultPerformBulkDelete
|
||||
this.$alert(msg, title, {
|
||||
type: 'warning',
|
||||
|
@@ -18,8 +18,8 @@ const defaultUpdateCallback = function({ row, col }) {
|
||||
}
|
||||
|
||||
const defaultDeleteCallback = function({ row, col, cellValue, reload }) {
|
||||
const msg = this.$t('common.message.deleteWarning') + ' "' + row.name + '"'
|
||||
const title = this.$t('common.info')
|
||||
const msg = this.$t('common.deleteWarningMsg') + ' "' + row.name + '"'
|
||||
const title = this.$t('common.Info')
|
||||
const performDelete = this.colActions.performDelete
|
||||
this.$alert(msg, title, {
|
||||
type: 'warning',
|
||||
@@ -32,9 +32,9 @@ const defaultDeleteCallback = function({ row, col, cellValue, reload }) {
|
||||
await performDelete.bind(this)({ row: row, col: col })
|
||||
done()
|
||||
reload()
|
||||
this.$message.success(this.$t('common.Delete success'))
|
||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
||||
} catch (error) {
|
||||
this.$message.error(this.$t('common.Delete failed' + ' ' + error))
|
||||
this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error))
|
||||
} finally {
|
||||
instance.confirmButtonLoading = false
|
||||
}
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
const defaultActions = [
|
||||
{
|
||||
name: 'update',
|
||||
title: this.$t('common.actions.Update'),
|
||||
title: this.$t('common.Update'),
|
||||
type: 'primary',
|
||||
has: colActions.hasUpdate,
|
||||
can: colActions.canUpdate,
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
},
|
||||
{
|
||||
name: 'delete',
|
||||
title: this.$t('common.actions.Delete'),
|
||||
title: this.$t('common.Delete'),
|
||||
type: 'danger',
|
||||
has: colActions.hasDelete,
|
||||
can: colActions.canDelete,
|
||||
@@ -118,6 +118,9 @@ export default {
|
||||
return this.cleanedActions.slice(2, this.cleanedActions.length)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.actions)
|
||||
},
|
||||
methods: {
|
||||
cleanBoolean(item, attr) {
|
||||
const ok = item[attr]
|
||||
|
@@ -19,10 +19,10 @@ export default {
|
||||
onDelete(col, row, cellValue, reload) {
|
||||
const url = col.deleteUrl + cellValue
|
||||
this.$axios.delete(url).then(res => {
|
||||
this.$message.success(this.$t('common.Delete success'))
|
||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
||||
reload()
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$t('common.Delete failed' + ' ' + error))
|
||||
this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error))
|
||||
})
|
||||
},
|
||||
iCanDelete() {
|
||||
|
@@ -8,7 +8,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<el-button :type="type" size="small" :loading="submitLoading" @click="addObjects">{{ $t('common.actions.Add') }}</el-button>
|
||||
<el-button :type="type" size="small" :loading="submitLoading" @click="addObjects">{{ $t('common.Add') }}</el-button>
|
||||
</td>
|
||||
</tr>
|
||||
<template v-if="showHasObjects">
|
||||
|
@@ -1,105 +1,102 @@
|
||||
{
|
||||
"asset_list": "资产列表",
|
||||
"asset_detail": "资产详情",
|
||||
"create_asset": "创建资产",
|
||||
"update_asset": "更新资产",
|
||||
"systemUsers": "系统用户",
|
||||
"hostname": "主机名",
|
||||
"ip": "IP",
|
||||
"hardware": "硬件",
|
||||
"reachable": "可连接",
|
||||
"action": "动作",
|
||||
"update": "更新",
|
||||
"delete": "删除",
|
||||
"search": "搜索",
|
||||
"delete_selected": "批量删除",
|
||||
"update_selected": "批量更新",
|
||||
"remove_from_this_node": "从节点移除",
|
||||
"deactive_selected": "禁用所选",
|
||||
"active_selected": "激活所选",
|
||||
"submit": "提交",
|
||||
"platform": "系统平台",
|
||||
"public_ip": "公网IP",
|
||||
"domain": "网域",
|
||||
"admin_user": "管理用户",
|
||||
"node": "节点",
|
||||
"label": "标签",
|
||||
"comment": "备注",
|
||||
"basic": "基本",
|
||||
"protocols": "协议组",
|
||||
"auth": "认证",
|
||||
"labels": "标签管理",
|
||||
"other": "其它",
|
||||
"vendor": "制造商",
|
||||
"model": "型号",
|
||||
"cpu": "CPU",
|
||||
"memory": "内存",
|
||||
"disk": "硬盘",
|
||||
"os": "操作系统",
|
||||
"is_active": "激活",
|
||||
"serial_number": "序列号",
|
||||
"asset_number": "资产编号",
|
||||
"date_joined": "创建日期",
|
||||
"quick_modify": "快速修改",
|
||||
"active": "激活中",
|
||||
"refresh_hardware": "更新硬件信息",
|
||||
"test_connective": "测试可连接性",
|
||||
"refresh": "刷新",
|
||||
"test": "测试",
|
||||
"confirm": "确认",
|
||||
"asset_user_list": "资产用户列表",
|
||||
"domain_list": "网域列表",
|
||||
"domain_detail": "网域详情",
|
||||
"create_domain": "创建网域",
|
||||
"update_domain": "更新网域",
|
||||
"name": "名称",
|
||||
"asset": "资产",
|
||||
"gateway": "网关",
|
||||
"date_created": "创建日期",
|
||||
"port": "端口",
|
||||
"version": "版本",
|
||||
"TestConnection": "测试连接",
|
||||
"AdminUserList": "管理用户列表",
|
||||
"AdminUserDetail": "管理用户详情",
|
||||
"AdminUserCreate": "创建管理用户",
|
||||
"AdminUserUpdate": "更新管理用户",
|
||||
"username": "用户名",
|
||||
"login_mode_display": "登录模式",
|
||||
"replace_node_assets_admin_user_with_this": "替换资产的管理员",
|
||||
"select_nodes": "选择节点",
|
||||
"protocol": "协议",
|
||||
"assetlist": "资产列表",
|
||||
"loginMode": "登录模式",
|
||||
"quick_update": "快速更新",
|
||||
"auto_push": "自动推送",
|
||||
"label_list": "标签列表",
|
||||
"label_detail": "标签详情",
|
||||
"create_label": "创建标签",
|
||||
"update_label": "更新标签",
|
||||
"value": "值",
|
||||
"command_filter_list": "命令过滤器列表",
|
||||
"create_command_filter": "创建命令过滤器",
|
||||
"update_command_filter": "更新命令过滤器",
|
||||
"commandFilterDetail": "命令过滤器详情",
|
||||
"commandFilterRules": "命令过滤器规则",
|
||||
"rules": "规则",
|
||||
"systemUser": "系统用户",
|
||||
"date_updated": "更新日期",
|
||||
"detail": "详情",
|
||||
"type": "类型",
|
||||
"content": "内容",
|
||||
"priority": "优先级",
|
||||
"ruleaction": "策略",
|
||||
"binding_to_system_user": "绑定到系统用户",
|
||||
"created_by": "创建者",
|
||||
"platform_list": "平台列表",
|
||||
"create_platform": "创建系统平台",
|
||||
"update_platform": "更新系统平台",
|
||||
"platform_detail": "平台详情",
|
||||
"BasePlatform": "基础平台",
|
||||
"charset": "编码",
|
||||
"meta": "元数据",
|
||||
"TestAssetsConnective": "测试资产可连接性",
|
||||
"PushSystemUserNow": "立刻推送系统",
|
||||
"Replace node assets admin user with this": "替换资产节点的管理员"
|
||||
"Assets": "资产",
|
||||
"Nodes": "节点",
|
||||
"SystemUsers": "系统用户",
|
||||
"RemoteApps": "远程应用",
|
||||
"Hostname": "主机名",
|
||||
"Ip": "IP",
|
||||
"Hardware": "硬件",
|
||||
"Reachable": "可连接",
|
||||
"Action": "动作",
|
||||
"Update": "更新",
|
||||
"Delete": "删除",
|
||||
"Search": "搜索",
|
||||
"Deleteselected": "批量删除",
|
||||
"Updateselected": "批量更新",
|
||||
"Removefromthisnode": "从节点移除",
|
||||
"Deactiveselected": "禁用所选",
|
||||
"Activeselected": "激活所选",
|
||||
"Submit": "提交",
|
||||
"Platform": "系统平台",
|
||||
"Publicip": "公网IP",
|
||||
"Domain": "网域",
|
||||
"Adminuser": "管理用户",
|
||||
"Node": "节点",
|
||||
"Label": "标签",
|
||||
"Comment": "备注",
|
||||
"Basic": "基本",
|
||||
"Protocols": "协议组",
|
||||
"Auth": "认证",
|
||||
"Labels": "标签管理",
|
||||
"Other": "其它",
|
||||
"Vendor": "制造商",
|
||||
"Model": "型号",
|
||||
"Cpu": "CPU",
|
||||
"Memory": "内存",
|
||||
"Disk": "硬盘",
|
||||
"Os": "操作系统",
|
||||
"Isactive": "激活",
|
||||
"Serialnumber": "序列号",
|
||||
"Assetnumber": "资产编号",
|
||||
"Datejoined": "创建日期",
|
||||
"Quickmodify": "快速修改",
|
||||
"Active": "激活中",
|
||||
"Refreshhardware": "更新硬件信息",
|
||||
"Testconnective": "测试可连接性",
|
||||
"Refresh": "刷新",
|
||||
"Test": "测试",
|
||||
"Confirm": "确认",
|
||||
"Assetuserlist": "资产用户列表",
|
||||
"Domainlist": "网域列表",
|
||||
"Domaindetail": "网域详情",
|
||||
"Createdomain": "创建网域",
|
||||
"Updatedomain": "更新网域",
|
||||
"Name": "名称",
|
||||
"Asset": "资产",
|
||||
"Gateway": "网关",
|
||||
"Datecreated": "创建日期",
|
||||
"Port": "端口",
|
||||
"Version": "版本",
|
||||
"Testconnection": "测试连接",
|
||||
"Adminuserlist": "管理用户列表",
|
||||
"Adminuserdetail": "管理用户详情",
|
||||
"Adminusercreate": "创建管理用户",
|
||||
"Adminuserupdate": "更新管理用户",
|
||||
"Username": "用户名",
|
||||
"Loginmodedisplay": "登录模式",
|
||||
"Replacenodeassetsadminuserwiththis": "替换资产节点的管理员",
|
||||
"Selectnodes": "选择节点",
|
||||
"Protocol": "协议",
|
||||
"Loginmode": "登录模式",
|
||||
"Quickupdate": "快速更新",
|
||||
"Autopush": "自动推送",
|
||||
"Labellist": "标签列表",
|
||||
"Labeldetail": "标签详情",
|
||||
"Createlabel": "创建标签",
|
||||
"Updatelabel": "更新标签",
|
||||
"Value": "值",
|
||||
"Commandfilterlist": "命令过滤器列表",
|
||||
"Createcommandfilter": "创建命令过滤器",
|
||||
"Updatecommandfilter": "更新命令过滤器",
|
||||
"Commandfilterdetail": "命令过滤器详情",
|
||||
"Commandfilterrules": "命令过滤器规则",
|
||||
"Rules": "规则",
|
||||
"Systemuser": "系统用户",
|
||||
"Dateupdated": "更新日期",
|
||||
"Detail": "详情",
|
||||
"Type": "类型",
|
||||
"Content": "内容",
|
||||
"Priority": "优先级",
|
||||
"Ruleaction": "策略",
|
||||
"Bindingtosystemuser": "绑定到系统用户",
|
||||
"Createdby": "创建者",
|
||||
"Platformlist": "平台列表",
|
||||
"Createplatform": "创建系统平台",
|
||||
"Updateplatform": "更新系统平台",
|
||||
"Platformdetail": "平台详情",
|
||||
"Baseplatform": "基础平台",
|
||||
"Charset": "编码",
|
||||
"Meta": "元数据",
|
||||
"Testassetsconnective": "测试资产可连接性",
|
||||
"Pushsystemusernow": "立刻推送系统"
|
||||
}
|
||||
|
@@ -4,37 +4,53 @@
|
||||
"Active": "激活中",
|
||||
"role": "角色",
|
||||
"username": "用户名",
|
||||
"language": "语言",
|
||||
"help": "帮助",
|
||||
"nav": {
|
||||
"Language": "语言",
|
||||
"Docs": "文档",
|
||||
"Help": "帮助",
|
||||
"Profile": "个人信息",
|
||||
"UserPage": "用户页面",
|
||||
"APIKey": "API Key",
|
||||
"Logout": "退出",
|
||||
"Support": "支持"
|
||||
},
|
||||
"Reset": "重置",
|
||||
"Submit": "提交",
|
||||
"more": "更多",
|
||||
"update": "更新",
|
||||
"delete": "删除",
|
||||
"detail": "详情",
|
||||
"baseInfo": "基本信息",
|
||||
"CreatedBy": "创建人",
|
||||
"DateCreated": "创建日期",
|
||||
"BaseInfo": "基本信息",
|
||||
"BasicInfo": "基本信息",
|
||||
"createdBy": "创建人",
|
||||
"dateCreated": "创建日期",
|
||||
"Comment": "备注",
|
||||
"create": "创建",
|
||||
"moreActions": "更多操作",
|
||||
"Create": "创建",
|
||||
"MoreActions": "更多操作",
|
||||
"deleteSelected": "删除所选",
|
||||
"updateSelected": "更新所选",
|
||||
"deleteSuccessMsg": "删除成功",
|
||||
"Validity": "有效",
|
||||
"Update": "更新",
|
||||
"Delete": "删除",
|
||||
"Remove": "移除",
|
||||
"Actions": "操作",
|
||||
"deleteFailedMsg": "删除失败",
|
||||
"search": "搜索",
|
||||
"source": "来源",
|
||||
"status": "状态",
|
||||
"monitor": "监控",
|
||||
"Source": "来源",
|
||||
"Status": "状态",
|
||||
"Monitor": "监控",
|
||||
"run": "执行",
|
||||
"deleteConfirmMsg": "你确定要删除",
|
||||
"info": "提示",
|
||||
"Info": "提示",
|
||||
"submit": "提交",
|
||||
"reset": "重置",
|
||||
"requiredErrorMsg": "这个字段是必填项",
|
||||
"validity": "有效性",
|
||||
"confirm": "确认",
|
||||
"cancel": "取消",
|
||||
"import": "导入",
|
||||
"export": "导出",
|
||||
"Confirm": "确认",
|
||||
"Cancel": "取消",
|
||||
"Import": "导入",
|
||||
"Export": "导出",
|
||||
"Other": "其它",
|
||||
"createSuccessMsg": "创建成功",
|
||||
"updateSuccessMsg": "更新成功",
|
||||
@@ -45,22 +61,16 @@
|
||||
"rows": "行",
|
||||
"basicInfo": "基本信息",
|
||||
"commandFilter": "命令过滤器",
|
||||
"add": "添加",
|
||||
"auth": "认证",
|
||||
"others": "其他",
|
||||
"members": "成员",
|
||||
"email": "邮件",
|
||||
"Add": "添加",
|
||||
"Auth": "认证",
|
||||
"Others": "其他",
|
||||
"Members": "成员",
|
||||
"Email": "邮件",
|
||||
"dateExpired": "失效日期",
|
||||
"quickUpdate": "快速更新",
|
||||
"send": "发送",
|
||||
"unblock": "解锁",
|
||||
"active": "激活中",
|
||||
"docs": "文档",
|
||||
"support": "支持",
|
||||
"profile": "个人信息",
|
||||
"userPage": "用户页面",
|
||||
"apiKey": "API Key",
|
||||
"logout": "退出",
|
||||
"Send": "发送",
|
||||
"Unblock": "解锁",
|
||||
|
||||
"show": "显示",
|
||||
"actions": {
|
||||
"exportRange": "导出范围",
|
||||
|
@@ -1,19 +1,22 @@
|
||||
{
|
||||
"account": "账户",
|
||||
"authentication": "认证",
|
||||
"secure": "安全",
|
||||
"Account": "账户",
|
||||
"Authentication": "认证",
|
||||
"Secure": "安全",
|
||||
"dateLastLogin": "最后登录日期",
|
||||
"MFA": "MFA",
|
||||
"source": "来源",
|
||||
"Source": "来源",
|
||||
"datePasswordUpdated": "改密日期",
|
||||
"name": "姓名",
|
||||
"username": "用户名",
|
||||
"email": "Email",
|
||||
"role": "角色",
|
||||
"Name": "姓名",
|
||||
"Username": "用户名",
|
||||
"Email": "Email",
|
||||
"Role": "角色",
|
||||
"dateExpired": "过期时间",
|
||||
"dateJoined": "创建日期",
|
||||
"users": "用户",
|
||||
"quickUpdate": {
|
||||
"Users": "用户",
|
||||
"Remove": "移除",
|
||||
"UserGroups": "用户组",
|
||||
"RemoveApps": "远程应用",
|
||||
"SystemUsers": "系统用户", "quickUpdate": {
|
||||
"resetMFA": "重置MFA",
|
||||
"resetPassword": "重置密码",
|
||||
"restSSHKey": "重置密钥",
|
||||
@@ -21,5 +24,13 @@
|
||||
"messages": {
|
||||
"resetPasswordWarning": ""
|
||||
}
|
||||
},
|
||||
"tabs": {
|
||||
"grantedAssets": "授权的资产",
|
||||
"assetPermissionRules": "资产授权规则",
|
||||
"grantedRemoteApps": "授权的远程应用",
|
||||
"remoteAppPermissionRules": "远程应用授权规则",
|
||||
"grantedDatabases": "授权的数据库",
|
||||
"databasePermissionRules": "数据库授权规则"
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"systemUsers": "System users",
|
||||
"remoteApps": "Remote apps",
|
||||
"SystemUsers": "System users",
|
||||
"RemoteApps": "Remote apps",
|
||||
"Assets": "Assets",
|
||||
"Nodes": "Nodes",
|
||||
"asset_list": "Asset list",
|
||||
"asset_detail": "Asset detail",
|
||||
"create_asset": "Create asset",
|
||||
|
@@ -1,13 +1,34 @@
|
||||
{
|
||||
"Other": "Other",
|
||||
"fieldRequiredError": "This field is required",
|
||||
"comment": "Comment",
|
||||
"createdBy": "Created by",
|
||||
"validity": "Validity",
|
||||
"info": "Info",
|
||||
"Comment": "Comment",
|
||||
"CreatedBy": "Created by",
|
||||
"Validity": "Validity",
|
||||
"Info": "Info",
|
||||
"Members": "Members",
|
||||
"More": "More",
|
||||
"QuickUpdate": "Quick update",
|
||||
"Activate": "Activate",
|
||||
"Actions": "Actions",
|
||||
"Name": "Name",
|
||||
"dateCreated": "Date created",
|
||||
"createdBy": "Created by",
|
||||
"deleteWarningMsg": "Are you sure to delete ",
|
||||
"Update": "Update",
|
||||
"Delete": "Delete",
|
||||
"moreActions": "Actions",
|
||||
"Submit": "Submit",
|
||||
"Reset": "Reset",
|
||||
"Confirm": "Confirm",
|
||||
"Cancel": "Cancel",
|
||||
"Create": "Create",
|
||||
"Show": "Show",
|
||||
"deleteSelected": "Delete selected",
|
||||
"disableSelected": "Disable selected",
|
||||
"activateSelected": "Activate selected",
|
||||
"Add": "Add",
|
||||
"BasicInfo": "Basic info",
|
||||
"quickUpdate": "Quick update",
|
||||
"MoreActions": "Actions",
|
||||
"nav": {
|
||||
"Help": "Help",
|
||||
"Docs": "Docs",
|
||||
@@ -18,38 +39,11 @@
|
||||
"Logout": "Logout",
|
||||
"UserPage": "User page"
|
||||
},
|
||||
"table": {
|
||||
"Actions": "Actions",
|
||||
"Name": "Name",
|
||||
"CreatedBy": "Created by",
|
||||
"DateCreated": "Date created",
|
||||
"Comment": "Comment"
|
||||
},
|
||||
"actions": {
|
||||
"Update": "Update",
|
||||
"Delete": "Delete",
|
||||
"Reset": "Reset",
|
||||
"Submit": "Submit",
|
||||
"Create": "Create",
|
||||
"MoreActions": "Actions",
|
||||
"deleteSelected": "Delete selected",
|
||||
"disableSelected": "Disable selected",
|
||||
"activateSelected": "Activate selected",
|
||||
"Cancel": "Cancel",
|
||||
"Add": "Add",
|
||||
"Activate": "Activate"
|
||||
},
|
||||
"tabs": {
|
||||
"BasicInfo": "Basic info"
|
||||
},
|
||||
"tree": {
|
||||
"AddNode": "Add",
|
||||
"RenameNode": "Rename",
|
||||
"DeleteNode": "Delete",
|
||||
"addNode": "Add",
|
||||
"renameNode": "Rename",
|
||||
"deleteNode": "Delete",
|
||||
"Empty": "Empty",
|
||||
"Loading": "Loading"
|
||||
},
|
||||
"message": {
|
||||
"deleteWarning": "Are you sure to delete "
|
||||
}
|
||||
}
|
||||
|
@@ -1,38 +1,38 @@
|
||||
{
|
||||
"dateLastLogin": "Date last login",
|
||||
"MFA": "MFA",
|
||||
"source": "Source",
|
||||
"Source": "Source",
|
||||
"datePasswordUpdated": "Date password updated",
|
||||
"name": "Name",
|
||||
"username": "Username",
|
||||
"email": "Email",
|
||||
"role": "Role",
|
||||
"Name": "Name",
|
||||
"Username": "Username",
|
||||
"Email": "Email",
|
||||
"Role": "Role",
|
||||
"dateExpired": "Date expired",
|
||||
"dateJoined": "Date joined",
|
||||
"users": "Users",
|
||||
"systemUsers": "System users",
|
||||
"userGroups": "User groups",
|
||||
"create": {
|
||||
"account": "Account",
|
||||
"authentication": "Account",
|
||||
"secure": "Secure"
|
||||
},
|
||||
"Users": "Users",
|
||||
"SystemUsers": "System users",
|
||||
"UserGroups": "User groups",
|
||||
"Account": "Account",
|
||||
"Authentication": "Account",
|
||||
"Secure": "Secure",
|
||||
"Remove": "Remove",
|
||||
"removeWarningMsg": "Are you sure remove ",
|
||||
"removeSuccessMsg": "Remove success",
|
||||
"removeErrorMsg": "Remove failed: ",
|
||||
"quickUpdate": {
|
||||
"resetPasswordWarning": "This will reset the user password and send a reset mail",
|
||||
"resetPasswordSuccess": "An e-mail has been sent to the user`s mailbox",
|
||||
"resetSSHKeyWarning": "This will reset the user public key and send a reset mail",
|
||||
"resetSSHKeySuccess": "An e-mail has been sent to the user`s mailbox",
|
||||
"unblockSuccess": "Account has unblocked",
|
||||
"resetMFAWarning": "This will reset user MFA setting and user need config again",
|
||||
"resetMFAdSuccess": "User MFA setting reset success",
|
||||
"resetMFA": "Reset MFA",
|
||||
"resetPassword": "Reset password",
|
||||
"resetSSHKey": "Reset SSH key",
|
||||
"unblockUser": "Unblock login",
|
||||
"send": "Send",
|
||||
"unblock": "Unblock",
|
||||
"messages": {
|
||||
"resetPasswordWarning": "This will reset the user password and send a reset mail",
|
||||
"resetPasswordSuccess": "An e-mail has been sent to the user`s mailbox",
|
||||
"resetSSHKeyWarning": "This will reset the user public key and send a reset mail",
|
||||
"resetSSHKeySuccess": "An e-mail has been sent to the user`s mailbox",
|
||||
"unblockSuccess": "Account has unblocked",
|
||||
"resetMFAWarning": "This will reset user MFA setting and user need config again",
|
||||
"resetMFAdSuccess": "User MFA setting reset success"
|
||||
}
|
||||
"unblock": "Unblock"
|
||||
},
|
||||
"tabs": {
|
||||
"grantedAssets": "Granted assets",
|
||||
|
@@ -95,13 +95,13 @@ export default {
|
||||
return [
|
||||
{
|
||||
name: 'update',
|
||||
title: this.$t('common.actions.Update'),
|
||||
title: this.$t('common.Update'),
|
||||
can: this.validActions.canUpdate,
|
||||
callback: this.validActions.updateCallback.bind(this)
|
||||
},
|
||||
{
|
||||
name: 'delete',
|
||||
title: this.$t('common.actions.Delete'),
|
||||
title: this.$t('common.Delete'),
|
||||
can: this.validActions.canDelete,
|
||||
callback: this.validActions.deleteCallback.bind(this)
|
||||
}
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
methods: {
|
||||
defaultDelete() {
|
||||
const msg = this.$t('common.deleteWarningMsg') + ' ' + this.iTitle + ' ?'
|
||||
const title = this.$t('common.info')
|
||||
const title = this.$t('common.Info')
|
||||
const performDelete = async function() {
|
||||
const url = this.validActions.deleteApiUrl
|
||||
this.$log.debug('Start perform delete: ', url)
|
||||
@@ -146,10 +146,10 @@ export default {
|
||||
try {
|
||||
await performDelete.bind(this)()
|
||||
done()
|
||||
this.$message.success(this.$t('common.Delete success'))
|
||||
this.$message.success(this.$t('common.deleteSuccessMsg'))
|
||||
this.$router.push({ name: this.validActions.deleteSuccessRoute })
|
||||
} catch (error) {
|
||||
this.$message.error(this.$t('common.Delete failed' + ' ' + error))
|
||||
this.$message.error(this.$t('common.deleteErrorMsg' + ' ' + error))
|
||||
} finally {
|
||||
instance.confirmButtonLoading = false
|
||||
}
|
||||
|
@@ -14,15 +14,19 @@ export function setToken(token) {
|
||||
export function removeToken() {
|
||||
return Cookies.remove(TokenKey)
|
||||
}
|
||||
|
||||
export function getCurrentOrg() {
|
||||
if (!Cookies.getJSON(CurrentOrg)) {
|
||||
setCurrentOrg({ id: '', name: 'DEFAULT' })
|
||||
let org = Cookies.getJSON(CurrentOrg)
|
||||
if (!org) {
|
||||
org = { id: '', name: 'DEFAULT' }
|
||||
setCurrentOrg(org)
|
||||
return org
|
||||
}
|
||||
return Cookies.getJSON(CurrentOrg)
|
||||
return org
|
||||
}
|
||||
|
||||
export function setCurrentOrg(token) {
|
||||
Cookies.set(CurrentOrg, token)
|
||||
export function setCurrentOrg(org) {
|
||||
Cookies.set(CurrentOrg, org)
|
||||
// 切换组织后重新刷新页面
|
||||
window.location.reload(true)
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ export default {
|
||||
detailItems() {
|
||||
return [
|
||||
{
|
||||
key: this.$t('common.table.Name'),
|
||||
key: this.$t('common.Name'),
|
||||
value: this.object.name
|
||||
},
|
||||
{
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
value: this.object.path
|
||||
},
|
||||
{
|
||||
key: this.$t('common.table.DateCreated'),
|
||||
key: this.$t('common.dateCreated'),
|
||||
value: toSafeLocalDateStr(this.object.date_created)
|
||||
},
|
||||
{
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
value: this.object.created_by
|
||||
},
|
||||
{
|
||||
key: this.$t('common.comment'),
|
||||
key: this.$t('common.Comment'),
|
||||
value: this.object.comment
|
||||
}
|
||||
]
|
||||
|
@@ -17,14 +17,14 @@ export default {
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
label: this.$t('common.table.Name'),
|
||||
label: this.$t('common.Name'),
|
||||
formatter: DetailFormatter,
|
||||
sortable: true,
|
||||
route: 'AdminUserDetail'
|
||||
},
|
||||
{
|
||||
prop: 'username',
|
||||
label: this.$t('common.username'),
|
||||
label: this.$t('common.Username'),
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
@@ -33,7 +33,7 @@ export default {
|
||||
},
|
||||
{
|
||||
prop: 'comment',
|
||||
label: this.$t('common.comment'),
|
||||
label: this.$t('common.Comment'),
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
|
@@ -23,7 +23,7 @@ export default {
|
||||
|
||||
},
|
||||
fields: [
|
||||
[this.$t('common.tabs.BasicInfo'), ['name', 'login_mode', 'username', 'username_same_with_user', 'priority', 'protocol']],
|
||||
[this.$t('common.BasicInfo'), ['name', 'login_mode', 'username', 'username_same_with_user', 'priority', 'protocol']],
|
||||
[this.$t('common.Auth'), ['auto_generate_key', 'password', 'auto_push']],
|
||||
[this.$t('common.Command filter'), ['cmd_filters']],
|
||||
[this.$t('common.Others'), ['sftp_root', 'sudo', 'shell', 'comment']]
|
||||
|
@@ -17,14 +17,14 @@ export default {
|
||||
columns: [
|
||||
{
|
||||
prop: 'name',
|
||||
label: this.$t('common.table.Name'),
|
||||
label: this.$t('common.Name'),
|
||||
formatter: DetailFormatter,
|
||||
sortable: true,
|
||||
route: 'SystemUserDetail'
|
||||
},
|
||||
{
|
||||
prop: 'username',
|
||||
label: this.$t('common.username'),
|
||||
label: this.$t('common.Username'),
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
},
|
||||
{
|
||||
prop: 'comment',
|
||||
label: this.$t('common.comment'),
|
||||
label: this.$t('common.Comment'),
|
||||
sortable: 'custom'
|
||||
},
|
||||
{
|
||||
|
@@ -64,7 +64,7 @@ export default {
|
||||
value: this.object.id
|
||||
},
|
||||
{
|
||||
key: this.$t('common.table.Name'),
|
||||
key: this.$t('common.Name'),
|
||||
value: this.object.name
|
||||
},
|
||||
{
|
||||
|
@@ -45,7 +45,7 @@ export default {
|
||||
},
|
||||
delete_action: {
|
||||
prop: 'asset',
|
||||
label: this.$t('common.table.Actions'),
|
||||
label: this.$t('common.Actions'),
|
||||
align: 'center',
|
||||
width: 150,
|
||||
objects: this.object.assets,
|
||||
|
@@ -30,7 +30,7 @@ export default {
|
||||
return {
|
||||
quickActions: [
|
||||
{
|
||||
title: this.$t('common.actions.Activate'),
|
||||
title: this.$t('common.Activate'),
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
model: this.object.is_active
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
detailCardItems() {
|
||||
return [
|
||||
{
|
||||
key: this.$t('common.table.Name'),
|
||||
key: this.$t('common.Name'),
|
||||
value: this.object.name
|
||||
},
|
||||
{
|
||||
@@ -92,11 +92,11 @@ export default {
|
||||
value: this.object.date_created
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.CreatedBy'),
|
||||
key: this.$t('perms.createdBy'),
|
||||
value: this.object.created_by
|
||||
},
|
||||
{
|
||||
key: this.$t('common.comment'),
|
||||
key: this.$t('common.Comment'),
|
||||
value: 'api没有这个字段'
|
||||
}
|
||||
]
|
||||
|
@@ -42,7 +42,7 @@ export default {
|
||||
},
|
||||
delete_action: {
|
||||
prop: 'user',
|
||||
label: this.$t('common.table.Actions'),
|
||||
label: this.$t('common.Actions'),
|
||||
align: 'center',
|
||||
width: 150,
|
||||
objects: this.object.users,
|
||||
|
@@ -31,7 +31,7 @@ export default {
|
||||
tagSearch: [
|
||||
{ label: this.$t('common.Name'), key: 'name' },
|
||||
{ label: this.$t('perms.IsValid'), key: 'is_valid' },
|
||||
{ label: this.$t('common.username'), key: 'username' },
|
||||
{ label: this.$t('common.Username'), key: 'username' },
|
||||
{ label: this.$t('perms.UserGroups'), key: 'user_group' },
|
||||
{ label: this.$t('perms.IP'), key: 'ip' },
|
||||
{ label: this.$t('perms.Hostname'), key: 'hostname' },
|
||||
|
@@ -42,7 +42,7 @@ export default {
|
||||
},
|
||||
delete_action: {
|
||||
prop: 'databaseapp',
|
||||
label: this.$t('common.table.Actions'),
|
||||
label: this.$t('common.Actions'),
|
||||
align: 'center',
|
||||
width: 150,
|
||||
objects: this.object.database_apps,
|
||||
|
@@ -30,7 +30,7 @@ export default {
|
||||
return {
|
||||
quickActions: [
|
||||
{
|
||||
title: this.$t('common.actions.Activate'),
|
||||
title: this.$t('common.Activate'),
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
model: this.object.is_active
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
detailCardItems() {
|
||||
return [
|
||||
{
|
||||
key: this.$t('common.table.Name'),
|
||||
key: this.$t('common.Name'),
|
||||
value: this.object.name
|
||||
},
|
||||
{
|
||||
@@ -87,11 +87,11 @@ export default {
|
||||
value: toSafeLocalDateStr(this.object.date_created)
|
||||
},
|
||||
{
|
||||
key: this.$t('perms.CreatedBy'),
|
||||
key: this.$t('perms.createdBy'),
|
||||
value: this.object.created_by
|
||||
},
|
||||
{
|
||||
key: this.$t('common.comment'),
|
||||
key: this.$t('common.Comment'),
|
||||
value: this.object.comment
|
||||
}
|
||||
]
|
||||
|
@@ -43,7 +43,7 @@ export default {
|
||||
},
|
||||
delete_action: {
|
||||
prop: 'user',
|
||||
label: this.$t('common.table.Actions'),
|
||||
label: this.$t('common.Actions'),
|
||||
align: 'center',
|
||||
width: 150,
|
||||
objects: this.object.users,
|
||||
|
@@ -15,9 +15,9 @@ export default {
|
||||
date_expired: '2099-12-31 00:00:00 +0800'
|
||||
},
|
||||
fields: [
|
||||
[this.$t('perms.' + 'Basic'), ['name']],
|
||||
[this.$t('perms.' + 'User'), ['users', 'user_groups']],
|
||||
[this.$t('perms.' + 'RemoteApp'), ['remote_apps', 'system_users']],
|
||||
[this.$t('perms.Basic'), ['name']],
|
||||
[this.$t('perms.User'), ['users', 'user_groups']],
|
||||
[this.$t('perms.RemoteApp'), ['remote_apps', 'system_users']],
|
||||
[this.$t('common.Other'), ['is_active', 'date_expired', 'comment']]
|
||||
],
|
||||
url: '/api/v1/perms/remote-app-permissions/',
|
||||
|
@@ -21,17 +21,17 @@ export default {
|
||||
],
|
||||
columnsMeta: {
|
||||
users_amount: {
|
||||
label: this.$t('users.users')
|
||||
label: this.$t('users.Users')
|
||||
},
|
||||
user_groups_amount: {
|
||||
label: this.$t('users.userGroups')
|
||||
label: this.$t('users.UserGroups')
|
||||
},
|
||||
remote_apps_amount: {
|
||||
label: this.$t('assets.remoteApps')
|
||||
label: this.$t('assets.RemoteApps')
|
||||
},
|
||||
system_users_amount: {
|
||||
formatter: LengthFormatter,
|
||||
label: this.$t('assets.systemUsers')
|
||||
label: this.$t('assets.SystemUsers')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -42,7 +42,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<el-button @click="dialogVisible = false">{{ $t('common.actions.Cancel') }}</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('common.actions.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="testUerLoginClick">{{ $t('common.confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -58,7 +58,7 @@
|
||||
@error="handlerListTableXHRError($event)"
|
||||
/>
|
||||
<div slot="footer">
|
||||
<el-button @click="dialogLdapUserImport = false">{{ $t('common.actions.Cancel') }}</el-button>
|
||||
<el-button @click="dialogLdapUserImport = false">{{ $t('common.actions.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="importUserClick">{{ $t('common.import') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
@@ -99,7 +99,7 @@ export default {
|
||||
value: '需要处理'
|
||||
},
|
||||
{
|
||||
key: this.$t('common.DateCreated'),
|
||||
key: this.$t('common.dateCreated'),
|
||||
value: this.object.date_created
|
||||
}
|
||||
]
|
||||
|
@@ -64,7 +64,7 @@ export default {
|
||||
detailItems() {
|
||||
return [
|
||||
{
|
||||
key: this.$t('common.table.Name'),
|
||||
key: this.$t('common.Name'),
|
||||
value: this.object.name
|
||||
},
|
||||
{
|
||||
@@ -72,11 +72,11 @@ export default {
|
||||
value: this.object.created_by
|
||||
},
|
||||
{
|
||||
key: this.$t('common.table.DateCreated'),
|
||||
key: this.$t('common.dateCreated'),
|
||||
value: this.object.date_created
|
||||
},
|
||||
{
|
||||
key: this.$t('common.comment'),
|
||||
key: this.$t('common.Comment'),
|
||||
value: this.object.comment
|
||||
}
|
||||
]
|
||||
|
@@ -25,7 +25,7 @@ export default {
|
||||
activeMenu: 'GroupInfo',
|
||||
submenu: [
|
||||
{
|
||||
title: this.$t('common.tabs.BasicInfo'),
|
||||
title: this.$t('common.BasicInfo'),
|
||||
name: 'GroupInfo'
|
||||
},
|
||||
{
|
||||
|
@@ -16,7 +16,7 @@ export default {
|
||||
columns: ['name', 'users_amount', 'comment', 'actions'],
|
||||
columnsMeta: {
|
||||
users_amount: {
|
||||
label: this.$t('users.users')
|
||||
label: this.$t('users.Users')
|
||||
}
|
||||
},
|
||||
detailRoute: 'UserGroupDetail'
|
||||
|
@@ -9,7 +9,6 @@ export default {
|
||||
GenericCreateUpdatePage
|
||||
},
|
||||
data() {
|
||||
const vm = this
|
||||
return {
|
||||
initial: {
|
||||
password_strategy: 0,
|
||||
@@ -19,9 +18,9 @@ export default {
|
||||
date_expired: '2099-12-31 00:00:00 +0800'
|
||||
},
|
||||
fields: [
|
||||
[this.$t('users.create.Account'), ['name', 'username', 'email', 'groups']],
|
||||
[this.$t('users.create.Authentication'), ['password_strategy', 'password', 'public_key', 'mfa_level', 'source']],
|
||||
[this.$t('users.create.Secure'), ['role', 'date_expired']],
|
||||
[this.$t('users.Account'), ['name', 'username', 'email', 'groups']],
|
||||
[this.$t('users.Authentication'), ['password_strategy', 'password', 'public_key', 'mfa_level', 'source']],
|
||||
[this.$t('users.Secure'), ['role', 'date_expired']],
|
||||
[this.$t('common.Other'), ['phone', 'wechat', 'comment']]
|
||||
],
|
||||
url: '/api/v1/users/users/',
|
||||
@@ -51,15 +50,7 @@ export default {
|
||||
value: []
|
||||
}
|
||||
}
|
||||
},
|
||||
moreButtons: [
|
||||
{
|
||||
title: 'Test',
|
||||
callback: function(values) {
|
||||
vm.$log.debug('hello: ', values)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -23,14 +23,14 @@ export default {
|
||||
hasSelection: false,
|
||||
hasTree: true,
|
||||
tagSearch: [
|
||||
{ label: this.$t('common.name'), key: 'name' },
|
||||
{ label: this.$t('common.isValid'), key: 'is_valid' },
|
||||
{ label: this.$t('users.username'), key: 'username' },
|
||||
{ label: this.$t('users.userGroups'), key: 'user_group' },
|
||||
{ label: this.$t('common.Name'), key: 'name' },
|
||||
{ label: this.$t('common.IsValid'), key: 'is_valid' },
|
||||
{ label: this.$t('users.Username'), key: 'username' },
|
||||
{ label: this.$t('users.UserGroups'), key: 'user_group' },
|
||||
{ label: this.$t('assets.IP'), key: 'ip' },
|
||||
{ label: this.$t('assets.hostname'), key: 'hostname' },
|
||||
{ label: this.$t('assets.node'), key: 'node' },
|
||||
{ label: this.$t('assets.systemUser'), key: 'system_user' },
|
||||
{ label: this.$t('assets.Hostname'), key: 'hostname' },
|
||||
{ label: this.$t('assets.Node'), key: 'node' },
|
||||
{ label: this.$t('assets.SystemUser'), key: 'system_user' },
|
||||
{ label: '继承(先占位)', key: 'all=0' }
|
||||
],
|
||||
columns: [
|
||||
@@ -43,19 +43,19 @@ export default {
|
||||
formatter: ExpandAssetPermissionFormatter
|
||||
},
|
||||
users_amount: {
|
||||
label: this.$t('users.users')
|
||||
label: this.$t('users.Users')
|
||||
},
|
||||
user_groups_amount: {
|
||||
label: this.$t('users.userGroups')
|
||||
label: this.$t('users.UserGroups')
|
||||
},
|
||||
assets_amount: {
|
||||
label: this.$t('users.assets')
|
||||
label: this.$t('assets.Assets')
|
||||
},
|
||||
nodes_amount: {
|
||||
label: this.$t('assets.nodes')
|
||||
label: this.$t('assets.Nodes')
|
||||
},
|
||||
system_users_amount: {
|
||||
label: this.$t('assets.systemUsers')
|
||||
label: this.$t('assets.SystemUsers')
|
||||
},
|
||||
actions: {
|
||||
updateRoute: 'AssetPermissionUpdate',
|
||||
|
@@ -26,25 +26,25 @@ export default {
|
||||
route: 'DatabasePermissionDetail'
|
||||
},
|
||||
users: {
|
||||
label: this.$t('users.users'),
|
||||
label: this.$t('users.Users'),
|
||||
formatter(row, col, colValue) {
|
||||
return colValue.length
|
||||
}
|
||||
},
|
||||
user_groups: {
|
||||
label: this.$t('users.userGroups'),
|
||||
label: this.$t('users.UserGroups'),
|
||||
formatter(row, col, colValue) {
|
||||
return colValue.length
|
||||
}
|
||||
},
|
||||
database_apps: {
|
||||
label: this.$t('assets.remoteApps'),
|
||||
label: this.$t('assets.RemoteApps'),
|
||||
formatter(row, col, colValue) {
|
||||
return colValue.length
|
||||
}
|
||||
},
|
||||
system_users: {
|
||||
label: this.$t('assets.systemUsers'),
|
||||
label: this.$t('assets.SystemUsers'),
|
||||
formatter(row, col, colValue) {
|
||||
return colValue.length
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ export default {
|
||||
return {
|
||||
quickActions: [
|
||||
{
|
||||
title: this.$t('common.actions.Activate'),
|
||||
title: this.$t('common.Activate'),
|
||||
type: 'switcher',
|
||||
attrs: {
|
||||
model: this.object.is_active
|
||||
@@ -50,14 +50,14 @@ export default {
|
||||
title: this.$t('users.quickUpdate.resetMFA'),
|
||||
attrs: {
|
||||
type: 'primary',
|
||||
label: this.$t('common.actions.Reset')
|
||||
label: this.$t('common.Reset')
|
||||
},
|
||||
callbacks: {
|
||||
click: function() {
|
||||
const warnMsg = vm.$t('users.resetMFAWarningMsg')
|
||||
const warnTitle = vm.$t('common.info')
|
||||
const warnMsg = vm.$t('users.quickUpdate.resetMFAWarningMsg')
|
||||
const warnTitle = vm.$t('common.Info')
|
||||
const url = `/api/v1/users/users/${vm.object.id}/otp/reset/`
|
||||
const successMsg = vm.$t('users.resetMFAdSuccessMsg')
|
||||
const successMsg = vm.$t('users.quickUpdate.resetMFAdSuccessMsg')
|
||||
vm.$confirm(warnMsg, warnTitle, {
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'el-button--warning',
|
||||
@@ -117,7 +117,7 @@ export default {
|
||||
callbacks: {
|
||||
click: function() {
|
||||
const warnMsg = vm.$t('users.resetSSHKeyWarningMsg')
|
||||
const warnTitle = vm.$t('common.info')
|
||||
const warnTitle = vm.$t('common.Info')
|
||||
const url = `/api/v1/users/users/${vm.object.id}/pubkey/reset/`
|
||||
const successMsg = vm.$t('users.resetPasswordSuccessMsg')
|
||||
vm.$confirm(warnMsg, warnTitle, {
|
||||
@@ -160,7 +160,7 @@ export default {
|
||||
],
|
||||
relationConfig: {
|
||||
icon: 'fa-user',
|
||||
title: this.$t('users.userGroups'),
|
||||
title: this.$t('users.UserGroups'),
|
||||
objectsAjax: {
|
||||
url: '/api/v1/users/groups/?fields_size=mini&order=name'
|
||||
},
|
||||
@@ -189,19 +189,19 @@ export default {
|
||||
detailItems() {
|
||||
return [
|
||||
{
|
||||
key: this.$t('users.name'),
|
||||
key: this.$t('users.Name'),
|
||||
value: this.object.name
|
||||
},
|
||||
{
|
||||
key: this.$t('users.username'),
|
||||
key: this.$t('users.Username'),
|
||||
value: this.object.username
|
||||
},
|
||||
{
|
||||
key: this.$t('users.email'),
|
||||
key: this.$t('users.Email'),
|
||||
value: this.object.email
|
||||
},
|
||||
{
|
||||
key: this.$t('users.role'),
|
||||
key: this.$t('users.Role'),
|
||||
value: this.object.role_display
|
||||
},
|
||||
{
|
||||
@@ -209,7 +209,7 @@ export default {
|
||||
value: this.object.mfa_level_display
|
||||
},
|
||||
{
|
||||
key: this.$t('users.source'),
|
||||
key: this.$t('users.Source'),
|
||||
value: this.object.source_display
|
||||
},
|
||||
{
|
||||
@@ -233,7 +233,7 @@ export default {
|
||||
value: this.object.date_password_last_updated
|
||||
},
|
||||
{
|
||||
key: this.$t('common.comment'),
|
||||
key: this.$t('common.Comment'),
|
||||
value: this.object.comment
|
||||
}
|
||||
]
|
||||
|
@@ -26,25 +26,25 @@ export default {
|
||||
route: 'RemoteAppPermissionDetail'
|
||||
},
|
||||
users: {
|
||||
label: this.$t('users.users'),
|
||||
label: this.$t('users.Users'),
|
||||
formatter(row, col, colValue) {
|
||||
return colValue.length
|
||||
}
|
||||
},
|
||||
user_groups: {
|
||||
label: this.$t('users.userGroups'),
|
||||
label: this.$t('users.UserGroups'),
|
||||
formatter(row, col, colValue) {
|
||||
return colValue.length
|
||||
}
|
||||
},
|
||||
remote_apps: {
|
||||
label: this.$t('assets.remoteApps'),
|
||||
label: this.$t('assets.RemoteApps'),
|
||||
formatter(row, col, colValue) {
|
||||
return colValue.length
|
||||
}
|
||||
},
|
||||
system_users: {
|
||||
label: this.$t('assets.systemUsers'),
|
||||
label: this.$t('assets.SystemUsers'),
|
||||
formatter(row, col, colValue) {
|
||||
return colValue.length
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ export default {
|
||||
activeMenu: 'UserInfo',
|
||||
submenu: [
|
||||
{
|
||||
title: this.$t('common.tabs.BasicInfo'),
|
||||
title: this.$t('common.BasicInfo'),
|
||||
name: 'UserInfo'
|
||||
},
|
||||
{
|
||||
|
@@ -29,12 +29,14 @@ export default {
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
actions: {
|
||||
hasDelete: this.currentOrgIsDefault(),
|
||||
hasDelete: () => this.currentOrgIsDefault,
|
||||
extraActions: [
|
||||
{
|
||||
title: 'Remove',
|
||||
title: this.$t('users.Remove'),
|
||||
name: 'remove',
|
||||
type: 'warning',
|
||||
has: !this.currentOrgIsDefault()
|
||||
has: () => !this.currentOrgIsDefault,
|
||||
callback: this.removeUserFromOrg
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -44,14 +46,14 @@ export default {
|
||||
extraMoreActions: [
|
||||
{
|
||||
name: 'disableSelected',
|
||||
title: this.$t('common.actions.disableSelected'),
|
||||
title: this.$t('common.disableSelected'),
|
||||
callback: () => {
|
||||
console.log('disableSelected')
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'activateSelected',
|
||||
title: this.$t('common.actions.activateSelected'),
|
||||
title: this.$t('common.activateSelected'),
|
||||
callback: () => {
|
||||
console.log('activateSelected')
|
||||
}
|
||||
@@ -62,14 +64,42 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'currentOrg'
|
||||
])
|
||||
'currentOrg',
|
||||
'currentUser',
|
||||
'device'
|
||||
]),
|
||||
currentOrgIsDefault() {
|
||||
console.log('Current org is default: ', this.currentOrg.id === 'DEFAULT')
|
||||
return this.currentOrg.id === 'DEFAULT'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
currentOrgIsDefault() {
|
||||
console.log(this.currentOrg)
|
||||
return false
|
||||
// return this.currentOrg.id === 'DEFAULT'
|
||||
removeUserFromOrg({ row, col, reload }) {
|
||||
const msg = this.$t('users.removeWarningMsg') + ' "' + row.name + '"'
|
||||
const title = this.$t('common.Info')
|
||||
const performDelete = function() {
|
||||
const url = `/api/v1/users/users/${row.id}/`
|
||||
return this.$axios.delete(url)
|
||||
}
|
||||
this.$alert(msg, title, {
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'el-button--danger',
|
||||
showCancelButton: true,
|
||||
beforeClose: async(action, instance, done) => {
|
||||
if (action !== 'confirm') return done()
|
||||
instance.confirmButtonLoading = true
|
||||
try {
|
||||
await performDelete.bind(this)({ row: row, col: col })
|
||||
done()
|
||||
reload()
|
||||
this.$message.success(this.$t('users.removeSuccessMsg'))
|
||||
} catch (error) {
|
||||
this.$message.error(this.$t('users.removeErrorMsg' + ' ' + error))
|
||||
} finally {
|
||||
instance.confirmButtonLoading = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user