diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c960635316..5ae4a51d2f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-03-13 Miguel de Dios + + * godmode/reporting/reporting_builder.item_editor.php: added button near to + the list custom graph to create or edit the custom grap selected. + 2012-03-13 Miguel de Dios * godmode/reporting/graph_builder.main.php: fixed lost require PHP functions diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index e5a7a07301..ab27398202 100644 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -511,7 +511,6 @@ html_print_input_hidden('id_item', $idItem); if ($config['metaconsole'] == 1) { $graphs = array(); $graphs = metaconsole_get_custom_graphs(); - html_print_select ($graphs, 'id_custom_graph', $idCustomGraph, '', '--', 0); } else { switch ($config["dbtype"]) { @@ -523,8 +522,21 @@ html_print_input_hidden('id_item', $idItem); $query_sql = 'SELECT id_graph, name FROM tgraph WHERE private = 0 OR (private = 1 AND id_user = \''.$config["id_user"].'\')'; break; } - html_print_select_from_sql($query_sql, 'id_custom_graph', $idCustomGraph, '', '--', 0); } + html_print_select_from_sql($query_sql, 'id_custom_graph', $idCustomGraph, 'change_custom_graph();', '--', 0); + + $style_button_create_custom_graph = 'style="display: none;"'; + $style_button_edit_custom_graph = ''; + if (empty($idCustomGraph)) { + $style_button_create_custom_graph = ''; + $style_button_edit_custom_graph = 'style="display: none;"'; + } + echo " "; + html_print_button(__("Create"), 'create_graph', false, + 'create_custom_graph();', 'class="sub add" ' . $style_button_create_custom_graph); + + html_print_button(__("Edit"), 'edit_graph', false, + 'edit_custom_graph();', 'class="sub config" ' . $style_button_edit_custom_graph); ?> @@ -847,7 +859,7 @@ function print_General_list($width, $action, $idItem = null) { } ?> -