mirror of
https://github.com/unraid/webgui.git
synced 2026-05-12 15:20:29 -05:00
Dashboard: correct context menu not working when docker or vm service stopped
This commit is contained in:
@@ -459,7 +459,7 @@ function loadlist(init) {
|
||||
});
|
||||
context.init({preventDoubleContext:false,left:true,above:false});
|
||||
}
|
||||
$.post('/webGui/include/DashboardApps.php',{display:'<?=$display['dashapps']?>'},function(d) {
|
||||
$.post('/webGui/include/DashboardApps.php',{display:'<?=$display['dashapps']?>',docker:'<?=$dockerd?>',vms:'<?=$libvirtd?>'},function(d) {
|
||||
var data = d.split(/\0/);
|
||||
$('.docker_view').html(data[0]);
|
||||
$('.vm_view').html(data[1]);
|
||||
|
||||
@@ -19,7 +19,7 @@ require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php";
|
||||
$display = $_POST['display'];
|
||||
$menu = [];
|
||||
|
||||
if ($display=='icons' || $display=='docker') {
|
||||
if ($_POST['docker'] && ($display=='icons' || $display=='docker')) {
|
||||
$user_prefs = $dockerManPaths['user-prefs'];
|
||||
$DockerClient = new DockerClient();
|
||||
$DockerTemplates = new DockerTemplates();
|
||||
@@ -58,7 +58,7 @@ if ($display=='icons' || $display=='docker') {
|
||||
echo "</td><td></td></tr>";
|
||||
}
|
||||
echo "\0";
|
||||
if ($display=='icons' || $display=='vms') {
|
||||
if ($_POST['vms'] && ($display=='icons' || $display=='vms')) {
|
||||
$user_prefs = '/boot/config/plugins/dynamix.vm.manager/userprefs.cfg';
|
||||
$vms = $lv->get_domains();
|
||||
if (file_exists($user_prefs)) {
|
||||
|
||||
Reference in New Issue
Block a user