#12573 fixed number of cells in list dashboard
This commit is contained in:
parent
d6d53a3cd7
commit
7b6c14974d
|
@ -1056,6 +1056,7 @@ class Manager implements PublicLogin
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'id_user' => $id_user,
|
'id_user' => $id_user,
|
||||||
'id_group' => $id_group,
|
'id_group' => $id_group,
|
||||||
|
'cells' => 1,
|
||||||
'cells_slideshow' => $slideshow,
|
'cells_slideshow' => $slideshow,
|
||||||
'active' => $favourite,
|
'active' => $favourite,
|
||||||
'date_range' => $dateRange,
|
'date_range' => $dateRange,
|
||||||
|
@ -1367,6 +1368,7 @@ class Manager implements PublicLogin
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$items = \get_parameter('items', []);
|
$items = \get_parameter('items', []);
|
||||||
|
$totalCells = 0;
|
||||||
|
|
||||||
// Class Dashboard.
|
// Class Dashboard.
|
||||||
if (empty($items) === false) {
|
if (empty($items) === false) {
|
||||||
|
@ -1398,8 +1400,15 @@ class Manager implements PublicLogin
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_array($items) === true) {
|
||||||
|
$totalCells = count($items);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$values = ['cells' => $totalCells];
|
||||||
|
$this->put($values);
|
||||||
|
|
||||||
echo json_encode($result);
|
echo json_encode($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2704,8 +2704,8 @@ INSERT INTO `treport_content` (`id_rc`,`id_report`,`id_gs`,`id_agent_module`,`ty
|
||||||
(2,1,0,0,'top_n',28800,0,2,'Top CPU per agent','',0,'<p>This type of report implies loading a lot of data. Therefore it is recommended for scheduled reports, not real-time view.</p>',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,3,10,0,10,0,1,1,0,'{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":"1","dyn_height":"250","text_agent":"Lio=","text_agent_module":"Y3B1Lio="}',0,0,'',0,0,300,0,0,NULL,NULL,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL),
|
(2,1,0,0,'top_n',28800,0,2,'Top CPU per agent','',0,'<p>This type of report implies loading a lot of data. Therefore it is recommended for scheduled reports, not real-time view.</p>',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,3,10,0,10,0,1,1,0,'{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":"1","dyn_height":"250","text_agent":"Lio=","text_agent_module":"Y3B1Lio="}',0,0,'',0,0,300,0,0,NULL,NULL,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL),
|
||||||
(3,1,0,0,'event_report_group',21600,0,3,'General event report','This is a sample of not normal events for any agent available in the last 6 hours',0,'<p>This type of report implies loading a lot of data. Therefore it is recommended for scheduled reports, not real-time view.</p>',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,0,10,0,10,0,0,0,0,'{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":"1","dyn_height":"250","server_multiple":"\"\"","show_summary_group":0,"filter_event_severity":"[\"20\"]","filter_event_type":"[\"all\"]","filter_event_status":"[\"-1\"]","event_graph_by_agent":"1","event_graph_by_user_validator":"1","event_graph_by_criticity":"1","event_graph_validated_vs_unvalidated":0,"event_filter_search":"","event_filter_exclude":"","custom_data_events":"1","label":""}',0,0,'',0,0,300,0,0,NULL,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL);
|
(3,1,0,0,'event_report_group',21600,0,3,'General event report','This is a sample of not normal events for any agent available in the last 6 hours',0,'<p>This type of report implies loading a lot of data. Therefore it is recommended for scheduled reports, not real-time view.</p>',NULL,0,'','','','00:00:00','00:00:00',1,1,1,1,1,1,1,0,0,10,0,10,0,0,0,0,'{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":"1","dyn_height":"250","server_multiple":"\"\"","show_summary_group":0,"filter_event_severity":"[\"20\"]","filter_event_type":"[\"all\"]","filter_event_status":"[\"-1\"]","event_graph_by_agent":"1","event_graph_by_user_validator":"1","event_graph_by_criticity":"1","event_graph_validated_vs_unvalidated":0,"event_filter_search":"","event_filter_exclude":"","custom_data_events":"1","label":""}',0,0,'',0,0,300,0,0,NULL,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,NULL,NULL,1,0,0,NULL);
|
||||||
INSERT INTO `tdashboard` (`id`,`name`,`id_user`,`id_group`,`active`,`cells`,`cells_slideshow`) VALUES
|
INSERT INTO `tdashboard` (`id`,`name`,`id_user`,`id_group`,`active`,`cells`,`cells_slideshow`) VALUES
|
||||||
(1,'Sample Dashboard #1','',0,0,0,0),
|
(1,'Sample Dashboard #1','',0,0,7,0),
|
||||||
(2,'Sample Dashboard #2','',0,0,0,0);
|
(2,'Sample Dashboard #2','',0,0,10,0);
|
||||||
INSERT INTO `twidget_dashboard` (`id`,`position`,`options`,`order`,`id_dashboard`,`id_widget`,`prop_width`,`prop_height`) VALUES
|
INSERT INTO `twidget_dashboard` (`id`,`position`,`options`,`order`,`id_dashboard`,`id_widget`,`prop_width`,`prop_height`) VALUES
|
||||||
(1,'{\"x\":\"0\",\"y\":\"0\",\"width\":\"4\",\"height\":\"4\"}','{\"title\":\"Agents hive\",\"background\":\"#ffffff\",\"groups\":[\"12,8,4,9,2,10,13,11\"]}',0,1,1,0.32,0.32),
|
(1,'{\"x\":\"0\",\"y\":\"0\",\"width\":\"4\",\"height\":\"4\"}','{\"title\":\"Agents hive\",\"background\":\"#ffffff\",\"groups\":[\"12,8,4,9,2,10,13,11\"]}',0,1,1,0.32,0.32),
|
||||||
(2,'{\"x\":\"4\",\"y\":\"0\",\"width\":\"3\",\"height\":\"4\"}','{\"title\":\"Clock\",\"background\":\"#ffffff\",\"clockType\":\"analogic\"}',1,1,12,0.32,0.32),
|
(2,'{\"x\":\"4\",\"y\":\"0\",\"width\":\"3\",\"height\":\"4\"}','{\"title\":\"Clock\",\"background\":\"#ffffff\",\"clockType\":\"analogic\"}',1,1,12,0.32,0.32),
|
||||||
|
|
Loading…
Reference in New Issue