Skip to content

Commit

Permalink
feat(admin-ui): logging level in jans-link #1351
Browse files Browse the repository at this point in the history
Signed-off-by: Jeet Viramgama <jviramgama5@gmail.com>
  • Loading branch information
jv18creator committed Sep 25, 2023
1 parent da3a6a2 commit 165cf5f
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 9 deletions.
1 change: 1 addition & 0 deletions admin-ui/app/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"fields": {
"access_token_signing_alg": "JWS alg for signing",
"activate": "Activate",
"use_search_limit": "Load Source Data withLimited Search",
"active": "Active",
"application_type": "Application type",
"attributes": "Attributes",
Expand Down
1 change: 1 addition & 0 deletions admin-ui/app/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"fields": {
"issuer": "Émetteur",
"base_endpoint": "Point d'Accès de Base",
"use_search_limit": "Charger les données sources avec une recherche limitée",
"clean_service_interval": "Intervalle de Nettoyage du Service",
"clean_service_batch_chunk": "Lot de Nettoyage du Service",
"use_local_cache": "Utiliser le Cache Local",
Expand Down
1 change: 1 addition & 0 deletions admin-ui/app/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
"issuer": "Emissor",
"base_endpoint": "Endpoint Base",
"clean_service_interval": "Intervalo de Limpeza do Serviço",
"use_search_limit": "Carregar dados de origem com pesquisa limitada",
"clean_service_batch_chunk": "Lote de Limpeza do Serviço",
"use_local_cache": "Usar Cache Local",
"logging_level": "Nível de Registo",
Expand Down
14 changes: 9 additions & 5 deletions admin-ui/app/routes/Apps/Gluu/GluuSelectRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ function GluuSelectRow({
disabled={disabled}
>
<option value="">{t('actions.choose')}...</option>
{values.map((item, key) => (
<option value={item} key={key}>
{item}
</option>
))}
{values.map((item) => {
const value = typeof item === 'string' ? item : item.value
const label = typeof item === 'string' ? item : item.label
return (
<option value={value} key={value}>
{label}
</option>
)
})}
</CustomInput>
</InputGroup>
{showError ? <div style={{ color: "red" }}>{errorMessage}</div> : null}
Expand Down
33 changes: 29 additions & 4 deletions admin-ui/plugins/jans-link/components/Tabs/ConfigurationTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ const ConfigurationTab = () => {
problemCount = null,
lastUpdateCount = null,
lastUpdate = null,
loggingLevel = [],
useSearchLimit = false
} = useSelector((state) => state.cacheRefreshReducer.configuration)

const initialValues = {
Expand All @@ -56,6 +58,8 @@ const ConfigurationTab = () => {
problemCount,
lastUpdateCount,
lastUpdate,
loggingLevel,
useSearchLimit
}

const formik = useFormik({
Expand All @@ -76,9 +80,6 @@ const ConfigurationTab = () => {
`${t('fields.mandatory_fields_required')}`
),
}),
setFieldValue: (field) => {
delete values[field]
},
onSubmit: () => {
if (isEmpty(formik.errors)) {
toggle()
Expand Down Expand Up @@ -143,7 +144,7 @@ const ConfigurationTab = () => {
name='updateMethod'
value={formik.values.updateMethod}
defaultValue={formik.values.updateMethod}
values={['copy', 'VDS']}
values={[{ value: 'copy', label: 'COPY' }, { value: 'vds', label: 'VDS' }]}
formik={formik}
lsize={3}
rsize={9}
Expand All @@ -154,6 +155,18 @@ const ConfigurationTab = () => {
errorMessage={formik.errors.updateMethod}
/>
</Col>
<Col sm={12}>
<GluuSelectRow
label='fields.logging_level'
name='loggingLevel'
value={formik.values.loggingLevel}
defaultValue={formik.values.loggingLevel}
values={['TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL', 'OFF']}
formik={formik}
lsize={3}
rsize={9}
/>
</Col>
<Col sm={12}>
<Row>
<GluuLabel required label='fields.change_attribute_name_from_source_to_estination' size={3} />
Expand Down Expand Up @@ -263,6 +276,18 @@ const ConfigurationTab = () => {
value={formik.values.linkEnabled}
/>
</Col>
<Col sm={12}>
<GluuToogleRow
label='fields.use_search_limit'
name='useSearchLimit'
handler={(e) => {
formik.setFieldValue('useSearchLimit', e.target.checked)
}}
lsize={3}
rsize={9}
value={formik.values.useSearchLimit}
/>
</Col>
</FormGroup>
<Row>
<Col>
Expand Down

0 comments on commit 165cf5f

Please sign in to comment.