Skip to content

Commit 73385c3

Browse files
authored
Merge pull request #442 from GluuFederation/admin-ui-issue-437
fix [object Object] on client basic and software panel. issue 437
2 parents b3a3f32 + 99f006d commit 73385c3

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

admin-ui/plugins/auth-server/components/Clients/ClientBasicPanel.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const ClientBasicPanel = ({
7070
function handleMouseDownClientSecret(event) {
7171
event.preventDefault()
7272
}
73-
73+
7474
return (
7575
<Container>
7676
{client.inum && (
@@ -93,7 +93,7 @@ const ClientBasicPanel = ({
9393
label="fields.client_name"
9494
name="clientName"
9595
formik={formik}
96-
value={client.clientName || client.displayName}
96+
value={client.displayName}
9797
doc_category={DOC_CATEGORY}
9898
disabled={viewOnly}
9999
/>

admin-ui/plugins/auth-server/components/Clients/ClientSoftwarePanel.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import { Col, Container, FormGroup } from 'Components'
33
import GluuInputRow from 'Routes/Apps/Gluu/GluuInputRow'
44
import GluuTypeAheadWithAdd from 'Routes/Apps/Gluu/GluuTypeAheadWithAdd'
55
import { useTranslation } from 'react-i18next'
6+
import isEmpty from 'lodash/isEmpty'
67
const DOC_CATEGORY = 'openid_client'
78

9+
const EMPTY = ''
810
function ClientSoftwarePanel({ client, scripts, formik, viewOnly }) {
911
const { t } = useTranslation()
1012

@@ -31,31 +33,31 @@ function ClientSoftwarePanel({ client, scripts, formik, viewOnly }) {
3133
label="fields.clientUri"
3234
name="clientUri"
3335
formik={formik}
34-
value={client.clientUri}
36+
value={isEmpty(client.clientUri) ? EMPTY : client.clientUri}
3537
doc_category={DOC_CATEGORY}
3638
disabled={viewOnly}
3739
/>
3840
<GluuInputRow
3941
label="fields.policy_uri"
4042
name="policyUri"
4143
formik={formik}
42-
value={client.policyUri}
44+
value={isEmpty(client.policyUri) ? EMPTY : client.policyUri}
4345
doc_category={DOC_CATEGORY}
4446
disabled={viewOnly}
4547
/>
4648
<GluuInputRow
4749
label="fields.logo_uri"
4850
name="logoUri"
4951
formik={formik}
50-
value={client.logoUri}
52+
value={isEmpty(client.logoUri) ? EMPTY : client.logoUri}
5153
doc_category={DOC_CATEGORY}
5254
disabled={viewOnly}
5355
/>
5456
<GluuInputRow
5557
label="fields.tosUri"
5658
name="tosUri"
5759
formik={formik}
58-
value={client.tosUri}
60+
value={isEmpty(client.tosUri) ? EMPTY : client.tosUri}
5961
doc_category={DOC_CATEGORY}
6062
disabled={viewOnly}
6163
/>

0 commit comments

Comments
 (0)