forked from lensen/graphsky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
host_view.php
34 lines (29 loc) · 1.14 KB
/
host_view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<a class="anchor" id="reports"> </a>
<div class="block_title"><a href="#reports">Reports</a></div>
<div class="graph_block">
<?php
$graph_args = "env=$env&c=$c";
if (isset($dn)) { $graph_args = "$graph_args&dn=$dn"; }
if (isset($g)) { $graph_reports = array($g); }
else { $graph_reports = find_dashboards($env, $c); }
foreach ($graph_reports as $graph_report) {
$current_graph_args = $graph_args . "&h=$h";
print print_zoom_graph($current_graph_args, "g=$graph_report", $z, $from, $until);
}
?>
</div>
<a class="anchor" id="metrics"> </a>
<div class="block_title"><a href="#metrics">Metrics</a></div>
<?php
$metrics = find_metrics("$env.$c.$h", $conf['host_metric_group_depth']);
foreach ($metrics as $metric_group => $metric_array) {
print "<a class=\"anchor\" id=\"$metric_group\"> </a>";
print "<a href=\"#$metric_group\"><div class=\"banner_text\">$metric_group</div></a>";
print "<div class=\"graph_block\">";
foreach ($metric_array as $metric) {
$current_graph_args = $graph_args . "&h=$h&dn=";
print print_zoom_graph($current_graph_args, "m=$metric", $z, $from, $until);
}
print "</div>";
}
?>