mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 18:05:20 +00:00
Add go to edit file in rules and decoders, when it has been created correctly (#1943)
This commit is contained in:
parent
00fb130c5e
commit
4686f5dd9d
@ -57,6 +57,12 @@ export class FilesController {
|
||||
this.$scope.$applyAsync();
|
||||
});
|
||||
|
||||
this.$scope.$on('showSaveAndOverwrite', () => {
|
||||
this.$scope.newFile = true;
|
||||
this.$scope.editorReadOnly = false;
|
||||
this.$scope.$applyAsync();
|
||||
});
|
||||
|
||||
this.$scope.$on('viewFileOnly', (ev, params) => {
|
||||
this.$scope.editorReadOnly = true;
|
||||
this.editFile(params, true);
|
||||
|
@ -263,6 +263,17 @@ app.directive('wzXmlFileEditor', function() {
|
||||
? showRestartMessage(msg, params.showRestartManager)
|
||||
: errorHandler.handle(warnMsg, '', true)
|
||||
: errorHandler.info(msg);
|
||||
if(params.isNewFile) {
|
||||
$scope.$emit('editFile', {
|
||||
file: {
|
||||
file: params.rule.file,
|
||||
path: 'etc/rules',
|
||||
status: 'enabled',
|
||||
type: 'rule',
|
||||
},
|
||||
path: 'etc/rules',
|
||||
});
|
||||
}
|
||||
} else if (params.decoder) {
|
||||
close = false;
|
||||
await rulesetHandler.sendDecoderConfiguration(
|
||||
@ -281,6 +292,17 @@ app.directive('wzXmlFileEditor', function() {
|
||||
? showRestartMessage(msg, params.showRestartManager)
|
||||
: errorHandler.handle(warnMsg, '', true)
|
||||
: errorHandler.info(msg);
|
||||
if(params.isNewFile) {
|
||||
$scope.$emit('editFile', {
|
||||
file: {
|
||||
file: params.decoder.file,
|
||||
path: '/decoders/files',
|
||||
status: 'enabled',
|
||||
type: 'decoder',
|
||||
},
|
||||
path: '/decoders/files',
|
||||
});
|
||||
}
|
||||
} else if (params.node) {
|
||||
close = false;
|
||||
await configHandler.saveNodeConfiguration(params.node, xml);
|
||||
|
Loading…
Reference in New Issue
Block a user