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',
|
dataIndex: 'tags',
|
||||||
render: (tags) => tags.map((tag, index) => SimpleTag({ tag, index })),
|
render: (tags) => tags.map((tag, index) => SimpleTag({ tag, index })),
|
||||||
isHideable: true,
|
isHideable: true,
|
||||||
|
sorter: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('Locked'),
|
title: t('Locked'),
|
||||||
|
@ -54,6 +54,10 @@ export class Volume extends Base {
|
|||||||
return this.inDetailPage && this.path.includes('storage/snapshot');
|
return this.inDetailPage && this.path.includes('storage/snapshot');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isInstanceDetail() {
|
||||||
|
return this.inDetailPage && this.path.includes('compute/instance');
|
||||||
|
}
|
||||||
|
|
||||||
get actionConfigs() {
|
get actionConfigs() {
|
||||||
if (this.isRecycleBinDetail) {
|
if (this.isRecycleBinDetail) {
|
||||||
return emptyActionConfig;
|
return emptyActionConfig;
|
||||||
|
@ -247,7 +247,7 @@ export const snapshotTypeTip = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
export const getVolumeColumnsList = (self) => {
|
export const getVolumeColumnsList = (self) => {
|
||||||
const columns = [
|
return [
|
||||||
{
|
{
|
||||||
title: t('ID/Name'),
|
title: t('ID/Name'),
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
@ -298,6 +298,7 @@ export const getVolumeColumnsList = (self) => {
|
|||||||
dataIndex: 'attachments',
|
dataIndex: 'attachments',
|
||||||
isHideable: true,
|
isHideable: true,
|
||||||
sorter: false,
|
sorter: false,
|
||||||
|
hidden: self.isInstanceDetail,
|
||||||
render: (value) => {
|
render: (value) => {
|
||||||
if (value && value.length > 0) {
|
if (value && value.length > 0) {
|
||||||
return value.map((it) => (
|
return value.map((it) => (
|
||||||
@ -351,10 +352,6 @@ export const getVolumeColumnsList = (self) => {
|
|||||||
stringify: (value) => toLocalTimeFilter(value),
|
stringify: (value) => toLocalTimeFilter(value),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
if (self.inDetailPage) {
|
|
||||||
return columns.filter((it) => it.dataIndex !== 'attachments');
|
|
||||||
}
|
|
||||||
return columns;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// deal with quota
|
// deal with quota
|
||||||
|
Loading…
Reference in New Issue
Block a user