mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
Merge pull request #271 from laf/issue-laf-34
Fixed links for health graphs
This commit is contained in:
@@ -23,7 +23,7 @@ foreach (dbFetchRows("SELECT * FROM `mempools` WHERE device_id = ?", array($devi
|
|||||||
|
|
||||||
$text_descr = rewrite_entity_descr($mempool['mempool_descr']);
|
$text_descr = rewrite_entity_descr($mempool['mempool_descr']);
|
||||||
|
|
||||||
$mempool_url = "device/".$device['device_id']."/health/mempool/";
|
$mempool_url = "graphs/id=".$mempool['mempool_id']."/type=mempool_usage/";
|
||||||
$mini_url = "graph.php?id=".$mempool['mempool_id']."&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=80&height=20&bg=f4f4f4";
|
$mini_url = "graph.php?id=".$mempool['mempool_id']."&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=80&height=20&bg=f4f4f4";
|
||||||
|
|
||||||
$mempool_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
|
$mempool_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$text_descr;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ echo("<table width=100% cellpadding=6 cellspacing=0>");
|
|||||||
$i = '1';
|
$i = '1';
|
||||||
foreach (dbFetchRows("SELECT * FROM `processors` WHERE device_id = ?", array($device['device_id'])) as $proc)
|
foreach (dbFetchRows("SELECT * FROM `processors` WHERE device_id = ?", array($device['device_id'])) as $proc)
|
||||||
{
|
{
|
||||||
$proc_url = "device/device=".$device['device_id']."/tab=health/metric=processor/";
|
$proc_url = "graphs/id=".$proc['processor_id']."/type=processor_usage/";
|
||||||
|
|
||||||
$mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=80&height=20&bg=f4f4f4";
|
$mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=80&height=20&bg=f4f4f4";
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ foreach (dbFetchRows("SELECT * FROM `storage` WHERE device_id = ? ORDER BY stora
|
|||||||
$total = formatStorage($total);
|
$total = formatStorage($total);
|
||||||
$free = formatStorage($free);
|
$free = formatStorage($free);
|
||||||
|
|
||||||
$fs_url = "device/device=".$device['device_id']."/tab=health/metric=storage/";
|
$fs_url = "graphs/id=".$drive['drive_id']."/type=storage_usage/";
|
||||||
|
|
||||||
$fs_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$drive['storage_descr'];
|
$fs_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$drive['storage_descr'];
|
||||||
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=400&height=125\'>";
|
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=400&height=125\'>";
|
||||||
@@ -33,14 +33,14 @@ foreach (dbFetchRows("SELECT * FROM `storage` WHERE device_id = ? ORDER BY stora
|
|||||||
|
|
||||||
$background = get_percentage_colours($percent);
|
$background = get_percentage_colours($percent);
|
||||||
|
|
||||||
echo("<tr bgcolor='$row_colour'><th><a href='$fs_url' $fs_popup>" . $drive['storage_descr'] . "</a></td><td>
|
echo("<tr bgcolor='$row_colour'><td><a href='$fs_url' $fs_popup>" . $drive['storage_descr'] . "</a></td><td>
|
||||||
<a href='$fs_url' $fs_popup>".print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $perc . "%", "ffffff", $background['right'])."</a>
|
<a href='$fs_url' $fs_popup>".print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $perc . "%", "ffffff", $background['right'])."</a>
|
||||||
</td><td>" . $free . "</td><td></td></tr>");
|
</td><td>" . $free . "</td><td></td></tr>");
|
||||||
|
|
||||||
$graph_array['id'] = $drive['storage_id'];
|
$graph_array['id'] = $drive['storage_id'];
|
||||||
$graph_array['type'] = $graph_type;
|
$graph_array['type'] = $graph_type;
|
||||||
|
|
||||||
echo("<tr bgcolor='$row_colour'><td colspan=6>");
|
echo("<tr bgcolor='$row_colour'><td colspan=4>");
|
||||||
|
|
||||||
include("includes/print-graphrow.inc.php");
|
include("includes/print-graphrow.inc.php");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user