mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Perform correct visualization of information tiles
This commit is contained in:
parent
70d8c5177a
commit
3596ee35df
@ -664,24 +664,28 @@ class AgentModuleWidget extends Widget
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($all_modules !== null) {
|
if ($all_modules !== null) {
|
||||||
$reduceAllModules = array_reduce(
|
if (is_metaconsole() === true
|
||||||
$all_modules,
|
&& $this->values['mShowCommonModules'] === '1'
|
||||||
function ($carry, $item) {
|
) {
|
||||||
if ($item === null) {
|
$reduceAllModules = [];
|
||||||
|
} else {
|
||||||
|
$reduceAllModules = array_reduce(
|
||||||
|
$all_modules,
|
||||||
|
function ($carry, $item) {
|
||||||
|
if ($item === null) {
|
||||||
|
return $carry;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_object($item) === true) {
|
||||||
|
$carry[$item->name()] = null;
|
||||||
|
} else {
|
||||||
|
$carry[io_safe_output($item)] = null;
|
||||||
|
}
|
||||||
|
|
||||||
return $carry;
|
return $carry;
|
||||||
}
|
}
|
||||||
|
);
|
||||||
if (is_object($item) === true) {
|
}
|
||||||
$carry[$item->name()] = null;
|
|
||||||
} else {
|
|
||||||
$carry[io_safe_output($item)] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $carry;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$reduceAllModules = [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$visualData = [];
|
$visualData = [];
|
||||||
@ -708,13 +712,13 @@ class AgentModuleWidget extends Widget
|
|||||||
$visualData[$agent_id]['agent_status'] = $agent->lastStatus();
|
$visualData[$agent_id]['agent_status'] = $agent->lastStatus();
|
||||||
$visualData[$agent_id]['agent_name'] = $agent->name();
|
$visualData[$agent_id]['agent_name'] = $agent->name();
|
||||||
$visualData[$agent_id]['agent_alias'] = $agent->alias();
|
$visualData[$agent_id]['agent_alias'] = $agent->alias();
|
||||||
|
$visualData[$agent_id]['modules'] = [];
|
||||||
|
|
||||||
if (is_metaconsole() === true
|
if (is_metaconsole() === true
|
||||||
&& $this->values['mShowCommonModules'] === '1'
|
&& $this->values['mShowCommonModules'] === '1'
|
||||||
) {
|
) {
|
||||||
// MC should connect to nodes and retrieve information
|
// MC should connect to nodes and retrieve information
|
||||||
// from targets.
|
// from targets.
|
||||||
$reduceAllModules = [];
|
|
||||||
$tmpModules = array_reduce(
|
$tmpModules = array_reduce(
|
||||||
$target_modules,
|
$target_modules,
|
||||||
function ($carry, $item) {
|
function ($carry, $item) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user