* [pve-devel] [PATCH novnc] don't require confirmation for starting a stopped vm from button
@ 2022-03-09 8:26 Dominik Csapak
2022-04-25 14:27 ` Dominik Csapak
2022-04-26 14:04 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2022-03-09 8:26 UTC (permalink / raw)
To: pve-devel
when the vm is stopped and the user clicks on the 'start now' button,
there really is no need for confirmation again
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
...ow-start-button-on-not-running-vm-ct.patch | 26 ++++++++++++++++---
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/debian/patches/0018-show-start-button-on-not-running-vm-ct.patch b/debian/patches/0018-show-start-button-on-not-running-vm-ct.patch
index 1e9e73d..162acc4 100644
--- a/debian/patches/0018-show-start-button-on-not-running-vm-ct.patch
+++ b/debian/patches/0018-show-start-button-on-not-running-vm-ct.patch
@@ -13,22 +13,40 @@ colors were adapted
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
- app/pve.js | 34 +++++++++++++++++++++++++--
+ app/pve.js | 38 ++++++++++++++++++++++++++----
app/styles/pve.css | 58 ++++++++++++++++++++++++++++++++++++++++++++++
vnc.html | 9 +++++++
- 3 files changed, 99 insertions(+), 2 deletions(-)
+ 3 files changed, 101 insertions(+), 4 deletions(-)
diff --git a/app/pve.js b/app/pve.js
-index 583a406..8144fdb 100644
+index 583a406..3eeaa47 100644
--- a/app/pve.js
+++ b/app/pve.js
+@@ -231,7 +231,7 @@ PVEUI.prototype = {
+
+ },
+
+- pve_vm_command: function(cmd, params, reload) {
++ pve_vm_command: function(cmd, params, reload, mustConfirm = true) {
+ var me = this;
+ var baseUrl;
+ var confirmMsg = "";
+@@ -255,7 +255,7 @@ PVEUI.prototype = {
+
+ confirmMsg = confirmMsg.replace('{0}', me.vmid);
+
+- if (confirmMsg !== "" && confirm(confirmMsg) !== true) {
++ if (confirmMsg !== "" && mustConfirm && confirm(confirmMsg) !== true) {
+ return;
+ }
+
@@ -320,6 +320,11 @@ PVEUI.prototype = {
.classList.add('pve_hidden');
}
+ document.getElementById("pve_start_button")
+ .addEventListener('click', function() {
-+ me.pve_vm_command('start');
++ me.pve_vm_command('start', {}, undefined, false);
+ });
+
// add command logic
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-26 14:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09 8:26 [pve-devel] [PATCH novnc] don't require confirmation for starting a stopped vm from button Dominik Csapak
2022-04-25 14:27 ` Dominik Csapak
2022-04-26 14:04 ` [pve-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal