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 4526E1FF16B for ; Thu, 28 Nov 2024 11:40:33 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B50437510; Thu, 28 Nov 2024 11:40:34 +0100 (CET) From: Stefan Hanreich To: pbs-devel@lists.proxmox.com Date: Thu, 28 Nov 2024 11:40:32 +0100 Message-Id: <20241128104032.66011-1-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.231 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 KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods 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. RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [pbs-devel] [PATCH proxmox-backup 1/1] ui: mask unmounted datastores in datastore overview 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" Currently, showing the Datastore summary page leads to errors since the status returned by the API does not contain any fields that are checked by the component rendering the datastore summary. We solve this by checking if the datastore is currently mounted first and mask the element if it is currently unmounted. Signed-off-by: Stefan Hanreich --- www/datastore/DataStoreListSummary.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/www/datastore/DataStoreListSummary.js b/www/datastore/DataStoreListSummary.js index f7ea83e7..b43f1ab2 100644 --- a/www/datastore/DataStoreListSummary.js +++ b/www/datastore/DataStoreListSummary.js @@ -35,6 +35,13 @@ Ext.define('PBS.datastore.DataStoreListSummary', { let me = this; let vm = me.getViewModel(); + if (statusData['mount-status'] === 'notmounted') { + let maskMessage = gettext('Datastore is not mounted'); + let maskIcon = 'fa pbs-unplugged-mask'; + me.mask(maskMessage, maskIcon); + return; + } + if (statusData.error !== undefined) { Proxmox.Utils.API2Request({ url: `/config/datastore/${statusData.store}`, -- 2.39.5 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel