mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-04 18:00:10 +00:00
Fixed undefined error in js user scripts
This commit is contained in:
parent
fefc3c39b0
commit
09ca9e604c
1 changed files with 10 additions and 2 deletions
|
|
@ -1451,7 +1451,14 @@ function appendSeveritySelect(data) {
|
|||
|
||||
let severity = data.metadata.default_value.severity.severity_id;
|
||||
|
||||
const scriptConfSeverity = data.hooks.all.script_conf.severity;
|
||||
const hooksKeys = Object.keys(data.hooks);
|
||||
var index;
|
||||
if (hooksKeys[0] === "filter") {
|
||||
index = hooksKeys[1];
|
||||
} else {
|
||||
index = hooksKeys[0];
|
||||
}
|
||||
const scriptConfSeverity = data.hooks[index].script_conf.severity;
|
||||
|
||||
if (scriptConfSeverity) {
|
||||
severity = scriptConfSeverity.severity_id;
|
||||
|
|
@ -1492,7 +1499,7 @@ function appendExclusionList(data) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let $container;
|
||||
let $textarea = $($(`#exclusion-list-template`).html());
|
||||
|
|
@ -1512,6 +1519,7 @@ function appendExclusionList(data) {
|
|||
|
||||
$(`#script-config-editor`).append($container);
|
||||
$(`#script-config-editor Textarea[name='exclusion-list']`).val(ex_list_str);
|
||||
}
|
||||
}
|
||||
|
||||
function delegateActionButton(gui) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue