From: Christopher Faulet Date: Mon, 2 Dec 2019 10:29:04 +0000 (+0100) Subject: BUG/MINOR: stats: Fix HTML output for the frontends heading X-Git-Tag: v2.2-dev1~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc271ec113ab25b2617da73a8b11fce1a56675d4;p=thirdparty%2Fhaproxy.git BUG/MINOR: stats: Fix HTML output for the frontends heading Since the flag STAT_SHOWADMIN was removed, the frontends heading in the HTML output appears unaligned because the space reserved for the checkbox (not displayed for frontends) is not inserted. This patch fixes the issue #390. It must be backported to 2.1. --- diff --git a/src/stats.c b/src/stats.c index 5954fe67f8..32236f4570 100644 --- a/src/stats.c +++ b/src/stats.c @@ -2020,14 +2020,17 @@ static void stats_dump_html_px_hdr(struct stream_interface *si, struct proxy *px (appctx->ctx.stats.flags & STAT_SHLGNDS) ? "":"", px->desc ? "desc" : "empty", px->desc ? px->desc : ""); - if ((px->cap & PR_CAP_BE) && px->srv && (appctx->ctx.stats.flags & STAT_ADMIN)) { + if (appctx->ctx.stats.flags & STAT_ADMIN) { /* Column heading for Enable or Disable server */ - chunk_appendf(&trash, - "", - px->id, - px->id); + if ((px->cap & PR_CAP_BE) && px->srv) + chunk_appendf(&trash, + "", + px->id, + px->id); + else + chunk_appendf(&trash, ""); } chunk_appendf(&trash,