Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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: 17 additions & 1 deletion admin-ui/app/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@
"state": "State",
"status": "Status",
"scopes": "Scopes",
"sort_by": "Sort By",
"smtp_host": "SMTP Host",
"smtp_port": "SMTP Port",
"trust_host": "Trust Server",
Expand Down Expand Up @@ -798,6 +799,8 @@
"view_script_details": "View custom script details",
"add_new_user": "Add User",
"error_in_saving": "Error in saving.",
"loading_attribute": "Loading attribute...",
"loading_attributes": "Loading attributes",
"error_processiong_request": "Error in processing request.",
"no_scope_in_client": "No Scope data for this Client",
"no_scope_in_spontaneous_client": "No Spontaneous Scope data for this Client",
Expand All @@ -823,6 +826,12 @@
"password_changed_successfully": "Password changed successfully",
"device_deleted_successfully": "Device deleted successfully"
},
"errors": {
"attribute_create_failed": "Error creating attribute",
"attribute_update_failed": "Error updating attribute",
"attribute_delete_failed": "Error deleting attribute",
"attribute_load_failed": "Error loading attribute"
},
"tooltips": {
"add_attribute": "Add attribute",
"add_user": "Add User",
Expand All @@ -847,7 +856,10 @@
"product_version": "Version number of this database product",
"driver_name": "Name of this JDBC driver",
"driver_version": "Version number of this JDBC driver",
"followingPermissionRequiredToBeAdded": "We need to add the following essential permissions to the role to ensure users with this role can access the Admin UI."
"followingPermissionRequiredToBeAdded": "We need to add the following essential permissions to the role to ensure users with this role can access the Admin UI.",
"sort_ascending": "Sort ascending",
"sort_descending": "Sort descending",
"clear_filters": "Clear all filters"
},
"placeholders": {
"id": "Enter id",
Expand Down Expand Up @@ -1015,13 +1027,16 @@
"options": {
"admin": "ADMIN",
"active": "ACTIVE",
"all": "All",
"ascending": "Ascending",
"boolean": "BOOLEAN",
"binary": "BINARY",
"certificate": "CERTIFICATE",
"choose": "Choose",
"cluster": "CLUSTER",
"date": "DATE",
"default": "DEFAULT",
"descending": "Descending",
"disable": "disable",
"disabled": "Disabled",
"enabled": "Enabled",
Expand All @@ -1032,6 +1047,7 @@
"memcached": "MEMCACHED",
"native_persistence": "NATIVE_PERSISTENCE",
"no": "No",
"none": "None",
"numeric": "NUMERIC",
"openid": "OPENID",
"redis": "REDIS",
Expand Down
6 changes: 6 additions & 0 deletions admin-ui/app/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@
"state": "Estado",
"status": "Estado",
"scopes": "Ámbitos",
"sort_by": "Ordenar Por",
"smtp_host": "Host SMTP",
"smtp_port": "Puerto SMTP",
"trust_host": "Servidor de Confianza",
Expand Down Expand Up @@ -798,6 +799,7 @@
"view_script_details": "Ver detalles del script personalizado",
"add_new_user": "Agregar Usuario",
"error_in_saving": "Error al guardar.",
"loading_attributes": "Cargando atributos",
"error_processiong_request": "Error al procesar la solicitud.",
"no_scope_in_client": "Sin datos de Scope para este Cliente",
"no_scope_in_spontaneous_client": "Sin datos de Scope Espontáneo para este Cliente",
Expand Down Expand Up @@ -1012,13 +1014,16 @@
"options": {
"admin": "ADMIN",
"active": "ACTIVO",
"all": "Todos",
"ascending": "Ascendente",
"boolean": "BOOLEANO",
"binary": "BINARIO",
"certificate": "CERTIFICADO",
"choose": "Elegir",
"cluster": "CLÚSTER",
"date": "FECHA",
"default": "POR DEFECTO",
"descending": "Descendente",
"disable": "deshabilitar",
"disabled": "Deshabilitado",
"enabled": "Habilitado",
Expand All @@ -1029,6 +1034,7 @@
"memcached": "MEMCACHED",
"native_persistence": "PERSISTENCIA_NATIVA",
"no": "No",
"none": "Ninguno",
"numeric": "NUMÉRICO",
"openid": "OPENID",
"redis": "REDIS",
Expand Down
6 changes: 6 additions & 0 deletions admin-ui/app/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@
"parLifetime": "Durée requise",
"requirePar": "Requérir PAR",
"scopes": "Portées",
"sort_by": "Trier Par",
"activate": "Activer",
"active": "Active",
"application_type": "Type de demande",
Expand Down Expand Up @@ -737,6 +738,7 @@
"2FA_details": "les détails de la 2FA",
"view_script_details": "Afficher les détails du script personnalisé",
"add_new_user": "Ajouter un utilisateur",
"loading_attributes": "Chargement des attributs",
"no_scope_in_client": "Aucune donnée d'étendue pour ce client",
"error_in_script": "Erreur dans le script",
"see_configurations": "Voir configuration",
Expand Down Expand Up @@ -910,13 +912,16 @@
"options": {
"admin": "ADMINISTRER",
"active": "ACTIF",
"all": "Tout",
"ascending": "Croissant",
"boolean": "BOOLEEN",
"binary": "BINAIRE",
"certificate": "CERTIFICAT",
"choose": "Choisir",
"cluster": "GROUPE",
"date": "DATE",
"default": "DÉFAUT",
"descending": "Décroissant",
"disable": "désactiver",
"disabled": "Désactivée",
"enabled": "Activée",
Expand All @@ -927,6 +932,7 @@
"memcached": "MEMCACHED",
"native_persistence": "NATIVE_PERSISTENCE",
"no": "Non",
"none": "Aucun",
"numeric": "NUMÉRIQUE",
"openid": "ID OUVERT",
"redis": "REDIS",
Expand Down
6 changes: 6 additions & 0 deletions admin-ui/app/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
"spontaneousScopes": "Escopos espontâneos",
"redirectUrisRegex": "Expressão regular de redirecionamento",
"scopes": "Escopos",
"sort_by": "Ordenar Por",
"requestUris": "URIs de solicitação",
"defaultAcrValues": "ACR padrão",
"authorizedAcrValues": "ACRs autorizados",
Expand Down Expand Up @@ -732,6 +733,7 @@
"2FA_details": "detalhes 2FA",
"view_script_details": "Ver detalhes do guião personalizado",
"add_new_user": "Adicionar usuário",
"loading_attributes": "Carregando atributos",
"no_scope_in_client": "Sem dados de Escopo para este Cliente",
"error_in_script": "Erro no roteiro",
"see_configurations": "Voir configuration",
Expand Down Expand Up @@ -907,13 +909,16 @@
"options": {
"admin": "ADMIN",
"active": "ATIVO",
"all": "Todos",
"ascending": "Ascendente",
"boolean": "BOLEANO",
"binary": "BINÁRIO",
"certificate": "CERTIFICADO",
"choose": "Escolher",
"cluster": "AGRUPAR",
"date": "ENCONTRO: DATA",
"default": "PADRÃO",
"descending": "Descendente",
"disable": "desabilitar",
"disabled": "Desabilitado",
"enabled": "Habilitado",
Expand All @@ -924,6 +929,7 @@
"memcached": "MEMCACHED",
"native_persistence": "NATIVE_PERSISTENCE",
"no": "Não",
"none": "Nenhum",
"numeric": "NUMÉRICO",
"openid": "OPENID",
"redis": "REDIS",
Expand Down
7 changes: 4 additions & 3 deletions admin-ui/plugins/admin/redux/features/WebhookSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const initialState = {
triggerWebhookInProgress: false,
triggerWebhookMessage: '',
webhookTriggerErrors: [],
tiggerPayload: {
triggerPayload: {
feature: null,
payload: null,
},
Expand Down Expand Up @@ -107,8 +107,9 @@ const webhookSlice = createSlice({
setWebhookModal: (state, action) => {
state.webhookModal = action.payload
},
triggerWebhook: (state) => {
triggerWebhook: (state, action) => {
state.triggerWebhookInProgress = true
state.triggerPayload = action.payload
},
setTriggerWebhookResponse: (state, action) => {
state.triggerWebhookInProgress = false
Expand All @@ -118,7 +119,7 @@ const webhookSlice = createSlice({
state.webhookTriggerErrors = action.payload
},
setTriggerPayload: (state, action) => {
state.tiggerPayload = action.payload
state.triggerPayload = action.payload
},
setFeatureToTrigger: (state, action) => {
state.featureToTrigger = action.payload
Expand Down
54 changes: 45 additions & 9 deletions admin-ui/plugins/saml/components/TrustRelationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ import { useNavigate } from 'react-router'
import { nameIDPolicyFormat } from '../helper'
import GluuUploadFile from 'Routes/Apps/Gluu/GluuUploadFile'
import SetTitle from 'Utils/SetTitle'
import { getAttributes } from 'Plugins/schema/redux/features/attributeSlice'
import { useGetAttributes } from 'JansConfigApi'
import customColors from '@/customColors'

// Maximum number of attributes to fetch for trust relationship configuration
const MAX_ATTRIBUTES_FOR_TRUST_RELATION = 100

const TrustRelationForm = ({ configs, viewOnly }) => {
const { t } = useTranslation()

Expand All @@ -48,10 +51,14 @@ const TrustRelationForm = ({ configs, viewOnly }) => {
const [fileError, setFileError] = useState(false)
const [modal, setModal] = useState(false)

const attributes = useSelector((state) => state.attributeReducer)
const {
data: attributesData,
error: attributesError,
isLoading: attributesLoading,
} = useGetAttributes({ limit: MAX_ATTRIBUTES_FOR_TRUST_RELATION })

const attributesList = attributes?.items
? attributes?.items?.map((item) => ({
const attributesList = attributesData?.entries
? attributesData.entries.map((item) => ({
dn: item?.dn,
name: item?.displayName,
}))
Expand Down Expand Up @@ -215,10 +222,7 @@ const TrustRelationForm = ({ configs, viewOnly }) => {
}
}, [savedForm])

useEffect(() => {
const options = { limit: 70 }
dispatch(getAttributes({ options }))
}, [])
// Attributes are now fetched automatically by useGetAttributes hook

const handleDrop = (files) => {
const file = files[0]
Expand Down Expand Up @@ -323,13 +327,45 @@ const TrustRelationForm = ({ configs, viewOnly }) => {
options={attributesList}
lsize={4}
rsize={8}
disabled={viewOnly}
disabled={viewOnly || attributesLoading}
onChange={saveSelectedScopes}
paginate={false}
hideHelperMessage={true}
defaultSelected={scopeFieldValue}
doc_category={DOC_SECTION}
/>
{attributesLoading && (
<Row>
<GluuLabel label="" size={4} />
<Col sm={8}>
<div
style={{
color: customColors.lightBlue,
fontSize: '0.875rem',
marginTop: '0.25rem',
}}
>
{t('messages.loading_attributes')}...
</div>
</Col>
</Row>
)}
{attributesError && (
<Row>
<GluuLabel label="" size={4} />
<Col sm={8}>
<div
style={{
color: customColors.accentRed,
fontSize: '0.875rem',
marginTop: '0.25rem',
}}
>
{t('errors.attribute_load_failed')}
</div>
</Col>
</Row>
)}
</Col>
<Col sm={10}>
<GluuSelectRow
Expand Down
Loading
Loading