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