New menu module graph - #3617
This commit is contained in:
parent
a92f81272a
commit
283be8f632
|
@ -1120,11 +1120,11 @@ if (check_login()) {
|
|||
$draw_events = 0;
|
||||
}
|
||||
|
||||
$link = "winopeng('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module['id_agente_modulo'].'&'.'label='.rawurlencode(
|
||||
$link = "winopeng_var('".'operation/agentes/stat_win.php?'."type=$graph_type&".'period='.SECONDS_1DAY.'&'.'id='.$module['id_agente_modulo'].'&'.'label='.rawurlencode(
|
||||
urlencode(
|
||||
base64_encode($module['nombre'])
|
||||
)
|
||||
).'&'.'refresh='.SECONDS_10MINUTES.'&'."draw_events=$draw_events', 'day_".$win_handle."')";
|
||||
).'&'.'refresh='.SECONDS_10MINUTES.'&'."draw_events=$draw_events', 'day_".$win_handle."', 1000, 650)";
|
||||
if (!is_snapshot_data($module['datos'])) {
|
||||
$data[8] .= '<a href="javascript:'.$link.'">'.html_print_image('images/chart_curve.png', true, ['border' => '0', 'alt' => '']).'</a> ';
|
||||
}
|
||||
|
|
|
@ -5438,3 +5438,66 @@ table.info_table.policy_sub_table {
|
|||
margin-top: 0px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/* mergear esto antes */
|
||||
|
||||
table.events_show_more_table tr:nth-child(odd) td {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
table.events_show_more_table tr:nth-child(even) td {
|
||||
background-color: #f5f5f5;
|
||||
border-top: 1px solid #cacaca;
|
||||
border-bottom: 1px solid #cacaca;
|
||||
}
|
||||
|
||||
table.events_show_more_table tr td {
|
||||
height: 22px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
table.events_show_more_table tr td:first-child {
|
||||
width: 35%;
|
||||
font-weight: bold;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
/* nuevassss */
|
||||
.module_graph_menu_dropdown {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.module_graph_menu_content,
|
||||
.module_graph_menu_header {
|
||||
width: 92%;
|
||||
border: 1px solid #e2e2e2;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.module_graph_menu_content {
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
padding: 15px;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.module_graph_menu_header {
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
padding: 6px 10px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.module_graph_menu_header span > img {
|
||||
vertical-align: middle;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
|
|||
};
|
||||
</script>
|
||||
</head>
|
||||
<body bgcolor="#ffffff" style='background:#ffffff;'>
|
||||
<body style='background:#ffffff;'>
|
||||
|
||||
<?php
|
||||
echo "<div id='dialog' title='".__('CSV Export Information')."' style='visibility:hidden;'>";
|
||||
|
@ -175,8 +175,28 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
|
|||
|
||||
$unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $id);
|
||||
|
||||
echo '<div style="margin-left: 65px; padding-top: 10px;">';
|
||||
|
||||
|
||||
// MENU
|
||||
$menu_form = "<form method='get' action='stat_win.php'>".html_print_input_hidden('id', $id, true).html_print_input_hidden('label', $label, true);
|
||||
|
||||
if (!empty($server_id)) {
|
||||
$menu_form .= html_print_input_hidden('server', $server_id, true);
|
||||
}
|
||||
|
||||
if (isset($_GET['type'])) {
|
||||
$type = get_parameter_get('type');
|
||||
$menu_form .= html_print_input_hidden('type', $type, true);
|
||||
}
|
||||
|
||||
echo $menu_form;
|
||||
|
||||
echo '<div class="print_menu"></div>';
|
||||
|
||||
echo '</form>';
|
||||
|
||||
|
||||
echo '<div style="padding-top: 60px;">';
|
||||
$width = '90%';
|
||||
$height = '450';
|
||||
|
||||
|
@ -228,39 +248,16 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
|
|||
|
||||
echo '</div>';
|
||||
|
||||
//
|
||||
// SIDE MENU
|
||||
//
|
||||
$params = [];
|
||||
// TOP TEXT
|
||||
// Use the no_meta parameter because this image is only in the base console
|
||||
$params['top_text'] = "<div style='color: white; width: 100%; text-align: center; font-weight: bold; vertical-align: top;'>".html_print_image('images/wrench_blanco.png', true, ['width' => '16px'], false, false, true).' '.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_w.png', true).'</div>';
|
||||
$params['body_text'] = "<div class='menu_sidebar_outer'>";
|
||||
$params['body_text'] .= __('Please, make your changes and apply with the <i>Reload</i> button');
|
||||
|
||||
// MENU
|
||||
$params['body_text'] .= '<form method="get" action="stat_win.php">';
|
||||
$params['body_text'] .= html_print_input_hidden('id', $id, true);
|
||||
$params['body_text'] .= html_print_input_hidden('label', $label, true);
|
||||
|
||||
if (!empty($server_id)) {
|
||||
$params['body_text'] .= html_print_input_hidden('server', $server_id, true);
|
||||
}
|
||||
|
||||
if (isset($_GET['type'])) {
|
||||
$type = get_parameter_get('type');
|
||||
$params['body_text'] .= html_print_input_hidden('type', $type, true);
|
||||
}
|
||||
|
||||
// FORM TABLE
|
||||
$table = html_get_predefined_table('transparent', 2);
|
||||
$table->width = '98%';
|
||||
$table->width = '100%';
|
||||
$table->id = 'stat_win_form_div';
|
||||
$table->style[0] = 'text-align:left; padding: 7px;';
|
||||
$table->style[0] = 'text-align:left;';
|
||||
$table->style[1] = 'text-align:left;';
|
||||
// $table->size[0] = '50%';
|
||||
$table->styleTable = 'border-spacing: 4px;';
|
||||
$table->class = 'alternate';
|
||||
$table->styleTable = 'margin-bottom: 20px;';
|
||||
$table->class = 'events_show_more_table';
|
||||
|
||||
$data = [];
|
||||
$data[0] = __('Refresh time');
|
||||
|
@ -407,42 +404,16 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent);
|
|||
true
|
||||
).'</div>';
|
||||
|
||||
unset($table);
|
||||
|
||||
$table = new stdClass();
|
||||
$table->id = 'stat_win_form';
|
||||
$table->width = '100%';
|
||||
$table->cellspacing = 2;
|
||||
$table->cellpadding = 2;
|
||||
$table->class = 'databox';
|
||||
|
||||
$data = [];
|
||||
$data[0] = html_print_div(
|
||||
[
|
||||
'id' => 'field_list',
|
||||
'content' => $form_table,
|
||||
'style' => 'overflow: auto; height: 220px',
|
||||
],
|
||||
true
|
||||
);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$params['body_text'] .= html_print_table($table, true);
|
||||
$params['body_text'] .= '</form>';
|
||||
$params['body_text'] .= '</div>';
|
||||
// outer
|
||||
// ICONS
|
||||
$params['icon_closed'] = '/images/graphmenu_arrow_hide.png';
|
||||
$params['icon_open'] = '/images/graphmenu_arrow.png';
|
||||
|
||||
// SIZE
|
||||
$params['width'] = 500;
|
||||
|
||||
// POSITION
|
||||
$params['position'] = 'left';
|
||||
|
||||
html_print_side_layer($params);
|
||||
echo '<div class="module_graph_menu_dropdown">
|
||||
<div id="module_graph_menu_header" class="module_graph_menu_header">
|
||||
<img src="'.$urlImage.'images/arrow_down_green.png" class="imagen" style="float:left" alt="show/hide"/>
|
||||
<span>'.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_g.png', true).'</span>
|
||||
<img src="'.$urlImage.'images/config.png" style="float:right;" alt="Manage">
|
||||
</div>
|
||||
<div class="module_graph_menu_content module_graph_menu_content_closed" style="display:none;">'.$form_table.'</div>
|
||||
</div>';
|
||||
|
||||
// Hidden div to forced title
|
||||
html_print_div(
|
||||
|
@ -491,11 +462,24 @@ ui_include_time_picker(true);
|
|||
|
||||
$.datepicker.setDefaults($.datepicker.regional["<?php echo $custom_user_language; ?>"]);
|
||||
|
||||
$(window).ready(function() {
|
||||
$("#field_list").css('height', ($(window).height() - 160) + 'px');
|
||||
//$(window).ready(function() {
|
||||
$('.print_menu').append($('.module_graph_menu_dropdown'));
|
||||
//});
|
||||
|
||||
|
||||
$('#module_graph_menu_header').on('click', function(){
|
||||
if( $('.module_graph_menu_content').hasClass('module_graph_menu_content_closed')){
|
||||
$('.module_graph_menu_content').show();
|
||||
$('.module_graph_menu_content').removeClass('module_graph_menu_content_closed');
|
||||
$('#module_graph_menu_header .imagen').attr('src',$('#module_graph_menu_header .imagen').attr('src').replace('arrow_down_green','arrow_up_green'))
|
||||
}
|
||||
else{
|
||||
$('.module_graph_menu_content').hide();
|
||||
$('.module_graph_menu_content').addClass('module_graph_menu_content_closed');
|
||||
$('#module_graph_menu_header .imagen').attr('src',$('#module_graph_menu_header .imagen').attr('src').replace('arrow_up_green','arrow_down_green'))
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
$("#field_list").css('height', ($(document).height() - 160) + 'px');
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue