public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 2/2] ui: prune jobs: add enabled column in grid
Date: Fri, 26 Apr 2024 08:27:31 +0200	[thread overview]
Message-ID: <20240426062731.501439-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20240426062731.501439-1-d.csapak@proxmox.com>

so one can see if the jobs are enabled or disabled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
alternatively we could override the render for the schedule itself,
to either show '-' like we do for all other jobs that are disabled by
removing the schedule, or add smthg like `(disabled)` to the schedule

though what this patch does is the same we have for backup jobs in pve

 www/config/PruneView.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/www/config/PruneView.js b/www/config/PruneView.js
index 94bb7dd61..d4b0841d4 100644
--- a/www/config/PruneView.js
+++ b/www/config/PruneView.js
@@ -14,6 +14,10 @@ Ext.define('pbs-prune-jobs-status', {
 	    },
 	},
 	'comment',
+	{
+	    name: 'enabled',
+	    calculate: data => !data.disable,
+	},
     ],
     idProperty: 'id',
     proxy: {
@@ -171,6 +175,14 @@ Ext.define('PBS.config.PruneJobView', {
     },
 
     columns: [
+	{
+	    header: gettext('Enabled'),
+	    width: 80,
+	    dataIndex: 'enabled',
+	    align: 'center',
+	    renderer: Proxmox.Utils.renderEnabledIcon,
+	    sortable: true,
+	},
 	{
 	    header: gettext('Job ID'),
 	    dataIndex: 'id',
-- 
2.39.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


      reply	other threads:[~2024-04-26  6:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  6:27 [pbs-devel] [PATCH proxmox-backup 1/2] ui: datastore add: validate if path is absolute Dominik Csapak
2024-04-26  6:27 ` Dominik Csapak [this message]

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=20240426062731.501439-2-d.csapak@proxmox.com \
    --to=d.csapak@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal