mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 02:15:24 +00:00
Replaced angular.forEach by native for cached loop
This commit is contained in:
parent
a00fbf962f
commit
746c56d38a
@ -83,18 +83,19 @@ function ($scope, $rootScope, $http, $routeParams, $location, Notifier, testAPI,
|
||||
genericReq.request('GET', '/api/wazuh-api/apiEntries')
|
||||
.then((data) => {
|
||||
$scope.apiEntries = data.data.length > 0 ? data.data : [];
|
||||
angular.forEach($scope.apiEntries, (value, key) => {
|
||||
if (value._source && value._source.active === 'true') {
|
||||
let i = 0, len = $scope.apiEntries;
|
||||
for(; i<len; i++){
|
||||
if ($scope.apiEntries[i]._source && $scope.apiEntries[i]._source.active === 'true') {
|
||||
$scope.currentDefault = key;
|
||||
if (value._source.extensions) {
|
||||
$scope.extensions = value._source.extensions;
|
||||
if ($scope.apiEntries[i]._source.extensions) {
|
||||
$scope.extensions = $scope.apiEntries[i]._source.extensions;
|
||||
} else {
|
||||
$scope.extensions.oscap = true;
|
||||
$scope.extensions.audit = true;
|
||||
$scope.extensions.pci = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
notify.error("Error getting API entries");
|
||||
|
Loading…
Reference in New Issue
Block a user