4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7 <meta name="viewport" content="width=device-width, initial-scale=1">
8 <meta name="apple-mobile-web-app-capable" content="yes">
9 <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
10 <meta name="description" content="">
11 <meta name="author" content="costa@tsaousis.gr">
13 <title>NetData</title>
15 <!-- Google AJAX API -->
16 <script type="text/javascript" src="https://www.google.com/jsapi"></script>
17 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
20 <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
21 <!-- <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css"> -->
22 <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
23 <link href="/file/theme.css" rel="stylesheet">
26 <script type="text/javascript" src="/file/netdata.js"></script>
27 <script type="text/javascript" src="/file/jquery.visible.js"></script>
28 <script type="text/javascript">
30 // Set a callback to run when the Google Visualization API is loaded.
31 google.setOnLoadCallback(initCharts);
33 var TARGET_THUMB_GRAPH_WIDTH = 500; // chart width will range from 0.5 to 1.5 of that
34 var MINIMUM_THUMB_GRAPH_WIDTH = 400; // chart will generally try to be wider than that
35 var TARGET_THUMB_GRAPH_HEIGHT = 220;
36 var MAINCHART_MAX_TIME_TO_SHOW = 1200;
37 var THUMBS_MAX_TIME_TO_SHOW = 600;
41 var MODE_GROUP_THUMBS = 3;
42 var mode; // one of the MODE_* values
44 var mycharts = new Array();
47 // html for the main menu
51 // ------------------------------------------------------------------------
52 // common HTML generation
54 function chartIsLoadingHTML(width, height) { return "<table><tr><td align=\"center\" width=\"" + width + "\" height=\"" + height + "\" style=\"vertical-align:middle\"><h4><span class=\"glyphicon glyphicon-refresh\"></span><br/><br/>loading chart<br/><br/><span class=\"label label-default\">Please wait...</span></h4></td></tr></table>"; }
56 function showChartIsLoading(id, width, height) { document.getElementById(id).innerHTML = chartIsLoadingHTML(width, height); }
58 function thumbChartActions(i, c, nogroup) {
59 var refinfo = "the chart is drawing ";
60 if(c.group == 1) refinfo += "every single point collected.";
61 else refinfo += ((c.group_method == "average")?"the average":"the max") + " value for every " + (c.group * c.update_every) + " seconds of data";
63 var html = "<div class=\"btn-group btn-group\" data-toggle=\"tooltip\" title=\"" + refinfo + "\">"
64 + "<button type=\"button\" class=\"btn btn-default\" onclick=\"javascript: return;\"><span class=\"glyphicon glyphicon-info-sign\"></span></button>"
66 + "<div class=\"btn-group btn-group\"><button type=\"button\" class=\"btn btn-default disabled\"><small> " + c.name + "</small></button>";
70 var ingroup_detail = 0;
72 $.each(mycharts, function(i, d) {
73 if(d.group_tag == c.group_tag) {
75 if(d.isdetail) ingroup_detail++;
80 if(ingroup_detail) hidden = ", including " + ingroup_detail + " charts not shown now";
82 html += "<button type=\"button\" data-toggle=\"tooltip\" title=\"Show all " + ingroup + " charts in group '" + c.group_tag + "'" + hidden + "\" class=\"btn btn-default\" onclick=\"initGroupGraphs('" + c.group_tag +"');\"><span class=\"glyphicon glyphicon-th-large\"></span></button>";
85 html += "<button type=\"button\" data-toggle=\"tooltip\" title=\"show chart '" + c.name + "' in fullscreen\" class=\"btn btn-default\" onclick=\"initMainChartIndex(" + i +");\"><span class=\"glyphicon glyphicon-resize-full\"></span></button>"
86 + "<button type=\"button\" data-toggle=\"tooltip\" title=\"set options for chart '" + c.name + "'\" class=\"btn btn-default disabled\" onclick=\"alert('Not implemented yet!');\"><span class=\"glyphicon glyphicon-cog\"></span></button>"
87 + "<button type=\"button\" data-toggle=\"tooltip\" title=\"ignore chart '" + c.name + "'\" class=\"btn btn-default\" onclick=\"disableChart(" + i + ");\"><span class=\"glyphicon glyphicon-trash\"></span></button>"
93 function disableChart(i) {
97 chart = group_charts[i];
102 chart.enabled = false;
103 if(chart.chart) chart.chart.clearChart();
106 var div = document.getElementById(chart.div);
107 if(div) div.innerHTML = "";
109 div = document.getElementById(chart.div + "_parent");
110 if(div) div.innerHTML = "";
113 function chartssort(a, b) {
114 if(a.userpriority < b.userpriority) return -1;
119 // ------------------------------------------------------------------------
120 // MAINGRAPH = fullscreen view of 1 graph
122 // copy the chart c to mainchart
123 // switch to main graphs screen
124 function initMainChart(c) {
125 if(mainchart && mainchart.chart) {
126 mainchart.chart.clearChart();
127 mainchart.chart = null;
130 mainchart = $.extend(true, {}, c);
132 mainchart.chart = null;
133 mainchart.chartOptions.width = screenWidth();
134 mainchart.chartOptions.height = $(window).height() - 150;
135 if(mainchart.chartOptions.height < 300) mainchart.chartOptions.height = 300;
138 mainchart.div = 'maingraph';
139 mainchart.last_updated = 0;
141 if(mainchart.chartOptions.isStacked) mainchart.group = 5;
142 //mainchart.chartOptions.titlePosition = 'none';
143 mainchart.chartOptions.explorer = null;
145 // initialize the div
146 showChartIsLoading(mainchart.div, mainchart.chartOptions.width, mainchart.chartOptions.height);
148 // set the radio buttons
149 setMainChartGroupMethod(mainchart.group_method, 'no-refresh');
150 setMainChartMax('normal');
152 $('#group' + mainchart.group).trigger('click');
157 function initMainChartIndex(i) {
158 if(mode == MODE_GROUP_THUMBS)
159 initMainChart(group_charts[i]);
160 else if(mode == MODE_THUMBS)
161 initMainChart(mycharts[i]);
164 var last_main_chart_max='normal';
165 function setMainChartMax(m) {
166 if(!mainchart || mode != MODE_MAIN) return;
169 if(last_main_chart_max == 'maximized') m = 'normal';
170 else m = 'maximized';
173 if(m == "maximized") {
174 mainchart.chartOptions.theme = 'maximized';
175 //mainchart.chartOptions.axisTitlesPosition = 'in';
176 //mainchart.chartOptions.legend = {position: 'none'};
177 //mainchart.chartOptions.hAxis.title = null;
178 mainchart.chartOptions.hAxis.viewWindowMode = 'maximized';
179 mainchart.chartOptions.vAxis.viewWindowMode = 'maximized';
182 mainchart.chartOptions.theme = null;
183 mainchart.chartOptions.hAxis.viewWindowMode = null;
184 mainchart.chartOptions.vAxis.viewWindowMode = null;
186 $('.mainchart_max_button').button(m);
187 last_main_chart_max = m;
188 mainchart.last_updated = 0;
191 function setMainChartGroup(g) {
192 if(!mainchart || mode != MODE_MAIN) return;
195 mainchart.last_updated = 0;
199 var last_main_chart_avg = null;
200 function setMainChartGroupMethod(g, norefresh) {
201 if(!mainchart || mode != MODE_MAIN) return;
204 if(last_main_chart_avg == 'max') g = 'average';
208 mainchart.group_method = g;
210 $('.mainchart_avg_button').button(g);
213 mainchart.last_updated = 0;
217 last_main_chart_avg = g;
220 function setMainChartPlay(p) {
221 if(!mainchart) return;
224 if(stop_refreshing) p = 'play';
229 mainchart.chartOptions.explorer = null;
233 mainchart.chartOptions.explorer = {
234 'axis': 'horizontal',
237 mainchart.last_updated = 0;
239 if(!refreshChart(mainchart, pauseGraphs))
242 last_main_chart_play = p;
246 // ------------------------------------------------------------------------
249 function screenWidth() {
250 return (($(window).width() * 0.95) - 40);
253 // calculate the proper width for the thumb charts
254 function thumbWidth() {
255 var cwidth = screenWidth();
256 var items = Math.round(cwidth / TARGET_THUMB_GRAPH_WIDTH);
257 if(items < 1) items = 1;
259 if(items > 1 && (cwidth / items) < MINIMUM_THUMB_GRAPH_WIDTH) items--;
261 return Math.round(cwidth / items) - 1;
264 function groupWidth() {
265 var width = screenWidth() / 2;
266 if(width < 500) width = screenWidth();
271 // if the thumb charts need resize in their width, reset them
272 function resizeCharts() {
273 var width = screenWidth();
276 mainchart.chartOptions.width = width;
277 mainchart.chartOptions.height = $(window).height() - 200;
278 mainchart.last_updated = 0;
281 width = thumbWidth();
282 $.each(mycharts, function(i, c) {
283 if(c.enabled && c.chartOptions.width != width) {
284 if(c.chart) c.chart.clearChart();
286 c.chartOptions.width = width;
287 showChartIsLoading(c.div, c.chartOptions.width, c.chartOptions.height);
292 width = groupWidth();
293 if(group_charts) $.each(group_charts, function(i, c) {
294 if(c.enabled && c.chartOptions.width != width) {
295 if(c.chart) c.chart.clearChart();
297 c.chartOptions.width = width;
298 showChartIsLoading(c.div, c.chartOptions.width, c.chartOptions.height);
306 window.onresize = function(event) {
311 // ------------------------------------------------------------------------
312 // Core of the thread refreshing the charts
314 var stop_refreshing = 1;
315 var last_refresh = 0;
316 function playGraphs() {
317 if(!stop_refreshing) {
318 // check if the thread died due to a javascript error
319 var now = new Date().getTime();
320 if((now - last_refresh) > 5000) {
322 console.log('It seems the refresh thread died. Restarting it.');
329 $('.mainchart_play_button').button('play');
333 function pauseGraphs() {
334 if(stop_refreshing) return;
337 $('.mainchart_play_button').button('pause');
340 // refresh the proper chart
341 // this is an internal function.
342 // never call it directly, or new javascript threads will be spawn
344 function chartsRefresh() {
345 if(stop_refreshing) return;
347 last_refresh = new Date().getTime();
349 if(mode == MODE_THUMBS) thumbChartsRefresh();
350 else if(mode == MODE_GROUP_THUMBS) groupChartsRefresh();
351 else if(mode == MODE_MAIN) mainChartRefresh();
352 else timeout = setTimeout(triggerRefresh, 500);
355 // callback for refreshing the charts later
356 // this is an internal function.
357 // never call it directly, or new javascript threads will be spawn
358 function triggerRefresh() {
359 // cleanup has to take place when the charts are not refreshed
360 // since the refreshing thread is in this function, it means
361 // nothing is being refreshed.
364 if(mode == MODE_THUMBS) timeout = setTimeout(chartsRefresh, 200);
365 else if(mode == MODE_GROUP_THUMBS) timeout = setTimeout(chartsRefresh, 200);
366 else if(mode == MODE_MAIN) timeout = setTimeout(chartsRefresh, 200);
367 else timeout = setTimeout(triggerRefresh, 500);
370 // refresh the main chart
371 // make sure we don't loose the refreshing thread
372 function mainChartRefresh() {
373 if(mode != MODE_MAIN || !mainchart) {
378 mainchart.points_to_show = Math.round(mainchart.entries / mainchart.group) - 1;
380 if(mainchart.points_to_show * mainchart.group > MAINCHART_MAX_TIME_TO_SHOW)
381 mainchart.points_to_show = MAINCHART_MAX_TIME_TO_SHOW / mainchart.group;
383 if(!refreshChart(mainchart, triggerRefresh))
387 // refresh the thumb charts
388 // make sure we don't loose the refreshing thread
389 var last_thumb_updated = 0;
390 function thumbChartsRefresh() {
391 if(mycharts.length == 0 || mode != MODE_THUMBS) {
396 if(last_thumb_updated >= mycharts.length) last_thumb_updated = 0;
398 // find a chart to refresh
399 var orig = last_thumb_updated;
400 var refreshed = false;
402 last_thumb_updated++;
403 if(last_thumb_updated >= mycharts.length) last_thumb_updated = 0;
406 refreshed = refreshChart(mycharts[last_thumb_updated], chartsRefresh);
409 last_thumb_updated++;
410 if(last_thumb_updated >= mycharts.length) last_thumb_updated = 0;
411 if(last_thumb_updated == orig) break;
414 // no chart refreshed
415 if(!refreshed) triggerRefresh();
418 // refresh the group charts
419 // make sure we don't loose the refreshing thread
420 var last_group_updated = 0;
421 function groupChartsRefresh() {
422 if(!group_charts || group_charts.length == 0 || mode != MODE_GROUP_THUMBS) {
427 if(last_group_updated >= group_charts.length) last_group_updated = 0;
429 // find a chart to refresh
430 var orig = last_group_updated;
431 var refreshed = false;
433 last_group_updated++;
434 if(last_group_updated >= group_charts.length) last_group_updated = 0;
437 refreshed = refreshChart(group_charts[last_group_updated], chartsRefresh);
440 last_group_updated++;
441 if(last_group_updated >= group_charts.length) last_group_updated = 0;
442 if(last_group_updated == orig) break;
445 // no chart refreshed
446 if(!refreshed) triggerRefresh();
450 // ------------------------------------------------------------------------
451 // switch the screen between views
452 // these should be called only from initXXXX()
454 // cleanup the previously shown charts
455 function cleanupCharts() {
456 if(mode != MODE_MAIN && mainchart) {
457 if(mainchart.chart) {
458 mainchart.chart.clearChart();
459 mainchart.chart = null;
464 if(mode != MODE_GROUP_THUMBS && group_charts) {
468 // we never cleanup the thumb charts
471 var thumbsScrollPosition = null;
472 function switchToMainGraph() {
473 if(!mainchart) return;
475 if(!group_charts) thumbsScrollPosition = window.pageYOffset;
477 document.getElementById('maingraph_container').style.display = 'block';
478 document.getElementById('thumbgraphs_container').style.display = 'none';
479 document.getElementById('groupgraphs_container').style.display = 'none';
481 document.getElementById("main_menu_div").innerHTML = "<ul class=\"nav navbar-nav\"><li><a href=\"javascript:switchToThumbGraphs();\">Back to Home</a></li><li class=\"active\"><a href=\"#\">" + mainchart.title + "</a></li></ul>";
487 function switchToThumbGraphs() {
488 document.getElementById('maingraph_container').style.display = 'none';
489 document.getElementById('thumbgraphs_container').style.display = 'block';
490 document.getElementById('groupgraphs_container').style.display = 'none';
492 document.getElementById("main_menu_div").innerHTML = mainmenu;
494 if(thumbsScrollPosition) window.scrollTo(0, thumbsScrollPosition);
500 $('[data-spy="scroll"]').each(function () {
501 var $spy = $(this).scrollspy('refresh')
505 function switchToGroupGraphs() {
506 if(!group_charts) return;
508 if(!mainchart) thumbsScrollPosition = window.pageYOffset;
510 document.getElementById('maingraph_container').style.display = 'none';
511 document.getElementById('thumbgraphs_container').style.display = 'none';
512 document.getElementById('groupgraphs_container').style.display = 'block';
514 document.getElementById("main_menu_div").innerHTML = "<ul class=\"nav navbar-nav\"><li><a href=\"javascript:switchToThumbGraphs();\">Back to Home</a></li><li class=\"active\"><a href=\"#\">" + group_charts[0].group_tag + " charts</a></li></ul>";
516 window.scrollTo(0, 0);
518 mode = MODE_GROUP_THUMBS;
523 // ------------------------------------------------------------------------
526 var group_charts = null;
527 function initGroupGraphs(group) {
528 var width = groupWidth();
529 var height = (($(window).height() - 130) / 3) - 10;
530 if(height < TARGET_THUMB_GRAPH_HEIGHT) height = TARGET_THUMB_GRAPH_HEIGHT;
534 if(group_charts) clearGroupGraphs();
535 group_charts = new Array();
538 $.each(mycharts, function(i, c) {
539 if(c.group_tag == group) {
540 group_charts[count] = [];
541 group_charts[count] = $.extend(true, {}, c);
542 group_charts[count].div += "_group";
543 group_charts[count].enabled = true;
544 group_charts[count].chart = null;
545 group_charts[count].last_updated = 0;
547 group_charts[count].chartOptions.width = width;
548 group_charts[count].chartOptions.height = height;
552 group_charts.sort(chartssort);
555 $.each(group_charts, function(i, c) {
556 groupbody += "<div class=\"thumbgraph\" id=\"" + c.div + "_parent\"><table><tr><td><div class=\"thumbgraph\" id=\"" + c.div + "\">" + chartIsLoadingHTML(c.chartOptions.width, c.chartOptions.height) + "</div></td></tr><tr><td align=\"center\">" + thumbChartActions(i, c, 'nogroup') + "</td></tr></table></div>";
560 document.getElementById("groupgraphs").innerHTML = groupbody;
561 switchToGroupGraphs();
564 function clearGroupGraphs() {
565 if(group_charts && group_charts.length) {
566 $.each(group_charts, function(i, c) {
567 if(c.chart) c.chart.clearChart();
574 document.getElementById("groupgraphs").innerHTML = "";
578 // ------------------------------------------------------------------------
579 // Global entry point
580 // initialize the thumb charts
582 // load the charts from the server
583 // generate html for the thumbgraphs to support them
584 function initCharts() {
585 var width = thumbWidth();
586 var height = TARGET_THUMB_GRAPH_HEIGHT;
588 loadCharts(null, function(c) {
591 if(mycharts == null || mycharts.length == 0) {
592 alert("Cannot load data from server.");
596 var thumbsContainer = document.getElementById("thumbgraphs");
597 if(!thumbsContainer) {
598 alert("Cannot find the thumbsContainer");
602 mycharts.sort(chartssort);
604 document.getElementById('hostname_id').innerHTML = mycharts[0].hostname;
605 document.title = mycharts[0].hostname;
607 // create an array for grouping all same-type graphs together
608 var categories = new Array();
609 $.each(mycharts, function(i, c) {
610 c.chartOptions.width = width;
611 c.chartOptions.height = height;
613 // calculate how many point to show for each chart
614 c.points_to_show = Math.round(c.entries / c.group) - 1;
616 // show max 10 mins of data
617 if(c.points_to_show * c.group > THUMBS_MAX_TIME_TO_SHOW) c.points_to_show = THUMBS_MAX_TIME_TO_SHOW / c.group;
621 var h = "<div class=\"thumbgraph\" id=\"" + c.div + "_parent\"><table><tr><td><div class=\"thumbgraph\" id=\"" + c.div + "\">" + chartIsLoadingHTML(c.chartOptions.width, c.chartOptions.height) + "</div></td></tr><tr><td align=\"center\">"
622 + thumbChartActions(i, c)
623 + "</td></tr></table></div>";
625 // find the categories object for this type
626 for(j = 0; j < categories.length ;j++) {
627 if(categories[j].name == c.type) {
628 categories[j].html += h;
629 categories[j].count++;
634 if(j == categories.length) {
635 categories.push({name: c.type, title: c.category, description: '', priority: 0, count: 1, glyphicon: c.glyphicon, html: h});
640 $.each(categories, function(i, a) {
641 if(a.name == "system") a.priority = 1;
642 else if(a.name == "net") a.priority = 2;
643 else if(a.name == "tc") a.priority = 3;
644 else if(a.name == "conntrack") a.priority = 4;
645 else if(a.name == "ipvs") a.priority = 5;
646 else if(a.name == "ipv4") a.priority = 6;
647 else if(a.name == "cpu") a.priority = 7;
648 else if(a.name == "mem") a.priority = 8;
649 else if(a.name == "disk") a.priority = 9;
650 else a.priority = 99;
652 a.html = "<tr><td id=\"" + a.name + "\"><ol class=\"breadcrumb graphs\"><li class=\"active\"><span class=\"glyphicon " + a.glyphicon + "\"></span> <a id=\"" + a.name + "\" href=\"#" + a.name + "\"><b>" + a.title + "</b> " + a.description + " </a></li></ol></td></tr><tr><td><div class=\"thumbgraphs\">" + a.html + "</td></tr>";
655 function categoriessort(a, b) {
656 if(a.priority < b.priority) return -1;
659 categories.sort(categoriessort);
661 // combine all the htmls into one
662 var allcategories = "<table width=\"100%\">";
663 mainmenu = "<ul class=\"nav navbar-nav\"><li><a href=\"#\">Home</a></li>";
664 $.each(categories, function(i, a) {
665 allcategories += a.html;
666 mainmenu += "<li><a href=\"#" + a.name + "\">" + a.title + "</a></li>";
668 allcategories += "</table>";
671 thumbsContainer.innerHTML = allcategories;
672 $('[data-toggle="tooltip"]').tooltip({'placement': 'top', 'container': 'body', 'html': true});
673 switchToThumbGraphs();
680 <body role="document" data-spy="scroll" data-target="#main_menu_div">
681 <nav id="mynav" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
682 <div class="container">
683 <div class="navbar-header">
684 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main_menu_div">
685 <span class="sr-only">Toggle navigation</span>
686 <span class="icon-bar"></span>
687 <span class="icon-bar"></span>
688 <span class="icon-bar"></span>
690 <a class="navbar-brand" href="javascript:switchToThumbGraphs();" id="hostname_id">NetData</a>
692 <div class="collapse navbar-collapse" id="main_menu_div">
693 <ul class="nav navbar-nav">
694 <li><a href="#">Home</a></li>
696 </div><!--/.nav-collapse -->
700 <div class="container graphs" id="maingraph_container" style="display: none">
703 <div class="maingraph">
706 <div class="maingraph" id="maingraph"></div>
708 <tr><td align="center">
709 <div class="btn-group">
710 <form id="mainchartform">
711 <div class="btn-group btn-group" data-toggle="tooltip" title=" click <span class='glyphicon glyphicon-play'></span> to have the graph auto-refresh, or click <span class='glyphicon glyphicon-pause'></span> to pause the graph. When paused the graph can be zoomed and panned horizontally." >
712 <button type="button" class="btn btn-primary mainchart_play_button" data-play-text="<span class='glyphicon glyphicon-pause'></span>" data-pause-text="<span class='glyphicon glyphicon-play'></span>" onClick="setMainChartPlay('toggle');">
713 <span class="glyphicon glyphicon-pause"></span>
716 <div class="btn-group btn-group" data-toggle="tooltip" title="use the maximum ( <span class='glyphicon glyphicon-signal'></span> ) or the average ( <span class='glyphicon glyphicon-align-justify'></span> ) value of grouped points" >
717 <button type="button" class="btn btn-primary mainchart_avg_button" data-max-text="<span class='glyphicon glyphicon-signal'></span>" data-average-text="<span class='glyphicon glyphicon-align-justify'></span>" onClick="setMainChartGroupMethod('toggle');">
718 <span class="glyphicon glyphicon-signal"></span>
721 <!-- <div class="btn-group btn-group" data-toggle="buttons">
722 <label class="btn btn-primary" data-toggle="tooltip" title="show the MAX point among all points grouped">
723 <input type="radio" name="groupmethod" id="groupmax" onChange="setMainChartGroupMethod('max');">
724 <span class="glyphicon glyphicon-signal"></span>
726 <label class="btn btn-primary" data-toggle="tooltip" title="show the AVERAGE of all points grouped">
727 <input type="radio" name="groupmethod" id="groupaverage" onChange="setMainChartGroupMethod('average');">
728 <span class="glyphicon glyphicon-align-justify"></span>
731 --> <div class="btn-group btn-group" data-toggle="buttons" >
732 <label class="btn btn-primary" data-toggle="tooltip" title="do not group points, show the raw data">
733 <input type="radio" name="group" id="group1" onChange="setMainChartGroup(1);">1
736 <label class="btn btn-primary" data-toggle="tooltip" title="group in half, show 1 every 2 points of data">
737 <input type="radio" name="group" id="group2" onChange="setMainChartGroup(2);">2
740 <label class="btn btn-primary" data-toggle="tooltip" title="group every 5 points of data">
741 <input type="radio" name="group" id="group5" onChange="setMainChartGroup(5);">5
743 <label class="btn btn-primary" data-toggle="tooltip" title="group every 10 points of data">
744 <input type="radio" name="group" id="group10" onChange="setMainChartGroup(10);">10
746 <label class="btn btn-primary" data-toggle="tooltip" title="group every 15 points of data">
747 <input type="radio" name="group" id="group15" onChange="setMainChartGroup(15);">15
749 <label class="btn btn-primary" data-toggle="tooltip" title="group every 20 points of data">
750 <input type="radio" name="group" id="group20" onChange="setMainChartGroup(20);">20
752 <label class="btn btn-primary" data-toggle="tooltip" title="group every 30 points of data">
753 <input type="radio" name="group" id="group30" onChange="setMainChartGroup(30);">30
755 <label class="btn btn-primary" data-toggle="tooltip" title="group every 45 points of data">
756 <input type="radio" name="group" id="group45" onChange="setMainChartGroup(45);">45
758 <label class="btn btn-primary" data-toggle="tooltip" title="group every 60 points of data">
759 <input type="radio" name="group" id="group60" onChange="setMainChartGroup(60);">60
762 <div class="btn-group btn-group" data-toggle="tooltip" title="maximized ( <span class='glyphicon glyphicon-fullscreen'></span> ) or normal ( <span class='glyphicon glyphicon-resize-small'></span> ) view of the graph" >
763 <button type="button" class="btn btn-primary mainchart_max_button" data-maximized-text="<span class='glyphicon glyphicon-resize-small'></span>" data-normal-text="<span class='glyphicon glyphicon-fullscreen'></span>" onClick="setMainChartMax('toggle');">
764 <span class="glyphicon glyphicon-fullscreen"></span>
767 <!-- <div class="btn-group btn-group" data-toggle="buttons" >
768 <label class="btn btn-primary" data-toggle="tooltip" title="NORMAL chart size">
769 <input type="radio" name="chartmax" id="chartnormal" onChange="setMainChartMax('normal');">
770 <span class="glyphicon glyphicon-resize-small"></span>
772 <label class="btn btn-primary" data-toggle="tooltip" title="MAXIMIZED chart size">
773 <input type="radio" name="chartmax" id="chartmax" onChange="setMainChartMax('maximized');">
774 <span class="glyphicon glyphicon-fullscreen"></span>
781 </div><!-- /.maingraph -->
786 <div class="container graphs" id="thumbgraphs_container">
787 <div class="allgraphs" id="thumbgraphs">
789 <tr><td id="splash" align="center" style="vertical-align:middle">
791 Welcome to <b>NetData</b>!
793 <span class="glyphicon glyphicon-off"></span>
797 <span class="label label-default">Please wait...</span>
804 <div class="container graphs" id="groupgraphs_container">
805 <div class="allgraphs" id="groupgraphs">
809 <script type='text/javascript'>
810 $(document).ready(function(){
811 document.getElementById('splash').height = $(window).height();
813 $(document).on('click','.navbar-collapse.in',function(e) {
814 if( $(e.target).is('a') ) {
815 $(this).collapse('hide');
819 $('body').scrollspy({ target: '#main_menu_div' })