Merge remote-tracking branch 'origin/main' into init-sessions-view

This commit is contained in:
Susmitha Girumala committed 2021-01-29 15:24:01 -05:00
commit 3b346d4ca8
2 files changed
+17 -4

No files matched your search

+14 -3
View File
@@ -67,16 +67,27 @@ export default class ScopesScopeRoute extends Route {
this.scope.org = selectedOrg;
this.scope.project = selectedProject;
this.scopes = { orgs, projects, selectedOrg, selectedProject };
// Update the controller (if exists), since setupController is only
// called once the first time the route is activated. It is not called
// again on route refreshes.
if (this.controller) this.setControllerProperties(this.scopes);
}
/**
* Adds the scopes hash to the controller context (see `afterModel`).
* @param {Controller} controller
*/
setupController(controller) {
setupController(/* controller */) {
super.setupController(...arguments);
const scopes = this.scopes;
controller.setProperties({ scopes });
this.setControllerProperties(this.scopes);
}
/**
* Updates the controller's `scopes`.
* @param {array} scopes
*/
setControllerProperties(scopes) {
this.controller.setProperties({ scopes });
}
/**
@@ -77,7 +77,9 @@
<message.description>
{{t 'resources.auth-method.messages.welcome.description'}}
</message.description>
<message.link @route="scopes.scope.auth-methods.new">
<message.link
@route="scopes.scope.auth-methods.new"
@query={{hash type="password"}}>
<Rose::Icon @name="plus-circle-outline" />
{{t 'titles.new'}}
</message.link>