source: branches/0.4/web/addons/job_monarch/dwoo/compiled/compiled/templates/job_monarch/header.tpl.d17.php @ 755

Last change on this file since 755 was 755, checked in by ramonb, 11 years ago
  • add Dwoo
  • Property svn:executable set to *
File size: 10.8 KB
Line 
1<?php
2/* template head */
3if (function_exists('Dwoo_Plugin_include')===false)
4        $this->getLoader()->loadPlugin('include');
5/* end template head */ ob_start(); /* template body */ ?><!-- Begin header.tpl -->
6<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
7<html>
8<head>
9<title>Ganglia:: <?php echo $this->scope["page_title"];?></title>
10<meta http-equiv="Content-type" content="text/html; charset=utf-8">
11<link type="text/css" href="css/smoothness/jquery-ui-1.8.14.custom.min.css" rel="stylesheet" />
12<link type="text/css" href="css/jquery.liveSearch.css" rel="stylesheet" />
13<link type="text/css" href="css/jquery.multiselect.css" rel="stylesheet" />
14<link type="text/css" href="./styles.css" rel="stylesheet" />
15<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
16<script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script>
17<script type="text/javascript" src="js/jquery.livesearch.min.js"></script>
18<script type="text/javascript" src="js/ganglia.js"></script>
19<script type="text/javascript" src="js/jquery.gangZoom.js"></script>
20<script type="text/javascript" src="js/jquery.cookie.js"></script>
21<script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
22<script type="text/javascript" src="js/jquery.ba-bbq.min.js"></script>
23<script type="text/javascript" src="js/combobox.js"></script>
24<script type="text/javascript" src="js/jquery.scrollTo-1.4.2-min.js"></script>
25<script type="text/javascript" src="js/jquery.buttonsetv.js"></script>
26<script type="text/javascript">
27    var server_utc_offset=<?php echo $this->scope["server_utc_offset"];?>;
28   
29    var g_refresh_timer = setTimeout("refresh()", <?php echo $this->scope["refresh"];?> * 1000);
30
31    function refreshHeader() {
32      $.get('header.php?date_only=1', function(data) {
33        var title = $("#page_title").text();
34        var l = title.lastIndexOf(" for ");
35        title = title.substring(0, l);
36        title += " for " + data;
37        $("#page_title").text(title);
38        });
39    }
40
41    function refresh() {
42      var selected_tab = $("#selected_tab").val();
43      if (selected_tab == "agg") {
44        refreshAggregateGraph();
45        g_refresh_timer = setTimeout("refresh()", <?php echo $this->scope["refresh"];?> * 1000);
46      } else if (selected_tab == "v") {
47        refreshHeader();
48        if ($.isFunction(window.refreshView)) {
49          refreshView();
50          g_refresh_timer = setTimeout("refresh()", <?php echo $this->scope["refresh"];?> * 1000);
51        } else if ($.isFunction(window.refreshDecomposeGraph)) {
52          refreshDecomposeGraph();
53          g_refresh_timer = setTimeout("refresh()", <?php echo $this->scope["refresh"];?> * 1000);
54        } else
55          ganglia_form.submit();
56      } else if (selected_tab == "ev") {
57        refreshOverlayEvent();
58        g_refresh_timer = setTimeout("refresh()", <?php echo $this->scope["refresh"];?> * 1000);
59      } else if (selected_tab == "m") {
60        if ($.isFunction(window.refreshClusterView)) {
61          refreshHeader();
62          refreshClusterView();
63          g_refresh_timer = setTimeout("refresh()", <?php echo $this->scope["refresh"];?> * 1000);
64        } else if ($.isFunction(window.refreshHostView)) {
65          refreshHeader();
66          refreshHostView();
67          g_refresh_timer = setTimeout("refresh()", <?php echo $this->scope["refresh"];?> * 1000);
68        } else
69          ganglia_form.submit();
70      } else
71        ganglia_form.submit();
72    }
73
74    $(function() {
75      g_overlay_events = ($("#overlay_events").val() == "true");
76
77      g_tabIndex = new Object();
78      g_tabName = [];
79      var tabName = ["m", "s", "v", "agg", "ch", "ev", "rot", "mob"];
80      var j = 0;
81      for (var i in tabName) {
82        if (tabName[i] == "ev" && !g_overlay_events)
83          continue;
84        g_tabIndex[tabName[i]] = j++;
85        g_tabName.push(tabName[i]);
86      }
87
88      // Follow tab's URL instead of loading its content via ajax
89      var tabs = $("#tabs");
90      if (tabs[0]) {
91        tabs.tabs();
92        // Restore previously selected tab
93        var selected_tab = $("#selected_tab").val();
94        //alert("selected_tab = " + selected_tab);
95        if (typeof g_tabIndex[selected_tab] != 'undefined') {
96          try {
97            //alert("Selecting tab: " + selected_tab);
98            tabs.tabs("select", g_tabIndex[selected_tab]);
99            if (selected_tab == "rot")
100              autoRotationChooser();
101          } catch (err) {
102            try {
103              alert("Error(ganglia.js): Unable to select tab: " +
104                    selected_tab + ". " + err.getDescription());
105            } catch (err) {
106              // If we can't even show the error, fail silently.
107            }
108          }
109        }
110
111        tabs.bind("tabsselect", function(event, ui) {
112          $("#selected_tab").val(g_tabName[ui.index]);
113          if (g_tabName[ui.index] != "mob")
114            $.cookie("ganglia-selected-tab-" + window.name, ui.index);
115          if (ui.index == g_tabIndex["m"] ||
116              ui.index == g_tabIndex["v"] ||
117              ui.index == g_tabIndex["ch"])
118            ganglia_form.submit();
119        });
120      }
121    });
122
123    $(function() {
124      $("#metrics-picker").combobox();
125
126      <?php echo $this->scope["is_metrics_picker_disabled"];?>
127
128
129      $(".header_btn").button();
130    });
131
132  $(function () {
133
134    done = function done(startTime, endTime) {
135            setStartAndEnd(startTime, endTime);
136            document.forms['ganglia_form'].submit();
137    }
138
139    cancel = function (startTime, endTime) {
140            setStartAndEnd(startTime, endTime);
141    }
142
143    defaults = {
144        startTime: <?php echo $this->scope["start_timestamp"];?>,
145        endTime: <?php echo $this->scope["end_timestamp"];?>,
146        done: done,
147        cancel: cancel
148    }
149
150    $(".host_small_zoomable").gangZoom($.extend({
151        paddingLeft: 67,
152        paddingRight: 30,
153        paddingTop: 38,
154        paddingBottom: 25
155    }, defaults));
156
157    $(".host_medium_zoomable").gangZoom($.extend({
158        paddingLeft: 67,
159        paddingRight: 30,
160        paddingTop: 38,
161        paddingBottom: 40
162    }, defaults));
163
164    $(".host_default_zoomable").gangZoom($.extend({
165        paddingLeft: 66,
166        paddingRight: 30,
167        paddingTop: 37,
168        paddingBottom: 50
169    }, defaults));
170
171    $(".host_large_zoomable").gangZoom($.extend({
172        paddingLeft: 66,
173        paddingRight: 29,
174        paddingTop: 37,
175        paddingBottom: 56
176    }, defaults));
177
178    $(".cluster_zoomable").gangZoom($.extend({
179        paddingLeft: 67,
180        paddingRight: 30,
181        paddingTop: 37,
182        paddingBottom: 50
183    }, defaults));
184
185    function rrdDateTimeString(date) {
186      return (date.getMonth() + 1) + "/" + date.getDate() + "/" + date.getFullYear() + " " + date.getHours() + ":" + date.getMinutes();
187    }
188
189    function setStartAndEnd(startTime, endTime) {
190        // we're getting local start/end times.
191
192        // getTimezoneOffset returns negative values east of UTC,
193        // which is the opposite of PHP. we want negative values to the west.
194        var local_offset = new Date().getTimezoneOffset() * 60 * -1;
195        var delta = local_offset - server_utc_offset;
196        var date = new Date((Math.floor(startTime) - delta) * 1000);
197        $("#datepicker-cs").val(rrdDateTimeString(date));
198        date = new Date((Math.floor(endTime) - delta) * 1000);
199        $("#datepicker-ce").val(rrdDateTimeString(date));
200    }
201
202    initShowEvent();
203    initTimeShift();
204  });
205
206
207</script>
208<?php echo $this->scope["custom_time_head"];?>
209
210</head>
211<body style="background-color: #ffffff;" onunload="g_refresh_timer=null">
212<?php if (((isset($this->scope["user_header"]) ? $this->scope["user_header"] : null) !== null)) {
213?>
214<?php echo Dwoo_Plugin_include($this, "user_header.tpl", null, null, null, '_root', null);?>
215
216<?php 
217}?>
218
219
220<?php if ((isset($this->scope["auth_system_enabled"]) ? $this->scope["auth_system_enabled"] : null)) {
221?>
222<div style="float:right">
223  <?php if ((isset($this->scope["username"]) ? $this->scope["username"] : null)) {
224?>
225    Currently logged in as: <?php echo $this->scope["username"];?> | <a href="logout.php">Logout</a>
226  <?php 
227}
228else {
229?>
230    You are not currently logged in. | <a href="login.php">Login</a>
231  <?php 
232}?>
233
234</div>
235<br style="clear:both"/>
236<?php 
237}?>
238
239
240<div id="tabs">
241<ul>
242  <li><a href="#tabs-main">Main</a></li>
243  <li><a href="#tabs-search">Search</a></li>
244  <li><a href="#tabs-main">Views</a></li>
245  <li><a href="aggregate_graphs.php">Aggregate Graphs</a></li>
246  <li><a href="#tabs-main">Compare Hosts</a></li>
247<?php if ((isset($this->scope["overlay_events"]) ? $this->scope["overlay_events"] : null)) {
248?>
249  <li><a href="events.php">Events</a></li>
250<?php 
251}?>
252
253  <li><a href="#tabs-autorotation" onclick="autoRotationChooser();">Automatic Rotation</a></li>
254  <li><a href="#tabs-livedashboard" onclick="liveDashboardChooser();">Live Dashboard</a></li> 
255  <li><a href="#tabs-mobile" onclick="window.location.href='mobile.php';">Mobile</a></li>
256</ul>
257
258<div id="tabs-main">
259<form action="<?php echo $this->scope["page"];?>" method="GET" name="ganglia_form">
260
261  <div style="background-color:#dddddd;padding:5px;">
262     <big style="float:left;"><b id="page_title"><?php echo $this->scope["page_title"];?> for <?php echo $this->scope["date"];?></b></big><input style="float:right;" class="header_btn" type="submit" value="Get Fresh Data"/><div style="clear:both"></div>
263  </div>
264<a id="logo" href="http://www.sara.nl/"><img style="float: left;" src="https://subtrac.sara.nl/images/sara_logo.png" alt="SARA" /></a>
265  <div style="padding:5px 5px 0 5px;">
266    <div style="float:left;" id="range_menu" class="nobr"><?php echo $this->scope["range_menu"];?></div>
267    <div style="float:left;" id="custom_range_menu"><?php echo $this->scope["custom_time"];?></div>
268    <div style="float:right;"><?php echo $this->scope["additional_buttons"];?>&nbsp;&nbsp;<?php echo $this->scope["alt_view"];?></div>
269    <div style="clear:both;"></div>
270  </div>
271  <div id="sort_menu" style="padding:5px 5px 0 5px;">
272   Metric&nbsp;&nbsp; <select name="m" id="metrics-picker"><?php echo $this->scope["picker_metrics"];?></select>&nbsp;&nbsp;
273     <?php echo $this->scope["sort_menu"];?>
274
275  </div>
276<?php if ((isset($this->scope["node_menu"]) ? $this->scope["node_menu"] : null) != "") {
277?>
278  <div id="sort_menu" style="padding:5px 5px 0 5px;">
279    <?php echo $this->scope["node_menu"];?>&nbsp;&nbsp;<?php echo $this->scope["additional_filter_options"];?>
280
281  </div>
282<?php 
283}?>
284
285
286<input type="hidden" name="tab" id="selected_tab" value="<?php echo $this->scope["selected_tab"];?>">
287<input type="hidden" id="vn" name="vn" value="<?php echo $this->scope["view_name"];?>">
288<?php if ((isset($this->scope["overlay_events"]) ? $this->scope["overlay_events"] : null)) {
289?>
290<input type="hidden" id="overlay_events" value="true">
291<?php 
292}
293else {
294?>
295<input type="hidden" id="overlay_events" value="false">
296<?php 
297}?>
298
299<hr size="1" noshade>
300<!-- End header.tpl -->
301<?php  /* end template body */
302return $this->buffer . ob_get_clean();
303?>
Note: See TracBrowser for help on using the repository browser.