do not write empty logs when started
[svn/Prometheus-QoS/.git] / htmlandlogs.c
index 70377848b7c501bd89f458541495d637d9ecf941..bff5cb3a5ec3de2479eb23ce5261bb6a071b3135 100644 (file)
@@ -14,7 +14,6 @@ extern const char *version;
 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
@@ -23,6 +22,7 @@ extern int found_lmsid;
 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
@@ -100,19 +100,19 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview)
    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
@@ -403,7 +403,7 @@ style=\"cursor: pointer;\">+%d</a>]</span>",
     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
This page took 0.139725 seconds and 4 git commands to generate.