feat: Add add-principals route into a role

This commit is contained in:
Susmitha Girumala committed 2020-09-01 15:37:58 -04:00
1 parent 147aa1780d
commit 4b1fa9a345
3 files changed
+18 -22

No files matched your search

+7 -12
View File
@@ -17,31 +17,26 @@ export default class ScopesScopeRolesRoleRoute extends Route {
}
/**
* Renders the route-specific templates for header, navigation,
* Renders the role specific templates for header, navigation,
* and actions page sections.
* @override
* @param {object} controller
* @param {object} model
*/
renderTemplate(controller, model) {
renderTemplate() {
super.renderTemplate(...arguments);
this.render('scopes/scope/roles/role/-header', {
into: 'scopes/scope/roles/role',
outlet: 'header',
model
});
this.render('scopes/scope/roles/role/-actions', {
into: 'scopes/scope/roles/role',
outlet: 'actions',
model
});
this.render('scopes/scope/roles/role/-navigation', {
into: 'scopes/scope/roles/role',
outlet: 'navigation',
model
});
this.render('scopes/scope/roles/role/-actions', {
into: 'scopes/scope/roles/role',
outlet: 'actions',
});
}
}
@@ -13,7 +13,7 @@ export default class ScopesScopeRolesRoleAddPrincipalsRoute extends Route {
// =methods
/**
* Emtpy out any previously loaded users and groups
* Empty out any previously loaded users and groups
* (collectively, principals).
*/
beforeModel() {
@@ -32,8 +32,10 @@ export default class ScopesScopeRolesRoleAddPrincipalsRoute extends Route {
});
}
// =methods
/**
* Empties the actions and navigation outlets and renders a custom header.
* Renders the add-principals-specific header template.
* @override
*/
renderTemplate() {
@@ -41,17 +43,17 @@ export default class ScopesScopeRolesRoleAddPrincipalsRoute extends Route {
this.render('scopes/scope/roles/role/add-principals/-header', {
into: 'scopes/scope/roles/role',
outlet: 'header'
outlet: 'header',
});
this.render('-empty', {
into: 'scopes/scope/roles/role',
outlet: 'actions'
outlet: 'navigation',
});
this.render('-empty', {
into: 'scopes/scope/roles/role',
outlet: 'navigation'
outlet: 'actions',
});
}
@@ -79,5 +81,4 @@ export default class ScopesScopeRolesRoleAddPrincipalsRoute extends Route {
cancel() {
this.replaceWith('scopes.scope.roles.role.principals');
}
}
@@ -10,14 +10,14 @@
{{outlet "header"}}
</page.header>
<page.actions>
{{outlet "actions"}}
</page.actions>
<page.navigation>
{{outlet "navigation"}}
</page.navigation>
<page.actions>
{{outlet "actions"}}
</page.actions>
<page.body>
{{outlet}}
</page.body>