From 90fc5acda44ed8f23d1da4b0ca76aa619f89ed5d Mon Sep 17 00:00:00 2001 From: davidjumani Date: Fri, 16 Apr 2021 12:36:38 +0530 Subject: [PATCH] ui: Show diskoffering for create volume from ROOT volume snaps (#4912) Fixes the issue of not being able to select the diskofferingid while creating volumes from snapshots of ROOT volumes --- ui/src/config/section/storage.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index c907079864b..976cab9acde 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -284,7 +284,13 @@ export default { label: 'label.action.create.volume', dataView: true, show: (record) => { return record.state === 'BackedUp' }, - args: ['snapshotid', 'name'], + args: (record, store) => { + var fields = ['snapshotid', 'name'] + if (record.volumetype === 'ROOT') { + fields.push('diskofferingid') + } + return fields + }, mapping: { snapshotid: { value: (record) => { return record.id }