mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
WIP
This commit is contained in:
parent
b585a4e372
commit
c59042c034
@ -194,15 +194,36 @@ function createVisualConsole(
|
||||
item
|
||||
);
|
||||
} else if (meta.lineMode && item.props.type == 21) {
|
||||
confirmDialog({
|
||||
title: "todo",
|
||||
message:
|
||||
"<pre>" +
|
||||
item.props.labelStart +
|
||||
"</pre><br><pre>" +
|
||||
item.props.labelEnd +
|
||||
"</pre>"
|
||||
load_modal({
|
||||
url: baseUrl + "/ajax.php",
|
||||
modal: {
|
||||
title: "NetworkLink information",
|
||||
ok: "Ok"
|
||||
},
|
||||
extradata: [
|
||||
{
|
||||
name: "from",
|
||||
value: item.props.linkedStart
|
||||
},
|
||||
{
|
||||
name: "to",
|
||||
value: item.props.linkedEnd
|
||||
}
|
||||
],
|
||||
onshow: {
|
||||
page: "include/rest-api/index",
|
||||
method: "networkLinkPopup"
|
||||
}
|
||||
});
|
||||
// confirmDialog({
|
||||
// title: "todo",
|
||||
// message:
|
||||
// "<pre>" +
|
||||
// item.props.labelStart +
|
||||
// "</pre><br><pre>" +
|
||||
// item.props.labelEnd +
|
||||
// "</pre>"
|
||||
// });
|
||||
}
|
||||
});
|
||||
// VC Item moved.
|
||||
|
@ -479,6 +479,7 @@ final class NetworkLink extends Model
|
||||
);
|
||||
|
||||
$labelStart = $module->nombre();
|
||||
$labelStart .= ': '.$module->lastValue();
|
||||
}
|
||||
}
|
||||
|
||||
@ -492,6 +493,7 @@ final class NetworkLink extends Model
|
||||
);
|
||||
|
||||
$labelEnd = $module->nombre();
|
||||
$labelEnd .= ': '.$module->lastValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -613,4 +613,55 @@ class View extends \HTML
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a popup for networkLink viewer.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function networkLinkPopup()
|
||||
{
|
||||
global $config;
|
||||
include_once $config['homedir'].'/include/functions_graph.php';
|
||||
$item_idFrom = get_parameter('from');
|
||||
$item_idTo = get_parameter('to');
|
||||
|
||||
$itemFrom = db_get_row_filter(
|
||||
'tlayout_data',
|
||||
['id' => $item_idFrom]
|
||||
);
|
||||
|
||||
$itemTo = db_get_row_filter(
|
||||
'tlayout_data',
|
||||
['id' => $item_idTo]
|
||||
);
|
||||
|
||||
$from = new \PandoraFMS\Module((int) $itemFrom['id_agente_modulo']);
|
||||
$to = new \PandoraFMS\Module((int) $itemTo['id_agente_modulo']);
|
||||
|
||||
echo 'From '.$from->nombre().' con valor '.$from->lastValue();
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
echo \grafico_modulo_sparse(
|
||||
[
|
||||
'agent_module_id' => $from->id_agente_modulo(),
|
||||
'period' => SECONDS_1DAY,
|
||||
'height' => 150,
|
||||
'menu' => false,
|
||||
]
|
||||
);
|
||||
|
||||
echo 'To '.$to->nombre().' con valor '.$to->lastValue();
|
||||
|
||||
echo \grafico_modulo_sparse(
|
||||
[
|
||||
'agent_module_id' => $to->id_agente_modulo(),
|
||||
'period' => SECONDS_1DAY,
|
||||
'height' => 150,
|
||||
'menu' => false,
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user