X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=htmlandlogs.c;h=798544db52b6e0480dbe4166625c5cb3228057fb;hb=c5a58cd49c2e0be45739384880a1a172d79e2756;hp=70377848b7c501bd89f458541495d637d9ecf941;hpb=bf59a20b46290db34e1761926a39ee68164d636b;p=svn%2FPrometheus-QoS%2F.git diff --git a/htmlandlogs.c b/htmlandlogs.c index 7037784..798544d 100644 --- a/htmlandlogs.c +++ b/htmlandlogs.c @@ -14,7 +14,6 @@ extern const char *version; extern const char *stats_html_signature; extern char *jquery_url; extern int keywordcount; -extern long long int line; extern int dry_run; extern int qos_proxy; extern char *title; @@ -23,6 +22,7 @@ extern int found_lmsid; extern char *lms_url; extern char *log_dir; extern char *ip6prefix; +extern int traffic_detected; const char *tr_odd_even(void); /* implemented in prometheus.c, shared with parselogs.c */ @@ -100,19 +100,19 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview) count++; } #ifdef DEBUG - printf("Total groups: %d Total bandwidth requested: %d kb/s\nAGGREGATION: 1/%d\n", - count, i, i/line); + printf("Total groups: %d Total bandwidth requested: %d kb/s\n", + count, i, i); #endif fprintf(f,"\n\ \n\ -Line %Ld kb/s",line); +"); fprintf(f,"%d%d kb/s",total,i); for_each(keyword, keywords) if(keyword->ip_count) { fprintf(f,"%d IPs",keyword->ip_count); } - fprintf(f,"Aggregation 1/%d\n", (int)(0.5+i/line)); + fprintf(f,"\n"); fprintf(f,"%d traffic classes\n", keywordcount, total); fputs("\n",f); @@ -403,7 +403,7 @@ style=\"cursor: pointer;\">+%d]", insert(sum,sums,order_by,i); } - if(!just_preview) + if(!just_preview && traffic_detected) { append_log(ip); for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing)) @@ -411,6 +411,10 @@ style=\"cursor: pointer;\">+%d]", append_log(sharedip); } } + else + { + printf("."); + } } fprintf(f, "\n\ %d CLASSES", i);