diff --git a/app/admin-tab/settings/controller.js b/app/admin-tab/settings/controller.js index 908acafae..e6b573c6c 100644 --- a/app/admin-tab/settings/controller.js +++ b/app/admin-tab/settings/controller.js @@ -3,6 +3,7 @@ import C from 'ui/utils/constants'; export default Ember.Controller.extend({ settings: Ember.inject.service(), + projects: Ember.inject.service(), queryParams: ['backToAdd'], backToAdd: false, @@ -30,7 +31,6 @@ export default Ember.Controller.extend({ } if (this.get('backToAdd')) { - propsOut[C.SETTING.API_HOST] = model.host; } else { @@ -59,7 +59,7 @@ export default Ember.Controller.extend({ if (this.get('backToAdd')) { - this.transitionToRoute('hosts.new'); + this.transitionToRoute('hosts.new', this.get('projects.current.id')); } else { this.send('goToPrevious'); diff --git a/app/application/route.js b/app/application/route.js index bcc991198..7ce4727f6 100644 --- a/app/application/route.js +++ b/app/application/route.js @@ -5,6 +5,7 @@ export default Ember.Route.extend({ cookies: Ember.inject.service(), github: Ember.inject.service(), access: Ember.inject.service(), + settings: Ember.inject.service(), previousParams: null, previousRoute: null, @@ -163,7 +164,13 @@ export default Ember.Route.extend({ } }, + updateWindowTitle: function() { + document.title = this.get('settings.appName'); + }.observes('settings.appName'), + beforeModel() { + this.updateWindowTitle(); + var agent = window.navigator.userAgent.toLowerCase(); if ( agent.indexOf('msie ') >= 0 || agent.indexOf('trident/') >= 0 || agent.indexOf('edge/') >= 0 ) { diff --git a/app/application/template.hbs b/app/application/template.hbs index 51f7c1748..823e2f3df 100644 --- a/app/application/template.hbs +++ b/app/application/template.hbs @@ -18,7 +18,7 @@