Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesús Ángel González committed May 15, 2018
1 parent 7e6f400 commit d6a9cf6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 3 additions & 6 deletions public/controllers/agents.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const app = modules.get('app/wazuh', []);

app.controller('agentsController', function ($timeout, $scope, $location, $q, $rootScope, appState, genericReq, apiReq, AgentsAutoComplete, errorHandler, $window) {
const filterHandler = new FilterHandler(appState.getCurrentPattern());
$rootScope.wzCurrentFilters = [];
$rootScope.completedAgent = false;
$rootScope.page = 'agents';
$scope.extensions = appState.getExtensions().extensions;
Expand Down Expand Up @@ -348,7 +347,7 @@ app.controller('agentsController', function ($timeout, $scope, $location, $q, $r

$rootScope.completedAgent = true;
assignFilters($scope.tab, id);
//assignFilters($location.search().tab,$location.search().agent);

if(!$scope.$$phase) $scope.$digest();
return;
} catch (error) {
Expand All @@ -358,7 +357,6 @@ app.controller('agentsController', function ($timeout, $scope, $location, $q, $r
};

$scope.goGroups = agent => {
$rootScope.wzCurrentFilters = [];
$rootScope.globalAgent = agent;
$scope.agentsAutoComplete.reset();
if($rootScope.ownHandlers) {
Expand Down Expand Up @@ -401,7 +399,6 @@ app.controller('agentsController', function ($timeout, $scope, $location, $q, $r

//Destroy
$scope.$on("$destroy", () => {
delete $rootScope.wzWaitForAgent;
$location.search('_a',null)
$rootScope.rawVisualizations = null;
$scope.agentsAutoComplete.reset();
Expand All @@ -411,7 +408,6 @@ app.controller('agentsController', function ($timeout, $scope, $location, $q, $r
}
}
$rootScope.ownHandlers = [];
$rootScope.wzCurrentFilters = [];
});

//PCI tab
Expand Down Expand Up @@ -450,7 +446,6 @@ app.controller('agentsController', function ($timeout, $scope, $location, $q, $r
}

$scope.goGroup = () => {
delete $rootScope.wzWaitForAgent;
$rootScope.globalAgent = $scope.agent;
$rootScope.comeFrom = 'agents';
$location.path('/manager/groups');
Expand Down Expand Up @@ -523,6 +518,8 @@ app.controller('agentsController', function ($timeout, $scope, $location, $q, $r
.then(data => {
$rootScope.rawVisualizations = data.data.raw;
checkMetrics($scope.tab,'panels');

// If tab and tabView are defined, we come from reloading and/or from a stored url
if($location.search().tab && $location.search().tabView) $rootScope.$emit('updateVis')
})
.catch(error => errorHandler.handle(error, 'Agents'));
Expand Down
2 changes: 2 additions & 0 deletions public/controllers/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ app.controller('overviewController', function ($timeout, $scope, $location, $roo
.then(data => {
$rootScope.rawVisualizations = data.data.raw;
checkMetrics($scope.tab, $scope.tabView);

// If tab and tabView are defined, we come from reloading and/or from a stored url
if($location.search().tab && $location.search().tabView) $rootScope.$emit('updateVis')
})
.catch(error => {
Expand Down
2 changes: 1 addition & 1 deletion public/templates/agents/agents.head
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<!-- <md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="load"></md-progress-linear> -->

<!-- View: Discover -->
<kbn-dis ng-if="tab != 'configuration'" ></kbn-dis>
<kbn-dis ng-if="tab != 'configuration'"></kbn-dis>

<div class="wazuh-loading" layout="column" layout-align="center center" ng-show="resultState === 'ready' && tabView === 'panels' && tab !== 'configuration' && !rendered">
<div class="percentage"><i class="fa fa-spinner fa-spin fa-fw" aria-hidden="true"></i></div>
Expand Down

0 comments on commit d6a9cf6

Please sign in to comment.