Removed console.log statements

This commit is contained in:
Jesús Ángel González 2018-05-18 13:47:10 +02:00
parent 96142cdfea
commit 1574297297
4 changed files with 8 additions and 6 deletions

View File

@ -131,7 +131,7 @@ app.controller('agentsController', function ($timeout, $scope, $location, $rootS
.then(() => assignFilters(tab,agent)) .then(() => assignFilters(tab,agent))
} }
} catch (error){ } catch (error){
console.log(error.message || error) errorHandler.handle('An error occurred while creating custom filters for visualizations','Agents',true);
} }
} }

View File

@ -154,7 +154,7 @@ app.controller('overviewController', function ($timeout, $scope, $location, $roo
.then(() => assignFilters(tab)) .then(() => assignFilters(tab))
} }
} catch(error) { } catch(error) {
console.log(error.message || error) errorHandler.handle('An error occurred while creating custom filters for visualizations','Overview',true);
} }
} }
@ -336,5 +336,9 @@ app.controller('overviewController', function ($timeout, $scope, $location, $roo
$scope.wzMonitoringEnabled = true; $scope.wzMonitoringEnabled = true;
} }
}) })
.catch(error => {console.log(error.message || error);$scope.wzMonitoringEnabled = true}); .catch(error => {
$scope.wzMonitoringEnabled = true
errorHandler.handle(error, 'Overview');
if (!$rootScope.$$phase) $rootScope.$digest();
});
}); });

View File

@ -766,14 +766,13 @@ function discoverController(
if(!appState || !globalState){ if(!appState || !globalState){
$timeout(100) $timeout(100)
.then(() => { .then(() => {
console.log('Awaiting app state...')
return loadFilters(wzCurrentFilters) return loadFilters(wzCurrentFilters)
}) })
} else { } else {
$state.filters = localChange ? $state.filters : []; $state.filters = localChange ? $state.filters : [];
queryFilter.addFilters(wzCurrentFilters) queryFilter.addFilters(wzCurrentFilters)
.then(() => console.log('Filters loaded successfully')) .then(() => { })
.catch(error => console.log(error.message || error)); .catch(error => console.log(error.message || error));
} }
} }

View File

@ -171,7 +171,6 @@ export default class WazuhElastic {
results = await this.wzWrapper.searchWazuhElementsByIndexWithRequest(req, item.title); results = await this.wzWrapper.searchWazuhElementsByIndexWithRequest(req, item.title);
} catch (error){ } catch (error){
forbidden = true; forbidden = true;
console.log(`Some user tried to fetch the index pattern ${item.title} without permissions.`)
} }
if((results && results.hits && results.hits.total >= 1) || if((results && results.hits && results.hits.total >= 1) ||
(!forbidden && results && results.hits && results.hits.total === 0) (!forbidden && results && results.hits && results.hits.total === 0)