David, Sorry for the confusion. What I meant was, I like your patch (and will use it even if it's not added to the official software)
What I meant was more: selecting multiple servers from more than one backend.. hitting the maintenance button once doesn't work. it only applies to the backend immediatly above the dropdown. Now that I understand the purpose of your patch (taking an entire backend out at once) I realize my response was for a completely unrelated matter. On Fri, Dec 30, 2016 at 10:08 AM, David Harrigan <[email protected]> wrote: > Hi Jeff, > > Thank you for your comment. I believe nothing in this patch prevents you > from continuing to do that :-) You can select one, two, three etc., nodes > and perform the action you desire on them. > > However, in our setup, we often have 20+ nodes in various backends (Haproxy > rocks btw! being able to handle that!), and we often have occasions were we > want to take an entire backend (pool) out - for testing, performance and A/B > requirements. Our trusted testers (and developers) expressed a desire to do > this quickly without having to select each node individually or do a > modification of the configuration file and a reload. > > Having a simple checkbox to select all nodes and perform the desired action > in four clicks (if you count the dropdown of the select box and the action > selection), has been met with good positive feedback here at our place of > work and I'm convinced that this is a nice, user-friendly (hopefully minor) > feature to add :-) > > -=david=- > > On 30 December 2016 at 14:56, Jeff Palmer <[email protected]> wrote: >> >> I'd be happy if i could just manually select 2 or more backends and hit >> apply once. >> >> On Dec 30, 2016 7:31 AM, "David Harrigan" <[email protected]> wrote: >>> >>> FYI, here is the patch: >>> >>> From 218a6c42d47ccf2d8970e1d332c91429a2c34bbb Mon Sep 17 00:00:00 2001 >>> From: David Harrigan <[email protected]> >>> Date: Fri, 30 Dec 2016 12:12:49 +0000 >>> Subject: [PATCH] MINOR: stats: Support "select all" for backend actions >>> >>> Allow the user to quickly select all servers within a group before >>> invoking an >>> action. >>> --- >>> src/stats.c | 10 ++++++++-- >>> 1 file changed, 8 insertions(+), 2 deletions(-) >>> >>> diff --git a/src/stats.c b/src/stats.c >>> index 497aa477..d5fcec82 100644 >>> --- a/src/stats.c >>> +++ b/src/stats.c >>> @@ -636,7 +636,8 @@ static int stats_dump_fields_html(struct chunk *out, >>> const struct field *stats, >>> >>> if (flags & ST_SHOWADMIN) >>> chunk_appendf(out, >>> - "<td><input type=\"checkbox\" name=\"s\" >>> value=\"%s\"></td>", >>> + "<td><input class='%s-checkbox' type=\"checkbox\" >>> name=\"s\" value=\"%s\"></td>", >>> + field_str(stats, ST_F_PXNAME), >>> field_str(stats, ST_F_SVNAME)); >>> >>> chunk_appendf(out, >>> @@ -1642,7 +1643,12 @@ static void stats_dump_html_px_hdr(struct >>> stream_interface *si, struct proxy *px >>> >>> if ((px->cap & PR_CAP_BE) && px->srv && (appctx->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 width=1><input type=\"checkbox\" \ >>> + onclick=\"for(c in >>> document.getElementsByClassName('%s-checkbox')) \ >>> + >>> document.getElementsByClassName('%s-checkbox').item(c).checked = >>> this.checked\"></th>", >>> + px->id, >>> + px->id); >>> } >>> >>> chunk_appendf(&trash, >>> -- >>> 2.11.0 >>> >>> >>> -=david=- >>> >>> -- >>> I prefer encrypted and signed messages. >>> Fingerprint: 110A F423 3647 54E2 880F ADAD 1C52 85BF B20A 22F9 >>> >>> No trees were harmed in the sending of this message, however, a number of >>> electrons were inconvenienced. > > > > > -- > I prefer encrypted and signed messages. > Fingerprint: 110A F423 3647 54E2 880F ADAD 1C52 85BF B20A 22F9 > > No trees were harmed in the sending of this message, however, a number of > electrons were inconvenienced. -- Jeff Palmer https://PalmerIT.net

