Skip to content

Commit 165cf5f

Browse files
committed
feat(admin-ui): logging level in jans-link #1351
Signed-off-by: Jeet Viramgama <[email protected]>
1 parent da3a6a2 commit 165cf5f

File tree

5 files changed

+41
-9
lines changed

5 files changed

+41
-9
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"fields": {
7676
"access_token_signing_alg": "JWS alg for signing",
7777
"activate": "Activate",
78+
"use_search_limit": "Load Source Data withLimited Search",
7879
"active": "Active",
7980
"application_type": "Application type",
8081
"attributes": "Attributes",

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

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
"fields": {
120120
"issuer": "Émetteur",
121121
"base_endpoint": "Point d'Accès de Base",
122+
"use_search_limit": "Charger les données sources avec une recherche limitée",
122123
"clean_service_interval": "Intervalle de Nettoyage du Service",
123124
"clean_service_batch_chunk": "Lot de Nettoyage du Service",
124125
"use_local_cache": "Utiliser le Cache Local",

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

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
"issuer": "Emissor",
120120
"base_endpoint": "Endpoint Base",
121121
"clean_service_interval": "Intervalo de Limpeza do Serviço",
122+
"use_search_limit": "Carregar dados de origem com pesquisa limitada",
122123
"clean_service_batch_chunk": "Lote de Limpeza do Serviço",
123124
"use_local_cache": "Usar Cache Local",
124125
"logging_level": "Nível de Registo",

admin-ui/app/routes/Apps/Gluu/GluuSelectRow.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ function GluuSelectRow({
3737
disabled={disabled}
3838
>
3939
<option value="">{t('actions.choose')}...</option>
40-
{values.map((item, key) => (
41-
<option value={item} key={key}>
42-
{item}
43-
</option>
44-
))}
40+
{values.map((item) => {
41+
const value = typeof item === 'string' ? item : item.value
42+
const label = typeof item === 'string' ? item : item.label
43+
return (
44+
<option value={value} key={value}>
45+
{label}
46+
</option>
47+
)
48+
})}
4549
</CustomInput>
4650
</InputGroup>
4751
{showError ? <div style={{ color: "red" }}>{errorMessage}</div> : null}

admin-ui/plugins/jans-link/components/Tabs/ConfigurationTab.js

+29-4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ const ConfigurationTab = () => {
4141
problemCount = null,
4242
lastUpdateCount = null,
4343
lastUpdate = null,
44+
loggingLevel = [],
45+
useSearchLimit = false
4446
} = useSelector((state) => state.cacheRefreshReducer.configuration)
4547

4648
const initialValues = {
@@ -56,6 +58,8 @@ const ConfigurationTab = () => {
5658
problemCount,
5759
lastUpdateCount,
5860
lastUpdate,
61+
loggingLevel,
62+
useSearchLimit
5963
}
6064

6165
const formik = useFormik({
@@ -76,9 +80,6 @@ const ConfigurationTab = () => {
7680
`${t('fields.mandatory_fields_required')}`
7781
),
7882
}),
79-
setFieldValue: (field) => {
80-
delete values[field]
81-
},
8283
onSubmit: () => {
8384
if (isEmpty(formik.errors)) {
8485
toggle()
@@ -143,7 +144,7 @@ const ConfigurationTab = () => {
143144
name='updateMethod'
144145
value={formik.values.updateMethod}
145146
defaultValue={formik.values.updateMethod}
146-
values={['copy', 'VDS']}
147+
values={[{ value: 'copy', label: 'COPY' }, { value: 'vds', label: 'VDS' }]}
147148
formik={formik}
148149
lsize={3}
149150
rsize={9}
@@ -154,6 +155,18 @@ const ConfigurationTab = () => {
154155
errorMessage={formik.errors.updateMethod}
155156
/>
156157
</Col>
158+
<Col sm={12}>
159+
<GluuSelectRow
160+
label='fields.logging_level'
161+
name='loggingLevel'
162+
value={formik.values.loggingLevel}
163+
defaultValue={formik.values.loggingLevel}
164+
values={['TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL', 'OFF']}
165+
formik={formik}
166+
lsize={3}
167+
rsize={9}
168+
/>
169+
</Col>
157170
<Col sm={12}>
158171
<Row>
159172
<GluuLabel required label='fields.change_attribute_name_from_source_to_estination' size={3} />
@@ -263,6 +276,18 @@ const ConfigurationTab = () => {
263276
value={formik.values.linkEnabled}
264277
/>
265278
</Col>
279+
<Col sm={12}>
280+
<GluuToogleRow
281+
label='fields.use_search_limit'
282+
name='useSearchLimit'
283+
handler={(e) => {
284+
formik.setFieldValue('useSearchLimit', e.target.checked)
285+
}}
286+
lsize={3}
287+
rsize={9}
288+
value={formik.values.useSearchLimit}
289+
/>
290+
</Col>
266291
</FormGroup>
267292
<Row>
268293
<Col>

0 commit comments

Comments
 (0)