feat: 支持COS对象存储

This commit is contained in:
Jiangjie.Bai
2022-02-28 18:27:37 +08:00
committed by huailei
parent 263e7a0f34
commit 22bd95b55a
2 changed files with 16 additions and 30 deletions

View File

@@ -48,3 +48,16 @@ export const STORAGE_TYPE_META_MAP = {
endpointHelpText: i18n.t('sessions.helpText.s3Endpoint')
}
}
export function getReplayStorageOptions() {
const options = []
const storages = Object.values(STORAGE_TYPE_META_MAP)
for (const s of storages) {
const option = {
name: s.name,
title: s.title
}
options.push(option)
}
return options
}

View File

@@ -4,6 +4,7 @@
<script>
import ListTable from '@/components/ListTable'
import { TestReplayStorage, SetToDefaultReplayStorage } from '@/api/sessions'
import { getReplayStorageOptions } from '@/views/sessions/const'
export default {
name: 'ReplayStorage',
components: {
@@ -11,6 +12,7 @@ export default {
},
data() {
const vm = this
const storageOptions = getReplayStorageOptions()
return {
replayActions: {
hasExport: false,
@@ -21,36 +23,7 @@ export default {
callback: (item) => {
this.$router.push({ name: 'CreateReplayStorage', query: { type: item.name.toLowerCase() }})
},
dropdown: [
{
name: 'S3',
title: 'S3'
},
{
name: 'Ceph',
title: 'Ceph'
},
{
name: 'swift',
title: 'Swift'
},
{
name: 'OSS',
title: 'OSS'
},
{
name: 'Azure',
title: 'Azure'
},
{
name: 'obs',
title: 'OBS'
},
{
name: 'cos',
title: 'COS'
}
]
dropdown: storageOptions
}
},
replayTableConfig: {