lib/puppet-herald/public/report/report.js in puppet-herald-0.1.1 vs lib/puppet-herald/public/report/report.js in puppet-herald-0.2.0
- old
+ new
@@ -1,24 +1,26 @@
'use strict';
angular.module('herald.report', [
'ngRoute',
+ 'herald.page',
'herald.directives'
])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/report/:reportId', {
templateUrl: 'report/report.html',
controller: 'ReportController'
});
}])
-.controller('ReportController', ['$http', '$routeParams', function($http, $routeParams) {
+.controller('ReportController', ['$http', '$routeParams', 'Page', function($http, $routeParams, Page) {
+ Page.title('Report');
var ctrl = this;
ctrl.report = null;
-
this.reportId = $routeParams.reportId;
- $http.get('/api/v1/report/' + this.reportId).success(function(data) {
+ $http.get('/api/v1/reports/' + this.reportId).success(function(data) {
ctrl.report = data;
+ Page.title('Report', data.configuration_version);
});
}]);
\ No newline at end of file