mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 18:05:20 +00:00
Merge pull request #1182 from wazuh/fix-show-hide-editor
Emit event for success
This commit is contained in:
commit
c1fd75da98
@ -295,6 +295,11 @@ export function GroupsController(
|
||||
$scope.$broadcast('saveXmlFile', { group: $scope.currentGroup.name });
|
||||
};
|
||||
|
||||
$scope.$on('configurationSuccess',() => {
|
||||
$scope.editingFile = false;
|
||||
if(!$scope.$$phase) $scope.$digest();
|
||||
});
|
||||
|
||||
$scope.reload = async (element, searchTerm, addOffset, start) => {
|
||||
if (element === 'left') {
|
||||
if (!$scope.availableAgents.loadedAll) {
|
||||
|
@ -150,11 +150,13 @@ app.directive('wzXmlFileEditor', function() {
|
||||
const xml = replaceIllegalXML(text);
|
||||
await groupHandler.sendConfiguration(params.group, xml);
|
||||
errorHandler.info('Success. Group has been updated', '');
|
||||
$scope.$emit('configurationSuccess')
|
||||
} catch (error) {
|
||||
errorHandler.handle(error, 'Send file error');
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
$scope.xmlCodeBox = CodeMirror.fromTextArea(
|
||||
$document[0].getElementById('xml_box'),
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user