summaryrefslogtreecommitdiff
path: root/torrus/templates/report-monthly.html
blob: c302f932d1dada654e3c6618130ef5b7b8564b0e (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
[% PROCESS 'html-incblocks.txt' %]
[% INCLUDE htmlstart
     title="Torrus Reports: " _ year
     contentClass="SingleColumnContent"
     noTopMenu=1 %]

<H1>Torrus report: [% monthName(month) %]
<A HREF="[% yearlyUrl(year) %]">[% year %]</A></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">Service ID</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>
</TR>
[%     rowCount = 0;
       FOREACH serviceid = fieldshash.keys.sort;
         rowCount = rowCount + 1;
         IF rowCount % 2 %]
<TR CLASS="ReportEvenRow">
[%       ELSE %]
<TR CLASS="ReportRow">
[%       END %]       
<TD CLASS="ReportFirstCell">
<A HREF="[% srvIdUrl(serviceid) %]">[% serviceid %]</A>
</TD>
[%       FOREACH varname = ['AVG', '95TH_PERCENTILE', 'MAX',
                            'UNAVAIL', 'VOLUME'] %]
<TD CLASS="ReportCell">
[% formatValue( fieldshash.$serviceid.$varname ) %]
</TD>
[%       END %]
</TR>
[%     END %]
</TABLE>

[% ELSE %]

<TABLE CLASS="ReportTable">
<CAPTION CLASS="ReportTable">[% reportname %]</CAPTION>
<TR CLASS="ReportHeadRow">
<TD CLASS="ReportHeadCell">Service ID</TD>
<TD CLASS="ReportHeadCell">Field</TD>
<TD CLASS="ReportHeadCell">Value</TD>
</TR>
[%     rowCount = 0;
       FOREACH serviceid = fieldshash.keys.sort;
         FOREACH varname = fieldshash.$serviceid.keys.sort;
           rowCount = rowCount + 1;
           IF rowCount % 2 %]
<TR CLASS="ReportEvenRow">
[%         ELSE %]
<TR CLASS="ReportRow">
[%         END %]       
<TD CLASS="ReportFirstCell">
<A HREF="[% srvIdUrl(serviceid) %]">[% serviceid %]</A>
</TD>
<TD CLASS="ReportCell">
[% varname %]
</TD>
<TD CLASS="ReportCell">
[% formatValue( fieldshash.$serviceid.$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>

[% INCLUDE htmlend %]