]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stats: Fix color of draining servers on stats page
authorDaniel Corbett <dcorbett@haproxy.com>
Sat, 28 Mar 2020 16:35:50 +0000 (12:35 -0400)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Mar 2020 15:21:51 +0000 (17:21 +0200)
This patch fixes #53 where it was noticed that when an active
server is set to DRAIN it no longer has the color blue reflected
within the stats page. This patch addresses that and adds the
color back to drain. It's to be noted that backup servers are
configured to have an orange color when they are draining.

Should be backported as far as 1.7.

src/stats.c

index 28724fa2f08c4d503a455da06de403e7bc0fa033..36be3153bf8c4173df70f7779f5395404ff04dd3 100644 (file)
@@ -912,6 +912,9 @@ static int stats_dump_fields_html(struct buffer *out,
                else if (strcmp(field_str(stats, ST_F_STATUS), "DOWN ") == 0) {
                        style = "going_up";
                }
+               else if (strcmp(field_str(stats, ST_F_STATUS), "DRAIN") == 0) {
+                       style = "draining";
+               }
                else if (strcmp(field_str(stats, ST_F_STATUS), "NOLB ") == 0) {
                        style = "going_down";
                }