mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-02 07:27:01 +00:00
Merge pull request #2643 from jumpserver/pr@dev@replay_storage
perf: replay storage
This commit is contained in:
commit
53f48e7483
@ -33,9 +33,12 @@ export default {
|
||||
app: 'terminal',
|
||||
resource: 'replaystorage'
|
||||
},
|
||||
columnsExclude: ['meta'],
|
||||
columns: [
|
||||
'name', 'type', 'comment', 'is_default', 'actions'
|
||||
],
|
||||
columnsShow: {
|
||||
min: ['name', 'type', 'actions'],
|
||||
default: ['name', 'type', 'comment', 'is_default', 'actions']
|
||||
min: ['name', 'type', 'actions']
|
||||
},
|
||||
columnsMeta: {
|
||||
name: {
|
||||
@ -54,9 +57,8 @@ export default {
|
||||
sortable: 'custom'
|
||||
},
|
||||
actions: {
|
||||
prop: 'id',
|
||||
formatterArgs: {
|
||||
onUpdate: function({ row, col }) {
|
||||
onUpdate: function({ row }) {
|
||||
this.$router.push({ name: 'ReplayStorageUpdate', params: { id: row.id }, query: { type: row.type }})
|
||||
},
|
||||
canUpdate: function({ row }) {
|
||||
|
@ -1,15 +1,12 @@
|
||||
<template>
|
||||
<GenericCreateUpdatePage
|
||||
v-bind="$data"
|
||||
:create-success-next-route="successUrl"
|
||||
:update-success-next-route="successUrl"
|
||||
:has-detail-in-msg="false"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import GenericCreateUpdatePage from '@/layout/components/GenericCreateUpdatePage'
|
||||
import { STORAGE_TYPE_META_MAP } from '../../../sessions/const'
|
||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||
import { STORAGE_TYPE_META_MAP } from '@/views/sessions/const'
|
||||
import { UpdateToken } from '@/components/FormFields'
|
||||
import { encryptPassword } from '@/utils/crypto'
|
||||
|
||||
@ -19,8 +16,8 @@ export default {
|
||||
GenericCreateUpdatePage
|
||||
},
|
||||
data() {
|
||||
const storageType = this.$route.query.type || 's3'
|
||||
const storageTypeMeta = STORAGE_TYPE_META_MAP[storageType]
|
||||
const storageType = this.$route.query.type || { 'value': 's3' }
|
||||
const storageTypeMeta = STORAGE_TYPE_META_MAP[[storageType.value]]
|
||||
return {
|
||||
successUrl: { name: 'TerminalSetting', params: { activeMenu: 'RelayStorage' }},
|
||||
url: `/api/v1/terminal/replay-storages/`,
|
||||
@ -36,7 +33,7 @@ export default {
|
||||
if (params.id) {
|
||||
url = `${url}${params.id}/`
|
||||
}
|
||||
return `${url}?type=${storageType}`
|
||||
return `${url}?type=${storageType.value}`
|
||||
},
|
||||
fields: [
|
||||
[this.$t('common.Basic'), ['name', 'type']],
|
||||
|
Loading…
Reference in New Issue
Block a user