Added check on agents without acl

This commit is contained in:
Daniel Maya 2022-01-14 09:49:26 +01:00
parent 55f8f09894
commit 626431f27c
2 changed files with 20 additions and 17 deletions

View File

@ -430,6 +430,7 @@ class TreeService extends Tree
$tmp['searchChildren'] = 1; $tmp['searchChildren'] = 1;
} else { } else {
$tmp['searchChildren'] = 0; $tmp['searchChildren'] = 0;
$tmp['noAcl'] = 1;
} }
$tmp['showEventsBtn'] = 1; $tmp['showEventsBtn'] = 1;

View File

@ -1183,24 +1183,26 @@ var TreeController = {
disabled == false disabled == false
) { ) {
if (element.type == "agent" || element.type == "module") { if (element.type == "agent" || element.type == "module") {
$content if (typeof element.noAcl === "undefined") {
.click(function(e) { $content
_getTreeDetailData( .click(function(e) {
element.type, _getTreeDetailData(
element.id, element.type,
element.serverID, element.id,
function(error, data) { element.serverID,
if (error) { function(error, data) {
// console.error(error); if (error) {
} else { // console.error(error);
controller.detailRecipient } else {
.render(element.name, data) controller.detailRecipient
.open(); .render(element.name, data)
.open();
}
} }
} );
); })
}) .css("cursor", "pointer");
.css("cursor", "pointer"); }
} }
} }