Skip to content

Commit

Permalink
Show the epair device on the jail status page
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Webb committed Feb 14, 2013
1 parent 39d2f3e commit bb5bbe6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions classes/Jail.php
Expand Up @@ -118,16 +118,22 @@ public function NetworkStatus() {
$status = "";

foreach ($this->network as $n) {
$status .= (strlen($status) ? ", " : "") . $n->device . " { ";
if ($n->is_span)
$status = "(SPAN)";
$status .= "(SPAN)";

if ($n->dhcp)
$status .= " (DHCP), ";

if (!count($n->ips))
$status .= " (NO IP)";
$status .= " (NO STATIC IP)";

foreach ($n->ips as $ip)
$status .= " {$ip}";

$status .= ($n->IsOnline()) ? " (online)" : " (offline)";

$status .= " }";
}

return $status;
Expand Down

0 comments on commit bb5bbe6

Please sign in to comment.