From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 422881FF16F for ; Tue, 22 Jul 2025 14:47:47 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id ADDCA965D; Tue, 22 Jul 2025 14:49:00 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Tue, 22 Jul 2025 14:48:32 +0200 Message-ID: <20250722124837.864242-2-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250722124837.864242-1-c.ebner@proxmox.com> References: <20250722124837.864242-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753188527831 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.044 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. [state.tab] Subject: [pbs-devel] [PATCH proxmox-backup 1/6] ui: add tabs for remotes and move s3 endpoint config to it 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" As the s3 endpoint configuration might be considered a remote, move it to the remotes menu item of the sidebar. To distinguish between remote Proxmox Backup Server instances and S3 endpoints, create a tabbed panel. Further, rename current `Remotes` to `Remote Proxmox Backup Servers` to distinguish between them. Signed-off-by: Christian Ebner --- www/Makefile | 1 + www/NavigationTree.js | 8 +---- www/config/RemoteView.js | 2 +- www/config/RemotesOverview.js | 55 +++++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 www/config/RemotesOverview.js diff --git a/www/Makefile b/www/Makefile index 4a5cd1ff1..0c081d27f 100644 --- a/www/Makefile +++ b/www/Makefile @@ -60,6 +60,7 @@ JSSRC= \ config/UserView.js \ config/TokenView.js \ config/RemoteView.js \ + config/RemotesOverview.js \ config/TrafficControlView.js \ config/ACLView.js \ config/S3ClientView.js \ diff --git a/www/NavigationTree.js b/www/NavigationTree.js index 6944c78f9..351500e78 100644 --- a/www/NavigationTree.js +++ b/www/NavigationTree.js @@ -53,7 +53,7 @@ Ext.define('PBS.store.NavigationStore', { { text: gettext('Remotes'), iconCls: 'fa fa-server', - path: 'pbsRemoteView', + path: 'pbsRemotesOverview', leaf: true, }, { @@ -80,12 +80,6 @@ Ext.define('PBS.store.NavigationStore', { path: 'pbsSubscription', leaf: true, }, - { - text: gettext('S3 Remotes'), - iconCls: 'fa fa-cloud-upload', - path: 'pbsS3ClientView', - leaf: true, - }, ], }, { diff --git a/www/config/RemoteView.js b/www/config/RemoteView.js index ae1e0e90c..8b6d76fad 100644 --- a/www/config/RemoteView.js +++ b/www/config/RemoteView.js @@ -36,7 +36,7 @@ Ext.define('PBS.config.RemoteView', { stateful: true, stateId: 'grid-remotes', - title: gettext('Remotes'), + title: gettext('Remote Proxmox Backup Servers'), tools: [PBS.Utils.get_help_tool('backup-remote')], diff --git a/www/config/RemotesOverview.js b/www/config/RemotesOverview.js new file mode 100644 index 000000000..97004f060 --- /dev/null +++ b/www/config/RemotesOverview.js @@ -0,0 +1,55 @@ +Ext.define('PBS.config.RemotesOverview', { + extend: 'Ext.tab.Panel', + alias: 'widget.pbsRemotesOverview', + + title: gettext('Remotes'), + + stateId: 'pbs-remotes-panel', + stateful: true, + + stateEvents: ['tabchange'], + + applyState: function (state) { + let me = this; + if (state.tab !== undefined && me.rendered) { + me.setActiveTab(state.tab); + } else if (state.tab) { + // if we are not rendered yet, defer setting the activetab + setTimeout(function () { + me.setActiveTab(state.tab); + }, 10); + } + }, + + getState: function () { + let me = this; + return { + tab: me.getActiveTab().getItemId(), + }; + }, + + border: false, + defaults: { + border: false, + }, + + items: [ + { + xtype: 'pbsRemoteView', + iconCls: 'fa fa-server', + }, + { + xtype: 'pbsS3ClientView', + iconCls: 'fa fa-cloud-upload', + }, + ], + + initComponent: function () { + let me = this; + // remove invalid activeTab settings + if (me.activeTab && !me.items.some((item) => item.itemId === me.activeTab)) { + delete me.activeTab; + } + me.callParent(); + }, +}); -- 2.47.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel