Files
lina/src/views/settings/Terminal/Storage/ReplayStorageCreateUpdate.vue
Jiangjie.Bai 96157bb18d fix: rbac 合并 (#1329)
* perf: 修改 route name

* fix: perm app router

* fix: 修复资产应用授权路由权限问题

* feat: home页放到user里,调整文件位置

* perf: 修复 view change routers (#1326)

Co-authored-by: ibuler <ibuler@qq.com>

* fix: 修复搜集用户 改密计划 账号备份路由

* feat: 终端管理、存储配置文件路径修改,放到系统设置中显示

Co-authored-by: ibuler <ibuler@qq.com>
Co-authored-by: feng626 <1304903146@qq.com>
Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: fit2bot <68588906+fit2bot@users.noreply.github.com>
2022-02-21 16:24:43 +08:00

76 lines
1.7 KiB
Vue

<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 { UpdateToken } from '@/components/FormFields'
export default {
name: 'ReplayStorageUpdate',
components: {
GenericCreateUpdatePage
},
data() {
const storageType = this.$route.query.type || 's3'
const storageTypeMeta = STORAGE_TYPE_META_MAP[storageType]
return {
successUrl: { name: 'Storage', params: { activeMenu: 'RelayStorage' }},
url: `/api/v1/terminal/replay-storages/`,
initial: {
type: storageType,
endpoint_suffix: 'core.chinacloudapi.cn',
protocol: 'http'
},
getUrl() {
const params = this.$route.params
let url = `/api/v1/terminal/replay-storages/`
if (params.id) {
url = `${url}${params.id}/`
}
return `${url}?type=${storageType}`
},
fields: [
[this.$t('common.Basic'), ['name', 'type']],
[storageTypeMeta.title, ['meta']],
[this.$t('common.Other'), ['is_default', 'comment']]
],
fieldsMeta: {
type: {
disabled: true
},
meta: {
fields: storageTypeMeta.meta,
fieldsMeta: {
ACCESS_KEY: {
component: UpdateToken
}
}
},
is_default: {
helpText: this.$t('sessions.SetToDefaultStorage')
}
}
}
},
computed: {
},
mounted() {
},
methods: {
}
}
</script>
<style scoped>
</style>