Skip to content

Commit 1c3cc6b

Browse files
authored
fix(admin-ui): Use typescript generated client for SCHEMA plugin (#2396)
* fix(admin-ui): Use typescript generated client for SCHEMA plugin #2391 * fix(admin-ui): implement search bar for schema list #2396 * fix(admin-ui): improve the code #2396 * fix(admin-ui): Apply review suggestion #2396 * fix(admin-ui): Apply review suggestion #2391 * fix(admin-ui): Apply review suggestion #2391 * fix(admin-ui): Apply review suggestion #2391 * fix(admin-ui): Apply review suggestion #2391 * fix(admin-ui): Apply review suggestion #2391 * fix(admin-ui): Apply review suggestion #2391 * fix(admin-ui): Apply review suggestion #2391 * fix(admin-ui): Apply review suggestion #2391
1 parent 7630f1a commit 1c3cc6b

31 files changed

+1112
-1114
lines changed

admin-ui/app/locales/en/translation.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@
436436
"state": "State",
437437
"status": "Status",
438438
"scopes": "Scopes",
439+
"sort_by": "Sort By",
439440
"smtp_host": "SMTP Host",
440441
"smtp_port": "SMTP Port",
441442
"trust_host": "Trust Server",
@@ -798,6 +799,8 @@
798799
"view_script_details": "View custom script details",
799800
"add_new_user": "Add User",
800801
"error_in_saving": "Error in saving.",
802+
"loading_attribute": "Loading attribute...",
803+
"loading_attributes": "Loading attributes",
801804
"error_processiong_request": "Error in processing request.",
802805
"no_scope_in_client": "No Scope data for this Client",
803806
"no_scope_in_spontaneous_client": "No Spontaneous Scope data for this Client",
@@ -823,6 +826,13 @@
823826
"password_changed_successfully": "Password changed successfully",
824827
"device_deleted_successfully": "Device deleted successfully"
825828
},
829+
"errors": {
830+
"attribute_create_failed": "Error creating attribute",
831+
"attribute_update_failed": "Error updating attribute",
832+
"attribute_delete_failed": "Error deleting attribute",
833+
"attribute_load_failed": "Error loading attribute",
834+
"attribute_not_found": "Attribute not found"
835+
},
826836
"tooltips": {
827837
"add_attribute": "Add attribute",
828838
"add_user": "Add User",
@@ -847,7 +857,10 @@
847857
"product_version": "Version number of this database product",
848858
"driver_name": "Name of this JDBC driver",
849859
"driver_version": "Version number of this JDBC driver",
850-
"followingPermissionRequiredToBeAdded": "We need to add the following essential permissions to the role to ensure users with this role can access the Admin UI."
860+
"followingPermissionRequiredToBeAdded": "We need to add the following essential permissions to the role to ensure users with this role can access the Admin UI.",
861+
"sort_ascending": "Sort ascending",
862+
"sort_descending": "Sort descending",
863+
"clear_filters": "Clear all filters"
851864
},
852865
"placeholders": {
853866
"id": "Enter id",
@@ -1015,13 +1028,16 @@
10151028
"options": {
10161029
"admin": "ADMIN",
10171030
"active": "ACTIVE",
1031+
"all": "All",
1032+
"ascending": "Ascending",
10181033
"boolean": "BOOLEAN",
10191034
"binary": "BINARY",
10201035
"certificate": "CERTIFICATE",
10211036
"choose": "Choose",
10221037
"cluster": "CLUSTER",
10231038
"date": "DATE",
10241039
"default": "DEFAULT",
1040+
"descending": "Descending",
10251041
"disable": "disable",
10261042
"disabled": "Disabled",
10271043
"enabled": "Enabled",
@@ -1032,6 +1048,7 @@
10321048
"memcached": "MEMCACHED",
10331049
"native_persistence": "NATIVE_PERSISTENCE",
10341050
"no": "No",
1051+
"none": "None",
10351052
"numeric": "NUMERIC",
10361053
"openid": "OPENID",
10371054
"redis": "REDIS",

admin-ui/app/locales/es/translation.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@
436436
"state": "Estado",
437437
"status": "Estado",
438438
"scopes": "Ámbitos",
439+
"sort_by": "Ordenar Por",
439440
"smtp_host": "Host SMTP",
440441
"smtp_port": "Puerto SMTP",
441442
"trust_host": "Servidor de Confianza",
@@ -798,6 +799,7 @@
798799
"view_script_details": "Ver detalles del script personalizado",
799800
"add_new_user": "Agregar Usuario",
800801
"error_in_saving": "Error al guardar.",
802+
"loading_attributes": "Cargando atributos",
801803
"error_processiong_request": "Error al procesar la solicitud.",
802804
"no_scope_in_client": "Sin datos de Scope para este Cliente",
803805
"no_scope_in_spontaneous_client": "Sin datos de Scope Espontáneo para este Cliente",
@@ -823,6 +825,13 @@
823825
"password_changed_successfully": "Contraseña cambiada exitosamente",
824826
"device_deleted_successfully": "Dispositivo eliminado exitosamente"
825827
},
828+
"errors": {
829+
"attribute_create_failed": "Error al crear el atributo",
830+
"attribute_update_failed": "Error al actualizar el atributo",
831+
"attribute_delete_failed": "Error al eliminar el atributo",
832+
"attribute_load_failed": "Error al cargar el atributo",
833+
"attribute_not_found": "Atributo no encontrado"
834+
},
826835
"tooltips": {
827836
"add_attribute": "Añadir atributo",
828837
"add_ldap": "Añadir LDAP",
@@ -1012,13 +1021,16 @@
10121021
"options": {
10131022
"admin": "ADMIN",
10141023
"active": "ACTIVO",
1024+
"all": "Todos",
1025+
"ascending": "Ascendente",
10151026
"boolean": "BOOLEANO",
10161027
"binary": "BINARIO",
10171028
"certificate": "CERTIFICADO",
10181029
"choose": "Elegir",
10191030
"cluster": "CLÚSTER",
10201031
"date": "FECHA",
10211032
"default": "POR DEFECTO",
1033+
"descending": "Descendente",
10221034
"disable": "deshabilitar",
10231035
"disabled": "Deshabilitado",
10241036
"enabled": "Habilitado",
@@ -1029,6 +1041,7 @@
10291041
"memcached": "MEMCACHED",
10301042
"native_persistence": "PERSISTENCIA_NATIVA",
10311043
"no": "No",
1044+
"none": "Ninguno",
10321045
"numeric": "NUMÉRICO",
10331046
"openid": "OPENID",
10341047
"redis": "REDIS",

admin-ui/app/locales/fr/translation.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@
359359
"parLifetime": "Durée requise",
360360
"requirePar": "Requérir PAR",
361361
"scopes": "Portées",
362+
"sort_by": "Trier Par",
362363
"activate": "Activer",
363364
"active": "Active",
364365
"application_type": "Type de demande",
@@ -737,6 +738,7 @@
737738
"2FA_details": "les détails de la 2FA",
738739
"view_script_details": "Afficher les détails du script personnalisé",
739740
"add_new_user": "Ajouter un utilisateur",
741+
"loading_attributes": "Chargement des attributs",
740742
"no_scope_in_client": "Aucune donnée d'étendue pour ce client",
741743
"error_in_script": "Erreur dans le script",
742744
"see_configurations": "Voir configuration",
@@ -761,6 +763,13 @@
761763
"password_changed_successfully": "Mot de passe modifié avec succès",
762764
"device_deleted_successfully": "Appareil supprimé avec succès"
763765
},
766+
"errors": {
767+
"attribute_create_failed": "Erreur lors de la création de l'attribut",
768+
"attribute_update_failed": "Erreur lors de la mise à jour de l'attribut",
769+
"attribute_delete_failed": "Erreur lors de la suppression de l'attribut",
770+
"attribute_load_failed": "Erreur lors du chargement de l'attribut",
771+
"attribute_not_found": "Attribut introuvable"
772+
},
764773
"tooltips": {
765774
"add_attribute": "Ajouter un attribut",
766775
"add_ldap": "Ajouter LDAP",
@@ -783,7 +792,10 @@
783792
"product_version": "Numéro de version de ce produit de base de données",
784793
"driver_name": "Nom de ce pilote JDBC",
785794
"driver_version": "Numéro de version de ce pilote JDBC",
786-
"followingPermissionRequiredToBeAdded": "Nous devons ajouter les autorisations essentielles suivantes au rôle pour garantir que les utilisateurs disposant de ce rôle peuvent accéder à l'interface utilisateur d'administration."
795+
"followingPermissionRequiredToBeAdded": "Nous devons ajouter les autorisations essentielles suivantes au rôle pour garantir que les utilisateurs disposant de ce rôle peuvent accéder à l'interface utilisateur d'administration.",
796+
"sort_ascending": "Trier par ordre croissant",
797+
"sort_descending": "Trier par ordre décroissant",
798+
"clear_filters": "Effacer tous les filtres"
787799
},
788800
"placeholders": {
789801
"id": "Enter id",
@@ -910,13 +922,16 @@
910922
"options": {
911923
"admin": "ADMINISTRER",
912924
"active": "ACTIF",
925+
"all": "Tout",
926+
"ascending": "Croissant",
913927
"boolean": "BOOLEEN",
914928
"binary": "BINAIRE",
915929
"certificate": "CERTIFICAT",
916930
"choose": "Choisir",
917931
"cluster": "GROUPE",
918932
"date": "DATE",
919933
"default": "DÉFAUT",
934+
"descending": "Décroissant",
920935
"disable": "désactiver",
921936
"disabled": "Désactivée",
922937
"enabled": "Activée",
@@ -927,6 +942,7 @@
927942
"memcached": "MEMCACHED",
928943
"native_persistence": "NATIVE_PERSISTENCE",
929944
"no": "Non",
945+
"none": "Aucun",
930946
"numeric": "NUMÉRIQUE",
931947
"openid": "ID OUVERT",
932948
"redis": "REDIS",

admin-ui/app/locales/pt/translation.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@
326326
"spontaneousScopes": "Escopos espontâneos",
327327
"redirectUrisRegex": "Expressão regular de redirecionamento",
328328
"scopes": "Escopos",
329+
"sort_by": "Ordenar Por",
329330
"requestUris": "URIs de solicitação",
330331
"defaultAcrValues": "ACR padrão",
331332
"authorizedAcrValues": "ACRs autorizados",
@@ -732,6 +733,7 @@
732733
"2FA_details": "detalhes 2FA",
733734
"view_script_details": "Ver detalhes do guião personalizado",
734735
"add_new_user": "Adicionar usuário",
736+
"loading_attributes": "Carregando atributos",
735737
"no_scope_in_client": "Sem dados de Escopo para este Cliente",
736738
"error_in_script": "Erro no roteiro",
737739
"see_configurations": "Voir configuration",
@@ -756,6 +758,13 @@
756758
"password_changed_successfully": "Senha alterada com sucesso",
757759
"device_deleted_successfully": "Dispositivo excluído com sucesso"
758760
},
761+
"errors": {
762+
"attribute_create_failed": "Erro ao criar atributo",
763+
"attribute_update_failed": "Erro ao atualizar atributo",
764+
"attribute_delete_failed": "Erro ao excluir atributo",
765+
"attribute_load_failed": "Erro ao carregar atributo",
766+
"attribute_not_found": "Atributo não encontrado"
767+
},
759768
"tooltips": {
760769
"add_attribute": "Adicionar atributo",
761770
"add_user": "Adicionar usuário",
@@ -907,13 +916,16 @@
907916
"options": {
908917
"admin": "ADMIN",
909918
"active": "ATIVO",
919+
"all": "Todos",
920+
"ascending": "Ascendente",
910921
"boolean": "BOLEANO",
911922
"binary": "BINÁRIO",
912923
"certificate": "CERTIFICADO",
913924
"choose": "Escolher",
914925
"cluster": "AGRUPAR",
915926
"date": "ENCONTRO: DATA",
916927
"default": "PADRÃO",
928+
"descending": "Descendente",
917929
"disable": "desabilitar",
918930
"disabled": "Desabilitado",
919931
"enabled": "Habilitado",
@@ -924,6 +936,7 @@
924936
"memcached": "MEMCACHED",
925937
"native_persistence": "NATIVE_PERSISTENCE",
926938
"no": "Não",
939+
"none": "Nenhum",
927940
"numeric": "NUMÉRICO",
928941
"openid": "OPENID",
929942
"redis": "REDIS",
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import React from 'react'
2+
import { Row, Col } from 'Components'
3+
import GluuLabel from 'Routes/Apps/Gluu/GluuLabel'
4+
import { customColors } from '@/customColors'
5+
6+
interface GluuStatusMessageProps {
7+
message: string
8+
type: 'loading' | 'error' | 'success' | 'info'
9+
labelSize?: number
10+
colSize?: number
11+
inline?: boolean
12+
}
13+
14+
const getColorForType = (type: GluuStatusMessageProps['type']) => {
15+
switch (type) {
16+
case 'loading':
17+
case 'info':
18+
return customColors.lightBlue
19+
case 'error':
20+
return customColors.accentRed
21+
case 'success':
22+
return customColors.lightGreen
23+
default:
24+
return customColors.lightBlue
25+
}
26+
}
27+
28+
const getAriaAttributes = (type: GluuStatusMessageProps['type']) => {
29+
switch (type) {
30+
case 'error':
31+
return { 'role': 'alert', 'aria-live': 'assertive' as const }
32+
case 'success':
33+
case 'info':
34+
return { 'role': 'status', 'aria-live': 'polite' as const }
35+
case 'loading':
36+
return { 'role': 'status', 'aria-live': 'polite' as const, 'aria-busy': true }
37+
default:
38+
return { 'role': 'status', 'aria-live': 'polite' as const }
39+
}
40+
}
41+
42+
const GluuStatusMessage: React.FC<GluuStatusMessageProps> = ({
43+
message,
44+
type,
45+
labelSize = 4,
46+
colSize = 8,
47+
inline = false,
48+
}) => {
49+
const messageContent = (
50+
<div
51+
style={{
52+
color: getColorForType(type),
53+
fontSize: '0.875rem',
54+
marginTop: '0.25rem',
55+
}}
56+
{...getAriaAttributes(type)}
57+
>
58+
{message}
59+
</div>
60+
)
61+
62+
if (inline) {
63+
return messageContent
64+
}
65+
66+
return (
67+
<Row>
68+
<GluuLabel label="" size={labelSize} />
69+
<Col sm={colSize}>{messageContent}</Col>
70+
</Row>
71+
)
72+
}
73+
74+
export default GluuStatusMessage

admin-ui/plugins/admin/redux/features/WebhookSlice.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const initialState = {
1919
triggerWebhookInProgress: false,
2020
triggerWebhookMessage: '',
2121
webhookTriggerErrors: [],
22-
tiggerPayload: {
22+
triggerPayload: {
2323
feature: null,
2424
payload: null,
2525
},
@@ -107,8 +107,9 @@ const webhookSlice = createSlice({
107107
setWebhookModal: (state, action) => {
108108
state.webhookModal = action.payload
109109
},
110-
triggerWebhook: (state) => {
110+
triggerWebhook: (state, action) => {
111111
state.triggerWebhookInProgress = true
112+
state.triggerPayload = action.payload
112113
},
113114
setTriggerWebhookResponse: (state, action) => {
114115
state.triggerWebhookInProgress = false
@@ -118,7 +119,7 @@ const webhookSlice = createSlice({
118119
state.webhookTriggerErrors = action.payload
119120
},
120121
setTriggerPayload: (state, action) => {
121-
state.tiggerPayload = action.payload
122+
state.triggerPayload = action.payload
122123
},
123124
setFeatureToTrigger: (state, action) => {
124125
state.featureToTrigger = action.payload

0 commit comments

Comments
 (0)