2016-10-25 19:54:05 +00:00
|
|
|
// Require utils
|
2017-10-27 12:20:16 +00:00
|
|
|
let base64 = require('plugins/wazuh/utils/base64.js');
|
2017-05-25 16:29:54 +00:00
|
|
|
import chrome from 'ui/chrome';
|
2016-10-25 19:54:05 +00:00
|
|
|
|
2017-10-20 19:04:22 +00:00
|
|
|
// Require App
|
2017-12-12 16:59:19 +00:00
|
|
|
let app = require('ui/modules').get('app/wazuh', []).controller('settingsController', function ($scope, $rootScope, $http, $routeParams, $route, $location, Notifier, testAPI, appState, genericReq, courier) {
|
|
|
|
$rootScope.page = "settings";
|
|
|
|
|
|
|
|
// Initialize
|
|
|
|
const notify = new Notifier({ location: 'Settings' });
|
2017-12-21 16:05:43 +00:00
|
|
|
var currentApiEntryIndex;
|
2017-12-12 16:59:19 +00:00
|
|
|
$scope.formData = {};
|
|
|
|
$scope.formData.user = "";
|
|
|
|
$scope.formData.password = "";
|
|
|
|
$scope.formData.url = "";
|
|
|
|
$scope.accept_ssl = true;
|
|
|
|
$scope.editConfiguration = true;
|
|
|
|
$scope.menuNavItem = 'settings';
|
|
|
|
$scope.load = true;
|
|
|
|
$scope.extensions = {
|
|
|
|
oscap: true,
|
|
|
|
audit: true,
|
|
|
|
pci: true
|
|
|
|
};
|
|
|
|
$scope.addManagerContainer = false;
|
|
|
|
$scope.submenuNavItem = "api";
|
|
|
|
|
|
|
|
// Getting the index pattern list into the scope
|
|
|
|
$scope.indexPatterns = $route.current.locals.ip
|
2017-12-21 16:05:43 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
if ($routeParams.tab){
|
|
|
|
$scope.submenuNavItem = $routeParams.tab;
|
2017-10-27 12:20:16 +00:00
|
|
|
}
|
2017-08-13 19:54:56 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
// Watch tab change
|
|
|
|
$scope.$watch('submenuNavItem', () => {
|
|
|
|
$location.search('tab', $scope.submenuNavItem);
|
|
|
|
});
|
|
|
|
|
|
|
|
// Remove API entry
|
|
|
|
$scope.removeManager = (item) => {
|
|
|
|
let index = $scope.apiEntries.indexOf(item);
|
|
|
|
|
|
|
|
if (appState.getCurrentAPI() !== undefined && appState.getCurrentAPI() !== null) {
|
|
|
|
if ($scope.apiEntries[index]._id === JSON.parse(appState.getCurrentAPI()).id) { // We are trying to remove the one selected as default
|
|
|
|
notify.warning("Please remove another API.");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
genericReq.request('DELETE', `/api/wazuh-api/apiEntries/${$scope.apiEntries[index]._id}`)
|
2017-10-27 12:20:16 +00:00
|
|
|
.then(() => {
|
2017-12-12 16:59:19 +00:00
|
|
|
$scope.apiEntries.splice(index, 1);
|
2017-10-27 12:20:16 +00:00
|
|
|
})
|
|
|
|
.catch(() => {
|
2017-12-12 16:59:19 +00:00
|
|
|
notify.error("Could not remove manager");
|
|
|
|
});
|
|
|
|
};
|
2016-10-25 19:54:05 +00:00
|
|
|
|
2017-12-21 16:05:43 +00:00
|
|
|
// Get current API index
|
|
|
|
$scope.getCurrentAPIIndex = () => {
|
|
|
|
for(var i = 0; i < $scope.apiEntries.length; i += 1) {
|
|
|
|
if($scope.apiEntries[i]._id === $scope.currentDefault) {
|
|
|
|
currentApiEntryIndex = i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
// Set default API
|
|
|
|
$scope.setDefault = (item) => {
|
2017-10-27 12:20:16 +00:00
|
|
|
let index = $scope.apiEntries.indexOf(item);
|
2017-12-12 16:59:19 +00:00
|
|
|
|
|
|
|
genericReq.request('PUT', `/api/wazuh-api/apiEntries/${$scope.apiEntries[index]._id}`)
|
2017-10-27 12:20:16 +00:00
|
|
|
.then(() => {
|
2017-12-12 16:59:19 +00:00
|
|
|
appState.setClusterInfo($scope.apiEntries[index]._source.cluster_info);
|
|
|
|
if ($scope.apiEntries[index]._source.cluster_info.status == 'disabled')
|
|
|
|
appState.setCurrentAPI(JSON.stringify({name: $scope.apiEntries[index]._source.cluster_info.manager, id: $scope.apiEntries[index]._id }));
|
2017-12-21 16:05:43 +00:00
|
|
|
else
|
2017-12-12 16:59:19 +00:00
|
|
|
appState.setCurrentAPI(JSON.stringify({name: $scope.apiEntries[index]._source.cluster_info.cluster, id: $scope.apiEntries[index]._id }));
|
|
|
|
|
|
|
|
$scope.$emit('updateAPI', {});
|
|
|
|
|
|
|
|
$scope.currentDefault = JSON.parse(appState.getCurrentAPI()).id;
|
|
|
|
$scope.extensions = $scope.apiEntries[index]._source.extensions;
|
|
|
|
notify.info(`API ${$scope.apiEntries[index]._source.cluster_info.manager} set as default`);
|
2017-12-21 16:05:43 +00:00
|
|
|
|
|
|
|
$scope.getCurrentAPIIndex();
|
|
|
|
|
|
|
|
$scope.extensions.oscap = $scope.apiEntries[currentApiEntryIndex]._source.extensions.oscap;
|
|
|
|
$scope.extensions.audit = $scope.apiEntries[currentApiEntryIndex]._source.extensions.audit;
|
|
|
|
$scope.extensions.pci = $scope.apiEntries[currentApiEntryIndex]._source.extensions.pci;
|
|
|
|
|
|
|
|
appState.setExtensions($scope.apiEntries[currentApiEntryIndex]._source.extensions);
|
2017-10-27 12:20:16 +00:00
|
|
|
})
|
2017-12-12 16:59:19 +00:00
|
|
|
.catch((error) => {
|
|
|
|
notify.error("Could not set that manager API as default due to " + error);
|
|
|
|
});
|
|
|
|
};
|
2017-08-13 19:54:56 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
// Get settings function
|
|
|
|
$scope.getSettings = () => {
|
2017-10-27 12:20:16 +00:00
|
|
|
genericReq.request('GET', '/api/wazuh-api/apiEntries')
|
|
|
|
.then((data) => {
|
2017-12-12 16:59:19 +00:00
|
|
|
$scope.apiEntries = data.data.length > 0 ? data.data : [];
|
2017-12-21 16:05:43 +00:00
|
|
|
if (appState.getCurrentAPI() !== undefined && appState.getCurrentAPI() !== null)
|
2017-12-12 16:59:19 +00:00
|
|
|
$scope.currentDefault = JSON.parse(appState.getCurrentAPI()).id;
|
|
|
|
|
2017-12-21 16:05:43 +00:00
|
|
|
$scope.getCurrentAPIIndex();
|
|
|
|
|
|
|
|
$scope.extensions.oscap = $scope.apiEntries[currentApiEntryIndex]._source.extensions.oscap;
|
|
|
|
$scope.extensions.audit = $scope.apiEntries[currentApiEntryIndex]._source.extensions.audit;
|
|
|
|
$scope.extensions.pci = $scope.apiEntries[currentApiEntryIndex]._source.extensions.pci;
|
|
|
|
|
|
|
|
appState.setExtensions($scope.apiEntries[currentApiEntryIndex]._source.extensions);
|
2017-10-27 12:20:16 +00:00
|
|
|
})
|
|
|
|
.catch(() => {
|
2017-12-12 16:59:19 +00:00
|
|
|
notify.error("Error getting API entries");
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
// Save settings function
|
|
|
|
$scope.saveSettings = () => {
|
|
|
|
|
|
|
|
let tmpData = {
|
|
|
|
'user': $scope.formData.user,
|
|
|
|
'password': base64.encode($scope.formData.password),
|
|
|
|
'url': $scope.formData.url,
|
|
|
|
'port': $scope.formData.port,
|
|
|
|
'cluster_info': {},
|
|
|
|
'insecure': 'true',
|
|
|
|
'id': $scope.apiEntries.length
|
|
|
|
};
|
2017-10-27 12:20:16 +00:00
|
|
|
|
2017-12-18 12:04:28 +00:00
|
|
|
const userRegEx = new RegExp(/^[a-zA-Z0-9]{3,100}$/);
|
2017-12-21 16:05:43 +00:00
|
|
|
const passRegEx = new RegExp(/^.{3,100}$/);
|
|
|
|
const urlRegEx = new RegExp(/^https?:\/\/[a-zA-Z0-9]{1,300}$/);
|
|
|
|
const urlRegExIP = new RegExp(/^https?:\/\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/);
|
|
|
|
const portRegEx = new RegExp(/^[0-9]{2,5}$/);
|
2017-12-18 12:04:28 +00:00
|
|
|
|
|
|
|
// Validate user
|
|
|
|
if(!userRegEx.test($scope.formData.user)){
|
|
|
|
$scope.messageError = 'Invalid user field';
|
|
|
|
return notify.error('Invalid user field');
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validate password
|
|
|
|
if(!passRegEx.test($scope.formData.password)){
|
|
|
|
$scope.messageError = 'Invalid password field';
|
|
|
|
return notify.error('Invalid password field');
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validate url
|
|
|
|
if(!urlRegEx.test($scope.formData.url) && !urlRegExIP.test($scope.formData.url)){
|
|
|
|
$scope.messageError = 'Invalid url field';
|
|
|
|
return notify.error('Invalid url field');
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validate port
|
|
|
|
const validatePort = parseInt($scope.formData.port);
|
|
|
|
if(!portRegEx.test($scope.formData.port) || validatePort <= 0 || validatePort >= 99999) {
|
|
|
|
$scope.messageError = 'Invalid port field';
|
|
|
|
return notify.error('Invalid port field');
|
|
|
|
}
|
|
|
|
|
2017-10-27 12:20:16 +00:00
|
|
|
testAPI.check(tmpData)
|
|
|
|
.then((data) => {
|
2017-12-12 16:59:19 +00:00
|
|
|
// API Check correct. Get Cluster info
|
|
|
|
tmpData.cluster_info = data.data;
|
|
|
|
|
|
|
|
tmpData.extensions = {
|
|
|
|
"oscap": true,
|
|
|
|
"audit": true,
|
|
|
|
"pci": true
|
|
|
|
};
|
|
|
|
|
|
|
|
// Insert new API entry
|
2017-10-27 12:20:16 +00:00
|
|
|
genericReq.request('PUT', '/api/wazuh-api/settings', tmpData)
|
|
|
|
.then((data) => {
|
2017-12-12 16:59:19 +00:00
|
|
|
let newEntry = {
|
|
|
|
_id: data.data.response._id,
|
|
|
|
_source: {
|
|
|
|
cluster_info: tmpData.cluster_info,
|
|
|
|
active: tmpData.active,
|
|
|
|
url: tmpData.url,
|
|
|
|
api_user: tmpData.user,
|
|
|
|
api_port: tmpData.port
|
|
|
|
}
|
|
|
|
};
|
|
|
|
$scope.apiEntries.push(newEntry);
|
2017-12-21 15:44:21 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
notify.info('Wazuh API successfully added');
|
|
|
|
$scope.addManagerContainer = false;
|
|
|
|
$scope.formData.user = "";
|
|
|
|
$scope.formData.password = "";
|
|
|
|
$scope.formData.url = "";
|
|
|
|
$scope.formData.port = "";
|
|
|
|
|
|
|
|
// Setting current API as default if no one is in the cookies
|
2017-12-21 15:44:21 +00:00
|
|
|
if (!appState.getCurrentAPI()) { // No cookie
|
2017-12-12 16:59:19 +00:00
|
|
|
|
2017-12-21 15:44:21 +00:00
|
|
|
if ($scope.apiEntries[$scope.apiEntries.length - 1]._source.cluster_info.status === 'disabled')
|
2017-12-12 16:59:19 +00:00
|
|
|
appState.setCurrentAPI(JSON.stringify({name: $scope.apiEntries[$scope.apiEntries.length - 1]._source.cluster_info.manager, id: $scope.apiEntries[$scope.apiEntries.length - 1]._id }));
|
2017-12-21 16:05:43 +00:00
|
|
|
else
|
2017-12-12 16:59:19 +00:00
|
|
|
appState.setCurrentAPI(JSON.stringify({name: $scope.apiEntries[$scope.apiEntries.length - 1]._source.cluster_info.cluster, id: $scope.apiEntries[$scope.apiEntries.length - 1]._id }));
|
|
|
|
|
|
|
|
$scope.$emit('updateAPI', {});
|
|
|
|
$scope.currentDefault = JSON.parse(appState.getCurrentAPI()).id;
|
|
|
|
}
|
2017-10-27 12:20:16 +00:00
|
|
|
|
|
|
|
genericReq.request('GET', '/api/wazuh-api/fetchAgents')
|
|
|
|
.then(() => {})
|
|
|
|
.catch(() => {
|
2017-12-12 16:59:19 +00:00
|
|
|
notify.error("Error fetching agents");
|
|
|
|
});
|
2017-10-27 12:20:16 +00:00
|
|
|
})
|
|
|
|
.catch((error, status) => {
|
2017-12-12 16:59:19 +00:00
|
|
|
if (status === '400') notify.error("Please, fill all the fields in order to connect with Wazuh RESTful API.");
|
|
|
|
else notify.error("Some error ocurred, could not save data in elasticsearch.");
|
|
|
|
});
|
2017-10-27 12:20:16 +00:00
|
|
|
})
|
2017-12-20 16:49:27 +00:00
|
|
|
.catch(error => printError(error));
|
2017-12-12 16:59:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Check manager connectivity
|
|
|
|
$scope.checkManager = (item) => {
|
|
|
|
let index = $scope.apiEntries.indexOf(item);
|
|
|
|
|
2017-12-21 15:44:21 +00:00
|
|
|
|
|
|
|
testAPI.check_stored(item._id)
|
|
|
|
.then(data => {
|
|
|
|
|
|
|
|
let tmpData = {};
|
|
|
|
|
|
|
|
tmpData.cluster_info = data.data.data.cluster_info;
|
2017-12-12 16:59:19 +00:00
|
|
|
|
2017-10-30 10:52:54 +00:00
|
|
|
let tmpUrl = `/api/wazuh-api/updateApiHostname/${$scope.apiEntries[index]._id}`;
|
2017-12-12 16:59:19 +00:00
|
|
|
genericReq.request('PUT', tmpUrl , { "cluster_info": tmpData.cluster_info })
|
2017-10-27 12:20:16 +00:00
|
|
|
.then(() => {
|
2017-12-12 16:59:19 +00:00
|
|
|
$scope.apiEntries[index]._source.cluster_info = tmpData.cluster_info;
|
|
|
|
});
|
|
|
|
|
|
|
|
if (tmpData.cluster_info.status == 'disabled')
|
|
|
|
appState.setCurrentAPI(JSON.stringify({name: tmpData.cluster_info.manager, id: $scope.apiEntries[index]._id }));
|
2017-12-21 16:05:43 +00:00
|
|
|
else
|
2017-12-12 16:59:19 +00:00
|
|
|
appState.setCurrentAPI(JSON.stringify({name: tmpData.cluster_info.cluster, id: $scope.apiEntries[index]._id }));
|
|
|
|
|
|
|
|
$scope.$emit('updateAPI', {});
|
|
|
|
$scope.currentDefault = JSON.parse(appState.getCurrentAPI()).id;
|
|
|
|
|
|
|
|
$rootScope.apiIsDown = null;
|
2017-12-21 15:44:21 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
notify.info("Connection success");
|
2017-10-27 12:20:16 +00:00
|
|
|
})
|
2017-12-21 15:44:21 +00:00
|
|
|
.catch(error => printError(error));
|
2017-12-12 16:59:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Process form
|
|
|
|
$scope.processForm = () => {
|
|
|
|
$scope.messageError = "";
|
|
|
|
$scope.saveSettings();
|
|
|
|
};
|
|
|
|
|
|
|
|
// Toggle extension
|
|
|
|
$scope.toggleExtension = (extension, state) => {
|
|
|
|
if (['oscap','audit','pci'].includes(extension)) {
|
2017-12-21 16:05:43 +00:00
|
|
|
genericReq.request('PUT', `/api/wazuh-api/extension/toggle/${$scope.apiEntries[currentApiEntryIndex]._id}/${extension}/${state}`)
|
2017-10-27 12:20:16 +00:00
|
|
|
.then(() => {})
|
|
|
|
.catch(() => {
|
|
|
|
notify.error("Invalid request when toggle extension state.");
|
|
|
|
});
|
2017-12-21 16:05:43 +00:00
|
|
|
|
|
|
|
appState.setExtensions($scope.apiEntries[currentApiEntryIndex]._source.extensions);
|
2017-12-12 16:59:19 +00:00
|
|
|
}
|
|
|
|
};
|
2017-08-13 19:54:56 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
$scope.changeIndexPattern = (newIndexPattern) => {
|
|
|
|
genericReq.request('GET', `/api/wazuh-elastic/updatePattern/${newIndexPattern}`)
|
2017-12-03 14:30:47 +00:00
|
|
|
.then((data) => {
|
2017-12-12 16:59:19 +00:00
|
|
|
appState.setCurrentPattern(newIndexPattern);
|
2017-12-03 14:30:47 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
courier.indexPatterns.get(newIndexPattern)
|
2017-12-03 14:30:47 +00:00
|
|
|
.then((data) => {
|
2017-12-12 16:59:19 +00:00
|
|
|
let minimum = ["@timestamp", "full_log", "manager.name", "agent.id"];
|
|
|
|
let minimumCount = 0;
|
2017-12-11 10:54:25 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
for (var i = 0; i < data.fields.length; i++) {
|
|
|
|
if (minimum.includes(data.fields[i].name)) {
|
|
|
|
minimumCount++;
|
|
|
|
}
|
|
|
|
}
|
2017-12-03 14:30:47 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
if (minimumCount == minimum.length)
|
|
|
|
notify.info("Successfully changed the default index-pattern");
|
|
|
|
else notify.warning("The index-pattern was changed, but it is NOT compatible with Wazuh alerts");
|
2017-12-11 10:54:25 +00:00
|
|
|
|
2017-12-12 16:59:19 +00:00
|
|
|
$scope.selectedIndexPattern = newIndexPattern;
|
2017-12-03 14:30:47 +00:00
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(() => {
|
2017-12-12 16:59:19 +00:00
|
|
|
notify.error("Error while changing the default index-pattern");
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
const printError = (error) => {
|
|
|
|
let text;
|
|
|
|
switch (error.data) {
|
|
|
|
case 'no_elasticsearch':
|
|
|
|
text = 'Could not connect with elasticsearch in order to retrieve the credentials.';
|
|
|
|
break;
|
|
|
|
case 'no_credentials':
|
2017-12-21 16:05:43 +00:00
|
|
|
text = 'Valid credentials not found in elasticsearch. It seems the credentials ' +
|
2017-10-27 12:20:16 +00:00
|
|
|
'were not saved.';
|
2017-12-12 16:59:19 +00:00
|
|
|
break;
|
|
|
|
case 'protocol_error':
|
2017-12-21 16:05:43 +00:00
|
|
|
text = 'Invalid protocol in the API url. Please, specify <b>http://</b> or ' +
|
2017-10-27 12:20:16 +00:00
|
|
|
'<b>https://</b>.';
|
2017-12-12 16:59:19 +00:00
|
|
|
break;
|
|
|
|
case 'unauthorized':
|
|
|
|
text = 'Credentials were found, but they are not valid.';
|
|
|
|
break;
|
|
|
|
case 'bad_url':
|
|
|
|
text = 'The given URL does not contain a valid Wazuh RESTful API installation.';
|
|
|
|
break;
|
|
|
|
case 'self_signed':
|
2017-12-21 16:05:43 +00:00
|
|
|
text = 'The request to Wazuh RESTful API was blocked, because it is using a ' +
|
|
|
|
'selfsigned SSL certificate. Please, enable <b>"Accept selfsigned SSL"</b> ' +
|
2017-10-27 12:20:16 +00:00
|
|
|
'option if you want to connect anyway.';
|
2017-12-12 16:59:19 +00:00
|
|
|
break;
|
|
|
|
case 'not_running':
|
|
|
|
text = 'There are not services running in the given URL.';
|
|
|
|
break;
|
2017-12-14 15:06:16 +00:00
|
|
|
case 'request_timeout_checkstored':
|
|
|
|
text = 'The request to /api/wazuh-api/checkStoredAPI took too long and was aborted.';
|
|
|
|
break;
|
|
|
|
case 'request_timeout_checkapi':
|
|
|
|
text = 'The request to /api/wazuh-api/checkAPI took too long and was aborted.';
|
|
|
|
break;
|
2017-12-20 16:49:27 +00:00
|
|
|
case 'wrong_credentials':
|
|
|
|
text = 'Wrong Wazuh API credentials, please check them and try again';
|
|
|
|
break;
|
2017-12-21 14:22:57 +00:00
|
|
|
case 'invalid_url':
|
|
|
|
text = 'Wrong Wazuh API url, please check it and try again';
|
|
|
|
break;
|
|
|
|
case 'invalid_port':
|
|
|
|
text = 'Wrong Wazuh API port, please check it and try again';
|
|
|
|
break;
|
2017-12-12 16:59:19 +00:00
|
|
|
default:
|
|
|
|
text = `Unexpected error. ${error.message}`;
|
|
|
|
}
|
|
|
|
notify.error(text);
|
|
|
|
$scope.messageError = text;
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.getAppInfo = () => {
|
|
|
|
genericReq.request('GET', '/api/wazuh-elastic/setup')
|
2017-10-27 12:20:16 +00:00
|
|
|
.then((data) => {
|
2017-12-12 16:59:19 +00:00
|
|
|
$scope.appInfo = {};
|
|
|
|
$scope.appInfo["app-version"] = data.data.data["app-version"];
|
|
|
|
$scope.appInfo["installationDate"] = data.data.data["installationDate"];
|
|
|
|
$scope.appInfo["revision"] = data.data.data["revision"];
|
|
|
|
$scope.appInfo["index-pattern"] = data.data.data["index-pattern"];
|
|
|
|
$scope.load = false;
|
|
|
|
|
|
|
|
if (appState.getCurrentPattern() !== undefined && appState.getCurrentPattern() !== null) { // There's a pattern in the cookies
|
|
|
|
$scope.selectedIndexPattern = appState.getCurrentPattern();
|
|
|
|
} else { // There's no pattern in the cookies, pick the one in the settings
|
|
|
|
$scope.selectedIndexPattern = data.data.data["index-pattern"];
|
|
|
|
}
|
2017-10-27 12:20:16 +00:00
|
|
|
})
|
|
|
|
.catch(() => {
|
2017-12-12 16:59:19 +00:00
|
|
|
notify.error("Error when loading Wazuh setup info");
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
// Loading data
|
|
|
|
$scope.getSettings();
|
|
|
|
$scope.getAppInfo();
|
|
|
|
});
|