Improve custom graph interface / 2 - #66

This commit is contained in:
enriquecd 2017-02-21 13:05:22 +01:00
parent 20b4fb3e6b
commit c8727ec8af
2 changed files with 6 additions and 10 deletions

View File

@ -2411,16 +2411,10 @@ function ui_print_page_header ($title, $icon = "", $return = false, $help = "",
$separator_class = "separator_view"; $separator_class = "separator_view";
} }
$buffer = '<div id="'.$type2.'" style=""><div id="menu_tab_left">'; $buffer = '<div id="'.$type2.'" style=""><div id="menu_tab_left">';
$buffer .= '<ul class="mn"><li class="' . $type . '">&nbsp;' . '&nbsp; '; $buffer .= '<ul class="mn"><li class="' . $type . '">&nbsp;' . '&nbsp; ';
if(strpos($title, "Monitoring » Services »") != -1){
$title = str_replace("Monitoring » Services » Service Map » ",'',$title);
}
$buffer .= '<span style="margin-right:10px;">' . $buffer .= '<span style="margin-right:10px;">' .
ui_print_truncate_text($title, 'item_title'); ui_print_truncate_text($title, 'item_title');

View File

@ -131,6 +131,9 @@ if ($view_graph) {
if (check_acl ($config['id_user'], 0, "RW")) { if (check_acl ($config['id_user'], 0, "RW")) {
$options = array( $options = array(
'graph_list' => array('active' => false,
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs">' .
html_print_image("images/list.png", true, array ("title" => __('Graph list'))) .'</a>'),
'main' => array('active' => false, 'main' => array('active' => false,
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id=' . $id_graph . '">' . 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id=' . $id_graph . '">' .
html_print_image("images/chart.png", true, array ("title" => __('Main data'))) .'</a>'), html_print_image("images/chart.png", true, array ("title" => __('Main data'))) .'</a>'),
@ -160,13 +163,12 @@ if ($view_graph) {
} }
// Header // Header
ui_print_page_header (__('Reporting') . " &raquo; " . ui_print_page_header ($graph['name'],
__('Custom graphs') . " - " . $graph['name'], "images/chart.png", false, "", false, $options);
"images/chart.png", false, "", false, $options);
$graph_return = custom_graphs_print($id_graph, $height, $width, $period, $stacked, $graph_return = custom_graphs_print($id_graph, $height, $width, $period, $stacked,
true, $unixdate); true, $unixdate);
if ($graph_return){ if ($graph_return){
echo "<table class='databox filters' cellpadding='0' cellspacing='0' width='100%'>"; echo "<table class='databox filters' cellpadding='0' cellspacing='0' width='100%'>";
echo "<tr><td>"; echo "<tr><td>";