-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.php
33 lines (26 loc) · 1.16 KB
/
index.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
<?php
require_once "./include_conf.php";
include_once "./functions.php";
$env = isset($_GET['env']) ? $_GET['env'] : $conf['graphite_default_env'];
$c = (isset($_GET['c']) && $_GET['c'] != "") ? $_GET['c'] : NULL;
$m = (isset($_GET['m']) && $_GET['m'] != "") ? $_GET['m'] : NULL;
$h = (isset($_GET['h']) && $_GET['h'] != "") ? $_GET['h'] : NULL;
$g = (isset($_GET['g']) && $_GET['g'] != "") ? $_GET['g'] : NULL;
$l = (isset($_GET['l']) && $_GET['l'] != "") ? $_GET['l'] : "no";
$dn = (isset($_GET['dn']) && $_GET['dn'] != "") ? $_GET['dn'] : NULL;
$gs = isset($_GET['from']) ? $_GET['from'] : $conf['default_time_range'];
$ge = isset($_GET['until']) ? $_GET['until'] : "-10 seconds";
$z = isset($_GET['z']) && in_array($_GET[ 'z' ], $conf['graph_sizes_keys']) ? $_GET['z'] : "default";
$view = NULL;
$from = $gs;
$until = ($ge == "now") ? $ge : $ge;
$view = "over";
if ($env) { $view = "env"; }
if ($c) { $view = "cluster"; }
if ($c && $h) { $view = "host"; }
include_once "./header.php";
include_once "./menu.php";
print "<div id=\"main\">";
include_once "./${view}_view.php";
print "</div>";
include_once "./footer.php";