From 596742d78241dabb3df4231da8e900a15a2675be Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Wed, 17 May 2023 17:25:59 +0800 Subject: [PATCH] Show org column better for admin (shared) --- web/src/ApplicationEditPage.js | 7 ++++--- web/src/CertListPage.js | 3 +++ web/src/ProviderListPage.js | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/web/src/ApplicationEditPage.js b/web/src/ApplicationEditPage.js index 23ea74e6..8157a8b1 100644 --- a/web/src/ApplicationEditPage.js +++ b/web/src/ApplicationEditPage.js @@ -112,7 +112,6 @@ class ApplicationEditPage extends React.Component { UNSAFE_componentWillMount() { this.getApplication(); this.getOrganizations(); - this.getCerts(); this.getProviders(); this.getSamlMetadata(); } @@ -126,6 +125,8 @@ class ApplicationEditPage extends React.Component { this.setState({ application: application, }); + + this.getCerts(application.organization); }); } @@ -144,8 +145,8 @@ class ApplicationEditPage extends React.Component { }); } - getCerts() { - CertBackend.getCerts(this.props.account.owner) + getCerts(owner) { + CertBackend.getCerts(owner) .then((res) => { this.setState({ certs: (res.msg === undefined) ? res : [], diff --git a/web/src/CertListPage.js b/web/src/CertListPage.js index b2701d7b..b9142655 100644 --- a/web/src/CertListPage.js +++ b/web/src/CertListPage.js @@ -99,6 +99,9 @@ class CertListPage extends BaseListPage { width: "150px", sorter: true, ...this.getColumnSearchProps("organization"), + render: (text, record, index) => { + return (text !== "admin") ? text : i18next.t("provider:admin (Shared)"); + }, }, { title: i18next.t("general:Created time"), diff --git a/web/src/ProviderListPage.js b/web/src/ProviderListPage.js index f6d5381b..17ab9ccb 100644 --- a/web/src/ProviderListPage.js +++ b/web/src/ProviderListPage.js @@ -112,6 +112,9 @@ class ProviderListPage extends BaseListPage { width: "150px", sorter: true, ...this.getColumnSearchProps("organization"), + render: (text, record, index) => { + return (text !== "admin") ? text : i18next.t("provider:admin (Shared)"); + }, }, { title: i18next.t("general:Created time"),