Matching the checkbox in the CreateWizard dialogs for VMs and CTs, add
the option to create a HA resource when restoring a guest.

Signed-off-by: Michael Köppl <[email protected]>
---
 www/manager6/window/Restore.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js
index 690116df6..e3155f52d 100644
--- a/www/manager6/window/Restore.js
+++ b/www/manager6/window/Restore.js
@@ -41,6 +41,9 @@ Ext.define('PVE.window.Restore', {
             if (values.start && !values['live-restore']) {
                 params.start = 1;
             }
+            if (values['ha-managed']) {
+                params['ha-managed'] = 1;
+            }
             if (values['live-restore']) {
                 params['live-restore'] = 1;
             }
@@ -240,6 +243,15 @@ Ext.define('PVE.window.Restore', {
                         labelWidth: 105,
                         checked: false,
                     },
+                    {
+                        xtype: 'proxmoxcheckbox',
+                        name: 'ha-managed',
+                        reference: 'ha-managed',
+                        flex: 1,
+                        fieldLabel: gettext('Add as HA resource'),
+                        labelWidth: 120,
+                        checked: false,
+                    },
                 ],
             },
         ];
-- 
2.47.3



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to