![Austin Clark](/assets/img/avatar_default.png)
Fixes a couple of lint errors caught by `npm run lint` in timeline- overview.js and timeline-viewport.js. Also restructures the test- details controller to use appropriate `this.` syntax instead of `$scope.` In addition, eslint and eslint-config-openstack have been updated, and a new .eslintrc.json config file has been created to tweak some specific rules for stackviz. Change-Id: I9e1fe5121621730eb3efda4b99e9fe182f399aee
26 lines
519 B
JavaScript
26 lines
519 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* @ngInject
|
|
*/
|
|
function OnRun($rootScope, AppSettings) {
|
|
|
|
// change page title based on state
|
|
var disable = $rootScope.$on('$stateChangeSuccess', function(event, toState) {
|
|
$rootScope.pageTitle = '';
|
|
|
|
if (toState.title) {
|
|
$rootScope.pageTitle += toState.title;
|
|
$rootScope.pageTitle += ' \u2014 ';
|
|
}
|
|
|
|
$rootScope.pageTitle += AppSettings.appTitle;
|
|
});
|
|
|
|
$rootScope.$on('$destroy', disable);
|
|
|
|
}
|
|
|
|
OnRun.$inject = ['$rootScope','AppSettings'];
|
|
module.exports = OnRun;
|