[MINOR] add "description", "node" and show-node"/"show-desc", remove "node-name", v2

This patch implements "description" (proxy and global) and "node" (global)
options, removes "node-name" and adds "show-node" & "show-desc" options
for "stats". It also changes the way the header lines (with proxy name) and
the statistics are displayed, so stats no longer look so clumsy with very
long names.

Instead of "node-name" it is possible to use show-node/show-desc with
an optional parameter that overrides a default node/description.

backend cust-0045
        # report specific values for this customer
        stats show-node Europe
        stats show-desc Master node for Europe, Asia, Africa
diff --git a/src/dumpstats.c b/src/dumpstats.c
index 86ce23e..7199fe0 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -574,6 +574,8 @@
 				     "PipesFree: %d\n"
 				     "Tasks: %d\n"
 				     "Run_queue: %d\n"
+				     "node: %s\n"
+				     "description: %s\n"
 				     "",
 				     global.nbproc,
 				     relative_pid,
@@ -584,7 +586,8 @@
 				     global.rlimit_nofile,
 				     global.maxsock, global.maxconn, global.maxpipes,
 				     actconn, pipes_used, pipes_free,
-				     nb_tasks_cur, run_queue_cur
+				     nb_tasks_cur, run_queue_cur,
+				     global.node, global.desc?global.desc:""
 				     );
 			if (buffer_write_chunk(rep, &msg) >= 0)
 				return 0;
@@ -752,8 +755,7 @@
 			     " border-color: black;"
 			     " border-bottom-style: solid;"
 			     "}\n"
-			     ".pxname	{background: #b00040;color: #ffff40;font-weight: bold;}\n"
-			     ".titre	{background: #20D0D0;color: #000000;font-weight: bold;}\n"
+			     ".titre	{background: #20D0D0;color: #000000; font-weight: bold;}\n"
 			     ".total	{background: #20D0D0;color: #ffff80;}\n"
 			     ".frontend	{background: #e8e8d0;}\n"
 			     ".backend	{background: #e8e8d0;}\n"
@@ -775,14 +777,16 @@
 			     "table.tbl { border-collapse: collapse; border-style: none;}\n"
 			     "table.tbl td { border-width: 1px 1px 1px 1px; border-style: solid solid solid solid; padding: 2px 3px; border-color: gray;}\n"
 			     "table.tbl th { border-width: 1px; border-style: solid solid solid solid; border-color: gray;}\n"
+			     "table.tbl th.pxname {background: #b00040; color: #ffff40; font-weight: bold; border-style: solid solid none solid; padding: 2px 3px;}\n"
 			     "table.tbl th.empty { border-style: none; empty-cells: hide; background: white;}\n"
+			     "table.tbl th.desc { background: white; border-style: solid solid none solid; text-align: left; padding: 2px 3px;}\n"
 			     "table.lgd { border-collapse: collapse; border-width: 1px; border-style: none none none solid; border-color: black;}\n"
 			     "table.lgd td { border-width: 1px; border-style: solid solid solid solid; border-color: gray; padding: 2px;}\n"
 			     "table.lgd td.noborder { border-style: none; padding: 2px; white-space: nowrap;}\n"
 			     "-->\n"
 			     "</style></head>\n",
-			     uri->node_name ? " on " : "",
-			     uri->node_name ? uri->node_name : ""
+			     (uri->flags&ST_SHNODE) ? " on " : "",
+			     (uri->flags&ST_SHNODE) ? (uri->node ? uri->node : global.node) : ""
 			     );
 		} else {
 			print_csv_header(&msg);
@@ -804,16 +808,16 @@
 			chunk_printf(&msg,
 			     "<body><h1><a href=\"" PRODUCT_URL "\" style=\"text-decoration: none;\">"
 			     PRODUCT_NAME "%s</a></h1>\n"
-			     "<h2>Statistics Report for pid %d%s%s</h2>\n"
+			     "<h2>Statistics Report for pid %d%s%s%s%s</h2>\n"
 			     "<hr width=\"100%%\" class=\"hr\">\n"
 			     "<h3>&gt; General process information</h3>\n"
 			     "<table border=0 cols=4><tr><td align=\"left\" nowrap width=\"1%%\">\n"
 			     "<p><b>pid = </b> %d (process #%d, nbproc = %d)<br>\n"
 			     "<b>uptime = </b> %dd %dh%02dm%02ds<br>\n"
-			     "<b>system limits :</b> memmax = %s%s ; ulimit-n = %d<br>\n"
-			     "<b>maxsock = </b> %d ; <b>maxconn = </b> %d ; <b>maxpipes = </b> %d<br>\n"
-			     "current conns = %d ; current pipes = %d/%d<br>\n"
-			     "Running tasks : %d/%d<br>\n"
+			     "<b>system limits:</b> memmax = %s%s; ulimit-n = %d<br>\n"
+			     "<b>maxsock = </b> %d; <b>maxconn = </b> %d; <b>maxpipes = </b> %d<br>\n"
+			     "current conns = %d; current pipes = %d/%d<br>\n"
+			     "Running tasks: %d/%d<br>\n"
 			     "</td><td align=\"center\" nowrap>\n"
 			     "<table class=\"lgd\"><tr>\n"
 			     "<td class=\"active3\">&nbsp;</td><td class=\"noborder\">active UP </td>"
@@ -834,9 +838,9 @@
 			     "<b>Display option:</b><ul style=\"margin-top: 0.25em;\">"
 			     "",
 			     (uri->flags&ST_HIDEVER)?"":(STATS_VERSION_STRING),
-			     pid, uri->node_name ? " on " : "", uri->node_name ? uri->node_name : "",
-			     pid,
-			     relative_pid, global.nbproc,
+			     pid, (uri->flags&ST_SHNODE) ? " on " : "", (uri->flags&ST_SHNODE) ? (uri->node ? uri->node : global.node) : "",
+			     (uri->flags&ST_SHDESC)? ": " : "", (uri->flags&ST_SHDESC) ? (uri->desc ? uri->desc : global.desc) : "",
+			     pid, relative_pid, global.nbproc,
 			     up / 86400, (up % 86400) / 3600,
 			     (up % 3600) / 60, (up % 60),
 			     global.rlimit_memmax ? ultoa(global.rlimit_memmax) : "unlimited",
@@ -999,11 +1003,13 @@
 		if (!(s->data_ctx.stats.flags & STAT_FMT_CSV)) {
 			/* print a new table */
 			chunk_printf(&msg,
-				     "<table cols=\"29\" class=\"tbl\" width=\"100%%\">\n"
+				     "<table class=\"tbl\" width=\"100%%\">\n"
 				     "<tr align=\"center\" class=\"titre\">"
-				     "<th colspan=2 class=\"pxname\">%s</th>"
-				     "<th colspan=27 class=\"empty\"></th>"
+				     "<th class=\"pxname\" width=\"10%%\">%s</th>"
+				     "<th class=\"%s\" width=\"90%%\">%s</th>"
 				     "</tr>\n"
+				     "</table>\n"
+				     "<table cols=\"29\" class=\"tbl\" width=\"100%%\">\n"
 				     "<tr align=\"center\" class=\"titre\">"
 				     "<th rowspan=2></th>"
 				     "<th colspan=3>Queue</th>"
@@ -1022,7 +1028,8 @@
 				     "<th>Bck</th><th>Chk</th><th>Dwn</th><th>Dwntme</th>"
 				     "<th>Thrtle</th>\n"
 				     "</tr>",
-				     px->id);
+				     px->id,
+				     px->desc ? "desc" : "empty", px->desc ? px->desc : "");
 
 			if (buffer_write_chunk(rep, &msg) >= 0)
 				return 0;