all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox-backup 4/5] ui: expose per-datastore fstrim job schedule
Date: Thu, 19 Mar 2026 15:36:48 +0100	[thread overview]
Message-ID: <20260319143649.681937-6-c.ebner@proxmox.com> (raw)
In-Reply-To: <20260319143649.681937-1-c.ebner@proxmox.com>

Allows to configure the fstrim job schedule in the datastore options.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 www/Makefile                |  1 +
 www/datastore/OptionView.js |  7 +++++++
 www/window/FstrimJobEdit.js | 27 +++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 100644 www/window/FstrimJobEdit.js

diff --git a/www/Makefile b/www/Makefile
index 9ebf0445f..32ae479ea 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -87,6 +87,7 @@ JSSRC=							\
 	window/SyncJobEdit.js				\
 	window/PruneJobEdit.js				\
 	window/GCJobEdit.js				\
+	window/FstrimJobEdit.js				\
 	window/UserEdit.js				\
 	window/S3ClientEdit.js				\
 	window/Settings.js				\
diff --git a/www/datastore/OptionView.js b/www/datastore/OptionView.js
index 7854e64d7..7eb498ee8 100644
--- a/www/datastore/OptionView.js
+++ b/www/datastore/OptionView.js
@@ -334,5 +334,12 @@ Ext.define('PBS.Datastore.Options', {
                 },
             },
         },
+        'fstrim-schedule': {
+            required: true,
+            header: gettext('fstrim Schedule'),
+            editor: {
+                xtype: 'pbsFstrimJobEdit',
+            },
+        },
     },
 });
diff --git a/www/window/FstrimJobEdit.js b/www/window/FstrimJobEdit.js
new file mode 100644
index 000000000..daf355eb2
--- /dev/null
+++ b/www/window/FstrimJobEdit.js
@@ -0,0 +1,27 @@
+Ext.define('PBS.window.FstrimJobEdit', {
+    extend: 'Proxmox.window.Edit',
+    alias: 'widget.pbsFstrimJobEdit',
+    mixins: ['Proxmox.Mixin.CBind'],
+
+    userid: undefined,
+    isAdd: false,
+
+    subject: gettext('fstrim Schedule'),
+
+    cbindData: function (initial) {
+        let me = this;
+
+        me.datastore = encodeURIComponent(me.datastore);
+        me.url = `/api2/extjs/config/datastore/${me.datastore}`;
+        me.method = 'PUT';
+        me.autoLoad = true;
+        return {};
+    },
+
+    items: {
+        xtype: 'pbsCalendarEvent',
+        name: 'fstrim-schedule',
+        fieldLabel: gettext('fstrim Schedule'),
+        emptyText: gettext('none (disabled)'),
+    },
+});
-- 
2.47.3





  parent reply	other threads:[~2026-03-19 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 14:36 [RFC proxmox{,-backup} 0/6] add scheduled fstrim job for datastore's backing filesystems Christian Ebner
2026-03-19 14:36 ` [PATCH proxmox 1/1] pbs-api-types: define fstrim schedule on datastore config Christian Ebner
2026-03-19 14:36 ` [PATCH proxmox-backup 1/5] tools: add helper to run fstrim command on path or mountpoint Christian Ebner
2026-03-19 14:36 ` [PATCH proxmox-backup 2/5] api: config: expose fstrim schedule for datastores Christian Ebner
2026-03-19 14:36 ` [PATCH proxmox-backup 3/5] bin: proxy: periodically schedule fstrim on datastore's filesystems Christian Ebner
2026-03-19 15:02   ` Christian Ebner
2026-03-19 14:36 ` Christian Ebner [this message]
2026-03-19 14:36 ` [PATCH proxmox-backup 5/5] api: set default fstrim schedule on datastore create 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=20260319143649.681937-6-c.ebner@proxmox.com \
    --to=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 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