fix: Show the image which has no usage_type

Show the image which has no usage_type in the image list when create instace or ironic

Change-Id: I3d9cc0578eddb10942e039e507c63bf3ec6662c5
This commit is contained in:
xusongfu 2021-08-30 14:07:38 +08:00 committed by Jingwei.Zhang
parent f15ea203a2
commit afffef2ace

View File

@ -131,10 +131,10 @@ export const isSnapshot = (item) => {
};
export const canImageCreateInstance = (item) =>
item.status === 'active' && item.usage_type === 'common';
item.status === 'active' && (item.usage_type === 'common' || item.usage_type === undefined);
export const canImageCreateIronicInstance = (item) =>
item.status === 'active' && item.usage_type === 'ironic';
item.status === 'active' && (item.usage_type === 'ironic' || item.usage_type === undefined);
export const canSnapshotCreateInstance = (item) => item.status === 'active';