2023-03-15 16:00:52 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
import { helper as buildHelper } from '@ember/component/helper';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
|
|
|
export const TABS = {
|
|
|
|
entity: ['details', 'aliases', 'policies', 'groups', 'metadata'],
|
|
|
|
'entity-alias': ['details', 'metadata'],
|
|
|
|
//group will be used in the model hook of the route
|
2018-05-30 02:56:15 +00:00
|
|
|
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'],
|
2018-04-03 14:16:57 +00:00
|
|
|
'group-alias': ['details'],
|
|
|
|
};
|
|
|
|
|
|
|
|
export function tabsForIdentityShow([modelType, groupType]) {
|
|
|
|
let key = modelType;
|
|
|
|
if (groupType) {
|
|
|
|
key = `${key}-${groupType}`;
|
|
|
|
}
|
|
|
|
return TABS[key];
|
|
|
|
}
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export default buildHelper(tabsForIdentityShow);
|