From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [pve-devel] [PATCH v2 proxmox-backup 06/10] sync: add group filtering
Date: Thu, 16 Sep 2021 09:19:22 +0200 [thread overview]
Message-ID: <3411c837-865e-4f66-04e4-05e93b37c6c0@proxmox.com> (raw)
In-Reply-To: <20210915134157.19762-7-f.gruenbichler@proxmox.com>
FYI, it seems you sent the series to PVE devel by mistake.
On 15.09.21 15:41, Fabian Grünbichler wrote:
> like for manual pulls, but persisted in the sync job config and visible
> in the relevant GUI parts.
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
>
> Notes:
> GUI is read-only for now (and defaults to no filtering on creation), as this is
> a rather advanced feature that requires a complex GUI to be user-friendly
> (regex-freeform, type-combobox, remote group scanning + selector with
> additional freeform input).
above paragraph would belong into the commit message IMO.
>
> I did test the API manually though to see whether it works as expected, and
> updating the filter list by overwriting with a new one passed in as multiple
> parameters works as expected.
>
> if we want to make this configurable over the GUI, we probably want to switch
> the job edit window to a tabpanel and add a second grid tab for selecting
> the groups
we could also get away by adding it in the advanced section for now.
> diff --git a/www/window/SyncJobEdit.js b/www/window/SyncJobEdit.js
> index 47e65ae3..2399f11f 100644
> --- a/www/window/SyncJobEdit.js
> +++ b/www/window/SyncJobEdit.js
> @@ -199,6 +199,18 @@ Ext.define('PBS.window.SyncJobEdit', {
> ],
>
> columnB: [
> + {
> + fieldLabel: gettext('Backup Groups'),
> + xtype: 'displayfield',
> + name: 'groups',
> + renderer: function(value, metadata, record) {
> + if (!value) return gettext('All');
> + return Ext.String.htmlEncode(value, metadata, record);
Ext.String.htmlEncode only takes a single parameter
https://docs.sencha.com/extjs/7.0.0/classic/Ext.String.html#method-htmlEncode
besides that you could use a arrow fn here, the following would seem quite ok for me for
a renderer:
renderer: v => v ? Ext.String.htmlEncode(v) : gettext('All'),
> + },
> + cbind: {
> + hidden: '{isCreate}',
> + },
> + },
> {
> fieldLabel: gettext('Comment'),
> xtype: 'proxmoxtextfield',
>
next parent reply other threads:[~2021-09-16 7:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210915134157.19762-1-f.gruenbichler@proxmox.com>
[not found] ` <20210915134157.19762-7-f.gruenbichler@proxmox.com>
2021-09-16 7:19 ` Thomas Lamprecht [this message]
2021-09-16 7:38 ` Thomas Lamprecht
2021-09-16 7:57 ` Fabian Grünbichler
2021-09-23 5:24 ` Thomas Lamprecht
2021-09-16 7:44 ` Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3411c837-865e-4f66-04e4-05e93b37c6c0@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox