Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
#509 remove localStorage from alert details filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuel Lauria committed Apr 18, 2018
1 parent be4e5ab commit 5ff5555
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions zmon-controller-ui/js/controllers/AlertDetailsCtrl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('zmon2App').controller('AlertDetailsCtrl', [ '$location', '$routeParams', '$scope', 'timespanFilter', 'CommunicationService', 'DowntimesService', 'FeedbackMessageService', 'localStorageService', 'MainAlertService', 'UserInfoService', 'APP_CONST', function($location, $routeParams, $scope, timespanFilter, CommunicationService, DowntimesService, FeedbackMessageService, localStorageService, MainAlertService, UserInfoService, APP_CONST) {
angular.module('zmon2App').controller('AlertDetailsCtrl', [ '$location', '$routeParams', '$scope', 'timespanFilter', 'CommunicationService', 'DowntimesService', 'FeedbackMessageService', 'MainAlertService', 'UserInfoService', 'APP_CONST', function($location, $routeParams, $scope, timespanFilter, CommunicationService, DowntimesService, FeedbackMessageService, MainAlertService, UserInfoService, APP_CONST) {

// infinite-scroll initial limit
$scope.limit = APP_CONST.INFINITE_SCROLL_VISIBLE_ENTITIES_INCREMENT;
Expand Down Expand Up @@ -57,7 +57,7 @@ angular.module('zmon2App').controller('AlertDetailsCtrl', [ '$location', '$route

// Entity Filter. Defined as object to $watch by reference on 'str' since input field is inside ui-bootstrap's tabset.
$scope.alertDetailsSearch = {
str: $location.search().filter || localStorageService.get('alertDetailsSearchStr') || ''
str: $location.search().filter || ''
};

var setLinkToTrialRun = function () {
Expand Down Expand Up @@ -305,7 +305,6 @@ angular.module('zmon2App').controller('AlertDetailsCtrl', [ '$location', '$route
str = null;
}
$location.search('filter', str);
localStorageService.set('alertDetailsSearchStr', str);
if ($scope.alert) {
$scope.limit = APP_CONST.INFINITE_SCROLL_VISIBLE_ENTITIES_INCREMENT;
$scope.allAlerts = getSelectedAlerts()
Expand Down

0 comments on commit 5ff5555

Please sign in to comment.