Merge branch 'ent-8049-Bug-en-widget-Visual-console-de-Dasboards-metaconsola' into 'develop'

Ent 8049 bug en widget visual console de dasboards metaconsola

See merge request artica/pandorafms!4450
This commit is contained in:
Daniel Rodriguez 2021-11-15 11:20:21 +00:00
commit 4eb40382dd
1 changed files with 13 additions and 0 deletions

View File

@ -304,8 +304,21 @@ class MapsMadeByUser extends Widget
// Retrieve global - common inputs.
$inputs = parent::getFormInputs();
$node_id = $this->nodeId;
if (\is_metaconsole() === true && $node_id > 0) {
if (\metaconsole_connect(null, $node_id) !== NOERR) {
echo json_encode(
['error' => __('Failed to connect to node %d', $node_id) ]
);
}
}
$fields = $this->getVisualConsoles();
if (\is_metaconsole() === true && $node_id > 0) {
\metaconsole_restore_db();
}
// Visual console.
$inputs[] = [
'label' => __('Visual console'),