diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 87ae47ff31..4fc5523378 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -7132,5 +7132,9 @@ function ui_print_fav_menu($id_element, $url, $label, $section) ['onclick' => 'favMenuAction(this)'] ); $output .= ''; + $output .= '
'; return $output; } \ No newline at end of file diff --git a/pandora_console/include/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js index e65d8f382e..7786eb97d3 100644 --- a/pandora_console/include/javascript/pandora_ui.js +++ b/pandora_console/include/javascript/pandora_ui.js @@ -837,6 +837,31 @@ function unblockSubmit(button) { function favMenuAction(e) { var data = JSON.parse(atob(e.value)); + if ( + data.label === "" && + $(e) + .attr("src") + .endsWith("star.png") === false + ) { + $("#dialog-fav-menu").dialog({ + title: "Please choose a title", + width: 330, + buttons: [ + { + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-next", + text: "Confirm", + click: function() { + data.label = $("#text-label_fav_menu").val(); + $(e).val(btoa(JSON.stringify(data))); + favMenuAction(e); + $(this).dialog("close"); + } + } + ] + }); + return; + } $.ajax({ method: "POST", url: "ajax.php", diff --git a/pandora_console/include/styles/discovery.css b/pandora_console/include/styles/discovery.css index b47e52e619..2ea05c7446 100644 --- a/pandora_console/include/styles/discovery.css +++ b/pandora_console/include/styles/discovery.css @@ -317,3 +317,10 @@ div.ui-tooltip.ui-corner-all.ui-widget-shadow.ui-widget.ui-widget-content.uitool bottom: -20px; top: auto; } +#dialog-fav-menu { + display: none; +} +#dialog-fav-menu p { + margin: 0px; + padding-top: 40px; +} diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 18d3ed82b4..1ac1e07a4b 100755 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -232,6 +232,12 @@ if (is_metaconsole()) { 'link' => '', 'label' => __('Custom reports'), ], + ], + [ + 'id_element' => $id_report, + 'url' => 'operation/reporting/reporting_viewer&id='.$id_report, + 'label' => reporting_get_name($id_report), + 'section' => 'Reporting', ] ); }