#8049 Fixed get visual console with selected node
This commit is contained in:
parent
3f86528c80
commit
eab82aa6d1
|
@ -304,8 +304,21 @@ class MapsMadeByUser extends Widget
|
||||||
// Retrieve global - common inputs.
|
// Retrieve global - common inputs.
|
||||||
$inputs = parent::getFormInputs();
|
$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();
|
$fields = $this->getVisualConsoles();
|
||||||
|
|
||||||
|
if (\is_metaconsole() === true && $node_id > 0) {
|
||||||
|
\metaconsole_restore_db();
|
||||||
|
}
|
||||||
|
|
||||||
// Visual console.
|
// Visual console.
|
||||||
$inputs[] = [
|
$inputs[] = [
|
||||||
'label' => __('Visual console'),
|
'label' => __('Visual console'),
|
||||||
|
|
Loading…
Reference in New Issue