initial metrics page setup

This commit is contained in:
Athou
2013-08-23 12:46:35 +02:00
parent 966caae727
commit 7fa8bef3de
7 changed files with 76 additions and 24 deletions

View File

@@ -1416,10 +1416,13 @@ module.controller('HelpController', ['$scope', 'CategoryService', 'AnalyticsServ
}]);
module.controller('FooterController', ['$scope', function($scope) {
var baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf('#'));
var hostname = window.location.hostname;
$scope.subToMeUrl = baseUrl + 'rest/feed/subscribe?url={feed}';
$scope.subToMeName = hostname.indexOf('www.commafeed.com') !== -1 ? 'CommaFeed' : 'CommaFeed (' + hostname + ')';
}]);
module.controller('MetricsCtrl', ['$scope', 'AdminMetricsService', function($scope, AdminMetricsService) {
$scope.metrics = AdminMetricsService.get();
}]);