mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Add snapshot button in tree view dialog window and center image in snapshot window #90
This commit is contained in:
parent
0b1454f0e8
commit
adf7cc07f9
@ -248,6 +248,42 @@ function treeview_printModuleTable($id_module, $server_data = false, $no_head =
|
|||||||
|
|
||||||
$last_data_str .= " ";
|
$last_data_str .= " ";
|
||||||
$last_data_str .= html_print_image('images/clock2.png', true, array('title' => $last_data["timestamp"], 'width' => '18px'));
|
$last_data_str .= html_print_image('images/clock2.png', true, array('title' => $last_data["timestamp"], 'width' => '18px'));
|
||||||
|
|
||||||
|
$is_snapshot = is_snapshot_data ( $last_data["datos"] );
|
||||||
|
|
||||||
|
if (($config['command_snapshot']) && ($is_snapshot)) {
|
||||||
|
$handle = 'snapshot_' . $module['id_agente_modulo'];
|
||||||
|
$url = 'include/procesos.php?agente=' . $row['id_agente_modulo'];
|
||||||
|
$win_handle = dechex(crc32($handle));
|
||||||
|
if (! defined ('METACONSOLE')) {
|
||||||
|
$link = "winopeng_var('operation/agentes/snapshot_view.php?" .
|
||||||
|
"id=" . $module['id_agente_modulo'] .
|
||||||
|
"&refr=" . $module['current_interval'] .
|
||||||
|
"&label=" . rawurlencode(urlencode(io_safe_output($module['module_name']))) . "','" . $win_handle . "', 700,480)";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$link = "winopeng_var('$last_data[datos]','',700,480)";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!is_image_data($last_data["datos"])){
|
||||||
|
$salida = '<a href="javascript:' . $link . '">' .
|
||||||
|
html_print_image('images/default_list.png', true,
|
||||||
|
array('border' => '0',
|
||||||
|
'alt' => '',
|
||||||
|
'title' => __('Snapshot view'))) . '</a> ';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$salida = '<a href="javascript:' . $link . '">' .
|
||||||
|
html_print_image('images/photo.png', true,
|
||||||
|
array('border' => '0',
|
||||||
|
'alt' => '',
|
||||||
|
'title' => __('Snapshot view'))) . '</a> ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$last_data_str .= $salida;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$last_data_str = '<i>' . __('No data') . '</i>';
|
$last_data_str = '<i>' . __('No data') . '</i>';
|
||||||
|
@ -62,14 +62,14 @@ $label = get_parameter ("label");
|
|||||||
FROM tagente_estado
|
FROM tagente_estado
|
||||||
WHERE id_agente_modulo = $id");
|
WHERE id_agente_modulo = $id");
|
||||||
|
|
||||||
echo "<h2 id='title_snapshot_view'>";
|
echo "<h2 style='text-align:center;' id='title_snapshot_view'>";
|
||||||
echo __("Current data at");
|
echo __("Current data at");
|
||||||
echo " ";
|
echo " ";
|
||||||
echo $row["timestamp"];
|
echo $row["timestamp"];
|
||||||
echo "</h2>";
|
echo "</h2>";
|
||||||
$datos = io_safe_output($row["datos"]);
|
$datos = io_safe_output($row["datos"]);
|
||||||
if (is_image_data($datos)) {
|
if (is_image_data($datos)) {
|
||||||
echo '<img src="' . $datos . '" alt="image"/>';
|
echo '<center><img src="' . $datos . '" alt="image"/></center>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$datos = preg_replace ('/</', '<', $datos);
|
$datos = preg_replace ('/</', '<', $datos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user