open-vault/ui/app/helpers/tabs-for-identity-show.js
Matthew Irish 96c1e547f0
UI identity lists (#4655)
* add new key_info to the list models for identity endpoints

* add details to group and show pages

* add parent groups to group tabs

* render alias the same everywhere

* space tab subnav more like the designs

* fix tests

* pull tabs in and remove padding
2018-05-29 21:56:15 -05:00

22 lines
736 B
JavaScript

import Ember from 'ember';
export const TABS = {
entity: ['details', 'aliases', 'policies', 'groups', 'metadata'],
'entity-alias': ['details', 'metadata'],
//group will be used in the model hook of the route
group: ['details', 'aliases', 'policies', 'members', 'parent-groups', 'metadata'],
'group-internal': ['details', 'policies', 'members', 'parent-groups', 'metadata'],
'group-external': ['details', 'aliases', 'policies', 'members', 'parent-groups', 'metadata'],
'group-alias': ['details'],
};
export function tabsForIdentityShow([modelType, groupType]) {
let key = modelType;
if (groupType) {
key = `${key}-${groupType}`;
}
return TABS[key];
}
export default Ember.Helper.helper(tabsForIdentityShow);