diff --git a/front/src/js/controllers/dashboardCtrl.js b/front/src/js/controllers/dashboardCtrl.js index 8efc959..38b3f95 100644 --- a/front/src/js/controllers/dashboardCtrl.js +++ b/front/src/js/controllers/dashboardCtrl.js @@ -25,6 +25,8 @@ dashboardCtrl.controller('DashboardCtrl', ['$scope', '$rootScope', '$routeParams // By default, Angular sorts object's attributes alphabetically. Countering this problem by retrieving the keys order here. $scope.categoriesOrder = Object.keys($scope.result.scoreProfiles.generic.categories); + $scope.globalScore = Math.max($scope.result.scoreProfiles.generic.globalScore, 0); + $scope.tweetText = 'I\'ve discovered this cool open-source tool that audits the front-end quality of a web page: '; } diff --git a/front/src/views/dashboard.html b/front/src/views/dashboard.html index 57c26f3..fa97376 100644 --- a/front/src/views/dashboard.html +++ b/front/src/views/dashboard.html @@ -1,12 +1,12 @@
- -
+ +

Global score

-
{{result.scoreProfiles.generic.globalScore}}/100
+
{{globalScore}}/100