Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (admin-ui): show tokens in Client View #1888

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions admin-ui/app/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"yes": "Yes",
"change_password": "Change Password",
"close": "Close",
"clear": "Clear",
"try_again": "Try Again",
"delete": "Delete",
"revoke": "Revoke",
Expand All @@ -52,7 +53,8 @@
"add_source_attribute": "Add source attribute",
"add_source_ldap_server": "Add source LDAP server",
"remove_source_server": "Remove source server",
"copy_to_clipboard": "Copy To Clipboard"
"copy_to_clipboard": "Copy To Clipboard",
"export_csv":"Export CSV"
},
"dashboard": {
"summary_title": "Actives Users & Access Token Stats",
Expand Down Expand Up @@ -368,7 +370,7 @@
"script_properties": "Script Properties",
"umaAuthorizationPolicies": "Authorization Policies",
"associatedClients": "Associated Clients",
"creationDate": "Creation Time",
"creationDate": "Creation Date",
"creatorType": "Creator",
"iconUrl": "Icon URL",
"scopes:": "Scopes",
Expand Down Expand Up @@ -550,6 +552,13 @@
"problems_at_last_run": "Problems at the last run",
"mapping": "Mapping",
"source": "Source",
"expiration_date": "Expiration Date",
"created_date": "Created Date",
"token_type": "Token Type",
"token_code": "Token Code",
"deleteable": "Deleteable",
"grant_Id": "Grant ID",
"reference_id": "Reference ID",
"createdBy": "Created By",
"deviceName": "Device Name",
"OSName": "OS Name",
Expand Down Expand Up @@ -783,6 +792,10 @@
"redirect_uri": "Enter a redirect URI",
"redirect_uris": "Enter a redirect URI in format (e.g. https:// or schema://",
"search_pattern": "Search pattern",
"search_reference": "Search by reference",
"search_scope": "Search by scope",
"search_token": "Search by token code",
"search_date":"Search by creation date",
"sector_uri": "Enter the sector URI",
"sender_email": "Enter the sender email",
"sender_name": "Enter the sender name",
Expand All @@ -804,6 +817,7 @@
"level": "Level"
},
"titles": {
"activeTokens": "Active Tokens",
"acrs": "ACRs",
"active_users": "Actives Users && Access Token Stats",
"assets": "Jans Assets",
Expand Down
10 changes: 10 additions & 0 deletions admin-ui/app/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"apply": "Appliquer",
"back_home": "Retour à la maison",
"cancel": "Annuler",
"clear": "Effacer",
"add_server": "Ajouter un serveur",
"add_base_dn": "Ajouter un DN de base",
"change_bind_password": "Modifier le mot de passe de liaison",
Expand Down Expand Up @@ -576,6 +577,12 @@
"problems_at_last_run": "Problèmes lors de la dernière course",
"mapping": "Mapeamento",
"source": "Fonte",
"created_date": "Data de Criação",
"token_type": "Tipo de Token",
"token_code": "Código do Token",
"deleteable": "Deletável",
"grant_Id": "ID de Concessão",
"reference_id": "ID de Referência",
"createdBy": "Créé par",
"deviceName": "Nom de l'appareil",
"OSName": "Nom du système d'exploitation",
Expand Down Expand Up @@ -717,6 +724,9 @@
"redirect_uri": "Entrez un URI de redirection",
"redirect_uris": "Entrez un URI de redirection avec le modèle https:// ou schema://",
"search_pattern": "Modèle de recherche",
"search_reference": "Rechercher par référence",
"search_scope": "Rechercher par périmètre",
"search_token": "Rechercher par code du jeton",
"sector_uri": "Entrez l'URI du secteur",
"sender_email": "Entrez l'e-mail de l'expéditeur",
"sender_name": "Entrez le nom de l'expéditeur",
Expand Down
10 changes: 10 additions & 0 deletions admin-ui/app/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"change_bind_password": "Alterar Senha de Vinculação",
"set_password": "Configurar senha",
"cancel": "Cancelar",
"clear": "Limpar",
"choose": "Escolher",
"edit": "Editar",
"next": "Próxima",
Expand Down Expand Up @@ -571,6 +572,12 @@
"problems_at_last_run": "Problemas na última corrida",
"mapping": "Mapeamento",
"source": "Fonte",
"created_date": "Date de Création",
"token_type": "Type de Jeton",
"token_code": "Code de Jeton",
"deleteable": "Supprimable",
"grant_Id": "ID de Subvention",
"reference_id": "ID de Référence",
"createdBy": "Criado por",
"deviceName": "Nome do dispositivo",
"OSName": "Nome do sistema operacional",
Expand Down Expand Up @@ -713,6 +720,9 @@
"redirect_uri": "Insira um uri de redirecionamento",
"redirect_uris": "Insira um uri de redirecionamento com padrão https: // ou esquema: //",
"search_pattern": "Padrão de pesquisa",
"search_reference": "Pesquisar por referência",
"search_scope": "Pesquisar por escopo",
"search_token": "Pesquisar por código do token",
"sector_uri": "Entrar no setor uri",
"sender_email": "Digite o e-mail do remetente",
"sender_name": "Insira o nome do remetente",
Expand Down
90 changes: 50 additions & 40 deletions admin-ui/app/routes/Apps/Gluu/styles/applicationstyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,78 @@ import React from "react";

export default {
tableHeaderStyle: {
backgroundColor: 'rgb(48, 54, 65)',
color: '#FFF',
padding: '12px',
textTransform: 'uppercase',
fontSize: '16px',
backgroundColor: "rgb(48, 54, 65)",
color: "#FFF",
padding: "12px",
textTransform: "uppercase",
fontSize: "16px",
},
homeStatTooltip: {
backgroundColor: '#00C9FF',
borderRadius: '30px',
padding: '0px 5px 0px 5px',
color: 'white',
backgroundColor: "#00C9FF",
borderRadius: "30px",
padding: "0px 5px 0px 5px",
color: "white",
},
buttonStyle: {
background: '#00a260',
background: "#00a260",
},
buttonFlexIconStyles: {
display: 'flex',
alignItems: 'center',
gap: '6px'
display: "flex",
alignItems: "center",
gap: "6px",
},
customButtonStyle: {
background: '#00a260',
paddingLeft: '20px',
paddingRight: '30px',
color: 'white',
fontSize: '1.5em',
fontWeight: 'bold',
background: "#00a260",
paddingLeft: "20px",
paddingRight: "30px",
color: "white",
fontSize: "1.5em",
fontWeight: "bold",
},
healthDown: {
background: 'rgb(241 35 32)',
background: "rgb(241 35 32)",
},
healthUp: {
content: '',
content: "",
},
mainCard: {
minHeight: '70vh',
minHeight: "70vh",
borderRadius: 24,
padding: 12,
},
licensePanel: {
backgroundColor: '#F5F5F5',
float: 'left',
backgroundColor: "#F5F5F5",
float: "left",
},
fieldRequired: {
color: 'red',
fontSize: '22px',
color: "red",
fontSize: "22px",
},
removableInputRow: {
float: 'right',
justifyContent: 'center',
cursor: 'pointer',
padding: '5px',
width: '25px',
height: '25px',
marginTop: '0px',
marginRight: '-10px',
float: "right",
justifyContent: "center",
cursor: "pointer",
padding: "5px",
width: "25px",
height: "25px",
marginTop: "0px",
marginRight: "-10px",
},
shortCodesWrapperStyles: {
position: 'absolute',
position: "absolute",
right: 0,
marginRight: '0.5rem',
top: '50%',
transform: 'translateY(-70%)',
}
}
marginRight: "0.5rem",
top: "50%",
transform: "translateY(-70%)",
},
globalSearch: {
width: "100%",
display: "flex",
alignItems: "center",
justifyContent: "flex-end"
},
globalSearchPattern: {
padding: "10px",
marginTop:"25px"
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import React from "react";
import { Container, Row, Col } from "Components";
import GluuFormDetailRow from "Routes/Apps/Gluu/GluuFormDetailRow";

const ClientActiveTokenDetailPage = ({ row }) => {
const { rowData } = row;
const DOC_SECTION = "user";

return (
<Container style={{ backgroundColor: "#F5F5F5", minWidth: "100%" }}>
<Row>
<Col sm={6} xl={4}>
<GluuFormDetailRow
label="fields.created_date"
value={new Date(rowData.creationDate).toLocaleString()}
doc_category={DOC_SECTION}
doc_entry="creationDate"
/>
</Col>

<Col sm={6} xl={4}>
<GluuFormDetailRow
label="fields.expiration_date"
value={
rowData.expirationDate
? new Date(rowData.expirationDate).toLocaleString()
: "--"
}
doc_category={DOC_SECTION}
doc_entry="creationDate"
/>
</Col>

<Col sm={6} xl={4}>
<GluuFormDetailRow
label="fields.token_type"
value={rowData.tokenType}
doc_category={DOC_SECTION}
doc_entry="token_type"
/>
</Col>
<Col sm={6} xl={4}>
<GluuFormDetailRow
label="fields.scope"
value={rowData.scope}
doc_category={DOC_SECTION}
doc_entry="scope"
/>
</Col>
<Col sm={6} xl={4}>
<GluuFormDetailRow
label="fields.deleteable"
value={rowData.deletable ? "true" : "false"}
doc_category={DOC_SECTION}
doc_entry="deleteable"
/>
</Col>

<Col sm={6} xl={4}>
<GluuFormDetailRow
label="fields.attributes"
value={JSON.stringify(rowData.attributes)}
doc_category={DOC_SECTION}
doc_entry="deleteable"
/>
</Col>
</Row>
</Container>
);
};
export default ClientActiveTokenDetailPage;
Loading