Merge pull request #787 from f0o/issue-741

Fix missing link to errored or ignored ports
This commit is contained in:
Neil Lathwood
2015-04-12 17:43:15 +01:00
+4 -2
View File
@@ -1,4 +1,5 @@
<?php <?php
include($config['install_dir'].'/includes/object-cache.inc.php');
// FIXME - this could do with some performance improvements, i think. possible rearranging some tables and setting flags at poller time (nothing changes outside of then anyways) // FIXME - this could do with some performance improvements, i think. possible rearranging some tables and setting flags at poller time (nothing changes outside of then anyways)
@@ -194,13 +195,14 @@ if ($_SESSION['userlevel'] >= '10')
<li><a href="ports/"><i class="fa fa-link fa-fw fa-lg"></i> All Ports</a></li> <li><a href="ports/"><i class="fa fa-link fa-fw fa-lg"></i> All Ports</a></li>
<?php <?php
$ports = new ObjCache('ports');
if (isset($ports['errored'])) if ($ports['errored'] > 0)
{ {
echo(' <li><a href="ports/errors=1/"><i class="fa fa-exclamation-circle fa-fw fa-lg"></i> Errored ('.$ports['errored'].')</a></li>'); echo(' <li><a href="ports/errors=1/"><i class="fa fa-exclamation-circle fa-fw fa-lg"></i> Errored ('.$ports['errored'].')</a></li>');
} }
if (isset($ports['ignored'])) if ($ports['ignored'] > 0)
{ {
echo(' <li><a href="ports/ignore=1/"><i class="fa fa-question-circle fa-fw fa-lg"></i> Ignored ('.$ports['ignored'].')</a></li>'); echo(' <li><a href="ports/ignore=1/"><i class="fa fa-question-circle fa-fw fa-lg"></i> Ignored ('.$ports['ignored'].')</a></li>');
} }