Skip to content

Commit cc55b11

Browse files
hsato03Henrique Sato
authored andcommitted
Simplify validation for creating volume templates via UI (apache#9828)
Co-authored-by: Henrique Sato <[email protected]>
1 parent ff432f4 commit cc55b11

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
@@ -253,9 +253,7 @@ export default {
253253
label: 'label.action.create.template.from.volume',
254254
dataView: true,
255255
show: (record) => {
256-
return !['Destroy', 'Destroyed', 'Expunging', 'Expunged', 'Migrating', 'Uploading', 'UploadError', 'Creating'].includes(record.state) &&
257-
((record.type === 'ROOT' && record.vmstate === 'Stopped') ||
258-
(record.type !== 'ROOT' && !record.virtualmachineid && !['Allocated', 'Uploaded'].includes(record.state)))
256+
return record.state === 'Ready' && (record.vmstate === 'Stopped' || !record.virtualmachineid)
259257
},
260258
args: (record, store) => {
261259
var fields = ['volumeid', 'name', 'displaytext', 'ostypeid', 'isdynamicallyscalable', 'requireshvm', 'passwordenabled']

0 commit comments

Comments
 (0)