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 <stustison.ctr@kr.af.mil>
Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Scott Tustison 2022-12-22 03:31:09 -05:00 committed by GitHub
parent 6354b415ae
commit 62c170f765
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 26 additions and 1 deletions

View file

@ -26,6 +26,7 @@
}, },
"credentials": "Credencials", "credentials": "Credencials",
"clientId": "ID Client", "clientId": "ID Client",
"clientName": "Nom",
"id": "ID", "id": "ID",
"mapperType": "Tipus d''assignador", "mapperType": "Tipus d''assignador",
"password": "Contrasenya" "password": "Contrasenya"

View file

@ -47,6 +47,7 @@
"attributes": "Attribute", "attributes": "Attribute",
"credentials": "Passwörter", "credentials": "Passwörter",
"clientId": "Client-ID", "clientId": "Client-ID",
"clientName": "Name",
"leave": "Verlassen", "leave": "Verlassen",
"password": "Passwort", "password": "Passwort",
"passwordConfirmation": "Passwort bestätigen", "passwordConfirmation": "Passwort bestätigen",

View file

@ -176,6 +176,7 @@
"valuePlaceholder": "Type a value", "valuePlaceholder": "Type a value",
"credentials": "Credentials", "credentials": "Credentials",
"clientId": "Client ID", "clientId": "Client ID",
"clientName": "Name",
"id": "ID", "id": "ID",
"addMapper": "Add mapper", "addMapper": "Add mapper",
"createNewMapper": "Create new mapper", "createNewMapper": "Create new mapper",

View file

@ -26,6 +26,7 @@
}, },
"credentials": "Credenciales", "credentials": "Credenciales",
"clientId": "ID Cliente", "clientId": "ID Cliente",
"clientName": "Nombre",
"id": "ID", "id": "ID",
"mapperType": "Tipo de asignador", "mapperType": "Tipo de asignador",
"password": "Contraseña" "password": "Contraseña"

View file

@ -84,6 +84,7 @@
"attributes": "属性", "attributes": "属性",
"credentials": "クレデンシャル", "credentials": "クレデンシャル",
"clientId": "クライアントID", "clientId": "クライアントID",
"clientName": "名前",
"id": "ID", "id": "ID",
"mapperType": "マッパータイプ", "mapperType": "マッパータイプ",
"leave": "外す", "leave": "外す",

View file

@ -56,6 +56,7 @@
"attributes": "Atributai", "attributes": "Atributai",
"credentials": "Prisijungimo duomenys", "credentials": "Prisijungimo duomenys",
"clientId": "Kliento ID", "clientId": "Kliento ID",
"clientName": "Vardas",
"id": "ID", "id": "ID",
"mapperType": "Atitikmens tipas", "mapperType": "Atitikmens tipas",
"leave": "Palikti", "leave": "Palikti",

View file

@ -48,6 +48,7 @@
"attributes": "Attributter", "attributes": "Attributter",
"credentials": "Innloggingsdetaljer", "credentials": "Innloggingsdetaljer",
"clientId": "Klient-ID", "clientId": "Klient-ID",
"clientName": "Navn",
"id": "ID", "id": "ID",
"mapperType": "Mappertype", "mapperType": "Mappertype",
"leave": "Forlat", "leave": "Forlat",

View file

@ -47,6 +47,7 @@
"attributes": "Atributos", "attributes": "Atributos",
"credentials": "Credenciais", "credentials": "Credenciais",
"clientId": "ID do cliente", "clientId": "ID do cliente",
"clientName": "Nome",
"id": "ID", "id": "ID",
"mapperType": "Tipo de mapeamento", "mapperType": "Tipo de mapeamento",
"leave": "Sair", "leave": "Sair",

View file

@ -56,6 +56,7 @@
"attributes": "Атрибуты", "attributes": "Атрибуты",
"credentials": "Учетные данные", "credentials": "Учетные данные",
"clientId": "ID клиента", "clientId": "ID клиента",
"clientName": "Имя",
"id": "ID", "id": "ID",
"mapperType": "Тип сопоставления", "mapperType": "Тип сопоставления",
"leave": "Покинуть", "leave": "Покинуть",

View file

@ -56,6 +56,7 @@
"attributes": "属性", "attributes": "属性",
"credentials": "凭据", "credentials": "凭据",
"clientId": "客户端 ID", "clientId": "客户端 ID",
"clientName": "姓名",
"id": "ID", "id": "ID",
"mapperType": "映射器类型", "mapperType": "映射器类型",
"leave": "离开", "leave": "离开",

View file

@ -99,6 +99,12 @@ export default function ClientsSection() {
</Link> </Link>
); );
const ClientName = (client: ClientRepresentation) => (
<TableText wrapModifier="truncate">
{emptyFormatter()(client.name)}
</TableText>
);
const ClientDescription = (client: ClientRepresentation) => ( const ClientDescription = (client: ClientRepresentation) => (
<TableText wrapModifier="truncate"> <TableText wrapModifier="truncate">
{emptyFormatter()(client.description)} {emptyFormatter()(client.description)}
@ -200,23 +206,32 @@ export default function ClientsSection() {
{ {
name: "clientId", name: "clientId",
displayKey: "common:clientId", displayKey: "common:clientId",
transforms: [cellWidth(20)],
cellRenderer: ClientDetailLink, cellRenderer: ClientDetailLink,
}, },
{
name: "clientName",
displayKey: "common:clientName",
transforms: [cellWidth(20)],
cellRenderer: ClientName,
},
{ {
name: "protocol", name: "protocol",
displayKey: "common:type", displayKey: "common:type",
transforms: [cellWidth(10)],
cellRenderer: (client) => cellRenderer: (client) =>
getProtocolName(t, client.protocol ?? "openid-connect"), getProtocolName(t, client.protocol ?? "openid-connect"),
}, },
{ {
name: "description", name: "description",
displayKey: "common:description", displayKey: "common:description",
transforms: [cellWidth(20)], transforms: [cellWidth(30)],
cellRenderer: ClientDescription, cellRenderer: ClientDescription,
}, },
{ {
name: "baseUrl", name: "baseUrl",
displayKey: "clients:homeURL", displayKey: "clients:homeURL",
transforms: [cellWidth(20)],
cellFormatters: [formattedLinkTableCell(), emptyFormatter()], cellFormatters: [formattedLinkTableCell(), emptyFormatter()],
cellRenderer: (c) => cellRenderer: (c) =>
convertClientToUrl(c, adminClient.baseUrl), convertClientToUrl(c, adminClient.baseUrl),