From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id E36021FF0E4 for ; Tue, 14 Jul 2026 13:33:19 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 5BC79213E7; Tue, 14 Jul 2026 13:33:19 +0200 (CEST) Message-ID: Date: Tue, 14 Jul 2026 13:33:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH common/manager/proxmox-widget-toolkit/storage 00/13] GUI Support for Custom Storage Plugins To: "Max R. Carrara" , pve-devel@lists.proxmox.com References: <20260623143402.772452-1-m.carrara@proxmox.com> Content-Language: en-US From: Jakob Klocker In-Reply-To: <20260623143402.772452-1-m.carrara@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784028776983 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.917 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) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes 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: 6VSGYIX6VGCU47M5CBY4LBJPUZY3DP3W X-Message-ID-Hash: 6VSGYIX6VGCU47M5CBY4LBJPUZY3DP3W X-MailFrom: j.klocker@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: Thanks for the patches. I've applied the patches and tested it with the sshfs plugin [0]. Tested following: * Adding a storage of a custom type (sshfs) via the new GUI dialog - fields are generated from the schema, labels/titles render correctly. I added the `multiline` format to the sshfs plugin's private-key property. Without it the key field was a single-line input and the multiline key couldn't be entered properly, with `multiline` it is correctly rendered as a textarea and preserves newlines. * Editing an existing storage - `fixed` properties (e.g. `path` in sshfs) are shown read only, and the sensitive multiline key field shows "Unchanged" instead of leaking the stored key. * Assigning a volume from the custom storage to a VM - works. * Queried the new endpoints (`pvesh get /plugins/storage/plugin` and `.../plugin/{type}`) - all inbuilt plugins plus the custom one show up with a correctly derived schema (titles, sensitive flags, content types). I've left two minor comments on the individual patches, apart from that everything worked as expected. Great work. Tested-by: Jakob Klocker [0] https://git.proxmox.com/?p=pve-storage-plugin-examples.git;a=tree;f=plugin-sshfs;h=c7543808f7226209650d1b8b6e449392bc1f0d2d;hb=HEAD On 6/23/26 4:34 PM, Max R. Carrara wrote: > GUI Support for Custom Storage Plugins > ====================================== > > This series builds upon my previous RFC (see below), with some issues > fixed and some further improvements made. The RFC status is dropped, > rerolling this series as a proper v1. > > Big thanks to @Daniel H. for testing the RFC v2 and providing feedback! > > tl;dr: Integrate custom storage plugins into our web UI by deriving > ExtJS field definitions from our SectionConfig JSON schema. JSON schema > keys are converted into ExtJS field attributes in the front end. > > Notable Changes Since rfc-v2 > ---------------------------- > > - Rebase on master > > - Add a new "multiline" format in pve-common that prevents strings with > line breaks from being folded (thanks @Daniel H. for spotting this!) > > - Add 'title' keys to every inbuilt property and adapt some properties' > descriptions (see patch #07 for the details) > > - Add a new 'proxmoxtextarea' field in the widget toolkit (see patch #08) > --> If a property has the "multiline" format, this field is used > instead the one matching its type > > - Use some of our custom ExtJS fields for the inbuilt 'content', > 'preallocation' and 'snapshot-as-volume-chain' properties > > - Refrain from exposing properties in the UI that are exposed for any > inbuilt storage types (in order to remain consistent) > > - As with inbuilt plugins, make 'preallocation' and > 'snapshot-as-volume-chain' properties advanced fields > --> The tech-preview hint for the SAVC property is also added if a > plugin uses that property > > - If any field uses some kind of textarea field (such as "multiline" > format properties), put those fields into the wide column at the > bottom of the editing window instead > > - If no `title` key is provided in a given plugin's schema, transform > its property name into title case instead, e.g. "foo_bar" --> "Foo > Bar", "foo-bar" --> "Foo Bar" > > Overall, this results in a lot more polish. Testing would be much > appreciated -- any custom plugin should work out of the box with this > series. > > If you need prebuilt packages, holler at me! :) > > 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/ > > Summary of Changes > ------------------ > > > pve-common: > > Max R. Carrara (1): > json schema: add multiline string format > > src/PVE/JSONSchema.pm | 5 +++++ > 1 file changed, 5 insertions(+) > > > pve-storage: > > Max R. Carrara (6): > 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 > > 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 | 11 +- > 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 | 46 +++++-- > src/PVE/Storage/RBDPlugin.pm | 16 ++- > src/PVE/Storage/ZFSPlugin.pm | 16 ++- > src/PVE/Storage/ZFSPoolPlugin.pm | 9 +- > 19 files changed, 362 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 (3): > 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 > > 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 | 208 +++++++++++++++++++++++++++++ > 7 files changed, 377 insertions(+), 34 deletions(-) > create mode 100644 PVE/API2/Plugins.pm > create mode 100644 www/manager6/storage/CustomEdit.js > > > Summary over all repositories: > 30 files changed, 954 insertions(+), 100 deletions(-) >