From 666efc4b974b968b921e5fc44d0f2085e005d9c5 Mon Sep 17 00:00:00 2001 From: Henrique Sato Date: Tue, 3 Dec 2024 14:44:18 -0300 Subject: [PATCH] Simplify validation for creating volume templates via UI (#9828) Co-authored-by: Henrique Sato --- ui/src/config/section/storage.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index 5a50cb0b1dd..e0fa72dff8a 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -251,9 +251,7 @@ export default { label: 'label.action.create.template.from.volume', dataView: true, show: (record) => { - return !['Destroy', 'Destroyed', 'Expunging', 'Expunged', 'Migrating', 'Uploading', 'UploadError', 'Creating'].includes(record.state) && - ((record.type === 'ROOT' && record.vmstate === 'Stopped') || - (record.type !== 'ROOT' && !record.virtualmachineid && !['Allocated', 'Uploaded'].includes(record.state))) + return record.state === 'Ready' && (record.vmstate === 'Stopped' || !record.virtualmachineid) }, args: (record, store) => { var fields = ['volumeid', 'name', 'displaytext', 'ostypeid', 'isdynamicallyscalable', 'requireshvm', 'passwordenabled']