"Fossies" - the Fresh Open Source Software Archive

Member "ganglia-web-3.7.2/templates/default/header.tpl" (12 Oct 2015, 10952 Bytes) of package /linux/www/ganglia-web-3.7.2.tar.gz:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

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