fix: hide project_id when modifies metadata

1. project_id should not be modified when mirror modifies metadata
2. mirror details page does not need to display the custom attribute project_id

Change-Id: Id629f94429ea1ee6556046f5f3d9e22b3a578b40
This commit is contained in:
zhangke 2022-03-04 18:39:46 +08:00
parent 04d150cc5b
commit 83a1b938c1
3 changed files with 3 additions and 4 deletions

View File

@ -93,10 +93,9 @@ export default class ManageMetadata extends ModalAction {
size,
image_type,
self,
project_name,
virtual_size,
...rest
} = this.item;
} = this.item.originData;
return rest;
}

View File

@ -88,9 +88,7 @@ export const imageProperties = {
min_ram: t('Min. RAM'),
name: t('Name'),
owner: t('Owner'),
tags: t('Tags'),
updated_at: t('Updated At'),
virtual_size: t('Virtual Size'),
visibility: t('Visibility'),
description: t('Description'),
architecture: t('Architecture'),

View File

@ -54,11 +54,13 @@ export class ImageStore extends Base {
return (data, filters, isDetail) => {
if (isDetail) {
return {
originData: { ...data },
...data,
project_id: data.owner,
};
}
return {
originData: { ...data },
...data,
project_id: data.owner,
project_name: data.owner_project_name || data.project_name,