RT# 74537 - added checks in MyAccount.pm for config option ach read only
[freeside.git] / torrus / templates / report-monthly.html
1 [% PROCESS 'html-incblocks.txt' %]
2 [% INCLUDE htmlstart
3      title="Torrus Reports: " _ year
4      contentClass="SingleColumnContent"
5      noTopMenu=1 %]
6
7 <H1>Torrus report: [% monthName(month) %]
8 <A HREF="[% yearlyUrl(year) %]">[% year %]</A></H1>
9
10 [% INCLUDE treename %]
11
12 [% FOREACH reportname = data.keys.sort;
13      fieldshash = data.$reportname;
14      IF reportname == 'MonthlyUsage' %]
15
16 <TABLE CLASS="ReportTable">
17 <CAPTION CLASS="ReportTable">Monthly usage</CAPTION>
18 <TR CLASS="ReportHeadRow">
19 <TD CLASS="ReportHeadCell">Service ID</TD>
20 <TD CLASS="ReportHeadCell">Average</TD>
21 <TD CLASS="ReportHeadCell">95th<BR/>Percentile</TD>
22 <TD CLASS="ReportHeadCell">Maximum</TD>
23 <TD CLASS="ReportHeadCell">Unavailable<BR/>samples</TD>
24 <TD CLASS="ReportHeadCell">Volume</TD>
25 </TR>
26 [%     rowCount = 0;
27        FOREACH serviceid = fieldshash.keys.sort;
28          rowCount = rowCount + 1;
29          IF rowCount % 2 %]
30 <TR CLASS="ReportEvenRow">
31 [%       ELSE %]
32 <TR CLASS="ReportRow">
33 [%       END %]       
34 <TD CLASS="ReportFirstCell">
35 <A HREF="[% srvIdUrl(serviceid) %]">[% serviceid %]</A>
36 </TD>
37 [%       FOREACH varname = ['AVG', '95TH_PERCENTILE', 'MAX',
38                             'UNAVAIL', 'VOLUME'] %]
39 <TD CLASS="ReportCell">
40 [% formatValue( fieldshash.$serviceid.$varname ) %]
41 </TD>
42 [%       END %]
43 </TR>
44 [%     END %]
45 </TABLE>
46
47 [% ELSE %]
48
49 <TABLE CLASS="ReportTable">
50 <CAPTION CLASS="ReportTable">[% reportname %]</CAPTION>
51 <TR CLASS="ReportHeadRow">
52 <TD CLASS="ReportHeadCell">Service ID</TD>
53 <TD CLASS="ReportHeadCell">Field</TD>
54 <TD CLASS="ReportHeadCell">Value</TD>
55 </TR>
56 [%     rowCount = 0;
57        FOREACH serviceid = fieldshash.keys.sort;
58          FOREACH varname = fieldshash.$serviceid.keys.sort;
59            rowCount = rowCount + 1;
60            IF rowCount % 2 %]
61 <TR CLASS="ReportEvenRow">
62 [%         ELSE %]
63 <TR CLASS="ReportRow">
64 [%         END %]       
65 <TD CLASS="ReportFirstCell">
66 <A HREF="[% srvIdUrl(serviceid) %]">[% serviceid %]</A>
67 </TD>
68 <TD CLASS="ReportCell">
69 [% varname %]
70 </TD>
71 <TD CLASS="ReportCell">
72 [% formatValue( fieldshash.$serviceid.$varname ) %]
73 </TD>
74 </TR>
75 [%       END;
76        END %]
77 </TABLE>
78
79 [%   END;
80    END %]
81
82 <DIV CLASS="ReportLegend">
83
84 <DIV CLASS="ReportLegendLine">
85 <SPAN CLASS="ReportLegendTerm">
86 Average:
87 </SPAN>
88 <SPAN CLASS="ReportLegendDef">
89 the monthly average of 5-minute samples.
90 </SPAN>
91 </DIV>
92
93 <DIV CLASS="ReportLegendLine">
94 <SPAN CLASS="ReportLegendTerm">
95 95th percentile:
96 </SPAN>
97 <SPAN CLASS="ReportLegendDef">
98 95% of the time, the usage is at or below this amount.
99 </SPAN>
100 </DIV>
101
102 <DIV CLASS="ReportLegendLine">
103 <SPAN CLASS="ReportLegendTerm">
104 Maximum:
105 </SPAN>
106 <SPAN CLASS="ReportLegendDef">
107 the maximum value among 5-minute samples.
108 </SPAN>
109 </DIV>
110
111 <DIV CLASS="ReportLegendLine">
112 <SPAN CLASS="ReportLegendTerm">
113 Unavailable samples:
114 </SPAN>
115 <SPAN CLASS="ReportLegendDef">
116 how many 5-minute samples were missed from the measurements.
117 </SPAN>
118 </DIV>
119
120 <DIV CLASS="ReportLegendLine">
121 <SPAN CLASS="ReportLegendTerm">
122 Volume:
123 </SPAN>
124 <SPAN CLASS="ReportLegendDef">
125 for traffic usage, this is the absolut volume of data in avaiable 5-minute
126 samples.
127 </SPAN>
128 </DIV>
129
130 </DIV>
131
132 [% INCLUDE htmlend %]