From 7a2c6ab00e5b1be293eae485a9b6399dd06dd56d Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Thu, 2 Nov 2023 14:46:08 +0100 Subject: [PATCH] wip: move volume needs shutdown --- public/js/ravada.js | 9 +++++++++ templates/main/needs_shutdown.html.ep | 9 +++++++++ templates/main/vm_hardware_modal_change_pool.html.ep | 5 +++++ 3 files changed, 23 insertions(+) create mode 100644 templates/main/needs_shutdown.html.ep diff --git a/public/js/ravada.js b/public/js/ravada.js index 46d07e9dd..0660dd8fb 100644 --- a/public/js/ravada.js +++ b/public/js/ravada.js @@ -1187,6 +1187,15 @@ }); }; + $scope.shutdown= function() { + $scope.set_edit(); + $scope.lock_info=false; + $http.get("/machine/shutdown/"+$scope.showmachine.id+".json") + .then(function(response) { + }); + }; + + $scope.shutdown_start = function() { $scope.set_edit(); $scope.lock_info=false; diff --git a/templates/main/needs_shutdown.html.ep b/templates/main/needs_shutdown.html.ep new file mode 100644 index 000000000..5df5ad7dc --- /dev/null +++ b/templates/main/needs_shutdown.html.ep @@ -0,0 +1,9 @@ +
+
+ <%=l 'This virtual machine is active and can not be changed' %> + +
+
+ diff --git a/templates/main/vm_hardware_modal_change_pool.html.ep b/templates/main/vm_hardware_modal_change_pool.html.ep index fd0acb6d0..a56457777 100644 --- a/templates/main/vm_hardware_modal_change_pool.html.ep +++ b/templates/main/vm_hardware_modal_change_pool.html.ep @@ -8,7 +8,10 @@ +