all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox{,-backup} v3 00/10] fix #7904: Implement Enable checkboxes for all jobs
@ 2026-10-09 14:53 Jonas Theisen
  2026-10-09 14:53 ` [PATCH proxmox v3 01/10] fix #7904: Add 'disable' to {sync,verify,tape,gc} job schema and datastore config Jonas Theisen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jonas Theisen @ 2026-10-09 14:53 UTC (permalink / raw)
  To: pbs-devel

Goal of this patch series is to allow users to disable tasks
without having to remove their current schedule.
This was already possible for Prune jobs.

This can be used f.ex. to create jobs which are supposed to
be run only manually.

Backwards compatibiltiy was kept in mind so that existing
jobs wiithout schedules would not need manual intervention.
They will get updated and adapt the new scheme on the next
actual user change.

The "remove clear" patch is to be considered optional as it does not
interfere with the functionality of the checkboxes but was rather
added from a personal perspective that this would improve UX.

Thanks for the review and help off-list @c.ebner and @m.sandoval!

Also because of this feedback the patch series expanded by
a few patches to cover more cases and deliver more uniformity.

changes from v2:
 * inverted patches to use "disable" instead of "enable"
 * added API requirement to set disable if no schedule is set
 * fixed commit messages
 * moved default values from UI to API
 * aligned prune job config to other jobs to allow creation
   without schedule
 * added "Enable" checkboxes to the datastore creation window
 * added "prune-disable" parameter to the create datastore
   api endpoint

proxmox:

Jonas Theisen (2):
  fix #7904: Add 'disable' to {sync,verify,tape,gc} job schema and
    datastore config
  pbs-api-types: prune job: make schedule optional

 pbs-api-types/src/datastore.rs | 17 +++++++++++++++++
 pbs-api-types/src/jobs.rs      | 31 ++++++++++++++++++++++++++++++-
 2 files changed, 47 insertions(+), 1 deletion(-)


proxmox-backup:

Jonas Theisen (8):
  ui: prune job: align prune edit window to other "Enable" checkboxes
  api: prune job: align prune job schedule to other jobs
  fix #7904: api: implement "disable" for {sync,verify,tape,GC} jobs
  fix #7904: ui: job edit: introduce "Enable" checkbox for
    {sync,verify,tape,GC} jobs
  ui: improve visibility of disabled {sync,verify,tape,GC,prune} jobs on
    the overview page
  ui: calendar-event: remove clear button from calendar selector
  api: create datastore: allow creation without prune job
  ui: create datastore: add enable checkboxes for {GC, prune}

 src/api2/admin/datastore.rs                   |  1 +
 src/api2/admin/gc.rs                          | 12 ++-
 src/api2/admin/prune.rs                       |  2 +-
 src/api2/admin/sync.rs                        |  7 +-
 src/api2/admin/verify.rs                      |  7 +-
 src/api2/config/datastore.rs                  | 20 ++++-
 src/api2/config/prune.rs                      | 16 ++--
 src/api2/config/sync.rs                       | 18 ++++-
 src/api2/config/tape_backup_job.rs            |  9 ++-
 src/api2/config/verify.rs                     | 17 +++-
 src/api2/tape/backup.rs                       |  6 +-
 src/bin/proxmox-backup-proxy.rs               | 25 +++++-
 .../proxmox_backup_manager/migrate_config.rs  |  2 +-
 www/Utils.js                                  | 10 +++
 www/config/GCView.js                          |  4 +-
 www/config/PruneView.js                       |  1 +
 www/config/SyncView.js                        |  2 +
 www/config/VerifyView.js                      |  2 +
 www/form/CalendarEvent.js                     | 19 -----
 www/tape/BackupJobs.js                        |  2 +
 www/tape/window/TapeBackupJob.js              | 40 +++++++++-
 www/window/DataStoreEdit.js                   | 77 ++++++++++++++++++-
 www/window/GCJobEdit.js                       | 52 +++++++++++--
 www/window/PruneJobEdit.js                    | 19 ++++-
 www/window/SyncJobEdit.js                     | 36 ++++++++-
 www/window/VerifyJobEdit.js                   | 40 +++++++++-
 26 files changed, 392 insertions(+), 54 deletions(-)


Summary over all repositories:
  28 files changed, 439 insertions(+), 55 deletions(-)

-- 
Generated by murpp 0.12.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH proxmox v3 01/10] fix #7904: Add 'disable' to {sync,verify,tape,gc} job schema and datastore config
  2026-10-09 14:53 [PATCH proxmox{,-backup} v3 00/10] fix #7904: Implement Enable checkboxes for all jobs Jonas Theisen
@ 2026-10-09 14:53 ` Jonas Theisen
  2026-10-09 14:53 ` [PATCH proxmox v3 02/10] pbs-api-types: prune job: make schedule optional Jonas Theisen
  2026-10-09 14:53 ` [PATCH proxmox-backup v3 03/10] ui: prune job: align prune edit window to other "Enable" checkboxes Jonas Theisen
  2 siblings, 0 replies; 4+ messages in thread
From: Jonas Theisen @ 2026-10-09 14:53 UTC (permalink / raw)
  To: pbs-devel

To be able to en-/disable the respective jobs this patch adds the
"disable" field to the job config and the needed schema.

This also adds the gc_disable parameter to the datastore config
to allow this type of job to be disabled.

Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=7904
Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
---
 pbs-api-types/src/datastore.rs | 17 +++++++++++++++++
 pbs-api-types/src/jobs.rs      | 27 +++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index 93ccaf07..b8ef7509 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -460,6 +460,11 @@ pub const COUNTER_RESET_SCHEDULE_SCHEMA: Schema =
             optional: true,
             schema: SINGLE_LINE_COMMENT_SCHEMA,
         },
+        "gc-disable": {
+            description: "Disable scheduled execution of garbage collection.",
+            optional: true,
+            type: Boolean,
+        },
         "gc-schedule": {
             optional: true,
             schema: GC_SCHEDULE_SCHEMA,
@@ -524,6 +529,10 @@ pub struct DataStoreConfig {
     #[serde(skip_serializing_if = "Option::is_none")]
     pub comment: Option<String>,
 
+    #[serde(default, skip_serializing_if = "is_false")]
+    #[updater(serde(skip_serializing_if = "Option::is_none"))]
+    pub gc_disable: bool,
+
     #[serde(skip_serializing_if = "Option::is_none")]
     pub gc_schedule: Option<String>,
 
@@ -605,6 +614,7 @@ impl DataStoreConfig {
             name,
             path,
             comment: None,
+            gc_disable: Default::default(),
             gc_schedule: None,
             gc_on_unmount: None,
             prune_schedule: None,
@@ -1704,6 +1714,9 @@ pub struct GarbageCollectionJobStatus {
     pub store: String,
     #[serde(flatten)]
     pub status: GarbageCollectionStatus,
+    /// Is this job disabled
+    #[serde(default)]
+    pub disable: bool,
     /// Schedule of the gc job
     #[serde(skip_serializing_if = "Option::is_none")]
     pub schedule: Option<String>,
@@ -1721,6 +1734,10 @@ pub struct GarbageCollectionJobStatus {
     pub duration: Option<i64>,
 }
 
+fn is_false(b: &bool) -> bool {
+    !b
+}
+
 #[api(
     properties: {
         "gc-status": {
diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs
index 9a5d2b77..73d7c13f 100644
--- a/pbs-api-types/src/jobs.rs
+++ b/pbs-api-types/src/jobs.rs
@@ -228,6 +228,11 @@ pub const VERIFICATION_OUTDATED_AFTER_SCHEMA: Schema =
             optional: true,
             schema: VERIFICATION_SCHEDULE_SCHEMA,
         },
+        disable: {
+            type: Boolean,
+            optional: true,
+            default: false,
+        },
         ns: {
             optional: true,
             schema: BACKUP_NAMESPACE_SCHEMA,
@@ -267,6 +272,10 @@ pub struct VerificationJobConfig {
     #[serde(skip_serializing_if = "Option::is_none")]
     /// when to schedule this job in calendar event notation
     pub schedule: Option<String>,
+    /// Disable this job.
+    #[serde(default, skip_serializing_if = "is_false")]
+    #[updater(serde(skip_serializing_if = "Option::is_none"))]
+    pub disable: bool,
     #[serde(skip_serializing_if = "Option::is_none", default)]
     /// on which backup namespace to run the verification recursively
     pub ns: Option<BackupNamespace>,
@@ -403,6 +412,11 @@ pub struct TapeBackupJobSetup {
             optional: true,
             schema: SYNC_SCHEDULE_SCHEMA,
         },
+        disable: {
+            type: Boolean,
+            optional: true,
+            default: false,
+        },
     }
 )]
 #[derive(Serialize, Deserialize, Clone, Updater, PartialEq)]
@@ -417,6 +431,10 @@ pub struct TapeBackupJobConfig {
     pub comment: Option<String>,
     #[serde(skip_serializing_if = "Option::is_none")]
     pub schedule: Option<String>,
+    /// Disable this job.
+    #[serde(default, skip_serializing_if = "is_false")]
+    #[updater(serde(skip_serializing_if = "Option::is_none"))]
+    pub disable: bool,
 }
 
 #[api(
@@ -642,6 +660,11 @@ pub const UNMOUNT_ON_SYNC_DONE_SCHEMA: Schema =
             optional: true,
             schema: SYNC_SCHEDULE_SCHEMA,
         },
+        disable: {
+            type: Boolean,
+            optional: true,
+            default: false,
+        },
         "group-filter": {
             schema: GROUP_FILTER_LIST_SCHEMA,
             optional: true,
@@ -717,6 +740,10 @@ pub struct SyncJobConfig {
     pub comment: Option<String>,
     #[serde(skip_serializing_if = "Option::is_none")]
     pub schedule: Option<String>,
+    /// Disable this job.
+    #[serde(default, skip_serializing_if = "is_false")]
+    #[updater(serde(skip_serializing_if = "Option::is_none"))]
+    pub disable: bool,
     #[serde(skip_serializing_if = "Option::is_none")]
     pub group_filter: Option<Vec<GroupFilter>>,
     #[serde(flatten)]
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH proxmox v3 02/10] pbs-api-types: prune job: make schedule optional
  2026-10-09 14:53 [PATCH proxmox{,-backup} v3 00/10] fix #7904: Implement Enable checkboxes for all jobs Jonas Theisen
  2026-10-09 14:53 ` [PATCH proxmox v3 01/10] fix #7904: Add 'disable' to {sync,verify,tape,gc} job schema and datastore config Jonas Theisen
@ 2026-10-09 14:53 ` Jonas Theisen
  2026-10-09 14:53 ` [PATCH proxmox-backup v3 03/10] ui: prune job: align prune edit window to other "Enable" checkboxes Jonas Theisen
  2 siblings, 0 replies; 4+ messages in thread
From: Jonas Theisen @ 2026-10-09 14:53 UTC (permalink / raw)
  To: pbs-devel

To align the prune job API to the other job types and
to make use of the disable parameter the schedule should be optional.
If this is not the case a new prune job cannot be created to be
manually run i.e. disabled without a schedule.

This also means the schedule should be an Option<String> instead
of a plain String. This is based on the existing other jobs.

Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
---
 pbs-api-types/src/jobs.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs
index 73d7c13f..9587971a 100644
--- a/pbs-api-types/src/jobs.rs
+++ b/pbs-api-types/src/jobs.rs
@@ -924,6 +924,7 @@ impl PruneJobOptions {
             schema: DATASTORE_SCHEMA,
         },
         schedule: {
+            optional: true,
             schema: PRUNE_SCHEDULE_SCHEMA,
         },
         comment: {
@@ -950,7 +951,8 @@ pub struct PruneJobConfig {
     #[updater(serde(skip_serializing_if = "Option::is_none"))]
     pub disable: bool,
 
-    pub schedule: String,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub schedule: Option<String>,
 
     #[serde(skip_serializing_if = "Option::is_none")]
     pub comment: Option<String>,
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH proxmox-backup v3 03/10] ui: prune job: align prune edit window to other "Enable" checkboxes
  2026-10-09 14:53 [PATCH proxmox{,-backup} v3 00/10] fix #7904: Implement Enable checkboxes for all jobs Jonas Theisen
  2026-10-09 14:53 ` [PATCH proxmox v3 01/10] fix #7904: Add 'disable' to {sync,verify,tape,gc} job schema and datastore config Jonas Theisen
  2026-10-09 14:53 ` [PATCH proxmox v3 02/10] pbs-api-types: prune job: make schedule optional Jonas Theisen
@ 2026-10-09 14:53 ` Jonas Theisen
  2 siblings, 0 replies; 4+ messages in thread
From: Jonas Theisen @ 2026-10-09 14:53 UTC (permalink / raw)
  To: pbs-devel

This commit aligns the already existing "Enabled" checkbox in
the Prune Job Edit window to the other checkboxes.

Meaning a reword from "Enabled" to "Enable" as it is more common
throghout the UI and the disabling of the schedule field if the
checkbox is off.

Signed-off-by: Jonas Theisen <j.theisen@proxmox.com>
---
 www/window/PruneJobEdit.js | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/www/window/PruneJobEdit.js b/www/window/PruneJobEdit.js
index a3dafde21..2eb8c7129 100644
--- a/www/window/PruneJobEdit.js
+++ b/www/window/PruneJobEdit.js
@@ -43,6 +43,15 @@ Ext.define('PBS.window.PruneJobEdit', {
         },
     },
 
+    setValues: function (values) {
+        let me = this;
+
+        if (!values.schedule || values.schedule === '') {
+            values.disable = true;
+        }
+        me.callParent([values]);
+    },
+
     items: {
         xtype: 'inputpanel',
         onGetValues: function (values) {
@@ -118,11 +127,19 @@ Ext.define('PBS.window.PruneJobEdit', {
             },
             {
                 xtype: 'proxmoxcheckbox',
-                fieldLabel: gettext('Enabled'),
+                fieldLabel: gettext('Enable'),
                 name: 'enable',
                 uncheckedValue: 0,
                 defaultValue: 1,
                 checked: true,
+                listeners: {
+                    change: function (field, enabled) {
+                        let me = this;
+                        let view = me.up('pbsPruneJobEdit');
+                        let schedule = view.down('field[name=schedule]');
+                        schedule.setDisabled(!enabled);
+                    },
+                },
             },
         ],
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-09 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09 14:53 [PATCH proxmox{,-backup} v3 00/10] fix #7904: Implement Enable checkboxes for all jobs Jonas Theisen
2026-10-09 14:53 ` [PATCH proxmox v3 01/10] fix #7904: Add 'disable' to {sync,verify,tape,gc} job schema and datastore config Jonas Theisen
2026-10-09 14:53 ` [PATCH proxmox v3 02/10] pbs-api-types: prune job: make schedule optional Jonas Theisen
2026-10-09 14:53 ` [PATCH proxmox-backup v3 03/10] ui: prune job: align prune edit window to other "Enable" checkboxes Jonas Theisen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal