diff --git a/src/components/Apps/AccountListTable/AccountList.vue b/src/components/Apps/AccountListTable/AccountList.vue
index 466dd9ebc..bfe3e3da8 100644
--- a/src/components/Apps/AccountListTable/AccountList.vue
+++ b/src/components/Apps/AccountListTable/AccountList.vue
@@ -157,6 +157,7 @@ export default {
},
columnsMeta: {
name: {
+ width: '120px',
formatter: function(row) {
const to = {
name: 'AssetAccountDetail',
@@ -182,8 +183,10 @@ export default {
}
}
},
+ username: {
+ width: '120px'
+ },
secret_type: {
- width: '100px',
formatter: function(row) {
return row.secret_type.label
}
@@ -194,7 +197,7 @@ export default {
}
},
has_secret: {
- width: '100px',
+ width: '120px',
formatterArgs: {
showFalse: false
}
diff --git a/src/components/Form/FormFields/TagInput.vue b/src/components/Form/FormFields/TagInput.vue
index 6fe67027c..890a76fa2 100644
--- a/src/components/Form/FormFields/TagInput.vue
+++ b/src/components/Form/FormFields/TagInput.vue
@@ -153,7 +153,7 @@ export default {
border: 1px solid #dcdee2;
border-radius: 1px;
background-color: #fff;
- line-height: 32px;
+ line-height: 30px;
&:hover {
border-color: #C0C4CC;
@@ -165,7 +165,7 @@ export default {
}
&>>> .el-autocomplete {
- height: 30px;
+ height: 28px;
}
}
@@ -184,7 +184,7 @@ export default {
}
.filter-field >>> .el-input__inner {
- height: 29px;
+ height: 28px;
}
.show-password {
diff --git a/src/layout/components/Page/index.vue b/src/layout/components/Page/index.vue
index 438e85a53..c6330d638 100644
--- a/src/layout/components/Page/index.vue
+++ b/src/layout/components/Page/index.vue
@@ -51,6 +51,7 @@ export default {
computed: {
iTitle() {
let title = this.title || this.$route.meta.title
+ console.log('title', this.$route.meta.title)
if (!title) {
title = this.$t('NoTitle')
}
diff --git a/src/router/console/accounts.js b/src/router/console/accounts.js
index fed664845..2131eb5cb 100644
--- a/src/router/console/accounts.js
+++ b/src/router/console/accounts.js
@@ -140,7 +140,7 @@ export default [
name: 'AccountPushCreate',
hidden: true,
meta: {
- title: i18n.t('Create'),
+ title: i18n.t('AccountPushCreate'),
permissions: ['accounts.add_pushaccountautomation']
}
},
@@ -150,7 +150,7 @@ export default [
name: 'AccountPushUpdate',
hidden: true,
meta: {
- title: i18n.t('Update'),
+ title: i18n.t('AccountPushUpdate'),
permissions: ['accounts.change_pushaccountautomation']
}
},
@@ -212,7 +212,7 @@ export default [
name: 'AccountGatherTaskCreate',
hidden: true,
meta: {
- title: i18n.t('Create'),
+ title: i18n.t('AccountGatherTaskCreate'),
permissions: ['accounts.add_gatheraccountsautomation']
}
},
@@ -232,7 +232,7 @@ export default [
name: 'AccountGatherTaskUpdate',
hidden: true,
meta: {
- title: i18n.t('Update'),
+ title: i18n.t('AccountGatherTaskUpdate'),
action: 'update',
permissions: ['accounts.change_gatheraccountsautomation'],
activeMenu: '/accounts/account-gather'
@@ -357,7 +357,7 @@ export default [
component: () => import('@/views/accounts/AccountBackup/AccountBackupCreateUpdate.vue'),
name: 'AccountBackupPlanCreate',
meta: {
- title: i18n.t('Create'),
+ title: i18n.t('AccountBackupPlanCreate'),
action: 'create'
},
hidden: true
@@ -367,7 +367,7 @@ export default [
component: () => import('@/views/accounts/AccountBackup/AccountBackupCreateUpdate.vue'),
name: 'AccountBackupPlanUpdate',
meta: {
- title: i18n.t('Update'),
+ title: i18n.t('AccountBackupPlanUpdate'),
action: 'update'
},
hidden: true
@@ -376,7 +376,7 @@ export default [
path: ':id',
component: () => import('@/views/accounts/AccountBackup/AccountBackupDetail/index.vue'),
name: 'AccountBackupPlanDetail',
- meta: { title: i18n.t('AccountBackup') },
+ meta: { title: i18n.t('AccountBackupPlanDetail') },
hidden: true
},
{
diff --git a/src/styles/sidebar.scss b/src/styles/sidebar.scss
index fca838650..4d511e466 100644
--- a/src/styles/sidebar.scss
+++ b/src/styles/sidebar.scss
@@ -43,7 +43,7 @@
&.has-logo {
.el-scrollbar {
- height: calc(100% - #{$headerHeight} - 40px - 50px); // header-height, view-header, footer-height
+ height: calc(100% - #{$headerHeight} - 40px - 52px); // header-height, view-header, footer-height
}
}
diff --git a/src/utils/common.js b/src/utils/common.js
index 14a86b8bd..80ecbe726 100644
--- a/src/utils/common.js
+++ b/src/utils/common.js
@@ -415,9 +415,14 @@ export function formatFileSize(bytes) {
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i]
}
+const notUppercase = ['to', 'a', 'from']
+
export function toTitleCase(string) {
if (!string) return string
return string.trim().split(' ').map(item => {
+ if (notUppercase.includes(item.toLowerCase())) {
+ return item
+ }
return item[0].toUpperCase() + item.slice(1)
}).join(' ')
}
diff --git a/src/utils/startup.js b/src/utils/startup.js
index f6b10926f..d81dfe455 100644
--- a/src/utils/startup.js
+++ b/src/utils/startup.js
@@ -38,7 +38,6 @@ async function getPublicSetting({ to, from, next }, isOpen) {
if (!publicSettings || Object.keys(publicSettings).length === 0 || !isOpen) {
await store.dispatch('settings/getPublicSettings', isOpen)
}
- console.log('Get public setting done')
}
async function refreshCurrentOrg() {
diff --git a/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionList.vue b/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionList.vue
index f263853d7..c90ebbc2f 100644
--- a/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionList.vue
+++ b/src/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionList.vue
@@ -42,14 +42,10 @@ export default {
},
timedelta: {
label: this.$t('TimeDelta'),
- width: '90px',
formatter: function(row) {
return row.timedelta.toFixed(2) + 's'
}
},
- is_success: {
- width: '90px'
- },
actions: {
formatterArgs: {
hasDelete: false,
diff --git a/src/views/accounts/AccountBackup/AccountBackupList.vue b/src/views/accounts/AccountBackup/AccountBackupList.vue
index 34c7241bc..6d95ed64d 100644
--- a/src/views/accounts/AccountBackup/AccountBackupList.vue
+++ b/src/views/accounts/AccountBackup/AccountBackupList.vue
@@ -45,14 +45,7 @@ export default {
is_periodic: {
formatterArgs: {
showFalse: false
- },
- width: '80px'
- },
- periodic_display: {
- width: '150px'
- },
- comment: {
- width: '90px'
+ }
},
executed_amount: {
formatter: DetailFormatter,
@@ -70,7 +63,6 @@ export default {
}
},
actions: {
- width: '164px',
formatterArgs: {
onClone: ({ row }) => {
vm.$router.push({ name: 'AccountBackupPlanCreate', query: { clone_from: row.id }})
diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretAsset/index.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretAsset/index.vue
index 099dbbc9d..e231e8322 100644
--- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretAsset/index.vue
+++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretAsset/index.vue
@@ -51,7 +51,6 @@ export default {
prop: 'id',
label: this.$t('Actions'),
align: 'center',
- width: 150,
objects: this.object.assets,
formatter: DeleteActionFormatter,
onDelete: function(col, row, cellValue, reload) {
diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue
index 8c1796265..ac7fe52e0 100644
--- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue
+++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue
@@ -42,25 +42,21 @@ export default {
},
asset_amount: {
label: this.$t('AssetAmount'),
- width: '80px',
formatter: function(row) {
return {row.snapshot.asset_amount}
}
},
node_amount: {
label: this.$t('NodeAmount'),
- width: '80px',
formatter: function(row) {
return {row.snapshot.node_amount}
}
},
status: {
- label: this.$t('Result'),
- width: '80px'
+ label: this.$t('Result')
},
timedelta: {
label: this.$t('TimeDelta'),
- width: '90px',
formatter: function(row) {
return row.timedelta.toFixed(2) + 's'
}
diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretList.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretList.vue
index f160994b9..3a08254bf 100644
--- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretList.vue
+++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretList.vue
@@ -46,21 +46,14 @@ export default {
return { row.secret_strategy.label }
}
},
- secret_type: {
- width: '120px'
- },
is_periodic: {
formatterArgs: {
showFalse: false
},
- width: '152px'
- },
- periodic_display: {
width: '150px'
},
executed_amount: {
formatter: DetailFormatter,
- width: '100px',
formatterArgs: {
route: 'AccountGatherList',
can: vm.$hasPerm('accounts.view_changesecretexecution'),
@@ -75,11 +68,7 @@ export default {
}
}
},
- comment: {
- width: '90px'
- },
actions: {
- width: '164px',
formatterArgs: {
onClone: ({ row }) => {
vm.$router.push({ name: 'AccountChangeSecretCreate', query: { clone_from: row.id }})
diff --git a/src/views/accounts/AccountGather/AccountGatherTaskList.vue b/src/views/accounts/AccountGather/AccountGatherTaskList.vue
index db9eaf483..24cd3fef7 100644
--- a/src/views/accounts/AccountGather/AccountGatherTaskList.vue
+++ b/src/views/accounts/AccountGather/AccountGatherTaskList.vue
@@ -52,7 +52,7 @@ export default {
formatterArgs: {
showFalse: false
},
- width: '152px'
+ width: '150px'
},
periodic_display: {
},
diff --git a/src/views/accounts/AccountPush/AccountPushCreateUpdate.vue b/src/views/accounts/AccountPush/AccountPushCreateUpdate.vue
index 11425d045..ae324e0dc 100644
--- a/src/views/accounts/AccountPush/AccountPushCreateUpdate.vue
+++ b/src/views/accounts/AccountPush/AccountPushCreateUpdate.vue
@@ -14,8 +14,8 @@ export default {
},
data() {
return {
- node_ids: [],
- asset_ids: [],
+ nodeIds: [],
+ assetIds: [],
isAssetType: '',
initial: {
is_periodic: this.$store.getters.hasValidLicense,
@@ -55,7 +55,7 @@ export default {
},
on: {
input: ([value]) => {
- this.asset_ids = value
+ this.assetIds = value
}
}
},
@@ -71,7 +71,7 @@ export default {
},
on: {
input: ([value]) => {
- this.node_ids = value?.map(i => i.pk)
+ this.nodeIds = value?.map(i => i.pk)
}
}
},
@@ -96,8 +96,8 @@ export default {
label: this.$t('PushParams'),
el: {
method: 'push_account_method',
- assets: this.asset_ids,
- nodes: this.node_ids
+ assets: this.assetIds,
+ nodes: this.nodeIds
},
helpText: this.$t('ParamsHelpText')
}
@@ -121,13 +121,13 @@ export default {
}
},
watch: {
- node_ids: {
+ nodeIds: {
handler(val) {
this.fieldsMeta.params.el.nodes = val
},
deep: true
},
- asset_ids: {
+ assetIds: {
handler(val) {
this.fieldsMeta.params.el.assets = val
},
diff --git a/src/views/accounts/AccountPush/AccountPushExecutionList.vue b/src/views/accounts/AccountPush/AccountPushExecutionList.vue
index a4e0eb103..90bcbbab3 100644
--- a/src/views/accounts/AccountPush/AccountPushExecutionList.vue
+++ b/src/views/accounts/AccountPush/AccountPushExecutionList.vue
@@ -42,25 +42,21 @@ export default {
},
asset_amount: {
label: this.$t('AssetAmount'),
- width: '120px',
formatter: function(row) {
return {row.snapshot.asset_amount}
}
},
node_amount: {
label: this.$t('NodeAmount'),
- width: '120px',
formatter: function(row) {
return {row.snapshot.node_amount}
}
},
status: {
- label: this.$t('Result'),
- width: '120px'
+ label: this.$t('Result')
},
timedelta: {
label: this.$t('TimeDelta'),
- width: '100px',
formatter: function(row) {
return row.timedelta.toFixed(2) + 's'
}
diff --git a/src/views/accounts/AccountPush/AccountPushList.vue b/src/views/accounts/AccountPush/AccountPushList.vue
index 077e6f4c9..6cd64c003 100644
--- a/src/views/accounts/AccountPush/AccountPushList.vue
+++ b/src/views/accounts/AccountPush/AccountPushList.vue
@@ -56,22 +56,13 @@ export default {
}
},
assets_amount: {
- label: vm.$t('AssetAmount'),
- width: '80px'
+ label: vm.$t('AssetAmount')
},
nodes_amount: {
- label: vm.$t('NodeAmount'),
- width: '80px'
- },
- is_periodic: {
- width: '152px'
- },
- periodic_display: {
- width: '150px'
+ label: vm.$t('NodeAmount')
},
password_strategy_display: {
label: vm.$t('PasswordStrategy'),
- width: '220px',
showOverflowTooltip: true
},
executed_amount: {
@@ -89,14 +80,7 @@ export default {
}
}
},
- is_active: {
- width: '87px'
- },
- comment: {
- width: '90px'
- },
actions: {
- width: '164px',
formatterArgs: {
extraActions: [
{
diff --git a/src/views/accounts/AccountTemplate/AccountTemplateList.vue b/src/views/accounts/AccountTemplate/AccountTemplateList.vue
index da259238c..5b5a78337 100644
--- a/src/views/accounts/AccountTemplate/AccountTemplateList.vue
+++ b/src/views/accounts/AccountTemplate/AccountTemplateList.vue
@@ -38,17 +38,12 @@ export default {
},
columnsMeta: {
privileged: {
- width: '120px',
formatterArgs: {
showText: false,
showFalse: false
}
},
- secret_type: {
- width: '120px'
- },
has_secret: {
- width: '120px',
formatterArgs: {
showFalse: false,
showText: false
diff --git a/src/views/audits/JobExecutionLogList.vue b/src/views/audits/JobExecutionLogList.vue
index caa27f4ce..8e85e967f 100644
--- a/src/views/audits/JobExecutionLogList.vue
+++ b/src/views/audits/JobExecutionLogList.vue
@@ -21,14 +21,12 @@ export default {
min: ['material', 'is_success'],
default: [
'creator_name', 'material', 'is_finished',
- 'is_success', 'time_cost',
- 'date_finished', 'actions'
+ 'is_success', 'time_cost', 'date_finished', 'actions'
]
},
columns: [
'creator_name', 'material', 'is_finished',
- 'is_success', 'time_cost',
- 'date_finished', 'actions'
+ 'is_success', 'time_cost', 'date_finished', 'actions'
],
columnsMeta: {
actions: {
@@ -50,7 +48,6 @@ export default {
}
},
time_cost: {
- width: '100px',
formatter: function(row) {
if (row.time_cost) {
return row.time_cost.toFixed(2) + 's'
@@ -59,19 +56,14 @@ export default {
}
},
is_finished: {
- width: '96px',
formatter: (row) => {
if (row.is_finished) {
return
}
return
- },
- formatterArgs: {
- width: '14px'
}
},
is_success: {
- width: '96px',
formatter: (row) => {
if (!row.is_finished) {
return
@@ -80,13 +72,7 @@ export default {
return
}
return
- },
- formatterArgs: {
- width: '14px'
}
- },
- date_start: {
- width: '160px'
}
}
},
diff --git a/src/views/audits/LoginLog/LoginLogList.vue b/src/views/audits/LoginLog/LoginLogList.vue
index 1164f590c..f9e5ff35e 100644
--- a/src/views/audits/LoginLog/LoginLogList.vue
+++ b/src/views/audits/LoginLog/LoginLogList.vue
@@ -25,23 +25,8 @@ export default {
},
url: '/api/v1/audits/login-logs/',
columnsMeta: {
- username: {
- width: '120px'
- },
- backend_display: {
- width: '120px'
- },
actions: {
has: false
- },
- city: {
- width: '120px'
- },
- reason_display: {
- width: '120px'
- },
- datetime: {
- width: '120px'
}
}
},
diff --git a/src/views/audits/OperateLog/OperateLogList.vue b/src/views/audits/OperateLog/OperateLogList.vue
index 9d84e8b92..f3892c212 100644
--- a/src/views/audits/OperateLog/OperateLogList.vue
+++ b/src/views/audits/OperateLog/OperateLogList.vue
@@ -39,20 +39,7 @@ export default {
]
},
columnsMeta: {
- resource_type: {
- width: '180px'
- },
- datetime: {
- width: '160px'
- },
- remote_addr: {
- width: '140px'
- },
- action_display: {
- width: '70px'
- },
actions: {
- width: '70px',
formatter: ActionsFormatter,
formatterArgs: {
hasUpdate: false,
diff --git a/src/views/audits/PasswordChangeLogList.vue b/src/views/audits/PasswordChangeLogList.vue
index 349a34cba..836052ad3 100644
--- a/src/views/audits/PasswordChangeLogList.vue
+++ b/src/views/audits/PasswordChangeLogList.vue
@@ -18,12 +18,6 @@ export default {
default: ['user', 'change_by', 'remote_addr', 'datetime']
},
columnsMeta: {
- remote_addr: {
- width: '140px'
- },
- datetime: {
- width: '180px'
- },
actions: {
has: false
}
diff --git a/src/views/perms/AssetPermission/AssetPermissionList.vue b/src/views/perms/AssetPermission/AssetPermissionList.vue
index 1f5aa7e97..c0016f396 100644
--- a/src/views/perms/AssetPermission/AssetPermissionList.vue
+++ b/src/views/perms/AssetPermission/AssetPermissionList.vue
@@ -18,9 +18,8 @@
import Page from '@/layout/components/Page'
import AssetTreeTable from '@/components/Apps/AssetTreeTable'
import PermBulkUpdateDialog from './components/PermBulkUpdateDialog'
-import AmountFormatter from '@/components/Table/TableFormatters/AmountFormatter'
import { mapGetters } from 'vuex'
-import { AccountLabelMapper, AssetPermissionListPageSearchConfigOptions } from '../const'
+import { AssetPermissionListPageSearchConfigOptions, AssetPermissionTableMeta } from '../const'
export default {
components: {
@@ -55,99 +54,7 @@ export default {
'nodes_amount', 'accounts', 'is_valid', 'actions'
]
},
- columnsMeta: {
- name: {
- minWidth: '160px',
- formatterArgs: {
- routeQuery: {
- activeTab: 'AssetPermissionDetail'
- }
- }
- },
- action: {
- label: this.$t('Action'),
- formatter: function(row) {
- if (row.actions.length === 6) {
- return vm.$t('All')
- }
- return row.actions.map(item => {
- return item.label.replace(/ \([^)]*\)/, '')
- }).join(',')
- }
- },
- is_expired: {
- formatterArgs: {
- showFalse: false
- }
- },
- from_ticket: {
- width: 100,
- formatterArgs: {
- showFalse: false
- }
- },
- users_amount: {
- formatter: AmountFormatter,
- formatterArgs: {
- async: true,
- routeQuery: {
- activeTab: 'AssetPermissionUser'
- }
- }
- },
- user_groups_amount: {
- width: 100,
- formatter: AmountFormatter,
- formatterArgs: {
- async: true,
- routeQuery: {
- activeTab: 'AssetPermissionUser'
- }
- }
- },
- assets_amount: {
- formatter: AmountFormatter,
- formatterArgs: {
- async: true,
- routeQuery: {
- activeTab: 'AssetPermissionAsset'
- }
- }
- },
- nodes_amount: {
- width: 80,
- formatter: AmountFormatter,
- formatterArgs: {
- async: true,
- routeQuery: {
- activeTab: 'AssetPermissionAsset'
- }
- }
- },
- accounts: {
- formatter: AmountFormatter,
- formatterArgs: {
- getItem(item) {
- if (item !== '@SPEC') {
- return AccountLabelMapper[item] || item
- }
- },
- routeQuery: {
- activeTab: 'AssetPermissionAccount'
- }
- }
- },
- actions: {
- formatterArgs: {
- updateRoute: 'AssetPermissionUpdate',
- performDelete: ({ row, col }) => {
- const id = row.id
- const url = `/api/v1/perms/asset-permissions/${id}/`
- return this.$axios.delete(url)
- }
- }
- }
- }
+ columnsMeta: AssetPermissionTableMeta
},
headerActions: {
hasLabelSearch: true,
diff --git a/src/views/perms/const.js b/src/views/perms/const.js
index b09aa7d98..224f709bf 100644
--- a/src/views/perms/const.js
+++ b/src/views/perms/const.js
@@ -1,4 +1,5 @@
import i18n from '@/i18n/i18n'
+import AmountFormatter from '@/components/Table/TableFormatters/AmountFormatter.vue'
export const UserAssetPermissionListPageSearchConfigOptions = [
{ label: i18n.t('Name'), value: 'name' },
@@ -30,6 +31,100 @@ export const UserAssetPermissionListPageSearchConfigOptions = [
}
]
+export const AssetPermissionTableMeta = {
+ name: {
+ minWidth: '160px',
+ formatterArgs: {
+ routeQuery: {
+ activeTab: 'AssetPermissionDetail'
+ }
+ }
+ },
+ action: {
+ label: i18n.t('Action'),
+ formatter: (row) => {
+ if (row.actions.length === 6) {
+ return i18n.t('All')
+ }
+ return row.actions.map(item => {
+ return item.label.replace(/ \([^)]*\)/, '')
+ }).join(',')
+ }
+ },
+ is_expired: {
+ formatterArgs: {
+ showFalse: false
+ }
+ },
+ from_ticket: {
+ width: 100,
+ formatterArgs: {
+ showFalse: false
+ }
+ },
+ users_amount: {
+ formatter: AmountFormatter,
+ formatterArgs: {
+ async: true,
+ routeQuery: {
+ activeTab: 'AssetPermissionUser'
+ }
+ }
+ },
+ user_groups_amount: {
+ width: 100,
+ formatter: AmountFormatter,
+ formatterArgs: {
+ async: true,
+ routeQuery: {
+ activeTab: 'AssetPermissionUser'
+ }
+ }
+ },
+ assets_amount: {
+ formatter: AmountFormatter,
+ formatterArgs: {
+ async: true,
+ routeQuery: {
+ activeTab: 'AssetPermissionAsset'
+ }
+ }
+ },
+ nodes_amount: {
+ width: 80,
+ formatter: AmountFormatter,
+ formatterArgs: {
+ async: true,
+ routeQuery: {
+ activeTab: 'AssetPermissionAsset'
+ }
+ }
+ },
+ accounts: {
+ formatter: AmountFormatter,
+ formatterArgs: {
+ getItem(item) {
+ if (item !== '@SPEC') {
+ return AccountLabelMapper[item] || item
+ }
+ },
+ routeQuery: {
+ activeTab: 'AssetPermissionAccount'
+ }
+ }
+ },
+ actions: {
+ formatterArgs: {
+ updateRoute: 'AssetPermissionUpdate',
+ performDelete: ({ row, col }) => {
+ const id = row.id
+ const url = `/api/v1/perms/asset-permissions/${id}/`
+ return this.$axios.delete(url)
+ }
+ }
+ }
+}
+
export const AssetPermissionListPageSearchConfigOptions = [
...UserAssetPermissionListPageSearchConfigOptions,
{
diff --git a/src/views/sessions/CommandList/BaseList.vue b/src/views/sessions/CommandList/BaseList.vue
index 18a6f2d28..08cf6641d 100644
--- a/src/views/sessions/CommandList/BaseList.vue
+++ b/src/views/sessions/CommandList/BaseList.vue
@@ -66,7 +66,6 @@ export default {
formatter: OutputExpandFormatter
},
risk_level: {
- width: '105px',
formatter: (row, col, cellValue) => {
const display = row['risk_level'].label
if (cellValue?.value === 0) {
@@ -79,15 +78,8 @@ export default {
actions: {
has: false
},
- asset: {
- width: '120px'
- },
- user: {
- width: '100px'
- },
session: {
formatter: DetailFormatter,
- width: '100px',
formatterArgs: {
openInNewPage: true,
can: this.$hasPerm('terminal.view_session'),
@@ -104,7 +96,6 @@ export default {
},
timestamp: {
label: this.$t('Date'),
- width: '130px',
sortable: 'custom',
formatter: function(row) {
return toSafeLocalDateStr(row.timestamp * 1000)
diff --git a/src/views/sessions/FTPLogList.vue b/src/views/sessions/FTPLogList.vue
index 65c44cbe9..84f931e49 100644
--- a/src/views/sessions/FTPLogList.vue
+++ b/src/views/sessions/FTPLogList.vue
@@ -21,17 +21,7 @@ export default {
},
url: '/api/v1/audits/ftp-logs/',
columnsMeta: {
- remote_addr: {
- width: '140px'
- },
- operate: {
- width: '100px'
- },
- is_success: {
- width: '100px'
- },
actions: {
- width: '82px',
formatterArgs: {
hasUpdate: false,
hasDelete: false,
diff --git a/src/views/sessions/SessionList/BaseList.vue b/src/views/sessions/SessionList/BaseList.vue
index c3184bfba..8b1f93c3e 100644
--- a/src/views/sessions/SessionList/BaseList.vue
+++ b/src/views/sessions/SessionList/BaseList.vue
@@ -27,7 +27,7 @@ export default {
return {
min: ['id', 'actions'],
default: [
- 'id', 'user', 'asset', 'account', 'remote_addr', 'protocol',
+ 'id', 'user', 'asset', 'account', 'protocol',
'date_start', 'actions'
]
}
@@ -46,7 +46,6 @@ export default {
prop: 'id',
label: this.$t('Number'),
align: 'center',
- width: '80px',
formatter: function(row, column, cellValue, index) {
const label = index + 1
const route = { to: { name: 'SessionDetail', params: { id: row.id }}}
@@ -54,7 +53,6 @@ export default {
}
},
user: {
- width: '100px',
formatter: DetailFormatter,
formatterArgs: {
getRoute: ({ row }) => {
@@ -88,7 +86,6 @@ export default {
}
},
is_finished: {
- width: '86px',
formatterArgs: {
showFalse: false
}
@@ -112,32 +109,15 @@ export default {
}
}
},
- command_amount: {
- width: '90px'
- },
- login_from: {
- width: '115px'
- },
- remote_addr: {
- width: '140px'
- },
protocol: {
- width: '100px',
sortable: false,
formatter: null
},
- date_start: {
- width: '150px'
- },
- date_end: {
- width: '150px'
- },
duration: {
label: this.$t('Duration'),
formatter: function(row) {
return timeOffset(row.date_start, row.date_end)
- },
- width: '80px'
+ }
},
is_locked: {
label: this.$t('IsLocked')
@@ -145,7 +125,6 @@ export default {
actions: {
prop: 'actions',
label: this.$t('Actions'),
- width: '160px',
formatter: ActionsFormatter,
formatterArgs: {
hasEdit: false,
diff --git a/src/views/settings/Storage/CommandStorage.vue b/src/views/settings/Storage/CommandStorage.vue
index 8ebf21af5..8cb177747 100644
--- a/src/views/settings/Storage/CommandStorage.vue
+++ b/src/views/settings/Storage/CommandStorage.vue
@@ -67,7 +67,7 @@ export default {
showText: false
},
align: 'center',
- width: '100px'
+ width: '150px'
},
actions: {
formatterArgs: {
diff --git a/src/views/settings/Storage/ReplayStorage.vue b/src/views/settings/Storage/ReplayStorage.vue
index 8a87c1dfe..aa2293f2f 100644
--- a/src/views/settings/Storage/ReplayStorage.vue
+++ b/src/views/settings/Storage/ReplayStorage.vue
@@ -53,7 +53,7 @@ export default {
showText: false
},
align: 'center',
- width: '100px'
+ width: '150px'
},
comment: {
sortable: 'custom'
diff --git a/src/views/users/Group/UserGroupList.vue b/src/views/users/Group/UserGroupList.vue
index 822035e74..3392eb7a7 100644
--- a/src/views/users/Group/UserGroupList.vue
+++ b/src/views/users/Group/UserGroupList.vue
@@ -21,7 +21,6 @@ export default {
},
columnsMeta: {
users_amount: {
- width: '120px',
formatter: AmountFormatter,
formatterArgs: {
async: true,
diff --git a/src/views/users/Role/RoleList/BaseRoleList.vue b/src/views/users/Role/RoleList/BaseRoleList.vue
index 830ee4edf..db19b8759 100644
--- a/src/views/users/Role/RoleList/BaseRoleList.vue
+++ b/src/views/users/Role/RoleList/BaseRoleList.vue
@@ -66,7 +66,7 @@ export default {
}
},
builtin: {
- width: '100px',
+ width: '150px',
formatterArgs: {
showFalse: false
}
diff --git a/src/views/users/User/UserDetail/UserAssetPermissionRules.vue b/src/views/users/User/UserDetail/UserAssetPermissionRules.vue
index 060c17135..112a253ee 100644
--- a/src/views/users/User/UserDetail/UserAssetPermissionRules.vue
+++ b/src/views/users/User/UserDetail/UserAssetPermissionRules.vue
@@ -8,8 +8,7 @@