From 19c5f27434ff93585054f7bdf897602e35fa296b Mon Sep 17 00:00:00 2001 From: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> Date: Mon, 17 May 2021 16:41:39 -0500 Subject: [PATCH] UI/fix identity model (#11641) --- changelog/11641.txt | 3 +++ ui/app/models/identity/group.js | 4 ++-- .../components/database-connection.hbs | 7 +++--- .../components/identity/item-details.hbs | 24 +++++++++---------- .../components/identity/item-groups.hbs | 14 ++++++----- .../components/identity/item-members.hbs | 23 +++++++++++------- .../components/identity/item-metadata.hbs | 14 +++++------ .../identity/item-parent-groups.hbs | 7 +++--- .../components/identity/item-policies.hbs | 7 +++--- .../vault/cluster/access/identity/show.hbs | 2 +- .../access/identity/_shared-tests.js | 16 ++++++++++--- .../pages/components/identity/edit-form.js | 2 ++ 12 files changed, 73 insertions(+), 50 deletions(-) create mode 100644 changelog/11641.txt diff --git a/changelog/11641.txt b/changelog/11641.txt new file mode 100644 index 000000000..84bd31188 --- /dev/null +++ b/changelog/11641.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix entity group membership and metadata not showing +``` diff --git a/ui/app/models/identity/group.js b/ui/app/models/identity/group.js index d51a96ef6..31a0b6932 100644 --- a/ui/app/models/identity/group.js +++ b/ui/app/models/identity/group.js @@ -64,8 +64,8 @@ export default IdentityModel.extend({ 'memberGroupIds.[]', function() { let { memberEntityIds, memberGroupIds } = this; - let numEntities = (memberEntityIds && memberEntityIds.get('length')) || 0; - let numGroups = (memberGroupIds && memberGroupIds.get('length')) || 0; + let numEntities = (memberEntityIds && memberEntityIds.length) || 0; + let numGroups = (memberGroupIds && memberGroupIds.length) || 0; return numEntities + numGroups > 0; } ), diff --git a/ui/app/templates/components/database-connection.hbs b/ui/app/templates/components/database-connection.hbs index 638464252..61a968316 100644 --- a/ui/app/templates/components/database-connection.hbs +++ b/ui/app/templates/components/database-connection.hbs @@ -87,7 +87,7 @@ {{form-field data-test-field attr=attr model=@model}} {{/if}} {{/each}} - + {{!-- Plugin Config Section --}}