extern const char *stats_html_signature;\r
extern char *jquery_url;\r
extern int keywordcount;\r
-extern long long int line;\r
extern int dry_run;\r
extern int qos_proxy;\r
extern char *title;\r
extern char *lms_url;\r
extern char *log_dir;\r
extern char *ip6prefix;\r
+extern int traffic_detected;\r
\r
const char *tr_odd_even(void);\r
/* implemented in prometheus.c, shared with parselogs.c */\r
count++; \r
}\r
#ifdef DEBUG\r
- printf("Total groups: %d Total bandwidth requested: %d kb/s\nAGGREGATION: 1/%d\n",\r
- count, i, i/line);\r
+ printf("Total groups: %d Total bandwidth requested: %d kb/s\n",\r
+ count, i, i);\r
#endif\r
fprintf(f,"</tr></tbody>\n\\r
<thead><tr>\n\\r
-<th colspan=\"2\" style=\"text-align: left\">Line %Ld kb/s</td>",line);\r
+<th colspan=\"2\" style=\"text-align: left\"></td>");\r
fprintf(f,"<th style=\"text-align: right\">%d</td><th style=\"text-align: right\">%d kb/s</td>",total,i);\r
\r
for_each(keyword, keywords) if(keyword->ip_count)\r
{\r
fprintf(f,"<th style=\"text-align: right\">%d IPs</th>",keyword->ip_count);\r
}\r
- fprintf(f,"</tr><tr><th colspan=\"4\">Aggregation 1/%d</th>\n", (int)(0.5+i/line));\r
+ fprintf(f,"</tr><tr><th colspan=\"4\"></th>\n");\r
fprintf(f,"<th colspan=\"%d\">%d traffic classes</th></tr>\n", keywordcount, total);\r
\r
fputs("</thead></table>\n",f);\r
int active_classes = 0;\r
// int colspan = 14;\r
struct Sum {unsigned long long l; int i; list(Sum);} *sum,*sums = NULL;\r
- int limit_count = 0, prio_count = 0;\r
+ int agreg_count = 0, limit_count = 0, prio_count = 0;\r
int popup_button = 0;\r
/* IPv6 vs. IPv4 stats */\r
unsigned long long pkts4 =0, pkts6 = 0, bytes4 = 0, bytes6 = 0;\r
char *f1="", *f2="";\r
i++;\r
\r
- if(ip->max < ip->desired) \r
+ if(ip->aggregated > 1)\r
+ {\r
+ f1 = "<span style=\"color:green\">";\r
+ f2 = "</span>"; \r
+ agreg_count++;\r
+ }\r
+ else if(ip->max < ip->desired) \r
{\r
f1 = "<span style=\"color:red\">";\r
f2 = "</span>"; \r
insert(sum,sums,order_by,i);\r
}\r
\r
- if(!just_preview)\r
+ if(!just_preview && traffic_detected)\r
{\r
append_log(ip);\r
for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing))\r
append_log(sharedip);\r
}\r
}\r
+ else\r
+ {\r
+ printf(".");\r
+ }\r
}\r
fprintf(f, "</tbody><thead><tr>\n\\r
<th colspan=\"5\" style=\"text-align: left\">%d CLASSES</th>", i);\r
*/\r
fprintf(f, "<th style=\"text-align: right\">%Lu</th><th style=\"text-align: right\">%d</th>",\r
total_direct, total_pktdown/i);\r
- fprintf(f, "<th colspan=\"6\"><span style=\"color:red\">LIMIT %dx</span> \\r
-<span style=\"color:brown\">LOW-PRIO %dx</span></th></tr>\n</thead></table>\n",\r
- limit_count, prio_count);\r
+ fprintf(f, "<th colspan=\"6\">\\r
+<span style=\"color:green\">AGR %dx</span> \\r
+<span style=\"color:red\">FUP %dx</span> \\r
+<span style=\"color:brown\">PRIO %dx</span></th></tr>\n</thead></table>\n",\r
+ agreg_count, limit_count, prio_count);\r
\r
if(ip6prefix)\r
{ \r