From 379fff9b62926f1bb7e25efea0c7f4b0ed4f4a54 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Mon, 22 Apr 2024 11:07:38 +0200 Subject: [PATCH] fix: show clones checkbox was not working (#2045) --- public/js/admin.js | 5 ++++- templates/main/admin_machines.html.ep | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/admin.js b/public/js/admin.js index 72727a686..467bd7f67 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -499,7 +499,7 @@ ravadaApp.directive("solShowMachine", swMach) $scope.set_autostart= function(machineId, value) { $http.get("/machine/autostart/"+machineId+"/"+value); }; - $scope.set_public = function(machineId, value) { + $scope.set_public = function(machineId, value, show_clones) { if (value) value=1; else value = 0; $http.get("/machine/public/"+machineId+"/"+value) @@ -509,6 +509,9 @@ ravadaApp.directive("solShowMachine", swMach) } }); + if ( value == 0 ) { + $http.get("/machine/set/"+machineId+"/show_clones/"+show_clones); + } }; $scope.can_remove_base = function(machine) { diff --git a/templates/main/admin_machines.html.ep b/templates/main/admin_machines.html.ep index a344230c2..2ad9eda41 100644 --- a/templates/main/admin_machines.html.ep +++ b/templates/main/admin_machines.html.ep @@ -240,7 +240,7 @@