2014-06-14 09:31:22 +10:00
|
|
|
<?php
|
2019-06-23 00:29:12 -05:00
|
|
|
|
|
|
|
use LibreNMS\Config;
|
|
|
|
|
2019-04-11 23:26:42 -05:00
|
|
|
require_once 'includes/html/object-cache.inc.php';
|
2015-07-22 22:04:33 +01:00
|
|
|
|
|
|
|
$temp_output = '
|
2014-06-15 01:36:49 +01:00
|
|
|
<div class="panel panel-default panel-condensed table-responsive">
|
2014-06-14 09:31:22 +10:00
|
|
|
<table class="table table-hover table-condensed table-striped">
|
|
|
|
<thead>
|
2016-08-19 13:45:04 -04:00
|
|
|
<tr>
|
2014-06-14 09:31:22 +10:00
|
|
|
<th>Summary</th>
|
|
|
|
<th><a href="devices/">Devices</a></th>
|
|
|
|
<th><a href="ports/">Ports</a></th>
|
2015-07-22 22:04:33 +01:00
|
|
|
';
|
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
if (Config::get('show_services')) {
|
2015-07-22 22:04:33 +01:00
|
|
|
$temp_output .= '
|
2014-06-14 09:31:22 +10:00
|
|
|
<th><a href="services/">Services</a></th>
|
2015-07-22 22:04:33 +01:00
|
|
|
';
|
|
|
|
}
|
|
|
|
|
|
|
|
$temp_output .= '
|
2014-06-14 09:31:22 +10:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2016-08-19 13:45:04 -04:00
|
|
|
<tr>
|
2014-06-14 09:31:22 +10:00
|
|
|
<th><span class="green">Up</span></th>
|
2015-07-22 22:04:33 +01:00
|
|
|
<td><a href="devices/format=list_detail/state=up/"><span class="green">'. $devices['up'] .'</span></a></td>
|
|
|
|
<td><a href="ports/format=list_detail/state=up/"><span class="green">'. $ports['up'] .'</span></a></td>
|
|
|
|
';
|
2019-06-23 00:29:12 -05:00
|
|
|
if (Config::get('show_services')) {
|
2015-07-22 22:04:33 +01:00
|
|
|
$temp_output .= '
|
2016-04-26 22:05:34 +10:00
|
|
|
<td><a href="services/view=details/state=ok/"><span class="green">'. $services['up'] .'</span></a></td>
|
2015-07-22 22:04:33 +01:00
|
|
|
';
|
|
|
|
}
|
|
|
|
|
|
|
|
$temp_output .= '
|
2014-06-14 09:31:22 +10:00
|
|
|
</tr>
|
2016-08-19 13:45:04 -04:00
|
|
|
<tr>
|
2014-06-14 09:31:22 +10:00
|
|
|
<th><span class="red">Down</span></th>
|
2015-07-22 22:04:33 +01:00
|
|
|
<td><a href="devices/format=list_detail/state=down/"><span class="red">'. $devices['down'] .'</span></a></td>
|
|
|
|
<td><a href="ports/format=list_detail/state=down/"><span class="red">'. $ports['down'] .'</span></a></td>
|
|
|
|
';
|
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
if (Config::get('show_services')) {
|
2015-07-22 22:04:33 +01:00
|
|
|
$temp_output .= '
|
2016-04-26 22:05:34 +10:00
|
|
|
<td><a href="services/view=details/state=critical/"><span class="red">'. $services['down'] .'</span></a></td>
|
2015-07-22 22:04:33 +01:00
|
|
|
';
|
|
|
|
}
|
|
|
|
|
|
|
|
$temp_output .= '
|
2014-06-14 09:31:22 +10:00
|
|
|
</tr>
|
2016-08-19 13:45:04 -04:00
|
|
|
<tr>
|
2014-06-14 09:31:22 +10:00
|
|
|
<th><span class="grey">Ignored</span></th>
|
2015-07-22 22:04:33 +01:00
|
|
|
<td><a href="devices/format=list_detail/ignore=1/"><span class="grey">'. $devices['ignored'] .'</span></a></td>
|
|
|
|
<td><a href="ports/format=list_detail/ignore=1/"><span class="grey">'. $ports['ignored'] .'</span></a></td>
|
|
|
|
';
|
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
if (Config::get('show_services')) {
|
2015-07-22 22:04:33 +01:00
|
|
|
$temp_output .= '
|
|
|
|
<td><a href="services/view=details/ignore=1/"><span class="grey">'. $services['ignored'] .'</span></a></td>
|
|
|
|
';
|
|
|
|
}
|
|
|
|
|
|
|
|
$temp_output .= '
|
2014-06-14 09:31:22 +10:00
|
|
|
</tr>
|
2016-08-19 13:45:04 -04:00
|
|
|
<tr>
|
2014-06-14 09:31:22 +10:00
|
|
|
<th><span class="black">Disabled/Shutdown</span></th>
|
2015-07-22 22:04:33 +01:00
|
|
|
<td><a href="devices/format=list_detail/disabled=1/"><span class="black">'. $devices['disabled'] .'</span></a></td>
|
|
|
|
<td><a href="ports/format=list_detail/state=admindown/"><span class="black">'. $ports['shutdown'] .'</span></a></td>
|
|
|
|
';
|
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
if (Config::get('show_services')) {
|
2015-07-22 22:04:33 +01:00
|
|
|
$temp_output .= '
|
|
|
|
<td><a href="services/view=details/disabled=1/"><span class="black">'. $services['disabled'] .'</span></a></td>
|
|
|
|
';
|
|
|
|
}
|
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
if (Config::get('summary_errors')) {
|
2015-08-28 09:24:08 +01:00
|
|
|
$temp_output .= '
|
|
|
|
</tr>
|
2016-08-19 13:45:04 -04:00
|
|
|
<tr>
|
2015-08-28 09:24:08 +01:00
|
|
|
<th><span class="black">Errored</span></th>
|
|
|
|
<td>-</td>
|
|
|
|
<td><a href="ports/format=list_detail/errors=1/"><span class="black"> '.$ports['errored'].'</span></a></td>
|
|
|
|
';
|
2019-06-23 00:29:12 -05:00
|
|
|
if (Config::get('show_services')) {
|
2015-08-28 09:24:08 +01:00
|
|
|
$temp_output .= '
|
|
|
|
<td>-</td>
|
|
|
|
';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-22 22:04:33 +01:00
|
|
|
$temp_output .= '
|
2014-06-14 09:31:22 +10:00
|
|
|
</tr>
|
2016-08-19 13:45:04 -04:00
|
|
|
<tr>
|
2015-10-09 09:43:02 +02:00
|
|
|
<th><span class="grey">Total</span></th>
|
2015-07-22 22:04:33 +01:00
|
|
|
<td><a href="devices/"><span>'. $devices['count'] .'</span></a></td>
|
|
|
|
<td><a href="ports/"><span>'. $ports['count'] .'</span></a></td>
|
|
|
|
';
|
|
|
|
|
2019-06-23 00:29:12 -05:00
|
|
|
if (Config::get('show_services')) {
|
2015-07-22 22:04:33 +01:00
|
|
|
$temp_output .= '
|
|
|
|
<td><a href="services/"><span>'. $services['count'] .'</span></a></td>
|
|
|
|
';
|
|
|
|
}
|
|
|
|
|
|
|
|
$temp_output .= '
|
2014-06-14 09:31:22 +10:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2015-07-22 22:04:33 +01:00
|
|
|
';
|
|
|
|
|
|
|
|
unset($common_output);
|
|
|
|
$common_output[] = $temp_output;
|