From e6ffec5386969e3620ff25721ebbbeb05827b723 Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 29 May 2020 15:57:48 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E8=AE=A1=E5=88=92=E8=B7=AF=E7=94=B1=E7=BB=93=E6=9E=84?= =?UTF-8?q?=EF=BC=9B=E4=BF=AE=E6=94=B9=E6=94=B9=E5=AF=86=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E7=BF=BB=E8=AF=91=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 5 ++ .../ChangeAuthPlan/ChangeAuthPlanList.vue | 31 +++++--- src/views/xpack/router.js | 73 ++++++++----------- 3 files changed, 57 insertions(+), 52 deletions(-) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 80df184d1..6a3f38e26 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -669,6 +669,8 @@ "assetAndNode": "资产或节点", "Success": "成功", "ChangeAuthPlan": { + "AssetAmount": "资产数量", + "NodeAmount": "节点数量", "ChangeAuthPlan": "改密计划", "ChangeAuthPlanCreate": "创建改密计划", "ChangeAuthPlanUpdate": "更新改密计划", @@ -680,6 +682,9 @@ "Username": "用户名", "PasswordStrategy": "密码策略", "PasswordLength": "密码长度", + "Execute": "执行", + "ExecutionTimes": "执行次数", + "Timer": "定时执行", "CyclePerform": "周期执行", "RegularlyPerform": "定期执行", "DateJoined": "创建日期", diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue index 0e9204ceb..21a749ddf 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue @@ -20,33 +20,42 @@ export default { 'periodic_display', 'run_times', 'comment', 'actions' ], columnsMeta: { - password_strategy_display: { - width: '200px', - showOverflowTooltip: true - }, assets_amount: { - label: vm.$t('xpack.Asset') + label: vm.$t('xpack.ChangeAuthPlan.AssetAmount'), + width: '80px' }, nodes_amount: { - label: vm.$t('xpack.Node') + label: vm.$t('xpack.ChangeAuthPlan.NodeAmount'), + width: '80px' + }, + password_strategy_display: { + label: vm.$t('xpack.ChangeAuthPlan.PasswordStrategy'), + width: '220px', + showOverflowTooltip: true }, periodic_display: { - showOverflowTooltip: true + label: vm.$t('xpack.ChangeAuthPlan.Timer'), + showOverflowTooltip: true, + width: '150px' + }, + run_times: { + label: vm.$t('xpack.ChangeAuthPlan.ExecutionTimes'), + width: '80px' } }, actions: { formatterArgs: { extraActions: [ { - title: vm.$t('xpack.ChangeAuthPlan.Run'), - name: 'run', + title: vm.$t('xpack.ChangeAuthPlan.Execute'), + name: 'execute', type: 'info', callback: function(data) { this.$axios.post( `/api/v1/xpack/change-auth-plan/plan-execution/`, { plan: data.cellValue } ).then(res => { - window.open(`/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600') + window.open(`/core/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600') }) }.bind(this) } @@ -55,9 +64,9 @@ export default { } }, headerActions: { + hasRefresh: true, hasExport: false, hasImport: false, - hasRefresh: false, hasBulkDelete: false, hasBulkUpdate: false } diff --git a/src/views/xpack/router.js b/src/views/xpack/router.js index aa4f18ae1..609b00151 100644 --- a/src/views/xpack/router.js +++ b/src/views/xpack/router.js @@ -76,47 +76,38 @@ export default { meta: { title: i18n.t('xpack.OrganizationDetail'), activeMenu: '/xpack/orgs' } }, { - path: 'change-auth-plan', - component: empty, - redirect: '/xpack/change-auth-plan/plan', - name: 'ChangeAuthPlan', - meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlan'), activeMenu: '/xpack/change-auth-plan' }, - children: [ - { - path: 'plan', - component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue'), - name: 'ChangeAuthPlanList', - meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlan'), activeMenu: '/xpack/change-auth-plan' } - }, - { - path: 'plan/create', - component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue'), - name: 'ChangeAuthPlanCreate', - meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlanCreate'), activeMenu: '/xpack/change-auth-plan', action: 'create' }, - hidden: true - }, - { - path: 'plan/:id/update', - component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue'), - name: 'ChangeAuthPlanUpdate', - meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlanUpdate'), activeMenu: '/xpack/change-auth-plan', action: 'update' }, - hidden: true - }, - { - path: 'plan/:id', - component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/index.vue'), - name: 'ChangeAuthPlanDetail', - meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlan'), activeMenu: '/xpack/change-auth-plan' }, - hidden: true - }, - { - path: 'plan-execution/:id', - component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/index.vue'), - name: 'ChangeAuthPlanExecutionDetail', - meta: { title: i18n.t('xpack.ChangeAuthPlan.ExecutionDetail'), activeMenu: '/xpack/change-auth-plan' }, - hidden: true - } - ] + path: 'change-auth-plan/plan', + component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue'), + name: 'ChangeAuthPlanList', + meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlan'), activeMenu: '/xpack/change-auth-plan/plan' } + }, + { + path: 'change-auth-plan/plan/create', + component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue'), + name: 'ChangeAuthPlanCreate', + meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlanCreate'), activeMenu: '/xpack/change-auth-plan/plan', action: 'create' }, + hidden: true + }, + { + path: 'change-auth-plan/plan/:id/update', + component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue'), + name: 'ChangeAuthPlanUpdate', + meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlanUpdate'), activeMenu: '/xpack/change-auth-plan/plan', action: 'update' }, + hidden: true + }, + { + path: 'change-auth-plan/plan/:id', + component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/index.vue'), + name: 'ChangeAuthPlanDetail', + meta: { title: i18n.t('xpack.ChangeAuthPlan.ChangeAuthPlan'), activeMenu: '/xpack/change-auth-plan/plan' }, + hidden: true + }, + { + path: 'change-auth-plan/plan-execution/:id', + component: () => import('@/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/index.vue'), + name: 'ChangeAuthPlanExecutionDetail', + meta: { title: i18n.t('xpack.ChangeAuthPlan.ExecutionDetail'), activeMenu: '/xpack/change-auth-plan/plan' }, + hidden: true }, { path: '/cloud', From 7f55565f8d6bf89f36ec017c8402ab958a0f2283 Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 29 May 2020 16:21:08 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E8=AE=A1=E5=88=92=E7=BF=BB=E8=AF=91=EF=BC=88=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=9B=B4=E6=96=B0=E9=A1=B5=E9=9D=A2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 7 ++++++- .../ChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue | 14 ++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 6a3f38e26..7ca1872f8 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -698,7 +698,12 @@ "DateStart": "开始日期", "Detail": "详情", "Log": "日志", - "Retry": "重试" + "Retry": "重试", + "HelpText": { + "UsernameOfCreateUpdatePage": "目标主机上用户的用户名;如果已️存在,修改用户密码;如果不存在,添加用户并设置密码;", + "CrontabOfCreateUpdatePage": "例如:每周日 03:05 执行 <5 3 * * 0>
使用5位 Linux crontab 表达式 <分 时 日 月 星期> (在线工具
如果同时设置了定期执行和周期执行,优先使用定期执行", + "IntervalOfCreateUpdatePage": "单位:时" + } }, "Corporation": "公司", "Edition": "版本", diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue index 66d02d080..26e634b68 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanCreateUpdate.vue @@ -31,7 +31,7 @@ export default { }, fieldsMeta: { username: { - helpText: '用户名为将要修改的资产上的用户的用户名。如果用户存在,则修改密码;如果用户不存在,则创建用户。' + helpText: this.$t('xpack.ChangeAuthPlan.HelpText.UsernameOfCreateUpdatePage') }, assets: { type: 'assetSelect', @@ -78,21 +78,15 @@ export default { hidden: (formValue) => { return formValue.is_periodic === false }, - helpText: '' + - 'eg:每周日 03:05 执行 <5 3 * * 0>' + - '
' + - '使用5位 Linux crontab 表达式 <分 时 日 月 星期> ' + - '(在线工具)' + - '
' + - '如果同时设置了定期执行和周期执行,优先使用定期执行' + - '' + helpText: this.$t('xpack.ChangeAuthPlan.HelpText.CrontabOfCreateUpdatePage') }, interval: { label: this.$t('xpack.ChangeAuthPlan.CyclePerform'), hidden: (formValue) => { return formValue.is_periodic === false }, - helpText: '(单位: 时)' + helpText: this.$t('xpack.ChangeAuthPlan.HelpText.IntervalOfCreateUpdatePage') + // helpText: '(单位: 时)' } } } From 305bbaa27068ace341f4385574370b017bf8ab36 Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 29 May 2020 17:12:09 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E8=AE=A1=E5=88=92=E7=BF=BB=E8=AF=91=EF=BC=88=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 4 +- .../ChangeAuthPlanAsset/index.vue | 16 +++--- .../ChangeAuthPlanExecutionList.vue | 51 +++++++++---------- .../ChangeAuthPlanInfo.vue | 6 +-- .../ChangeAuthPlanDetail/index.vue | 2 +- 5 files changed, 38 insertions(+), 41 deletions(-) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 7ca1872f8..0c602f449 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -669,6 +669,7 @@ "assetAndNode": "资产或节点", "Success": "成功", "ChangeAuthPlan": { + "AssetAndNode": "资产和节点", "AssetAmount": "资产数量", "NodeAmount": "节点数量", "ChangeAuthPlan": "改密计划", @@ -689,8 +690,7 @@ "RegularlyPerform": "定期执行", "DateJoined": "创建日期", "DateUpdated": "更新日期", - "ManualRunPlan": "手动执行计划", - "Run": "执行", + "ManualExecutePlan": "手动执行计划", "addAsset": "添加资产", "addNode": "添加节点", "Result": "结果", diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue index b50cccc65..5a75b1ab5 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue @@ -39,15 +39,15 @@ export default { } }, headerActions: { + hasSearch: true, + hasRefresh: true, + hasLeftActions: true, + hasRightActions: true, hasExport: false, hasImport: false, - hasRefresh: false, hasCreate: false, hasBulkDelete: false, - hasBulkUpdate: false, - hasLeftActions: false, - hasSearch: false, - hasRightActions: false + hasBulkUpdate: false }, assetRelationConfig: { icon: 'fa-edit', @@ -84,11 +84,10 @@ export default { return this.$axios.patch(relationUrl, data) }, onAddSuccess: (objects, that) => { - this.$log.debug('Select value', that.select2.value) that.iHasObjects = [...that.iHasObjects, ...objects] that.$refs.select2.clearSelected() this.$message.success(this.$t('common.updateSuccessMsg')) - setTimeout(() => location.reload(), 500) + this.$refs.listTable.reloadTable() }, performDelete: (item) => { const nodes = this.object.nodes @@ -105,11 +104,10 @@ export default { that.iHasObjects.splice(theRemoveIndex, 1) while (that.select2.disabledValues.indexOf(obj.value) !== -1) { const i = that.select2.disabledValues.indexOf(obj.value) - this.$log.debug('disabled values remove index: ', i) that.select2.disabledValues.splice(i, 1) } this.$message.success(this.$t('common.deleteSuccessMsg')) - setTimeout(() => location.reload(), 500) + this.$refs.listTable.reloadTable() } } } diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionList.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionList.vue index 405c2460b..88cf4e74e 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionList.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionList.vue @@ -30,10 +30,10 @@ export default { label: this.$t('xpack.ChangeAuthPlan.Username') }, assets_amount: { - label: this.$t('xpack.Asset') + label: this.$t('xpack.ChangeAuthPlan.AssetAmount') }, nodes_amount: { - label: this.$t('xpack.Node') + label: this.$t('xpack.ChangeAuthPlan.NodeAmount') }, result_summary: { label: this.$t('xpack.ChangeAuthPlan.Result'), @@ -57,31 +57,30 @@ export default { }, date_start: { showOverflowTooltip: true - }, - actions: { - prop: 'id', - formatterArgs: { - hasDelete: false, - hasUpdate: false, - extraActions: [ - { - name: 'log', - type: 'primary', - title: this.$t('xpack.ChangeAuthPlan.Log'), - callback: function({ cellValue, tableData }) { - window.open(`/ops/celery/task/${cellValue}/log/`, '_blank', 'toolbar=yes, width=900, height=600') - } - }, - { - name: 'detail', - title: this.$t('xpack.ChangeAuthPlan.Detail'), - type: 'info', - callback: function({ cellValue, tableData }) { - return this.$router.push({ name: 'ChangeAuthPlanExecutionDetail', params: { id: cellValue }}) - } + } + }, + actions: { + formatterArgs: { + hasDelete: false, + hasUpdate: false, + extraActions: [ + { + name: 'log', + type: 'primary', + title: this.$t('xpack.ChangeAuthPlan.Log'), + callback: function({ cellValue, tableData }) { + window.open(`/core/ops/celery/task/${cellValue}/log/`, '_blank', 'toolbar=yes, width=900, height=600') } - ] - } + }, + { + name: 'detail', + title: this.$t('xpack.ChangeAuthPlan.Detail'), + type: 'info', + callback: function({ cellValue, tableData }) { + return this.$router.push({ name: 'ChangeAuthPlanExecutionDetail', params: { id: cellValue }}) + } + } + ] } } }, diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanInfo.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanInfo.vue index bb93585b5..408f74e6d 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanInfo.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanInfo.vue @@ -29,10 +29,10 @@ export default { return { quickActions: [ { - title: this.$t('xpack.ChangeAuthPlan.ManualRunPlan'), + title: this.$t('xpack.ChangeAuthPlan.ManualExecutePlan'), attrs: { type: 'primary', - label: this.$t('xpack.ChangeAuthPlan.Run') + label: this.$t('xpack.ChangeAuthPlan.Execute') }, callbacks: { click: function() { @@ -40,7 +40,7 @@ export default { `/api/v1/xpack/change-auth-plan/plan-execution/`, { plan: this.object.id } ).then(res => { - window.open(`/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600') + window.open(`/core/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600') }) }.bind(this) } diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/index.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/index.vue index 2032c8d3b..f758a3867 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/index.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/index.vue @@ -30,7 +30,7 @@ export default { name: 'ChangeAuthPlanInfo' }, { - title: this.$t('xpack.assetAndNode'), + title: this.$t('xpack.ChangeAuthPlan.AssetAndNode'), name: 'ChangeAuthPlanAsset' }, { From 202985a942d22410e8dfa041c9b6c2b1a6b835dc Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 29 May 2020 18:42:16 +0800 Subject: [PATCH 4/4] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E8=AE=A1=E5=88=92=E7=BF=BB=E8=AF=91=EF=BC=88=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E8=AE=A1=E5=88=92=E9=A1=B5=E9=9D=A2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 2 + .../ChangeAuthPlanExecutionInfo.vue | 4 +- .../ChangeAuthPlanExecutionTaskList.vue | 55 +++++++++---------- .../ChangeAuthPlanExecutionList.vue | 23 +++++--- .../ChangeAuthPlanInfo.vue | 8 +++ 5 files changed, 54 insertions(+), 38 deletions(-) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 6f13d4582..fa5d9b4e5 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -687,6 +687,8 @@ "assetAndNode": "资产或节点", "Success": "成功", "ChangeAuthPlan": { + "Asset": "资产", + "Success": "成功", "AssetAndNode": "资产和节点", "AssetAmount": "资产数量", "NodeAmount": "节点数量", diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionInfo.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionInfo.vue index 5c7329ac5..220f7f3dd 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionInfo.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionInfo.vue @@ -32,11 +32,11 @@ export default { value: this.object.username }, { - key: this.$t('xpack.Asset'), + key: this.$t('xpack.ChangeAuthPlan.AssetAmount'), value: this.object.assets_amount }, { - key: this.$t('xpack.Node'), + key: this.$t('xpack.ChangeAuthPlan.NodeAmount'), value: this.object.nodes_amount }, { diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue index 966e60905..f2c954d6d 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue @@ -26,54 +26,53 @@ export default { ], columnsMeta: { asset: { - label: this.$t('xpack.Asset'), + label: this.$t('xpack.ChangeAuthPlan.Asset'), formatter: function(row, column, cellValue, index) { const url = `/assets/assets/${cellValue}` return { row.asset_info.hostname } } }, is_success: { - label: this.$t('xpack.Success') + label: this.$t('xpack.ChangeAuthPlan.Success') }, timedelta: { label: this.$t('xpack.ChangeAuthPlan.TimeDelta'), formatter: function(row) { return row.timedelta.toFixed(2) + 's' } - }, - actions: { - prop: 'id', - formatterArgs: { - hasDelete: false, - hasUpdate: false, - extraActions: [ - { - name: 'retry', - type: 'info', - title: this.$t('xpack.ChangeAuthPlan.Retry'), - callback: function({ cellValue, tableData }) { - this.$axios.put( - `/api/v1/xpack/change-auth-plan/plan-execution-subtask/${cellValue}/`, - ).then(res => { - window.open(`/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600') - }) - }.bind(this) - } - ] - } + } + }, + actions: { + formatterArgs: { + hasDelete: false, + hasUpdate: false, + extraActions: [ + { + name: 'retry', + type: 'info', + title: this.$t('xpack.ChangeAuthPlan.Retry'), + callback: function({ cellValue, tableData }) { + this.$axios.put( + `/api/v1/xpack/change-auth-plan/plan-execution-subtask/${cellValue}/`, + ).then(res => { + window.open(`/core/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600') + }) + }.bind(this) + } + ] } } }, headerActions: { + hasSearch: true, + hasRefresh: true, + hasLeftActions: true, + hasRightActions: true, hasExport: false, hasImport: false, - hasRefresh: false, hasCreate: false, hasBulkDelete: false, - hasBulkUpdate: false, - hasLeftActions: false, - hasSearch: false, - hasRightActions: false + hasBulkUpdate: false } } } diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionList.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionList.vue index 88cf4e74e..aaf8f749b 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionList.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionList.vue @@ -30,13 +30,17 @@ export default { label: this.$t('xpack.ChangeAuthPlan.Username') }, assets_amount: { - label: this.$t('xpack.ChangeAuthPlan.AssetAmount') + label: this.$t('xpack.ChangeAuthPlan.AssetAmount'), + width: '80px' }, nodes_amount: { - label: this.$t('xpack.ChangeAuthPlan.NodeAmount') + label: this.$t('xpack.ChangeAuthPlan.NodeAmount'), + width: '80px' }, result_summary: { label: this.$t('xpack.ChangeAuthPlan.Result'), + width: '80px', + showOverflowTooltip: true, formatter: function(row) { const summary =
{row.result_summary.succeed}/ @@ -47,10 +51,13 @@ export default { } }, password_strategy_display: { - label: this.$t('xpack.ChangeAuthPlan.PasswordStrategy') + label: this.$t('xpack.ChangeAuthPlan.PasswordStrategy'), + width: '220px', + showOverflowTooltip: true }, timedelta: { label: this.$t('xpack.ChangeAuthPlan.TimeDelta'), + width: '80px', formatter: function(row) { return row.timedelta.toFixed(2) + 's' } @@ -85,15 +92,15 @@ export default { } }, headerActions: { + hasSearch: true, + hasRefresh: true, + hasRightActions: true, + hasLeftActions: true, hasExport: false, hasImport: false, - hasRefresh: false, hasCreate: false, hasBulkDelete: false, - hasBulkUpdate: false, - hasLeftActions: false, - hasSearch: false, - hasRightActions: false + hasBulkUpdate: false } } } diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanInfo.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanInfo.vue index 408f74e6d..395c5f8f3 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanInfo.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanInfo.vue @@ -59,6 +59,14 @@ export default { key: this.$t('xpack.ChangeAuthPlan.Username'), value: this.object.username }, + { + key: this.$t('xpack.ChangeAuthPlan.AssetAmount'), + value: this.object.assets_amount + }, + { + key: this.$t('xpack.ChangeAuthPlan.NodeAmount'), + value: this.object.nodes_amount + }, { key: this.$t('xpack.ChangeAuthPlan.PasswordStrategy'), value: this.object.password_strategy_display