forked from lensen/graphsky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
89 lines (83 loc) · 3.2 KB
/
header.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
$name = "Graphsky";
$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;
$title_array = array($env,$c,$h,$g);
$title = implode(" > ", array_filter($title_array));
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="refresh" content="<?php print $conf['dashboard_refresh_interval']; ?>" >
<meta name="viewport" content="initial-scale=1,width=device-width,height=device-height,user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes">
<link href="js/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" type="text/css">
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<link href="img/logo_icon.png" rel="icon" type="text/x-icon">
<link href="img/logo_icon.png" rel="shortcut icon" sizes="196x196">
<link href="img/logo_icon.png" rel="apple-touch-icon" sizes="196x196">
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.10.4.custom.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-timepicker-addon.min.js"></script>
<script type="text/javascript" charset="utf-8">
Image1 = new Image(15,15)
Image1.src = "img/arrow_down.png"
Image2 = new Image(20,20)
Image2.src = "img/calendar.png"
var didScroll;
var lastScrollTop = 0;
var delta = 5;
var navbarHeight = $('#graph_menu').outerHeight();
$(window).scroll(function(event){
didScroll = true;
});
setInterval(function() {
if (didScroll) {
hasScrolled();
didScroll = false;
}
}, 250);
function hasScrolled() {
var st = $(this).scrollTop();
if(Math.abs(lastScrollTop - st) <= delta)
return;
if (st > lastScrollTop && st > navbarHeight){
$('#graph_menu').removeClass('graph_menu-down').addClass('graph_menu-up');
} else {
if(st + $(window).height() < $(document).height()) {
$('#graph_menu').addClass('graph_menu-down').removeClass('graph_menu-up');
}
}
lastScrollTop = st;
}
$(function(){
$('#from_calendar').datetimepicker({
timeFormat: "HH:mm",
dateFormat: "yy-mm-dd",
showOn: "button",
showTime: false,
constrainInput: false,
buttonImage: "img/calendar.png",
buttonImageOnly: true,
controlType: "select"
});
$('#until_calendar').datetimepicker({
timeFormat: "HH:mm",
dateFormat: "yy-mm-dd",
showOn: "button",
showTime: false,
constrainInput: false,
buttonImage: "img/calendar.png",
buttonImageOnly: true,
controlType: "select"
});
});
</script>
<title><?php print "$name | $title" ?></title>
</head>
<body>
<div id="container">