Skip to content

Commit 666efc4

Browse files
hsato03Henrique Sato
andauthored
Simplify validation for creating volume templates via UI (#9828)
Co-authored-by: Henrique Sato <[email protected]>
1 parent da54234 commit 666efc4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ui/src/config/section/storage.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,7 @@ export default {
251251
label: 'label.action.create.template.from.volume',
252252
dataView: true,
253253
show: (record) => {
254-
return !['Destroy', 'Destroyed', 'Expunging', 'Expunged', 'Migrating', 'Uploading', 'UploadError', 'Creating'].includes(record.state) &&
255-
((record.type === 'ROOT' && record.vmstate === 'Stopped') ||
256-
(record.type !== 'ROOT' && !record.virtualmachineid && !['Allocated', 'Uploaded'].includes(record.state)))
254+
return record.state === 'Ready' && (record.vmstate === 'Stopped' || !record.virtualmachineid)
257255
},
258256
args: (record, store) => {
259257
var fields = ['volumeid', 'name', 'displaytext', 'ostypeid', 'isdynamicallyscalable', 'requireshvm', 'passwordenabled']

0 commit comments

Comments
 (0)