summaryrefslogtreecommitdiff
path: root/torrus/templates/report-serviceid.html
blob: bd392ca0189f5b0bd2691e2fd0e5b7de6b1ebddd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
[% PROCESS 'html-incblocks.txt' %]
[% INCLUDE htmlstart
     title="Torrus Reports: " _ year
     contentClass="SingleColumnContent"
     noTopMenu=1 %]

<H1>Torrus report: <A HREF="[% yearlyUrl(year) %]">[% year %]</A>,
[% serviceid %]</H1>

[% INCLUDE treename %]

[% FOREACH reportname = data.keys.sort;
     fieldshash = data.$reportname;
     IF reportname == 'MonthlyUsage' %]

<TABLE CLASS="ReportTable">
<CAPTION CLASS="ReportTable">Monthly usage</CAPTION>
<TR CLASS="ReportHeadRow">
<TD CLASS="ReportHeadCell">Month</TD>
<TD CLASS="ReportHeadCell">Average</TD>
<TD CLASS="ReportHeadCell">95th<BR/>Percentile</TD>
<TD CLASS="ReportHeadCell">Maximum</TD>
<TD CLASS="ReportHeadCell">Unavailable<BR/>samples</TD>
<TD CLASS="ReportHeadCell">Volume</TD>
<TD CLASS="ReportHeadCell">Extrapolated<BR/>volume</TD>
</TR>
[%     rowCount = 0;
       FOREACH mth = fieldshash.keys.sort;
         rowCount = rowCount + 1;
         IF rowCount % 2 %]
<TR CLASS="ReportEvenRow">
[%       ELSE %]
<TR CLASS="ReportRow">
[%       END %]       
<TD CLASS="ReportFirstCell">
<A HREF="[% monthlyUrl(mth) %]">[% monthName(mth) %]</A>
</TD>
[%       FOREACH varname = ['AVG', '95TH_PERCENTILE', 'MAX',
                            'UNAVAIL', 'VOLUME'] %]
<TD CLASS="ReportCell">
[% formatValue( fieldshash.$mth.$varname ) %]
</TD>
[%       END %]
<TD CLASS="ReportCell">
[% extr.value = fieldshash.$mth.VOLUME.value * 100 /
                 ( 100 - fieldshash.$mth.UNAVAIL.value );
   extr.units = fieldshash.$mth.VOLUME.units;
   formatValue( extr ) %]
</TD>
</TR>
[%     END %]
</TABLE>

[% ELSE %]

<TABLE CLASS="ReportTable">
<CAPTION CLASS="ReportTable">[% reportname %]</CAPTION>
<TR CLASS="ReportHeadRow">
<TD CLASS="ReportHeadCell">Month</TD>
<TD CLASS="ReportHeadCell">Field</TD>
<TD CLASS="ReportHeadCell">Value</TD>
</TR>
[%     rowCount = 0;
       FOREACH mth = fieldshash.keys.sort;
         FOREACH varname = fieldshash.$mth.keys.sort;
           rowCount = rowCount + 1;
           IF rowCount % 2 %]
<TR CLASS="ReportEvenRow">
[%         ELSE %]
<TR CLASS="ReportRow">
[%         END %]       
<TD CLASS="ReportFirstCell">
<A HREF="[% monthlyUrl(mth) %]">[% monthName(mth) %]</A>
</TD>
<TD CLASS="ReportCell">
[% varname %]
</TD>
<TD CLASS="ReportCell">
[% formatValue( fieldshash.$mth.$varname ) %]
</TD>
</TR>
[%       END;
       END %]
</TABLE>
[%   END;
   END %]

<DIV CLASS="ReportLegend">

<DIV CLASS="ReportLegendLine">
<SPAN CLASS="ReportLegendTerm">
Average:
</SPAN>
<SPAN CLASS="ReportLegendDef">
the monthly average of 5-minute samples.
</SPAN>
</DIV>

<DIV CLASS="ReportLegendLine">
<SPAN CLASS="ReportLegendTerm">
95th percentile:
</SPAN>
<SPAN CLASS="ReportLegendDef">
95% of the time, the usage is at or below this amount.
</SPAN>
</DIV>

<DIV CLASS="ReportLegendLine">
<SPAN CLASS="ReportLegendTerm">
Maximum:
</SPAN>
<SPAN CLASS="ReportLegendDef">
the maximum value among 5-minute samples.
</SPAN>
</DIV>

<DIV CLASS="ReportLegendLine">
<SPAN CLASS="ReportLegendTerm">
Unavailable samples:
</SPAN>
<SPAN CLASS="ReportLegendDef">
how many 5-minute samples were missed from the measurements.
</SPAN>
</DIV>

<DIV CLASS="ReportLegendLine">
<SPAN CLASS="ReportLegendTerm">
Volume:
</SPAN>
<SPAN CLASS="ReportLegendDef">
for traffic usage, this is the absolut volume of data in avaiable 5-minute
samples.
</SPAN>
</DIV>

<DIV CLASS="ReportLegendLine">
<SPAN CLASS="ReportLegendTerm">
Extrapolated volume:
</SPAN>
<SPAN CLASS="ReportLegendDef">
for traffic usage, this is the volume of data extrapolated to the whole
time range.
</SPAN>
</DIV>
</DIV>

[% INCLUDE htmlend %]