From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 951751FF16F for ; Tue, 8 Jul 2025 19:09:40 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3857D1D55E; Tue, 8 Jul 2025 19:10:23 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Tue, 8 Jul 2025 19:01:14 +0200 Message-ID: <20250708170114.1556057-47-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250708170114.1556057-1-c.ebner@proxmox.com> References: <20250708170114.1556057-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.040 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [result.data] Subject: [pbs-devel] [PATCH proxmox-backup v6 37/37] ui: expose s3 refresh button for datastores backed by object store X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Allows to trigger a refresh of the local datastore contents from the WebUI. Signed-off-by: Christian Ebner --- www/datastore/Summary.js | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/www/datastore/Summary.js b/www/datastore/Summary.js index cdb34aea3..d8f59ebc5 100644 --- a/www/datastore/Summary.js +++ b/www/datastore/Summary.js @@ -301,6 +301,31 @@ Ext.define('PBS.DataStoreSummary', { }); }, }, + { + xtype: 'button', + text: gettext('S3 Refresh'), + hidden: true, + itemId: 's3RefreshButton', + reference: 's3RefreshButton', + handler: function () { + let me = this; + let datastore = me.up('panel').datastore; + Proxmox.Utils.API2Request({ + url: `/admin/datastore/${datastore}/s3-refresh`, + method: 'PUT', + failure: (response) => Ext.Msg.alert(gettext('Error'), response.htmlStatus), + success: function (response, options) { + Ext.create('Proxmox.window.TaskViewer', { + upid: response.result.data, + taskDone: () => { + me.up('panel').statusStore.load(); + Ext.ComponentQuery.query('navigationtree')[0]?.reloadStore(); + }, + }).show(); + }, + }); + }, + }, '->', { xtype: 'proxmoxRRDTypeSelector', @@ -398,6 +423,7 @@ Ext.define('PBS.DataStoreSummary', { me.mon(me.statusStore, 'load', (s, records, success) => { let mountBtn = me.lookupReferenceHolder().lookupReference('mountButton'); let unmountBtn = me.lookupReferenceHolder().lookupReference('unmountButton'); + let s3RefreshBtn = me.lookupReferenceHolder().lookupReference('s3RefreshButton'); if (!success) { lastRequestWasFailue = true; @@ -413,6 +439,16 @@ Ext.define('PBS.DataStoreSummary', { success: (response) => { let mode = response.result.data['maintenance-mode']; let [type, _message] = PBS.Utils.parseMaintenanceMode(mode); + + if (!type && response.result.data.backend) { + let backendConfig = PBS.Utils.parsePropertyString( + response.result.data.backend, + ); + if (backendConfig.type === 's3') { + s3RefreshBtn.setDisabled(true); + } + } + if (!response.result.data['backing-device']) { return; } @@ -466,6 +502,14 @@ Ext.define('PBS.DataStoreSummary', { me.lookupReferenceHolder().lookupReference('mountButton').setHidden(!removable); me.lookupReferenceHolder().lookupReference('unmountButton').setHidden(!removable); + if (data.backend) { + let backendConfig = PBS.Utils.parsePropertyString(data.backend); + let s3Backend = backendConfig.type === 's3'; + me.lookupReferenceHolder() + .lookupReference('s3RefreshButton') + .setHidden(!s3Backend); + } + let path = Ext.htmlEncode(data.path); me.down('pbsDataStoreInfo').setTitle(`${me.datastore} (${path})`); me.down('pbsDataStoreNotes').setNotes(data.comment); -- 2.47.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel