From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 462F51FF129 for ; Fri, 17 Jul 2026 17:50:40 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 21A2321509; Fri, 17 Jul 2026 17:50:19 +0200 (CEST) From: "Max R. Carrara" To: pve-devel@lists.proxmox.com Subject: [PATCH common/manager/proxmox-widget-toolkit/storage v2 00/17] GUI Support for Custom Storage Plugins Date: Fri, 17 Jul 2026 17:49:07 +0200 Message-ID: <20260717154943.696411-1-m.carrara@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784303362443 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.117 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: RMJWIDUHPRPZ6U3STR67MPGJDOAIH6KQ X-Message-ID-Hash: RMJWIDUHPRPZ6U3STR67MPGJDOAIH6KQ X-MailFrom: m.carrara@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: GUI Support for Custom Storage Plugins - v2 =========================================== Notable Changes Since v1 ------------------------ - Fix the 'sensitive' keyword being stringified to `"1"` when enabled, instead of being an integer. (Thanks @Jakob!) - Fix a non-breaking hyphen sneaking in, most likely caused by me copying an already existing string from the UI or some other place. (Thanks @Jakob!) - Implement *experimental* support for `patternProperties` in order to support the custom schema keywords `x-advanced` and `x-hidden`, which helps to avoid hard-coding which fields are in the "Advanced" section and which ones are hidden in the UI, respectively. Please note that the commits implementing this are explicitly marked as RFC and can be dropped if `patternProperties` is undesired. I figured that this was a decent use case for `patternProperties`, but I'm on the fence whether this is something that we actually want. Feedback is very welcome in that regard. Note that the 'sensitive' keyword that's added to the returned plugin schema is kept as is at the moment -- I'm a bit on the fence here too whether it should be an 'x-' keyword or whether we should actually include it in the default schema for JSON schemas overall, as I can see it being useful in other places in the future too, e.g. the ACME plugin code (for hiding API keys etc.). Also, given that the two fixes above are rather trivial and no functionality has been changed, I suggest keeping Jakob's trailer(s) from v1 in, should this series get applied. Previous Versions ----------------- rfc-v1: https://lore.proxmox.com/pve-devel/20250908180058.530119-1-m.carrara@proxmox.com/ rfc-v2: https://lore.proxmox.com/pve-devel/20251121165858.818307-1-m.carrara@proxmox.com/ v1: https://lore.proxmox.com/pve-devel/20260623143402.772452-1-m.carrara@proxmox.com/ Summary of Changes ------------------ pve-common: Max R. Carrara (2): json schema: add multiline string format jsonschema: support 'patternProperties' and allow 'x-' keywords src/PVE/JSONSchema.pm | 66 +++++++++++++++++++++++++++++++++++----- test/json-schema-test.pl | 2 +- 2 files changed, 60 insertions(+), 8 deletions(-) pve-storage: Max R. Carrara (8): api: plugins/storage: add initial routes and endpoints api: plugins/storage/plugin: include schema in plugin metadata api: plugins/storage/plugin: mark sensitive properties in schema api: plugins/storage/plugin: factor plugin metadata code into helper api: plugins/storage/plugin: add plugins' 'content' to their metadata all plugins: add 'title' to properties, adapt 'description's plugin: mark 'preallocation' and 'content-dirs' properties as advanced plugin, dirplugin: mark certain properties as hidden src/PVE/API2/Makefile | 1 + src/PVE/API2/Plugins/Makefile | 18 +++ src/PVE/API2/Plugins/Storage.pm | 54 ++++++++ src/PVE/API2/Plugins/Storage/Makefile | 17 +++ src/PVE/API2/Plugins/Storage/Plugin.pm | 163 +++++++++++++++++++++++++ src/PVE/Storage/BTRFSPlugin.pm | 1 + src/PVE/Storage/CIFSPlugin.pm | 10 +- src/PVE/Storage/CephFSPlugin.pm | 6 +- src/PVE/Storage/DirPlugin.pm | 19 ++- src/PVE/Storage/ESXiPlugin.pm | 1 + src/PVE/Storage/ISCSIPlugin.pm | 6 +- src/PVE/Storage/LVMPlugin.pm | 10 +- src/PVE/Storage/LvmThinPlugin.pm | 3 +- src/PVE/Storage/NFSPlugin.pm | 6 +- src/PVE/Storage/PBSPlugin.pm | 5 +- src/PVE/Storage/Plugin.pm | 50 ++++++-- src/PVE/Storage/RBDPlugin.pm | 16 ++- src/PVE/Storage/ZFSPlugin.pm | 16 ++- src/PVE/Storage/ZFSPoolPlugin.pm | 9 +- 19 files changed, 374 insertions(+), 37 deletions(-) create mode 100644 src/PVE/API2/Plugins/Makefile create mode 100644 src/PVE/API2/Plugins/Storage.pm create mode 100644 src/PVE/API2/Plugins/Storage/Makefile create mode 100644 src/PVE/API2/Plugins/Storage/Plugin.pm proxmox-widget-toolkit: Max R. Carrara (3): form: introduce new 'proxmoxtextarea' field utils: introduce helper function getFieldDefFromPropertySchema acme: use helper to construct ExtJS fields from property schemas src/Utils.js | 150 +++++++++++++++++++++++++++++++++++ src/form/TextAreaField.js | 47 +++++++++++ src/window/ACMEPluginEdit.js | 42 +++------- 3 files changed, 210 insertions(+), 29 deletions(-) pve-manager: Max R. Carrara (4): api: add API routes 'plugins' and 'plugins/storage' ui: storage view: display error when no editor for storage type exists ui: storage: add basic UI integration for custom storage plugins ui: storage: use property extension keywords for UI hints PVE/API2.pm | 6 + PVE/API2/Makefile | 1 + PVE/API2/Plugins.pm | 61 +++++++++ www/manager6/Makefile | 1 + www/manager6/dc/StorageView.js | 132 ++++++++++++++----- www/manager6/storage/Base.js | 2 + www/manager6/storage/CustomEdit.js | 196 +++++++++++++++++++++++++++++ 7 files changed, 365 insertions(+), 34 deletions(-) create mode 100644 PVE/API2/Plugins.pm create mode 100644 www/manager6/storage/CustomEdit.js Summary over all repositories: 31 files changed, 1009 insertions(+), 108 deletions(-) -- Generated by murpp 0.11.0