X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=htmlandlogs.c;h=b6f9cb66602c080c23b220dd177cd2076a95df98;hb=9f552e96b7c3ed1b5af6578252c0154491132a10;hp=3820ae462297c5a5059e84c07fabd8c7e3632ff7;hpb=64b2d1255780905c78973df33145c93ee5613c9c;p=svn%2FPrometheus-QoS%2F.git
diff --git a/htmlandlogs.c b/htmlandlogs.c
index 3820ae4..b6f9cb6 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;
@@ -100,19 +99,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", keywordcount, total);
fputs("\n",f);
@@ -130,7 +129,7 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview)
int active_classes = 0;
// int colspan = 14;
struct Sum {unsigned long long l; int i; list(Sum);} *sum,*sums = NULL;
- int limit_count = 0, prio_count = 0;
+ int agreg_count = 0, limit_count = 0, prio_count = 0;
int popup_button = 0;
/* IPv6 vs. IPv4 stats */
unsigned long long pkts4 =0, pkts6 = 0, bytes4 = 0, bytes6 = 0;
@@ -197,7 +196,13 @@ $(\'#pktsup_\'+n).show();\
char *f1="", *f2="";
i++;
- if(ip->max < ip->desired)
+ if(ip->aggregated > 1)
+ {
+ f1 = "";
+ f2 = "";
+ agreg_count++;
+ }
+ else if(ip->max < ip->desired)
{
f1 = "";
f2 = "";
@@ -259,7 +264,7 @@ style=\"cursor: pointer;\">+%d]",
}
else if(ip->lmsid == 0)
{
- fputs("-------",f);
+ fputs("------",f);
}
fputs("\n",f);
}
@@ -419,9 +424,11 @@ style=\"cursor: pointer;\">+%d]",
*/
fprintf(f, "\n");
fprintf(f," %d traffic classes