diff --git a/include/types/stats.h b/include/types/stats.h index ee16ac750..d078b676d 100644 --- a/include/types/stats.h +++ b/include/types/stats.h @@ -34,7 +34,6 @@ #define STAT_SHNODE 0x00000200 /* conf: show node name */ #define STAT_SHDESC 0x00000400 /* conf: show description */ #define STAT_SHLGNDS 0x00000800 /* conf: show legends */ -#define STAT_SHOWADMIN 0x00001000 /* conf: show the admin column */ #define STAT_BOUND 0x00800000 /* bound statistics to selected proxies/types/services */ #define STAT_STARTED 0x01000000 /* some output has occurred */ diff --git a/src/stats.c b/src/stats.c index afa2e305f..d464bd582 100644 --- a/src/stats.c +++ b/src/stats.c @@ -670,7 +670,7 @@ err: } /* Dump all fields from into using the HTML format. A column is - * reserved for the checkbox is STAT_SHOWADMIN is set in . Some extra info + * reserved for the checkbox is STAT_ADMIN is set in . Some extra info * are provided if STAT_SHLGNDS is present in . */ static int stats_dump_fields_html(struct buffer *out, @@ -684,7 +684,7 @@ static int stats_dump_fields_html(struct buffer *out, /* name, queue */ ""); - if (flags & STAT_SHOWADMIN) { + if (flags & STAT_ADMIN) { /* Column sub-heading for Enable or Disable server */ chunk_appendf(out, ""); } @@ -827,7 +827,7 @@ static int stats_dump_fields_html(struct buffer *out, } else if (stats[ST_F_TYPE].u.u32 == STATS_TYPE_SO) { chunk_appendf(out, ""); - if (flags & STAT_SHOWADMIN) { + if (flags & STAT_ADMIN) { /* Column sub-heading for Enable or Disable server */ chunk_appendf(out, ""); } @@ -932,7 +932,7 @@ static int stats_dump_fields_html(struct buffer *out, (stats[ST_F_BCK].u.u32) ? "backup" : "active", style); - if (flags & STAT_SHOWADMIN) + if (flags & STAT_ADMIN) chunk_appendf(out, "", field_str(stats, ST_F_PXNAME), @@ -1188,7 +1188,7 @@ static int stats_dump_fields_html(struct buffer *out, } else if (stats[ST_F_TYPE].u.u32 == STATS_TYPE_BE) { chunk_appendf(out, ""); - if (flags & STAT_SHOWADMIN) { + if (flags & STAT_ADMIN) { /* Column sub-heading for Enable or Disable server */ chunk_appendf(out, ""); } @@ -1356,9 +1356,7 @@ int stats_dump_one_line(const struct field *stats, unsigned int flags, struct pr { int ret; - if ((px->cap & PR_CAP_BE) && px->srv && (appctx->ctx.stats.flags & STAT_ADMIN)) - flags |= STAT_SHOWADMIN; - + flags |= appctx->ctx.stats.flags & STAT_ADMIN; if (appctx->ctx.stats.flags & STAT_FMT_HTML) ret = stats_dump_fields_html(&trash, stats, flags); else if (appctx->ctx.stats.flags & STAT_FMT_TYPED)