mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-07 18:08:50 +00:00
Compare commits
5 Commits
pr@dev@ass
...
v2.5.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd10551de1 | ||
|
|
8438defcf1 | ||
|
|
00bc6d96a1 | ||
|
|
dd7c492965 | ||
|
|
7c21a6f156 |
@@ -44,11 +44,31 @@ export default {
|
||||
dataTable() {
|
||||
return this.$refs.dataTable.$refs.dataTable
|
||||
},
|
||||
hasCreateAction() {
|
||||
const hasLeftAction = this.headerActions.hasLeftActions
|
||||
if (hasLeftAction === false) {
|
||||
return false
|
||||
}
|
||||
const hasCreate = this.headerActions.hasCreate
|
||||
if (hasCreate === false) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
hasCloneAction() {
|
||||
const hasClone = _.get(this.tableConfig, 'columnsMeta.actions.formatterArgs.hasClone', null)
|
||||
if (hasClone) {
|
||||
return true
|
||||
}
|
||||
if (this.hasCreateAction && hasClone == null) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
iTableConfig() {
|
||||
const config = deepmerge(this.tableConfig, { extraQuery: this.extraQuery })
|
||||
let hasClone = _.get(config, 'columnsMeta.actions.formatterArgs.hasClone', null)
|
||||
hasClone = !!(this.headerActions.hasCreate && hasClone == null)
|
||||
_.set(config, 'columnsMeta.actions.formatterArgs.hasClone', hasClone)
|
||||
this.$log.debug('Header actions', this.headerActions)
|
||||
_.set(config, 'columnsMeta.actions.formatterArgs.hasClone', this.hasCloneAction)
|
||||
this.$log.debug('ListTable: iTableConfig change', config)
|
||||
return config
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<Dialog
|
||||
v-if="dialogSetting.dialogVisible"
|
||||
:title="this.$t('common.updateSelected')"
|
||||
:visible.sync="dialogSetting.dialogVisible"
|
||||
width="70%"
|
||||
@@ -99,6 +98,7 @@ export default {
|
||||
const url = this.url
|
||||
const msg = this.updateSuccessMsg
|
||||
this.$axios.patch(url, validValues).then((res) => {
|
||||
vm.$emit('update')
|
||||
this.$message.success(msg)
|
||||
vm.dialogSetting.dialogVisible = false
|
||||
}).catch(error => {
|
||||
|
||||
@@ -27,8 +27,8 @@ export default [
|
||||
path: `${BASE_URL}/luna/?_=${Date.now()}`,
|
||||
name: 'WebTerminal',
|
||||
// component: () => window.open(`/luna/?_=${Date.now()}`),
|
||||
meta: { title: i18n.t('route.WebTerminal') },
|
||||
hidden: true
|
||||
meta: { title: i18n.t('route.WebTerminal') }
|
||||
// hidden: true
|
||||
},
|
||||
{
|
||||
path: `${BASE_URL}/koko/elfinder/sftp/?`,
|
||||
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tableConfig: {
|
||||
url: `/api/v1/perms/application-permissions/?user_id=${this.object.id}&draw=1`,
|
||||
url: `/api/v1/perms/application-permissions/?user_id=${this.$route.params.id}&draw=1`,
|
||||
columns: [
|
||||
'name', 'category_display', 'users_amount', 'user_groups_amount',
|
||||
'applications_amount', 'system_users_amount',
|
||||
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tableConfig: {
|
||||
url: `/api/v1/perms/asset-permissions/?user_id=${this.object.id}`,
|
||||
url: `/api/v1/perms/asset-permissions/?user_id=${this.$route.params.id}`,
|
||||
hasSelection: false,
|
||||
hasTree: true,
|
||||
columns: [
|
||||
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tableConfig: {
|
||||
url: `/api/v1/perms/users/${this.object.id}/applications/`,
|
||||
url: `/api/v1/perms/users/${this.$route.params.id}/applications/`,
|
||||
columns: ['name', 'category_display', 'type', 'asset', 'comment'],
|
||||
columnsMeta: {
|
||||
name: {
|
||||
|
||||
@@ -18,8 +18,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
treeUrl: `/api/v1/perms/users/${this.object.id}/nodes/children/tree/?cache_policy=1`,
|
||||
tableUrl: `/api/v1/perms/users/${this.object.id}/assets/?cache_policy=1&all=1`
|
||||
treeUrl: `/api/v1/perms/users/${this.$route.params.id}/nodes/children/tree/?cache_policy=1`,
|
||||
tableUrl: `/api/v1/perms/users/${this.$route.params.id}/assets/?cache_policy=1&all=1`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
:selected-rows="updateSelectedDialogSetting.selectedRows"
|
||||
:form-setting="updateSelectedDialogSetting.formSetting"
|
||||
:dialog-setting="updateSelectedDialogSetting.dialogSetting"
|
||||
@update="handleDialogUpdate"
|
||||
/>
|
||||
<InviteUsersDialog :setting="InviteDialogSetting" @close="handleInviteDialogClose" />
|
||||
</div>
|
||||
@@ -288,6 +289,9 @@ export default {
|
||||
handleInviteDialogClose() {
|
||||
this.InviteDialogSetting.InviteDialogVisible = false
|
||||
this.$refs.GenericListPage.$refs.ListTable.reloadTable()
|
||||
},
|
||||
handleDialogUpdate() {
|
||||
this.$refs.GenericListPage.$refs.ListTable.reloadTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user