src/dumpstats.c
static void stats_dump_html_px_hdr(struct stream_interface *si, struct proxy *px, struct uri_auth *uri)
{
	char scope_txt[STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN];

	if (px->cap & PR_CAP_BE && px->srv && (si->applet.ctx.stats.flags & STAT_ADMIN)) {
		/* A form to enable/disable this proxy servers */

		/* scope_txt = search pattern + search query, si->applet.ctx.stats.scope_len is always <= STAT_SCOPE_TXT_MAXLEN */
		scope_txt[0] = 0;
		if (si->applet.ctx.stats.scope_len) {
			strcpy(scope_txt, STAT_SCOPE_PATTERN);
			memcpy(scope_txt + strlen(STAT_SCOPE_PATTERN), bo_ptr(si->ob->buf) + si->applet.ctx.stats.scope_str, si->applet.ctx.stats.scope_len);
			scope_txt[strlen(STAT_SCOPE_PATTERN) + si->applet.ctx.stats.scope_len] = 0;
		}

		chunk_appendf(&trash,
			      "<form action=\"%s%s%s%s\" method=\"post\">",
			      uri->uri_prefix,
			      (si->applet.ctx.stats.flags & STAT_HIDE_DOWN) ? ";up" : "",
			      (si->applet.ctx.stats.flags & STAT_NO_REFRESH) ? ";norefresh" : "",
			      scope_txt);
	}

	/* print a new table */
	chunk_appendf(&trash,
		      "<table class=\"tbl\" width=\"100%%\">\n"
		      "<tr class=\"titre\">"
		      "<th class=\"pxname\" width=\"10%%\">");

	chunk_appendf(&trash,
	              "<a name=\"%s\"></a>%s"
	              "<a class=px href=\"#%s\">%s</a>",
	              px->id,
	              (uri->flags & ST_SHLGNDS) ? "<u>":"",
	              px->id, px->id);

	if (uri->flags & ST_SHLGNDS) {
		/* cap, mode, id */
		chunk_appendf(&trash, "<div class=tips>cap: %s, mode: %s, id: %d",
		              proxy_cap_str(px->cap), proxy_mode_str(px->mode),
		              px->uuid);
		chunk_appendf(&trash, "</div>");
	}

	chunk_appendf(&trash,
	              "%s</th>"
	              "<th class=\"%s\" width=\"90%%\">%s</th>"
	              "</tr>\n"
	              "</table>\n"
	              "<table class=\"tbl\" width=\"100%%\">\n"
	              "<tr class=\"titre\">",
	              (uri->flags & ST_SHLGNDS) ? "</u>":"",
	              px->desc ? "desc" : "empty", px->desc ? px->desc : "");

	if ((px->cap & PR_CAP_BE) && px->srv && (si->applet.ctx.stats.flags & STAT_ADMIN)) {
		/* Column heading for Enable or Disable server */
		chunk_appendf(&trash, "<th rowspan=2 width=1></th>");
	}

	chunk_appendf(&trash,
	              "<th rowspan=2></th>"
	              "<th colspan=3>Queue</th>"
	              "<th colspan=3>Session rate</th><th colspan=5>Sessions</th>"
	              "<th colspan=2>Bytes</th><th colspan=2>Denied</th>"
	              "<th colspan=3>Errors</th><th colspan=2>Warnings</th>"
	              "<th colspan=9>Server</th>"
	              "</tr>\n"
	              "<tr class=\"titre\">"
	              "<th>Cur</th><th>Max</th><th>Limit</th>"
	              "<th>Cur</th><th>Max</th><th>Limit</th><th>Cur</th><th>Max</th>"
	              "<th>Limit</th><th>Total</th><th>LbTot</th><th>In</th><th>Out</th>"
	              "<th>Req</th><th>Resp</th><th>Req</th><th>Conn</th>"
	              "<th>Resp</th><th>Retr</th><th>Redis</th>"
	              "<th>Status</th><th>LastChk</th><th>Wght</th><th>Act</th>"
	              "<th>Bck</th><th>Chk</th><th>Dwn</th><th>Dwntme</th>"
	              "<th>Thrtle</th>\n"
	              "</tr>");
}
/* Dumps the HTML table header for proxy <px> to the trash for and uses the state from
 * stream interface <si> and per-uri parameters <uri>. The caller is responsible
 * for clearing the trash if needed.
 */
Dumps the HTML table header for proxy  to the trash for and uses the state from
stream interface  and per-uri parameters . The caller is responsible
for clearing the trash if needed.
Dumps the HTML table header for proxy to the trash for and uses the state from stream interface and per - uri parameters . The caller is responsible for clearing the trash if needed .
static void stats_dump_html_px_hdr(struct stream_interface *si, struct proxy *px, struct uri_auth *uri)
{
	char scope_txt[STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN];
	if (px->cap & PR_CAP_BE && px->srv && (si->applet.ctx.stats.flags & STAT_ADMIN)) {
		scope_txt[0] = 0;
		if (si->applet.ctx.stats.scope_len) {
			strcpy(scope_txt, STAT_SCOPE_PATTERN);
			memcpy(scope_txt + strlen(STAT_SCOPE_PATTERN), bo_ptr(si->ob->buf) + si->applet.ctx.stats.scope_str, si->applet.ctx.stats.scope_len);
			scope_txt[strlen(STAT_SCOPE_PATTERN) + si->applet.ctx.stats.scope_len] = 0;
		}
		chunk_appendf(&trash,
			      "<form action=\"%s%s%s%s\" method=\"post\">",
			      uri->uri_prefix,
			      (si->applet.ctx.stats.flags & STAT_HIDE_DOWN) ? ";up" : "",
			      (si->applet.ctx.stats.flags & STAT_NO_REFRESH) ? ";norefresh" : "",
			      scope_txt);
	}
	chunk_appendf(&trash,
		      "<table class=\"tbl\" width=\"100%%\">\n"
		      "<tr class=\"titre\">"
		      "<th class=\"pxname\" width=\"10%%\">");
	chunk_appendf(&trash,
	              "<a name=\"%s\"></a>%s"
	              "<a class=px href=\"#%s\">%s</a>",
	              px->id,
	              (uri->flags & ST_SHLGNDS) ? "<u>":"",
	              px->id, px->id);
	if (uri->flags & ST_SHLGNDS) {
		chunk_appendf(&trash, "<div class=tips>cap: %s, mode: %s, id: %d",
		              proxy_cap_str(px->cap), proxy_mode_str(px->mode),
		              px->uuid);
		chunk_appendf(&trash, "</div>");
	}
	chunk_appendf(&trash,
	              "%s</th>"
	              "<th class=\"%s\" width=\"90%%\">%s</th>"
	              "</tr>\n"
	              "</table>\n"
	              "<table class=\"tbl\" width=\"100%%\">\n"
	              "<tr class=\"titre\">",
	              (uri->flags & ST_SHLGNDS) ? "</u>":"",
	              px->desc ? "desc" : "empty", px->desc ? px->desc : "");
	if ((px->cap & PR_CAP_BE) && px->srv && (si->applet.ctx.stats.flags & STAT_ADMIN)) {
		chunk_appendf(&trash, "<th rowspan=2 width=1></th>");
	}
	chunk_appendf(&trash,
	              "<th rowspan=2></th>"
	              "<th colspan=3>Queue</th>"
	              "<th colspan=3>Session rate</th><th colspan=5>Sessions</th>"
	              "<th colspan=2>Bytes</th><th colspan=2>Denied</th>"
	              "<th colspan=3>Errors</th><th colspan=2>Warnings</th>"
	              "<th colspan=9>Server</th>"
	              "</tr>\n"
	              "<tr class=\"titre\">"
	              "<th>Cur</th><th>Max</th><th>Limit</th>"
	              "<th>Cur</th><th>Max</th><th>Limit</th><th>Cur</th><th>Max</th>"
	              "<th>Limit</th><th>Total</th><th>LbTot</th><th>In</th><th>Out</th>"
	              "<th>Req</th><th>Resp</th><th>Req</th><th>Conn</th>"
	              "<th>Resp</th><th>Retr</th><th>Redis</th>"
	              "<th>Status</th><th>LastChk</th><th>Wght</th><th>Act</th>"
	              "<th>Bck</th><th>Chk</th><th>Dwn</th><th>Dwntme</th>"
	              "<th>Thrtle</th>\n"
	              "</tr>");
}
static void stats_dump_html_px_hdr ( struct stream_interface * si , struct proxy * px , struct uri_auth * uri ) { char scope_txt [ STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN ] ; if ( px -> cap & PR_CAP_BE && px -> srv && ( si -> applet . ctx . stats . flags & STAT_ADMIN ) ) { scope_txt [ 0 ] = 0 ; if ( si -> applet . ctx . stats . scope_len ) { strcpy ( scope_txt , STAT_SCOPE_PATTERN ) ; memcpy ( scope_txt + strlen ( STAT_SCOPE_PATTERN ) , bo_ptr ( si -> ob -> buf ) + si -> applet . ctx . stats . scope_str , si -> applet . ctx . stats . scope_len ) ; scope_txt [ strlen ( STAT_SCOPE_PATTERN ) + si -> applet . ctx . stats . scope_len ] = 0 ; } chunk_appendf ( & trash , " \" \" \" \" " , uri -> uri_prefix , ( si -> applet . ctx . stats . flags & STAT_HIDE_DOWN ) ? " " : " " , ( si -> applet . ctx . stats . flags & STAT_NO_REFRESH ) ? " " : " " , scope_txt ) ; } chunk_appendf ( & trash , " \" \" \" \" \n " " \" \" " " \" \" \" \" " ) ; chunk_appendf ( & trash , " \" \" " " \" \" " , px -> id , ( uri -> flags & ST_SHLGNDS ) ? " " : " " , px -> id , px -> id ) ; if ( uri -> flags & ST_SHLGNDS ) { chunk_appendf ( & trash , " " , proxy_cap_str ( px -> cap ) , proxy_mode_str ( px -> mode ) , px -> uuid ) ; chunk_appendf ( & trash , " " ) ; } chunk_appendf ( & trash , " " " \" \" \" \" " " \n " " \n " " \" \" \" \" \n " " \" \" " , ( uri -> flags & ST_SHLGNDS ) ? " " : " " , px -> desc ? " " : " " , px -> desc ? px -> desc : " " ) ; if ( ( px -> cap & PR_CAP_BE ) && px -> srv && ( si -> applet . ctx . stats . flags & STAT_ADMIN ) ) { chunk_appendf ( & trash , " " ) ; } chunk_appendf ( & trash , " " " " " " " " " " " " " \n " " \" \" " " " " " " " " " " " " " " " " \n " " " ) ; }
Dumps the HTML table header for proxy <px> to the trash for and uses the state from
 stream interface <si> and per-uri parameters <uri>.
Dumps the HTML table header for proxy <px > to the trash for and uses the state from stream interface <si > and per - uri parameters <uri > .
/* A form to enable/disable this proxy servers */ /* scope_txt = search pattern + search query, si->applet.ctx.stats.scope_len is always <= STAT_SCOPE_TXT_MAXLEN */ /* print a new table */ /* cap, mode, id */ /* Column heading for Enable or Disable server */