-
Notifications
You must be signed in to change notification settings - Fork 14
/
graph_all_periods.php
40 lines (32 loc) · 1.29 KB
/
graph_all_periods.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
35
36
37
38
39
40
<?php
require_once "./include_conf.php";
include_once "./functions.php";
$graph = isset($_GET['g']) ? "&g=" . $_GET['g'] : "";
$metric = isset($_GET['m']) ? "&m=" . $_GET['m'] : "";
$sourcetime = isset($_GET['st']) ? sanitize($_GET['st']) : NULL;
$env = isset($_GET['env']) ? $_GET['env'] : $conf['graphite_default_env'];
$c = isset($_GET['c']) ? $_GET['c'] : "*";
$realcluster = isset($_GET['c']) ? $_GET['c'] : "";
$h = isset($_GET['h']) ? $_GET['h'] : $conf['cluster_hostname'];
$realhost = isset($_GET['h']) ? $_GET['h'] : "";
$graph_args = "env=$env&c=$c&h=$h$graph$metric";
$graph_args_real = "env=$env&c=$realcluster&h=$realhost$graph$metric";
include_once "./header.php";
print "
<div id=\"top_menu\" class=\"top_menu_shadow\">
<a href=\"/\"><div id=\"menu_logo\"></div></a>
<div id=\"title_menu\" class=\"left\">
<div class=\"title_menu_cell\">
<a href=\"/?$graph_args_real\">Back to overview</a>
</div>
</div>
</div>
<div id=\"main\">
<div class=\"block_title\">Historical overview</div>
<div class=\"graph_block\">
";
foreach ($conf["graph_all_periods_timeframes"] as $tf) {
print print_period_graph($graph_args, $tf);
}
print "</div></div>";
include_once "./footer.php";