Merge branch '2035-Mala-colocación-items-en-exportación-dev' into 'develop'

Fixed line graph and box item when exporting visual consoles

See merge request artica/pandorafms!1517
This commit is contained in:
vgilc 2018-06-05 16:01:10 +02:00
commit 23142509a0
2 changed files with 38 additions and 1 deletions

View File

@ -285,10 +285,27 @@ function output_xml_visual_console($id) {
if ($item['parent_item'] != 0) {
echo "<parent_item>" . $item['parent_item'] . "</parent_item>\n";
}
if ($item['type'] == 19) {
if (!empty($item['clock_animation'])) {
echo "<clock_animation>" . $item['clock_animation'] . "</clock_animation>\n";
}
if (!empty($item['fill_color'])) {
echo "<fill_color>" . $item['fill_color'] . "</fill_color>\n";
}
if (!empty($item['type_graph'])) {
echo "<type_graph>" . $item['type_graph'] . "</type_graph>\n";
}
if (!empty($item['time_format'])) {
echo "<time_format>" . $item['time_format'] . "</time_format>\n";
}
if (!empty($item['timezone'])) {
echo "<timezone>" . $item['timezone'] . "</timezone>\n";
}
if (!empty($item['border_width'])) {
echo "<border_width>" . $item['border_width'] . "</border_width>\n";
}
if (!empty($item['border_color'])) {
echo "<border_color>" . $item['border_color'] . "</border_color>\n";
}
echo "</item>\n";
}
echo "</visual_map>\n";

View File

@ -536,6 +536,26 @@ function process_upload_xml_visualmap($xml, $filter_group = 0) {
$values['fill_color'] = (string)$item->fill_color;
}
if (isset($item->type_graph)) {
$values['type_graph'] = (string)$item->type_graph;
}
if (isset($item->time_format)) {
$values['time_format'] = (string)$item->time_format;
}
if (isset($item->timezone)) {
$values['timezone'] = (string)$item->timezone;
}
if (isset($item->border_width)) {
$values['border_width'] = (string)$item->border_width;
}
if (isset($item->border_color)) {
$values['border_color'] = (string)$item->border_color;
}
if ($no_agents) {
$id_item = db_process_sql_insert('tlayout_data', $values);