fix: Fix attachments in volume list and tag in instance list
1.Hide attachments only in instance detail page 2.Remove tag sort in instance list Change-Id: I415bdacf54ba266b3e8da261a688160bb1b0784b
This commit is contained in:
parent
dc57ad8f27
commit
321bea9dce
@ -198,6 +198,7 @@ export class Instance extends Base {
|
||||
dataIndex: 'tags',
|
||||
render: (tags) => tags.map((tag, index) => SimpleTag({ tag, index })),
|
||||
isHideable: true,
|
||||
sorter: false,
|
||||
},
|
||||
{
|
||||
title: t('Locked'),
|
||||
|
@ -54,6 +54,10 @@ export class Volume extends Base {
|
||||
return this.inDetailPage && this.path.includes('storage/snapshot');
|
||||
}
|
||||
|
||||
get isInstanceDetail() {
|
||||
return this.inDetailPage && this.path.includes('compute/instance');
|
||||
}
|
||||
|
||||
get actionConfigs() {
|
||||
if (this.isRecycleBinDetail) {
|
||||
return emptyActionConfig;
|
||||
|
@ -247,7 +247,7 @@ export const snapshotTypeTip = (
|
||||
);
|
||||
|
||||
export const getVolumeColumnsList = (self) => {
|
||||
const columns = [
|
||||
return [
|
||||
{
|
||||
title: t('ID/Name'),
|
||||
dataIndex: 'name',
|
||||
@ -298,6 +298,7 @@ export const getVolumeColumnsList = (self) => {
|
||||
dataIndex: 'attachments',
|
||||
isHideable: true,
|
||||
sorter: false,
|
||||
hidden: self.isInstanceDetail,
|
||||
render: (value) => {
|
||||
if (value && value.length > 0) {
|
||||
return value.map((it) => (
|
||||
@ -351,10 +352,6 @@ export const getVolumeColumnsList = (self) => {
|
||||
stringify: (value) => toLocalTimeFilter(value),
|
||||
},
|
||||
];
|
||||
if (self.inDetailPage) {
|
||||
return columns.filter((it) => it.dataIndex !== 'attachments');
|
||||
}
|
||||
return columns;
|
||||
};
|
||||
|
||||
// deal with quota
|
||||
|
Loading…
Reference in New Issue
Block a user