From bc271ec113ab25b2617da73a8b11fce1a56675d4 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 2 Dec 2019 11:29:04 +0100 Subject: [PATCH] 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. --- src/stats.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/stats.c b/src/stats.c index 5954fe67f..32236f457 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,