summaryrefslogtreecommitdiff
path: root/html/network.tmpl
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2011-10-08 07:43:51 +0200
committeranbr <vdr07@deltab.de>2011-10-08 07:43:51 +0200
commit85d4bfa04ce28b5ec3eb0054306c43bc59c55128 (patch)
treed7878021068d70e2a4ab3044beb5f770a57fc980 /html/network.tmpl
parenta71b70567ed73853367d972a95d2a346b2f93989 (diff)
downloadxxv-85d4bfa04ce28b5ec3eb0054306c43bc59c55128.tar.gz
xxv-85d4bfa04ce28b5ec3eb0054306c43bc59c55128.tar.bz2
Merge skins into common directory
Diffstat (limited to 'html/network.tmpl')
-rw-r--r--html/network.tmpl100
1 files changed, 0 insertions, 100 deletions
diff --git a/html/network.tmpl b/html/network.tmpl
deleted file mode 100644
index 5e39706..0000000
--- a/html/network.tmpl
+++ /dev/null
@@ -1,100 +0,0 @@
-<?%
- USE date;
- statusfiles = {};
-
- FILTER null;
- fields = data.shift;
-
- timestamps = [];
- FOREACH row = data;
- iname = row.0.split(':').first;
-
- rxbytes.${iname} = [];
- txbytes.${iname} = [];
- rxerror.${iname} = [];
- txerror.${iname} = [];
-
- oldentry.${iname} = [];
- END;
-
- FOREACH row = data;
- IF ot != row.5;
- t = date.format(row.5, '%H:%M');
- timestamps.push(t);
- ot = row.5;
- END;
-
- iname = row.0.split(':').first;
-
- UNLESS oldentry.${iname}.size;
- oldentry.${iname} = row;
- END;
-
- bytes = row.1 - oldentry.${iname}.1;
- rxbytes.${iname}.push(bytes / (1024*1024));
-
- bytes = row.3 - oldentry.${iname}.3;
- txbytes.${iname}.push(bytes / (1024*1024));
-
- oldentry.${iname} = row;
- END;
-
- FOREACH iname = rxbytes.keys.sort;
-
- # Data ...
- d = [
- timestamps,
- rxbytes.${iname},
- txbytes.${iname}
- ];
-
- USE my_graph = GD.Graph.lines(600,300);
-
- # Xsteps
- steps = timestamps.size div 5;
- label = gettext('Traffic on Interface');
- y_label = gettext('MB')
- label = "${label} ${iname} (${y_label})";
- my_graph.set(
- title => label,
- x_label_skip => steps,
- x_long_ticks => 1,
-
- y_long_ticks => 1,
-
- line_width => 2,
- box_axis => 1,
- boxclr => '#FFFFCC',
- fgclr => '#BBBBBB'
- legend_placement => 'RD',
- legend_spacing => 5,
- );
- my_graph.set_title_font(param.font,10);
- my_graph.set_y_label_font(param.font,10);
- my_graph.set_x_label_font(param.font,10);
- my_graph.set_x_axis_font(param.font,6);
- my_graph.set_y_axis_font(param.font,6);
- my_graph.set_legend( fields.1, fields.3);
- statusfiles.$iname = writefile("status_network_${iname}.png", my_graph.plot(d).gif );
- END;
- END;
- %?>
-
-<!-- Network Template -->
-<?% IF param.headingText %?>
-<table width=100%><tr><td class='tableheader'><h3><?% param.headingText %?></h3>
-<?% END %?>
-<table border="0" width="95%">
-
- <?% FOREACH file = statusfiles.keys %?>
- <tr>
- <td colspan="<?% fields.size %?>" align=center>
- <img src="<?% statusfiles.$file %?>">
- </td>
- </tr>
- <?% END %?>
-</table>
-<?% IF param.headingText %?>
-</td></tr></table>
-<p>
-<?% END %?>