From: Gabriel Goller <g.goller@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Christian Ebner <c.ebner@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup] ui: warn of missing gc-schedule, prune/verify jobs
Date: Mon, 4 Dec 2023 16:42:16 +0100 [thread overview]
Message-ID: <1d497261-271e-4a07-8f79-3ef1e8508f77@proxmox.com> (raw)
In-Reply-To: <20231130140104.378248-1-c.ebner@proxmox.com>
Comments inline.
On 11/30/23 15:01, Christian Ebner wrote:
> Warn about a missing garbage collection schedule, prune job or verify
> jobs configuration in summary panel of a datastore.
>
> Show the number of prune/verify job configurations, if there are jobs
> configured.
>
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
> www/datastore/Summary.js | 80 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 80 insertions(+)
>
> diff --git a/www/datastore/Summary.js b/www/datastore/Summary.js
> index a932b4e0..6a63ca14 100644
> --- a/www/datastore/Summary.js
> +++ b/www/datastore/Summary.js
> @@ -49,12 +49,19 @@ Ext.define('PBS.DataStoreInfo', {
> usage: {},
> stillbad: 0,
> mountpoint: "",
> + gcScheduldeMsg: gettext('unknown'),
Small typo here... This should say `gcScheduleMsg`.
> + pruneJobMsg: gettext('unknown'),
> + verifyJobMsg: gettext('unknown'),
> },
> },
>
> controller: {
> xclass: 'Ext.app.ViewController',
>
> + fmtWarning: function(msg) {
> + return `<i class="fa fa-fw fa-lg fa-exclamation-circle warning"></i> ${msg}`;
> + },
> +
> onLoad: function(store, data, success) {
> let me = this;
> if (!success) {
> @@ -101,6 +108,51 @@ Ext.define('PBS.DataStoreInfo', {
> vm.set('ctcount', countstext(counts.ct));
> vm.set('vmcount', countstext(counts.vm));
> vm.set('hostcount', countstext(counts.host));
> +
> + Proxmox.Utils.API2Request({
> + url: `/config/datastore/${me.view.datastore}`,
> + success: function(response) {
> + if (response.result.data['gc-schedule']) {
> + vm.set('gcScheduleMsg', gettext('configured'));
How about we put a green checkmark here (and on the other lines below)?
Otherwise this wall of text looks kinda bleak :(
We could add the `fa fa-check-circle` icon with the `good` (color:
green) class?
There are also a few linting issues:
3 issues marked with (*) could be auto-fixed using '--fix'.
[./datastore/Summary.js]:
WARN: line 123 col 4: comma-dangle - Missing trailing comma. (*)
WARN: line 138 col 4: comma-dangle - Missing trailing comma. (*)
WARN: line 153 col 4: comma-dangle - Missing trailing comma. (*)
next prev parent reply other threads:[~2023-12-04 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 14:01 Christian Ebner
2023-12-04 15:42 ` Gabriel Goller [this message]
2023-12-04 16:09 ` Christian Ebner
2023-12-05 10:22 ` Christian Ebner
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=1d497261-271e-4a07-8f79-3ef1e8508f77@proxmox.com \
--to=g.goller@proxmox.com \
--cc=c.ebner@proxmox.com \
--cc=pbs-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