Merge "fix: fix the delete permission of volume snapshot"
This commit is contained in:
commit
3b84b0ad9d
@ -2140,6 +2140,7 @@
|
||||
"Snapshot Failed": "Snapshot Failed",
|
||||
"Snapshot In Progress": "Snapshot In Progress",
|
||||
"Snapshot Instance": "Snapshot Instance",
|
||||
"Snapshot Source": "Snapshot Source",
|
||||
"Snapshots can be converted into volume and used to create an instance from the volume.": "Snapshots can be converted into volume and used to create an instance from the volume.",
|
||||
"Snapshotting": "Snapshotting",
|
||||
"Soft Delete Instance": "Soft Delete Instance",
|
||||
|
@ -2140,6 +2140,7 @@
|
||||
"Snapshot Failed": "生成快照失败",
|
||||
"Snapshot In Progress": "快照进行中",
|
||||
"Snapshot Instance": "创建云主机快照",
|
||||
"Snapshot Source": "快照源",
|
||||
"Snapshots can be converted into volume and used to create an instance from the volume.": "快照可以转换成云硬盘,用于从云硬盘启动云主机。",
|
||||
"Snapshotting": "创建快照中",
|
||||
"Soft Delete Instance": "软删除云主机",
|
||||
|
@ -24,16 +24,15 @@ export class BaseDetail extends Base {
|
||||
const options = [
|
||||
{
|
||||
label: t('Volume'),
|
||||
dataIndex: 'volume',
|
||||
render: (value) => {
|
||||
dataIndex: 'volume_id',
|
||||
render: (value, record) => {
|
||||
if (!value) {
|
||||
return '-';
|
||||
}
|
||||
const { id, name } = value;
|
||||
const link = this.getLinkRender(
|
||||
'volumeDetail',
|
||||
name || id,
|
||||
{ id },
|
||||
record.volume_name || value,
|
||||
{ id: value },
|
||||
{ tab: 'snapshot' }
|
||||
);
|
||||
return link;
|
||||
@ -41,7 +40,7 @@ export class BaseDetail extends Base {
|
||||
},
|
||||
];
|
||||
return {
|
||||
title: t('Volume Info'),
|
||||
title: t('Snapshot Source'),
|
||||
options,
|
||||
};
|
||||
}
|
||||
|
@ -52,11 +52,16 @@ export class SnapshotStore extends Base {
|
||||
return data;
|
||||
}
|
||||
|
||||
async detailDidFetch(item) {
|
||||
const { volume_id } = item;
|
||||
const { volume } = await this.volumeClient.show(volume_id);
|
||||
item.volume = volume;
|
||||
return item;
|
||||
async detailDidFetch(item, allProjects) {
|
||||
const params = {
|
||||
uuid: item.id,
|
||||
};
|
||||
if (allProjects) {
|
||||
params.all_projects = true;
|
||||
}
|
||||
const { volume_snapshots = [] } = await this.listFetchByClient(params);
|
||||
const { child_volumes = [], volume_name } = volume_snapshots[0] || {};
|
||||
return { ...item, child_volumes, volume_name };
|
||||
}
|
||||
|
||||
updateParamsSortPage = (params, sortKey, sortOrder) => {
|
||||
|
Loading…
Reference in New Issue
Block a user