Skip to content

Commit 53f447d

Browse files
Convert Auth Server Properties into Forms along with Back button uniformity (#2565)
* fix(admin-ui): service status shows accurate values on dashboard instead of marking Not present as Down (#2500) * feat(admin-ui): update Config API configuration screen with recent changes (#2550) * coderabbit suggestions * coderabbit suggestions * coderabbit suggestions * coderabbit suggestions * coderabbit suggestions * coderabbit suggestions * feat(admin-ui): convert Config API Properties to forms with back button uniformity (#2559) * enhancement * enhancement * enhancement * enhancement * enhancement * enhancement * enhancement * enhancement * enhancement * enhancement * feat(admin-ui): convert Auth Server Properties to forms with back button uniformity (#2560) * feat(admin-ui): Resolve issues coming in the pr * feat(admin-ui): Resolve comments in the pr * feat(admin-ui): Resolve comments in the pr * feat(admin-ui): Resolve comments in the pr * feat(admin-ui): Resolve comments in the pr * feat(admin-ui): Resolve comments in the pr * feat(admin-ui): Resolve comments in the pr * feat(admin-ui): Resolve comments in the pr * feat(admin-ui): Resolve comments in the pr * feat(admin-ui): Resolve comments in the pr * feat(admin-ui): Resolve comments on the pr * feat(admin-ui): Resolve comments on the pr * feat(admin-ui): Resolve comments on the pr * feat(admin-ui): Resolve comments on the pr * feat(admin-ui): Resolve comments on the pr --------- Signed-off-by: Faisal Siddique <71010439+faisalsiddique4400@users.noreply.github.com> Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
1 parent 39f3935 commit 53f447d

File tree

18 files changed

+933
-347
lines changed

18 files changed

+933
-347
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,15 @@
922922
"cannot_be_empty": "{{field}} cannot be empty",
923923
"must_be_valid_url": "{{field}} must be a valid URL"
924924
},
925+
"validation_messages": {
926+
"invalid_url_format": "Invalid URL format",
927+
"must_be_non_negative": "Must be non-negative",
928+
"required_field": "This field is required",
929+
"invalid_number": "Must be a valid number",
930+
"invalid_email": "Must be a valid email address",
931+
"invalid_json": "Must be valid JSON",
932+
"invalid_pattern": "Invalid format"
933+
},
925934
"tooltips": {
926935
"add_attribute": "Add attribute",
927936
"add_user": "Add User",

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,15 @@
918918
"cannot_be_empty": "{{field}} no puede estar vacío",
919919
"must_be_valid_url": "{{field}} debe ser una URL válida"
920920
},
921+
"validation_messages": {
922+
"invalid_url_format": "Formato de URL inválido",
923+
"must_be_non_negative": "Debe ser no negativo",
924+
"required_field": "Este campo es obligatorio",
925+
"invalid_number": "Debe ser un número válido",
926+
"invalid_email": "Debe ser una dirección de correo válida",
927+
"invalid_json": "Debe ser JSON válido",
928+
"invalid_pattern": "Formato inválido"
929+
},
921930
"tooltips": {
922931
"add_attribute": "Añadir atributo",
923932
"add_ldap": "Añadir LDAP",

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,15 @@
859859
"cannot_be_empty": "{{field}} ne peut pas être vide",
860860
"must_be_valid_url": "{{field}} doit être une URL valide"
861861
},
862+
"validation_messages": {
863+
"invalid_url_format": "Format d'URL invalide",
864+
"must_be_non_negative": "Doit être non-négatif",
865+
"required_field": "Ce champ est obligatoire",
866+
"invalid_number": "Doit être un nombre valide",
867+
"invalid_email": "Doit être une adresse e-mail valide",
868+
"invalid_json": "Doit être du JSON valide",
869+
"invalid_pattern": "Format invalide"
870+
},
862871
"tooltips": {
863872
"add_attribute": "Ajouter un attribut",
864873
"add_ldap": "Ajouter LDAP",

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,15 @@
854854
"cannot_be_empty": "{{field}} não pode estar vazio",
855855
"must_be_valid_url": "{{field}} deve ser uma URL válida"
856856
},
857+
"validation_messages": {
858+
"invalid_url_format": "Formato de URL inválido",
859+
"must_be_non_negative": "Deve ser não-negativo",
860+
"required_field": "Este campo é obrigatório",
861+
"invalid_number": "Deve ser um número válido",
862+
"invalid_email": "Deve ser um endereço de e-mail válido",
863+
"invalid_json": "Deve ser um JSON válido",
864+
"invalid_pattern": "Formato inválido"
865+
},
857866
"tooltips": {
858867
"add_attribute": "Adicionar atributo",
859868
"add_user": "Adicionar usuário",

admin-ui/app/routes/Apps/Gluu/GluuInlineInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const GluuInlineInput = ({
126126
handler(patch)
127127
}
128128
},
129-
[disabled, name, showSaveButtons, path, handler],
129+
[disabled, name, showSaveButtons, isValidPath, path, handler],
130130
)
131131

132132
const onAccept = useCallback(() => {

admin-ui/app/routes/Apps/Gluu/GluuTabs.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ TabPanel.displayName = 'TabPanel'
5656
const isNavigationTab = (tab: TabItem | null): tab is NavigationTab => {
5757
return Boolean(
5858
tab &&
59-
typeof tab === 'object' &&
60-
'name' in tab &&
61-
'path' in tab &&
62-
typeof tab.path === 'string' &&
63-
tab.path.trim().length > 0,
59+
typeof tab === 'object' &&
60+
'name' in tab &&
61+
'path' in tab &&
62+
typeof tab.path === 'string' &&
63+
tab.path.trim().length > 0,
6464
)
6565
}
6666

admin-ui/plugins/auth-server/components/Configuration/ConfigPage.test.js renamed to admin-ui/plugins/auth-server/components/Configuration/AuthPage.test.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import React from 'react'
22
import { render, screen, waitFor } from '@testing-library/react'
3-
import ConfigPage from './ConfigPage'
3+
import AuthPage from './AuthPage'
44
import { Provider } from 'react-redux'
5-
import i18n from '../../../../app/i18n'
6-
import { I18nextProvider } from 'react-i18next'
75
import AppTestWrapper from 'Routes/Apps/Gluu/Tests/Components/AppTestWrapper.test'
86
import { combineReducers, configureStore } from '@reduxjs/toolkit'
97

@@ -161,11 +159,11 @@ const Wrapper = ({ children }) => (
161159
</AppTestWrapper>
162160
)
163161

164-
it('Should render json properties page properly', () => {
165-
render(<ConfigPage configuration={config} permissions={permissions} />, {
162+
it('Should render json properties page properly', async () => {
163+
render(<AuthPage />, {
166164
wrapper: Wrapper,
167165
})
168-
waitFor(() => expect(screen.getByText(config.issuer)).toBeInTheDocument())
166+
await waitFor(() => expect(screen.getByText(config.issuer)).toBeInTheDocument())
169167
expect(screen.getByTestId('issuer')).toHaveValue(config.issuer)
170168
expect(screen.getByTestId('baseEndpoint')).toHaveValue(config.baseEndpoint)
171169
expect(screen.getByTestId('authorizationEndpoint')).toHaveValue(config.authorizationEndpoint)

0 commit comments

Comments
 (0)