mirror of
https://github.com/unraid/webgui.git
synced 2026-01-29 04:59:17 -06:00
Fixed: warning on docker container page when array is stopped
This commit is contained in:
@@ -4,8 +4,8 @@ Code="f100"
|
||||
Cond="exec(\"grep -o '^DOCKER_ENABLED=.yes' /boot/config/docker.cfg 2>/dev/null\")"
|
||||
----
|
||||
<?PHP
|
||||
/* Copyright 2005-2017, Lime Technology
|
||||
* Copyright 2014-2017, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2014-2018, Guilherme Jardim, Eric Schultz, Jon Panozzo.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -16,12 +16,9 @@ Cond="exec(\"grep -o '^DOCKER_ENABLED=.yes' /boot/config/docker.cfg 2>/dev/null\
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
if ($var['fsState'] != "Started") {
|
||||
echo "<p class='notice shift'>Array must be <span class='strong big'>started</span> to view Docker containers.</p>";
|
||||
return;
|
||||
}
|
||||
if ( !is_file('/var/run/dockerd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/dockerd.pid'))) ) {
|
||||
echo "<p class='notice shift'>Docker Service failed to start.</p>";
|
||||
return;
|
||||
if ($var['fsState'] != 'Started') {
|
||||
echo "<div class='notice shift'>Array must be <span class='strong big'>started</span> to view Docker containers.</div>";
|
||||
} elseif (!is_file('/var/run/dockerd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/dockerd.pid')))) {
|
||||
echo "<div class='notice shift'>Docker Service failed to start.</div>";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Menu="Docker:1"
|
||||
Title="Docker Containers"
|
||||
Tag="cubes"
|
||||
Cond="(pgrep('dockerd')!==false)"
|
||||
Cond="is_file('/var/run/dockerd.pid')"
|
||||
Markdown="false"
|
||||
---
|
||||
<?PHP
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Menu="VMs:1"
|
||||
Title="Virtual Machines"
|
||||
Tag="columns"
|
||||
Cond="(pgrep('libvirtd')!==false)"
|
||||
Cond="is_file('/var/run/libvirt/libvirtd.pid')"
|
||||
Markdown="false"
|
||||
---
|
||||
<?PHP
|
||||
|
||||
@@ -4,8 +4,8 @@ Code="f108"
|
||||
Cond="exec(\"grep -o '^SERVICE=.enable' /boot/config/domain.cfg 2>/dev/null\")"
|
||||
---
|
||||
<?PHP
|
||||
/* Copyright 2005-2017, Lime Technology
|
||||
* Copyright 2015-2017, Derek Macias, Eric Schultz, Jon Panozzo.
|
||||
/* Copyright 2005-2018, Lime Technology
|
||||
* Copyright 2015-2018, Derek Macias, Eric Schultz, Jon Panozzo.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -17,13 +17,9 @@ Cond="exec(\"grep -o '^SERVICE=.enable' /boot/config/domain.cfg 2>/dev/null\")"
|
||||
?>
|
||||
<?
|
||||
if ($var['fsState'] != "Started") {
|
||||
echo "<p class='notice shift'>Array must be <span class='strong big'>started</span> to view Virtual Machines.</p>";
|
||||
return;
|
||||
echo "<div class='notice shift'>Array must be <span class='strong big'>started</span> to view Virtual Machines.</div>";
|
||||
} elseif (!is_file('/var/run/libvirt/libvirtd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/libvirt/libvirtd.pid')))) {
|
||||
echo "<div class='notice shift'>Libvirt Service failed to start.</div>";
|
||||
}
|
||||
if (!is_file('/var/run/libvirt/libvirtd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/libvirt/libvirtd.pid')))) {
|
||||
echo "<p class='notice shift'>Libvirt Service failed to start.</p>";
|
||||
return;
|
||||
}
|
||||
|
||||
if (count($pages)==2) $tabbed = false;
|
||||
?>
|
||||
Reference in New Issue
Block a user