table formatting
authorxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Sun, 13 May 2012 22:18:18 +0000 (22:18 +0000)
committerxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Sun, 13 May 2012 22:18:18 +0000 (22:18 +0000)
git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@177 251d49ef-1d17-4917-a970-b30cf55b089b

prometheus.c

index 26d6b08..0870bce 100644 (file)
@@ -1659,7 +1659,9 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
    printf("Total groups: %d Total bandwidth requested: %d kb/s\nAGGREGATION: 1/%d\n",\r
           count, i, i/line);\r
 #endif\r
-   fprintf(f,"<tr><th colspan=\"2\" style=\"text-align: left\">Line %Ld kb/s</td>",line);\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
    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)\r
@@ -1669,7 +1671,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
    fprintf(f,"</tr><tr><th colspan=\"4\">Aggregation 1/%d</th>\n", (int)(0.5+i/line));\r
    fprintf(f,"<th colspan=\"%d\">%d traffic classes</th></tr>\n", keywordcount, total);\r
 \r
-   fputs("</tbody></table>\n",f);\r
+   fputs("</thead></table>\n",f);\r
  }\r
  else if(!dry_run && !just_flush)\r
  {\r
@@ -1707,8 +1709,8 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
 <th style=\"text-align: right\">min</th>\n\\r
 <th style=\"text-align: right\">max</th>\n\\r
 <th style=\"text-align: right\">limit</th>\n\\r
-<th>prio</th></tr>\n\\r
-<tr>\n\\r
+<th>&nbsp;</th>\n\\r
+</tr><tr>\n\\r
 <th style=\"text-align: right\">#</th>\n\\r
 <th>hostname [+sharing]</th>\n\\r
 <th style=\"text-align: right\">LMS</th>\n\\r
@@ -1720,7 +1722,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
 <th style=\"text-align: right\">kb/s</th>\n\\r
 <th style=\"text-align: right\">kb/s</th>\n\\r
 <th style=\"text-align: right\">kb/s</th>\n\\r
-<th>&nbsp;</th>\n\\r
+<th>prio</th>\n\\r
 </tr></thead><tbody>\n",f);    \r
 \r
   row_odd_even = 0;\r
@@ -1854,14 +1856,15 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
     }\r
    }\r
   }\r
-  fprintf(f,"<tr><th colspan=\"%d\" style=\"text-align: left\">%d CLASSES</th>", colspan-7, i);\r
+  fprintf(f,"</tbody><thead><tr>\n\\r
+<th colspan=\"%d\" style=\"text-align: left\">%d CLASSES</th>", colspan-7, i);\r
   fprintf(f,"<th style=\"text-align: right\">%Lu</th><th style=\"text-align: right\">%Lu</th>\n", total_traffic, total_direct);\r
   if(qos_proxy)\r
   {\r
    fprintf(f,"<th style=\"text-align: right\">%Lu</th>\n", total_proxy);\r
   }\r
   fprintf(f,"<th style=\"text-align: right\">%Lu</th>", total_upload);\r
-  fprintf(f,"<th colspan=\"4\"><span style=\"color:red\">FUP-LIMIT %dx</span> <span style=\"color:brown\">LOW-PRIO %dx</span></th></tr>\n</tbody></table>\n",limit_count,prio_count);\r
+  fprintf(f,"<th colspan=\"4\"><span style=\"color:red\">LIMIT %dx</span> <span style=\"color:brown\">LOW-PRIO %dx</span></th></tr>\n</thead></table>\n",limit_count,prio_count);\r
 \r
   row_odd_even = 0;\r
   if(active_classes>10)\r
This page took 0.185004 seconds and 4 git commands to generate.