mirror of
https://github.com/jumpserver/lina.git
synced 2025-04-28 03:20:24 +00:00
perf: Change secret
This commit is contained in:
parent
849d2829f4
commit
c08f446464
@ -16,8 +16,9 @@ export default {
|
||||
BaseExecutionList
|
||||
},
|
||||
data() {
|
||||
const params = new URLSearchParams(this.$route.params).toString()
|
||||
return {
|
||||
url: '/api/v1/accounts/change-secret-executions/',
|
||||
url: `/api/v1/accounts/change-secret-executions/?${params}`,
|
||||
detailRoute: 'AccountChangeSecretExecutionDetail',
|
||||
automationRoute: 'AccountChangeSecretDetail',
|
||||
resource: 'changesecretexecution'
|
||||
|
@ -52,7 +52,14 @@ export default {
|
||||
canDirect: true,
|
||||
count: this.data.total_count_change_secrets,
|
||||
callback: () => {
|
||||
this.$eventBus.$emit('change-tab', 'AccountChangeSecretList')
|
||||
this.$eventBus.$emit('change-tab',
|
||||
{
|
||||
name: 'AccountChangeSecretList',
|
||||
payload: {
|
||||
days: this.days
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -78,7 +85,12 @@ export default {
|
||||
canDirect: true,
|
||||
count: this.data.total_count_change_secret_executions,
|
||||
callback: () => {
|
||||
this.$eventBus.$emit('change-tab', 'AccountChangeSecretExecutionList')
|
||||
this.$eventBus.$emit('change-tab', {
|
||||
name: 'AccountChangeSecretExecutionList',
|
||||
payload: {
|
||||
days: this.days
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -53,8 +53,9 @@ export default {
|
||||
this.$eventBus.$off('change-tab', this.handleChangeTab)
|
||||
},
|
||||
methods: {
|
||||
handleChangeTab(tab) {
|
||||
this.config.activeMenu = tab
|
||||
handleChangeTab({ name, payload }) {
|
||||
this.config.activeMenu = name
|
||||
Object.assign(this.$route.params, { ...payload })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,6 +51,11 @@ export default {
|
||||
createDrawer: () => import('@/views/assets/Domain/DomainDetail/GatewayCreateUpdate.vue'),
|
||||
detailDrawer: () => import('@/views/assets/Asset/AssetDetail'),
|
||||
transObject: {},
|
||||
testConfig: {
|
||||
port: 0,
|
||||
visible: false,
|
||||
cell: ''
|
||||
},
|
||||
tableConfig: {
|
||||
url: `/api/v1/assets/gateways/?domain=${this.object.id}`,
|
||||
columnsExclude: [
|
||||
@ -133,13 +138,13 @@ export default {
|
||||
can: this.$hasPerm('assets.test_assetconnectivity') && !this.$store.getters.currentOrgIsRoot,
|
||||
title: this.$t('TestConnection'),
|
||||
callback: function(val) {
|
||||
this.visible = true
|
||||
vm.testConfig.visible = true
|
||||
const port = val.row.protocols.find(item => item.name === 'ssh').port
|
||||
if (!port) {
|
||||
return this.$message.error(this.$tc('BadRequestErrorMsg'))
|
||||
} else {
|
||||
this.port = port
|
||||
this.cell = val.row.id
|
||||
vm.testConfig.port = port
|
||||
vm.testConfig.cell = val.row.id
|
||||
}
|
||||
}.bind(this)
|
||||
}
|
||||
@ -205,11 +210,6 @@ export default {
|
||||
vm.$refs.ListTable.onCreate()
|
||||
}
|
||||
},
|
||||
testConfig: {
|
||||
port: 0,
|
||||
visible: false,
|
||||
cell: ''
|
||||
},
|
||||
addGatewaySetting: {
|
||||
addGatewayDialogVisible: false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user