2014-07-07 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_visual_map.php: show in the tooltip of "static graph" the last value of module. INCIDENT: #1014 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10321 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a27441d614
commit
7bc036aafe
|
@ -1,3 +1,10 @@
|
|||
2014-07-07 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_visual_map.php: show in the tooltip of
|
||||
"static graph" the last value of module.
|
||||
|
||||
INCIDENT: #1014
|
||||
|
||||
2014-07-07 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/setup/license.php: fixed the white screen.
|
||||
|
|
|
@ -114,9 +114,11 @@ function visual_map_print_item($layoutData) {
|
|||
echo '<div id="' . $id . '" class="item static_graph" style="z-index: 1; text-align: center; color: ' . $color . '; position: absolute; display: inline-block; ' . $sizeStyle . ' top: ' . $top . 'px; left: ' . $left . 'px;">';
|
||||
if ($layoutData['image'] != null) {
|
||||
if (($width != 0) && ($height != 0))
|
||||
echo html_print_image($img, true, array("class" => "image", "id" => "image_" . $id, "width" => "$width", "height" => "$height", "style" => $borderStyle));
|
||||
echo html_print_image($img, true,
|
||||
array("class" => "image", "id" => "image_" . $id, "width" => "$width", "height" => "$height", "style" => $borderStyle));
|
||||
else
|
||||
echo html_print_image($img, true, array("class" => "image", "id" => "image_" . $id, "style" => $borderStyle));
|
||||
echo html_print_image($img, true,
|
||||
array("class" => "image", "id" => "image_" . $id, "style" => $borderStyle));
|
||||
echo '<br />';
|
||||
}
|
||||
echo io_safe_output($text);
|
||||
|
@ -1299,7 +1301,27 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
|
|||
}
|
||||
|
||||
$img_style = array ();
|
||||
|
||||
$img_style["title"] = strip_tags($layout_data["label"]);
|
||||
if ($layout_data['type'] == STATIC_GRAPH) {
|
||||
if ($layout_data['id_agente_modulo'] != 0) {
|
||||
$unit_text = trim(io_safe_output(
|
||||
modules_get_unit($layout_data['id_agente_modulo'])));
|
||||
|
||||
$value = modules_get_last_value($layout_data['id_agente_modulo']);
|
||||
|
||||
if (!is_string($value)) {
|
||||
$value = format_for_graph($value, 2);
|
||||
}
|
||||
|
||||
if (!empty($unit_text))
|
||||
$value .= " " . $unit_text;
|
||||
|
||||
$img_style["title"] .= " <br>" . __("Last value: ") .
|
||||
$value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!empty ($layout_data["width"])) {
|
||||
$img_style["width"] = $layout_data["width"];
|
||||
|
|
Loading…
Reference in New Issue