@cryptotaxi247 / netdata-1 / commits / a8c3c20ca

various fixes

Costa Tsaousis (ktsaou) committed Mar 30, 2014 at 23:49 UTC a8c3c20cad3fc37a348d7c98840d8e8bf6304e9e
1 file changed +16 -17
web/index.html
+16 -17
@@ -103,8 +103,6 @@
103 var go_thumbs = 0;
104 var go_main = 0;
105 function drawCharts() {
106 - var now = new Date().getTime();
107 -
106 myChartsRefreshInternal(mycharts.length);
107 };
108
@@ -150,11 +148,13 @@
148
149 if(c.type == "tc") {
150 c.category = "Quality of Service"
151 + c.glyphicon = "glyphicon-transfer";
152 c.group = 30;
153 c.group_method = "average";
154 }
155 else if(c.type == "net") {
156 c.category = "Network Traffic"
157 + c.glyphicon = "glyphicon-cloud";
158 c.group = 10;
159 c.group_method = "max";
160
@@ -164,26 +164,31 @@
164 }
165 else if(c.type == "ipv4") {
166 c.category = "IPv4 connections"
167 + c.glyphicon = "glyphicon-resize-full";
168 c.group = 30;
169 c.group_method = "max";
170 }
171 else if(c.type == "conntrack") {
172 c.category = "Netfilter Connections Tracked"
173 + c.glyphicon = "glyphicon-eye-open";
174 c.group = 30;
175 c.group_method = "max";
176 }
177 else if(c.type == "ipvs") {
178 c.category = "IPVS"
179 + c.glyphicon = "glyphicon-sort";
180 c.group = 30;
181 c.group_method = "max";
182 }
183 else if(c.type == "disk") {
184 c.category = "Disk I/O"
185 + c.glyphicon = "glyphicon-floppy-disk";
186 c.group = 20;
187 c.group_method = "max";
188 }
189 else {
190 c.category = "Unknown"
191 + c.glyphicon = "glyphicon-search";
192 c.group = 60;
193 c.group_method = "max";
194 }
@@ -199,7 +204,7 @@
204
205 if(c.enabled) {
206 var j;
202 - var h = "<div class=\"thumbgraph\"><table><tr><td><div class=\"thumbgraph\" id=\"" + c.div + "\">" + c.name + "</div></td></tr><tr><td align=\"center\"><div class=\"btn-group-xs\"><button type=\"button\" class=\"btn btn-default\" onclick=\"setMainChart(" + i +");\">&nbsp;&nbsp;select " + c.name + " for zoom&nbsp;&nbsp;</button></div></td></tr></table></div>";
207 + var h = "<div class=\"thumbgraph\"><table><tr><td><div class=\"thumbgraph\" id=\"" + c.div + "\"><table><tr><td align=\"center\" width=\"" + c.width + "\" height=\"" + c.height + "\"><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></div></td></tr><tr><td align=\"center\"><div class=\"btn-group-xs\"><button type=\"button\" class=\"btn btn-default\" onclick=\"setMainChart(" + i +");\">&nbsp;&nbsp;select " + c.name + " for zoom&nbsp;&nbsp;</button></div></td></tr></table></div>";
208
209 // find the categories object for this type
210 for(j = 0; j < categories.length ;j++) {
@@ -212,7 +217,7 @@
217
218 if(j == categories.length) {
219 var t = "(as " + c.group_method + " every " + (c.group*c.update_every) + " seconds)";
215 - categories.push({name: c.type, title: c.category, description: t, priority: 0, count: 1, html: h});
220 + categories.push({name: c.type, title: c.category, description: t, priority: 0, count: 1, glyphicon: c.glyphicon, html: h});
221 }
222 }
223 });
@@ -226,7 +231,7 @@
231 else if(a.name == "disk") a.priority = 6;
232 else a.priority = 4;
233
229 - a.html = "<tr><td><ol class=\"breadcrumb graphs\"><li class=\"active\"><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>";
234 + a.html = "<tr><td><ol class=\"breadcrumb graphs\"><li class=\"active\"><span class=\"glyphicon " + a.glyphicon + "\"></span> &nbsp; <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>";
235 });
236
237 function categoriessort(a, b) {
@@ -298,17 +303,8 @@
303 setInterval(myChartsRefresh, 500);
304
305 window.onresize = function(event) {
301 - var ot = go_thumbs;
302 - var om = go_main;
303 -
304 - go_thumbs = 0;
305 - go_main = 0;
306 -
306 resizeCharts();
307 drawCharts();
309 -
310 - go_thumbs = ot;
311 - go_main = om;
308 };
309
310 function showMainGraph() {
@@ -352,9 +348,12 @@
348 <div class="collapse navbar-collapse">
349 <ul class="nav navbar-nav">
350 <li class="active"><a href="#">Home</a></li>
355 - <li><a href="#net">net</a></li>
356 - <li><a href="#tc">tc</a></li>
357 - <li><a href="#disk">disk</a></li>
351 + <li><a href="#net">Network</a></li>
352 + <li><a href="#tc">QoS</a></li>
353 + <li><a href="#conntrack">Netfilter</a></li>
354 + <li><a href="#ipv4">IPv4</a></li>
355 + <li><a href="#ipvs">IPVS</a></li>
356 + <li><a href="#disk">Disk</a></li>
357 </ul>
358 </div><!--/.nav-collapse -->
359 </div>