From b42958e43db76d75dc713d27917856b5a4a48228 Mon Sep 17 00:00:00 2001 From: zhangjingwei Date: Mon, 4 Mar 2024 10:08:21 +0800 Subject: [PATCH] fix: fix catalog region display fix the region display when the catalog's endpoints is empty Change-Id: Ibee94fd5895c0dfd295a3b735aac46f428cbb5b9 --- src/pages/configuration/containers/SystemInfo/Catalog.jsx | 1 + src/stores/keystone/catalog.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/configuration/containers/SystemInfo/Catalog.jsx b/src/pages/configuration/containers/SystemInfo/Catalog.jsx index 6ceeb270..04e37c6f 100644 --- a/src/pages/configuration/containers/SystemInfo/Catalog.jsx +++ b/src/pages/configuration/containers/SystemInfo/Catalog.jsx @@ -53,6 +53,7 @@ export class Catalog extends Base { dataIndex: 'region', isHideable: true, width: 150, + render: (value) => value || '-', }, { title: t('Endpoints'), diff --git a/src/stores/keystone/catalog.js b/src/stores/keystone/catalog.js index 438dccd8..591fc678 100644 --- a/src/stores/keystone/catalog.js +++ b/src/stores/keystone/catalog.js @@ -27,7 +27,7 @@ export class AuthCatalogStore extends Base { get mapper() { return (data) => ({ ...data, - region: (data.endpoints && data.endpoints[0].region) || '', + region: (data.endpoints && data.endpoints[0]?.region) || '', }); } }