migrate histrogram report items

This commit is contained in:
alejandro.campos@artica.es 2021-08-19 16:23:52 +02:00
parent 54ae7e5783
commit c07a112f4b
6 changed files with 4 additions and 18 deletions

View File

@ -5,4 +5,8 @@ ALTER TABLE `treport_content_template` ADD COLUMN `checks_in_warning_status` TIN
ALTER TABLE `treport_content` ADD COLUMN `time_in_warning_status` TINYINT(1) DEFAULT '0';
ALTER TABLE `treport_content` ADD COLUMN `checks_in_warning_status` TINYINT(1) DEFAULT '0';
INSERT INTO treport_content (id_report, id_gs, id_agent_module, type, period, `order`, name, description, id_agent, `text`, external_source, treport_custom_sql_id, header_definition, column_separator, line_separator, time_from, time_to, style, server_name, time_in_warning_status, checks_in_warning_status) SELECT id_report, 0, id_agent_module, 'availability', period, `order`, name, description, id_agent, NULL, NULL, treport_custom_sql_id, header_definition, column_separator, line_separator, time_from, time_to, '{"show_in_same_row":0,"hide_notinit_agents":0,"priority_mode":1,"dyn_height":"230"}', server_name, 1, 1 FROM treport_content WHERE type = 'histogram_data';
INSERT INTO treport_content_item (id_report_content, id_agent_module, id_agent_module_failover, operation, server_name) SELECT id_rc, id_agent_module, 0, '', server_name FROM treport_content WHERE type = 'availability' AND id_agent <> 0 AND id_agent_module <> 0;
DELETE FROM treport_content WHERE type = 'histogram_data';
COMMIT;

View File

@ -360,7 +360,6 @@ switch ($action) {
$failover_type = $item['failover_type'];
break;
case 'histogram_data':
case 'module_histogram_graph':
$description = $item['description'];
$period = $item['period'];
@ -840,7 +839,6 @@ switch ($action) {
case 'database_serialized':
case 'last_value':
case 'monitor_report':
case 'histogram_data':
case 'min_value':
case 'max_value':
case 'avg_value':
@ -4434,7 +4432,6 @@ $(document).ready (function () {
case 'max_value':
case 'min_value':
case 'monitor_report':
case 'histogram_data':
case 'database_serialized':
case 'last_value':
case 'sumatory':
@ -4488,7 +4485,6 @@ $(document).ready (function () {
case 'prediction_date':
case 'projection_graph':
case 'monitor_report':
case 'histogram_data':
case 'module_histogram_graph':
case 'avg_value':
case 'max_value':
@ -4574,7 +4570,6 @@ $(document).ready (function () {
case 'max_value':
case 'min_value':
case 'monitor_report':
case 'histogram_data':
case 'database_serialized':
case 'last_value':
case 'sumatory':
@ -4623,7 +4618,6 @@ $(document).ready (function () {
case 'prediction_date':
case 'projection_graph':
case 'monitor_report':
case 'histogram_data':
case 'module_histogram_graph':
case 'avg_value':
case 'max_value':
@ -5651,7 +5645,6 @@ function chooseType() {
$("#row_summary").show();
break;
case 'histogram_data':
case 'module_histogram_graph':
$("#row_description").show();
$("#row_period").show();

View File

@ -2199,7 +2199,6 @@ switch ($action) {
break;
case 'module_histogram_graph':
case 'histogram_data':
case 'agent_configuration':
case 'alert_report_agent':
case 'alert_report_module':
@ -2846,7 +2845,6 @@ switch ($action) {
break;
case 'module_histogram_graph':
case 'histogram_data':
case 'agent_configuration':
case 'alert_report_agent':
case 'alert_report_module':

View File

@ -858,7 +858,6 @@ function reporting_make_reporting_data(
);
break;
case 'histogram_data':
case 'module_histogram_graph':
$report['contents'][] = reporting_module_histogram_graph(
$report,

View File

@ -433,10 +433,6 @@ function reporting_html_print_report($report, $mini=false, $report_info=1)
$mini
);
break;
case 'histogram_data':
reporting_enterprise_html_histogram_data($table, $item, $mini);
break;
}
if ($item['type'] == 'agent_module') {

View File

@ -757,10 +757,6 @@ function reports_get_report_types($template=false, $not_editor=false)
'optgroup' => __('Modules'),
'name' => __('Last value'),
];
$types['histogram_data'] = [
'optgroup' => __('Modules'),
'name' => __('Histogram'),
];
$types['general'] = [
'optgroup' => __('Grouped'),