SNMP visual fix staticts
This commit is contained in:
parent
60f8c9bc95
commit
80076434b3
|
@ -181,113 +181,47 @@ class SnmpConsole extends HTML
|
|||
|
||||
$default_refr = 300;
|
||||
|
||||
if (!isset($config['pure']) || $config['pure'] === false) {
|
||||
$statistics['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_statistics&pure='.$config['pure'].'">'.html_print_image(
|
||||
'images/logs@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Statistics'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$list['text'] = '<a href="index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&pure=0">'.html_print_image(
|
||||
'images/SNMP-network-numeric-data@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('List'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$list['active'] = true;
|
||||
$statistics['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_statistics&pure='.$config['pure'].'">'.html_print_image(
|
||||
'images/logs@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Statistics'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$list['text'] = '<a href="index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&pure=0">'.html_print_image(
|
||||
'images/SNMP-network-numeric-data@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('List'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
$list['active'] = true;
|
||||
|
||||
$screen['text'] = '<a href="#" onClick="javascript:fullscreen(1)">'.html_print_image(
|
||||
'images/fullscreen@svg.svg',
|
||||
true,
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('SNMP Console'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'snmp_console',
|
||||
false,
|
||||
[
|
||||
$screen,
|
||||
$list,
|
||||
$statistics,
|
||||
],
|
||||
[
|
||||
[
|
||||
'title' => __('View in full screen'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
|
||||
// Header.
|
||||
ui_print_standard_header(
|
||||
__('SNMP Console'),
|
||||
'images/op_snmp.png',
|
||||
false,
|
||||
'snmp_console',
|
||||
false,
|
||||
[
|
||||
$screen,
|
||||
$list,
|
||||
$statistics,
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('Monitoring'),
|
||||
],
|
||||
[
|
||||
'link' => '',
|
||||
'label' => __('SNMP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
} else {
|
||||
echo '<div id="dashboard-controls">';
|
||||
|
||||
echo '<div id="menu_tab">';
|
||||
echo '<ul class="mn">';
|
||||
// Normal view button.
|
||||
echo '<li class="nomn">';
|
||||
|
||||
echo '<a href="#" onClick="javascript:fullscreen(0)">';
|
||||
echo html_print_image(
|
||||
'images/exit_fullscreen@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('Exit fullscreen'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
);
|
||||
echo '</a>';
|
||||
echo '</li>';
|
||||
|
||||
// Auto refresh control.
|
||||
echo '<li class="nomn">';
|
||||
echo '<div class="dashboard-refr mrgn_top_6px">';
|
||||
echo '<div class="dashboard-countdown display_in"></div>';
|
||||
$normal_url = 'index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view';
|
||||
|
||||
echo '<form id="refr-form" method="get" action="'.$normal_url.'" >';
|
||||
echo __('Refresh every').':';
|
||||
echo html_print_select(get_refresh_time_array(), 'refresh', $this->refr, '', '', 0, true, false, false);
|
||||
echo '</form>';
|
||||
echo '</li>';
|
||||
|
||||
html_print_input_hidden('sec', 'snmpconsole');
|
||||
html_print_input_hidden('sec2', 'operation/snmpconsole/snmp_view');
|
||||
html_print_input_hidden('pure', 1);
|
||||
html_print_input_hidden('refresh', (($this->refr > 0) ? $this->refr : $default_refr));
|
||||
|
||||
// Dashboard name.
|
||||
echo '<li class="nomn">';
|
||||
echo '<div class="dashboard-title">'.__('SNMP Traps').'</div>';
|
||||
echo '</li>';
|
||||
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
ui_require_css_file('pandora_enterprise', ENTERPRISE_DIR.'/include/styles/');
|
||||
ui_require_css_file('pandora_dashboard', ENTERPRISE_DIR.'/include/styles/');
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
|
||||
ui_require_jquery_file('countdown');
|
||||
ui_require_javascript_file('pandora_dashboard', ENTERPRISE_DIR.'/include/javascript/');
|
||||
ui_require_javascript_file('wz_jsgraphics');
|
||||
ui_require_javascript_file('pandora_visual_console');
|
||||
}
|
||||
'link' => '',
|
||||
'label' => __('SNMP'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Datatables list.
|
||||
try {
|
||||
|
|
|
@ -5044,6 +5044,8 @@ function ui_print_page_header(
|
|||
$breadcrumbs='',
|
||||
$hide_left_small=false
|
||||
) {
|
||||
global $config;
|
||||
|
||||
$title = io_safe_input_html($title);
|
||||
if (($icon == '') && ($godmode == true)) {
|
||||
$icon = 'images/gm_setup.png';
|
||||
|
@ -5057,13 +5059,18 @@ function ui_print_page_header(
|
|||
$type = 'view';
|
||||
$type2 = 'menu_tab_frame_view';
|
||||
$separator_class = 'separator';
|
||||
$div_style = '';
|
||||
} else {
|
||||
$type = 'view';
|
||||
$type2 = 'menu_tab_frame_view';
|
||||
$separator_class = 'separator_view';
|
||||
$div_style = '';
|
||||
if ($config['pure'] === true) {
|
||||
$div_style = 'top:0px;';
|
||||
}
|
||||
}
|
||||
|
||||
$buffer = '<div id="'.$type2.'" >';
|
||||
$buffer = '<div id="'.$type2.'" style="'.$div_style.'" >';
|
||||
|
||||
if (!empty($breadcrumbs)) {
|
||||
$buffer .= '<div class="menu_tab_left_bc">';
|
||||
|
|
|
@ -11635,3 +11635,21 @@ ul.tag-editor {
|
|||
padding-left: 5px !important;
|
||||
font-size: 20px !important;
|
||||
}
|
||||
|
||||
div.ui-dialog-buttonset > button.ui-button.ui-corner-all.ui-widget {
|
||||
background-color: var(--primary-color);
|
||||
color: #fff;
|
||||
border: 1px solid var(--primary-color);
|
||||
border-radius: 8px;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
div.ui-dialog-buttonset > button.ui-button.ui-corner-all.ui-widget:hover {
|
||||
background-color: #1d7873;
|
||||
border-color: #1d7873;
|
||||
}
|
||||
|
||||
div.ui-dialog-buttonset > button.ui-button.ui-corner-all.ui-widget:active {
|
||||
background-color: #0d312f;
|
||||
border-color: #0d312f;
|
||||
}
|
||||
|
|
|
@ -57,16 +57,18 @@ if ($config['pure']) {
|
|||
).'</a>';
|
||||
}
|
||||
|
||||
// List
|
||||
$list = [];
|
||||
$list['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_view&pure='.$config['pure'].'&refresh='.$refr.'">'.html_print_image(
|
||||
'images/SNMP-network-numeric-data@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('List'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
if ($config['pure'] === false) {
|
||||
// List.
|
||||
$list = [];
|
||||
$list['text'] = '<a href="index.php?sec=estado&sec2=operation/snmpconsole/snmp_view&pure='.$config['pure'].'&refresh='.$refr.'">'.html_print_image(
|
||||
'images/SNMP-network-numeric-data@svg.svg',
|
||||
true,
|
||||
[
|
||||
'title' => __('List'),
|
||||
'class' => 'main_menu_icon invert_filter',
|
||||
]
|
||||
).'</a>';
|
||||
}
|
||||
|
||||
// Statistics (This file)
|
||||
$statistics = [];
|
||||
|
@ -165,10 +167,9 @@ $water_mark = [
|
|||
// By SOURCE
|
||||
$table_source = new StdClass();
|
||||
$table_source->width = '100%';
|
||||
$table_source->class = 'databox data';
|
||||
$table_source->class = 'info_table';
|
||||
$table_source->head[] = __('Traps received by source').' - '.sprintf(__('Top %d'), 25);
|
||||
$table_source->head_colspan[] = 2;
|
||||
$table_source->headstyle[] = 'background-color: #82b92e';
|
||||
$table_source->size = [];
|
||||
$table_source->size['table'] = '50%';
|
||||
$table_source->size['graph'] = '50%';
|
||||
|
@ -182,6 +183,7 @@ $table_source_data->head = [];
|
|||
$table_source_data->head['source'] = __('Source IP');
|
||||
$table_source_data->head['num'] = __('Number');
|
||||
$table_source_data->data = [];
|
||||
$table_source_data->class = 'info_table';
|
||||
|
||||
$table_source_graph_data = [];
|
||||
$labels = [];
|
||||
|
@ -239,9 +241,9 @@ unset($table_source);
|
|||
// By OID
|
||||
$table_oid = new StdClass();
|
||||
$table_oid->width = '100%';
|
||||
$table_oid->class = 'info_table';
|
||||
$table_oid->head[] = __('Traps received by Enterprise String').' - '.sprintf(__('Top %d'), 25);
|
||||
$table_oid->head_colspan[] = 2;
|
||||
$table_oid->headstyle[] = 'background-color: #82b92e';
|
||||
$table_oid->size = [];
|
||||
$table_oid->size['table'] = '50%';
|
||||
$table_oid->size['graph'] = '50%';
|
||||
|
@ -255,6 +257,7 @@ $table_oid_data->head = [];
|
|||
$table_oid_data->head['oid'] = __('Trap Enterprise String');
|
||||
$table_oid_data->head['num'] = __('Number');
|
||||
$table_oid_data->data = [];
|
||||
$table_oid_data->class = 'info_table';
|
||||
|
||||
$table_oid_graph_data = [];
|
||||
$labels = [];
|
||||
|
|
Loading…
Reference in New Issue