From aa9b320ff93511280cf51b03d38fb9254af6b530 Mon Sep 17 00:00:00 2001 From: sa282w Date: Wed, 25 Jul 2018 13:25:43 -0400 Subject: JUnits for coverage Issue-ID: PORTAL-273 JUnits for sonar coverage Change-Id: Icb88d8563164281d29877bbc2de9c8f1f780aa0c Signed-off-by: sa282w --- .../client/app/views/dashboard/dashboard.controller.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ecomp-portal-FE-common/client/app/views/dashboard') diff --git a/ecomp-portal-FE-common/client/app/views/dashboard/dashboard.controller.js b/ecomp-portal-FE-common/client/app/views/dashboard/dashboard.controller.js index 069bc454..e1a09326 100644 --- a/ecomp-portal-FE-common/client/app/views/dashboard/dashboard.controller.js +++ b/ecomp-portal-FE-common/client/app/views/dashboard/dashboard.controller.js @@ -146,7 +146,14 @@ function _classCallCheck(instance, Constructor) { $scope.appsViewData = []; $scope.appsView = []; - $scope.sort_type = userAppSortTypePref; + if(userAppSortTypePref == ""){ + $scope.selectedSortType = $scope.sort_options[0]; + } else { + angular.forEach($scope.sort_options, function(sort_type, key){ + if(sort_type.value == userAppSortTypePref) + $scope.selectedSortType = sort_type; + }); + } applicationsService .getAppsOrderBySortPref(userAppSortTypePref) -- cgit 1.2.3-korg