From 62c170f765ad261f93755d820a33adce5cc143d9 Mon Sep 17 00:00:00 2001 From: Scott Tustison Date: Thu, 22 Dec 2022 03:31:09 -0500 Subject: [PATCH] Added the client name to the client list view to make it easier to read the list (#4056) * Added the client name to the client list view to make it easier to differentiate clients with non-human readable client IDs * changed order and added widths Co-authored-by: stustison Co-authored-by: Erik Jan de Wit --- apps/admin-ui/public/resources/ca/common.json | 1 + apps/admin-ui/public/resources/de/common.json | 1 + apps/admin-ui/public/resources/en/common.json | 1 + apps/admin-ui/public/resources/es/common.json | 1 + apps/admin-ui/public/resources/ja/common.json | 1 + apps/admin-ui/public/resources/lt/common.json | 1 + apps/admin-ui/public/resources/no/common.json | 1 + .../admin-ui/public/resources/pt-BR/common.json | 1 + apps/admin-ui/public/resources/ru/common.json | 1 + .../admin-ui/public/resources/zh-CN/common.json | 1 + apps/admin-ui/src/clients/ClientsSection.tsx | 17 ++++++++++++++++- 11 files changed, 26 insertions(+), 1 deletion(-) diff --git a/apps/admin-ui/public/resources/ca/common.json b/apps/admin-ui/public/resources/ca/common.json index 36db26137b..732483b0c0 100644 --- a/apps/admin-ui/public/resources/ca/common.json +++ b/apps/admin-ui/public/resources/ca/common.json @@ -26,6 +26,7 @@ }, "credentials": "Credencials", "clientId": "ID Client", + "clientName": "Nom", "id": "ID", "mapperType": "Tipus d''assignador", "password": "Contrasenya" diff --git a/apps/admin-ui/public/resources/de/common.json b/apps/admin-ui/public/resources/de/common.json index 5a9a95e43e..105acf4318 100644 --- a/apps/admin-ui/public/resources/de/common.json +++ b/apps/admin-ui/public/resources/de/common.json @@ -47,6 +47,7 @@ "attributes": "Attribute", "credentials": "Passwörter", "clientId": "Client-ID", + "clientName": "Name", "leave": "Verlassen", "password": "Passwort", "passwordConfirmation": "Passwort bestätigen", diff --git a/apps/admin-ui/public/resources/en/common.json b/apps/admin-ui/public/resources/en/common.json index 7240f4c374..3c96b8f77b 100644 --- a/apps/admin-ui/public/resources/en/common.json +++ b/apps/admin-ui/public/resources/en/common.json @@ -176,6 +176,7 @@ "valuePlaceholder": "Type a value", "credentials": "Credentials", "clientId": "Client ID", + "clientName": "Name", "id": "ID", "addMapper": "Add mapper", "createNewMapper": "Create new mapper", diff --git a/apps/admin-ui/public/resources/es/common.json b/apps/admin-ui/public/resources/es/common.json index afee906eed..a32abb3698 100644 --- a/apps/admin-ui/public/resources/es/common.json +++ b/apps/admin-ui/public/resources/es/common.json @@ -26,6 +26,7 @@ }, "credentials": "Credenciales", "clientId": "ID Cliente", + "clientName": "Nombre", "id": "ID", "mapperType": "Tipo de asignador", "password": "Contraseña" diff --git a/apps/admin-ui/public/resources/ja/common.json b/apps/admin-ui/public/resources/ja/common.json index 6bcd825dac..5905c8c174 100644 --- a/apps/admin-ui/public/resources/ja/common.json +++ b/apps/admin-ui/public/resources/ja/common.json @@ -84,6 +84,7 @@ "attributes": "属性", "credentials": "クレデンシャル", "clientId": "クライアントID", + "clientName": "名前", "id": "ID", "mapperType": "マッパータイプ", "leave": "外す", diff --git a/apps/admin-ui/public/resources/lt/common.json b/apps/admin-ui/public/resources/lt/common.json index 839e1e7009..f6a3f20708 100644 --- a/apps/admin-ui/public/resources/lt/common.json +++ b/apps/admin-ui/public/resources/lt/common.json @@ -56,6 +56,7 @@ "attributes": "Atributai", "credentials": "Prisijungimo duomenys", "clientId": "Kliento ID", + "clientName": "Vardas", "id": "ID", "mapperType": "Atitikmens tipas", "leave": "Palikti", diff --git a/apps/admin-ui/public/resources/no/common.json b/apps/admin-ui/public/resources/no/common.json index a895a1074c..91618c5b91 100644 --- a/apps/admin-ui/public/resources/no/common.json +++ b/apps/admin-ui/public/resources/no/common.json @@ -48,6 +48,7 @@ "attributes": "Attributter", "credentials": "Innloggingsdetaljer", "clientId": "Klient-ID", + "clientName": "Navn", "id": "ID", "mapperType": "Mappertype", "leave": "Forlat", diff --git a/apps/admin-ui/public/resources/pt-BR/common.json b/apps/admin-ui/public/resources/pt-BR/common.json index 821bd93682..e1344363a0 100644 --- a/apps/admin-ui/public/resources/pt-BR/common.json +++ b/apps/admin-ui/public/resources/pt-BR/common.json @@ -47,6 +47,7 @@ "attributes": "Atributos", "credentials": "Credenciais", "clientId": "ID do cliente", + "clientName": "Nome", "id": "ID", "mapperType": "Tipo de mapeamento", "leave": "Sair", diff --git a/apps/admin-ui/public/resources/ru/common.json b/apps/admin-ui/public/resources/ru/common.json index 0deb86d61d..601850096c 100644 --- a/apps/admin-ui/public/resources/ru/common.json +++ b/apps/admin-ui/public/resources/ru/common.json @@ -56,6 +56,7 @@ "attributes": "Атрибуты", "credentials": "Учетные данные", "clientId": "ID клиента", + "clientName": "Имя", "id": "ID", "mapperType": "Тип сопоставления", "leave": "Покинуть", diff --git a/apps/admin-ui/public/resources/zh-CN/common.json b/apps/admin-ui/public/resources/zh-CN/common.json index c5309b5240..0b1a421e23 100644 --- a/apps/admin-ui/public/resources/zh-CN/common.json +++ b/apps/admin-ui/public/resources/zh-CN/common.json @@ -56,6 +56,7 @@ "attributes": "属性", "credentials": "凭据", "clientId": "客户端 ID", + "clientName": "姓名", "id": "ID", "mapperType": "映射器类型", "leave": "离开", diff --git a/apps/admin-ui/src/clients/ClientsSection.tsx b/apps/admin-ui/src/clients/ClientsSection.tsx index fce06ec55e..1fa3fc1672 100644 --- a/apps/admin-ui/src/clients/ClientsSection.tsx +++ b/apps/admin-ui/src/clients/ClientsSection.tsx @@ -99,6 +99,12 @@ export default function ClientsSection() { ); + const ClientName = (client: ClientRepresentation) => ( + + {emptyFormatter()(client.name)} + + ); + const ClientDescription = (client: ClientRepresentation) => ( {emptyFormatter()(client.description)} @@ -200,23 +206,32 @@ export default function ClientsSection() { { name: "clientId", displayKey: "common:clientId", + transforms: [cellWidth(20)], cellRenderer: ClientDetailLink, }, + { + name: "clientName", + displayKey: "common:clientName", + transforms: [cellWidth(20)], + cellRenderer: ClientName, + }, { name: "protocol", displayKey: "common:type", + transforms: [cellWidth(10)], cellRenderer: (client) => getProtocolName(t, client.protocol ?? "openid-connect"), }, { name: "description", displayKey: "common:description", - transforms: [cellWidth(20)], + transforms: [cellWidth(30)], cellRenderer: ClientDescription, }, { name: "baseUrl", displayKey: "clients:homeURL", + transforms: [cellWidth(20)], cellFormatters: [formattedLinkTableCell(), emptyFormatter()], cellRenderer: (c) => convertClientToUrl(c, adminClient.baseUrl),