Skip to content

Commit 918a959

Browse files
committed
fix(admin-ui): show client name
1 parent ad38103 commit 918a959

File tree

1 file changed

+19
-33
lines changed

1 file changed

+19
-33
lines changed

admin-ui/plugins/auth-server/components/Scopes/ScopeForm.js

+19-33
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
372372
<FormGroup row>
373373
<GluuLabel label="fields.associatedClients" size={4} />
374374
<Col sm={8}>
375-
{client.map((item) => (
376-
<div>
375+
{client.map((item, key) => (
376+
<div key={'uma-client' + key}>
377377
<a
378378
onClick={() =>
379379
goToClientViewPage(item.inum, item)
@@ -383,7 +383,7 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
383383
cursor: 'pointer',
384384
}}
385385
>
386-
{item.inum}
386+
{item.displayName ? item.displayName : item.inum}
387387
</a>
388388
</div>
389389
))}
@@ -434,18 +434,21 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
434434
size={4}
435435
/>
436436
<Col sm={8}>
437-
<div>
438-
{scope.attributes.spontaneousClientId}
439-
<IconButton
440-
onClick={() =>
441-
goToClientViewPage(
442-
scope.attributes.spontaneousClientId,
443-
)
444-
}
445-
>
446-
<Visibility />
447-
</IconButton>
448-
</div>
437+
{client.map((item, key) => (
438+
<div key={'spontaneous-client' + key}>
439+
<a
440+
onClick={() =>
441+
goToClientViewPage(item.inum, item)
442+
}
443+
style={{
444+
textDecoration: 'underline',
445+
cursor: 'pointer',
446+
}}
447+
>
448+
{item.displayName ? item.displayName : item.inum}
449+
</a>
450+
</div>
451+
))}
449452
</Col>
450453
</FormGroup>
451454
</GluuTooltip>
@@ -475,24 +478,7 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
475478
</Col>
476479
</FormGroup>
477480
</GluuTooltip>
478-
<FormGroup row>
479-
<GluuLabel label="fields.associatedClients" size={4} />
480-
<Col sm={8}>
481-
{client.map((item) => (
482-
<div>
483-
<a
484-
onClick={() => goToClientViewPage(item.inum, item)}
485-
style={{
486-
textDecoration: 'underline',
487-
cursor: 'pointer',
488-
}}
489-
>
490-
{item.inum}
491-
</a>
492-
</div>
493-
))}
494-
</Col>
495-
</FormGroup>
481+
496482
<FormGroup row>
497483
<GluuLabel label="fields.creationDate" size={4} />
498484
<Col sm={8}>

0 commit comments

Comments
 (0)