From: xchaos Date: Thu, 31 May 2012 12:20:26 +0000 (+0000) Subject: html table formatting X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=commitdiff_plain;h=4f4d182088d6b40224a5475f284a9c756ae604a1 html table formatting git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@184 251d49ef-1d17-4917-a970-b30cf55b089b --- diff --git a/prometheus.c b/prometheus.c index 494ce50..f12de15 100644 --- a/prometheus.c +++ b/prometheus.c @@ -40,7 +40,7 @@ const char *version = "0.8.3-d"; /* C source code development versions ("beta"): 0.7.9-a, 0.8.1-b, etc. */ /* C source code release versions: 0.8.0, 0.8.2, 0.8.4, etc. */ -const char *stats_html_signature = "Statistics generated by Prometheus QoS version %s
GPL+Copyright(C)2005-2012 Michael Polak, Arachne Labs
\n"; +const char *stats_html_signature = "Statistics generated by Prometheus QoS version %s
GPL+Copyright(C)2005-2012 Michael Polak, Arachne Labs
\n"; /* ======= All path names are defined here (for RPM patch) ======= */ @@ -917,13 +917,13 @@ void parse_ip_log(int argc, char **argv) if(iplog->traffic) { fprintf(f, "%s%d\n\ -%s\n\ +%s\n\ ", tr_odd_even(), i++, log_url, iplog->name, iplog->name); if(iplog->lmsid > 0) { /*base URL will be configurable soon ... */ - fprintf(f, "%04d\n", lms_url, iplog->lmsid, iplog->lmsid); + fprintf(f, "%04d\n", lms_url, iplog->lmsid, iplog->lmsid); } else if(iplog->lmsid == 0) { @@ -939,9 +939,9 @@ void parse_ip_log(int argc, char **argv) } } fprintf(f,"\ - Total:\ - %ld GB\ - %Ld kb/s\n", total, line); + Total:\ + %ld GB\ + %Ld kb/s\n", total, line); fputs("\n", f); row_odd_even = 0; @@ -1021,9 +1021,8 @@ void parse_ip_log(int argc, char **argv) fprintf(f,"%d%d %%%ld G%d %%\n",iplog->i,(100*iplog->i+50)/i,iplog->l,(int)((100*iplog->l+50)/total)); } - fprintf(f,"\n\ -All users, all traffic\n\ -%d\n\ + fprintf(f,"All users, all traffic\n", log_url); + fprintf(f,"%d\n\ 100 %%\n\ %ld G\n\ 100 %%\n",i-1,total); @@ -1794,7 +1793,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); printf("%03d. %-22s %10Lu (%d/%d)\n",i ,ip->name, ip->traffic, ip->min, ip->max); #endif /* hostnames -------------------------------------- */ - fprintf(f,"%s%d%s\n", + fprintf(f,"%s%d%s\n", tr_odd_even(), ip->name, i, log_url, ip->name, ip->name); if(use_jquery_popups) @@ -1803,7 +1802,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); popup_button=0; for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing)) { - fprintf(f,"
%s\n", log_url, sharedip->name, sharedip->name); + fprintf(f,"
%s\n", log_url, sharedip->name, sharedip->name); popup_button++; } fputs("\n",f); @@ -1821,7 +1820,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); fputs("",f); if(ip->lmsid > 0) { - fprintf(f,"%04d\n", lms_url, ip->lmsid, ip->lmsid); + fprintf(f,"%04d\n", lms_url, ip->lmsid, ip->lmsid); } else if(ip->lmsid == 0) { @@ -2002,7 +2001,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); sum->i,(100*sum->i+50)/active_classes,sum->l,(100*sum->l+50)/total_traffic); } - fprintf(f,"All users, all traffic\n", log_url); + fprintf(f,"All users, all traffic\n", log_url); fprintf(f,"%d\n\ 100 %%\n\ %Lu M\n\