From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Stefan Reiter <s.reiter@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 2/2] ui: add support for notes on backup groups
Date: Mon, 12 Jul 2021 08:32:24 +0200 [thread overview]
Message-ID: <0e99faa7-52ea-39de-1e04-531c3da7d50d@proxmox.com> (raw)
In-Reply-To: <20210708144528.1405534-2-s.reiter@proxmox.com>
On 08.07.21 16:45, Stefan Reiter wrote:
> Currently done a little bit hacky in a seperate API call following the
> initial list_snapshots, as we previously didn't call list_groups at all
> and instead calculated the groups from the snapshots.
>
> This calls it async and updates the view with group comments when data
> arrives. The editor is simply reused with the 'group-notes' API call,
> since the semantics are the same.
>
> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
> ---
> www/datastore/Content.js | 59 ++++++++++++++++++++++++++++++++--------
> 1 file changed, 48 insertions(+), 11 deletions(-)
>
> diff --git a/www/datastore/Content.js b/www/datastore/Content.js
> index 101763aa..29d58fc3 100644
> --- a/www/datastore/Content.js
> +++ b/www/datastore/Content.js
> @@ -125,6 +125,29 @@ Ext.define('PBS.DataStoreContent', {
> return groups;
> },
>
> + updateGroupNotes: function(view) {
> + Proxmox.Utils.API2Request({
> + url: `/api2/extjs/admin/datastore/${view.datastore}/groups`,
> + method: 'GET',
> + success: function(response) {
> + let groups = response.result.data;
> + let map = {};
> + for (const group of groups) {
> + map[`${group["backup-type"]}/${group["backup-id"]}`] = group["comment"];
eslint throws an error on this, as the rules enforce that it'd be written in dot notation:
group.comment
Please actually use the build system before sending such things, a simple `make install`
in the www/ folder would have shown that this cannot work...
Fixed in a followup, rewrote that whole function to async while at it.
next prev parent reply other threads:[~2021-07-12 6:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 14:45 [pbs-devel] [PATCH proxmox-backup 1/2] api: " Stefan Reiter
2021-07-08 14:45 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: " Stefan Reiter
2021-07-12 6:32 ` Thomas Lamprecht [this message]
2021-07-12 6:30 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] api: " Thomas Lamprecht
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=0e99faa7-52ea-39de-1e04-531c3da7d50d@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=s.reiter@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