SNMP views
This commit is contained in:
parent
831579f9c8
commit
c4a0dc1934
|
@ -220,7 +220,7 @@ if ($edit_filter > -2) {
|
|||
if ($j == 1) {
|
||||
$table->data[$j][1] .= ui_print_help_tip(__('This field contains a substring, could be part of a IP address, a numeric OID, or a plain substring').SEPARATOR_COLUMN, true);
|
||||
} else {
|
||||
$table->data[$j][1] .= html_print_image('images/cross.png', true, ['id' => 'delete_filter_'.$f['id_snmp_filter'], 'class' => 'invert_filter', 'alt' => __('Click to remove the filter')]);
|
||||
$table->data[$j][1] .= html_print_image('images/delete.svg', true, ['id' => 'delete_filter_'.$f['id_snmp_filter'], 'class' => 'invert_filter main_menu_icon', 'alt' => __('Click to remove the filter')]);
|
||||
}
|
||||
|
||||
$j++;
|
||||
|
@ -298,7 +298,7 @@ if ($edit_filter > -2) {
|
|||
$data = [];
|
||||
$data[0] = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.$r['description'].'</a>';
|
||||
$data[1] = $r['filter'];
|
||||
$data[2] = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update'), 'class' => 'invert_filter']).'</a>'.' <a onclick="if (confirm(\''.__('Are you sure?').'\')) return true; else return false;" href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'class' => 'invert_filter']).'</a>';
|
||||
$data[2] = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/support@svg.svg', true, ['border' => '0', 'alt' => __('Update'), 'class' => 'invert_filter main_menu_icon']).'</a>'.' <a onclick="if (confirm(\''.__('Are you sure?').'\')) return true; else return false;" href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/delete.svg', true, ['border' => '0', 'alt' => __('Delete'), 'class' => 'invert_filter main_menu_icon']).'</a>';
|
||||
array_push($table->data, $data);
|
||||
}
|
||||
} else {
|
||||
|
@ -309,7 +309,7 @@ if ($edit_filter > -2) {
|
|||
foreach ($row as $i => $r) {
|
||||
if ($ind2 == 0) {
|
||||
$compose_id = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.$r['description'].'</a>';
|
||||
$compose_action = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/config.png', true, ['border' => '0', 'alt' => __('Update'), 'class' => 'invert_filter']).'</a>'.' <a onclick="if (confirm(\''.__('Are you sure?').'\')) return true; else return false;" href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/cross.png', true, ['border' => '0', 'alt' => __('Delete'), 'class' => 'invert_filter']).'</a>';
|
||||
$compose_action = '<a href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&edit_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/support@svg.svg', true, ['border' => '0', 'alt' => __('Update'), 'class' => 'invert_filter main_menu_icon']).'</a>'.' <a onclick="if (confirm(\''.__('Are you sure?').'\')) return true; else return false;" href="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_filters&delete_filter='.$r['id_snmp_filter'].'">'.html_print_image('images/delete.svg', true, ['border' => '0', 'alt' => __('Delete'), 'class' => 'invert_filter main_menu_icon']).'</a>';
|
||||
$ind2++;
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ if ($edit_filter > -2) {
|
|||
|
||||
$(document).ready (function () {
|
||||
$('#add_filter').click(function(e) {
|
||||
$('#filter_table').append('<tr id="filter_table-' + id + '" class="datos"><td id="filter_table-' + id + '-0" class="datos "></td><td id="filter_table-' + id + '-1" class="datos "><input type="text" name="filter_' + id + '" value="" id="text-filter_' + id + '" size="60" maxlength="100"><img src="' + homeurl + 'images/cross.png" onclick="delete_this_row(' + id + ');" data-title="Click to delete the filter" data-use_title_for_force_title="1" class="forced_title" alt="Click to delete the filter"></td></tr>');
|
||||
$('#filter_table').append('<tr id="filter_table-' + id + '" class="datos"><td id="filter_table-' + id + '-0" class="datos "></td><td id="filter_table-' + id + '-1" class="datos "><input type="text" name="filter_' + id + '" value="" id="text-filter_' + id + '" size="60" maxlength="100"><img src="' + homeurl + 'images/delete.svg" onclick="delete_this_row(' + id + ');" data-title="Click to delete the filter" data-use_title_for_force_title="1" class="forced_title main_menu_icon" alt="Click to delete the filter"></td></tr>');
|
||||
|
||||
id++;
|
||||
|
||||
|
|
|
@ -79,69 +79,84 @@ if ($generate_trap) {
|
|||
$table = new stdClass();
|
||||
$traps_generator = '<form method="POST" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_trap_generator">';
|
||||
$table->width = '100%';
|
||||
$table->class = 'databox filters';
|
||||
$table->class = 'filter-table-adv';
|
||||
$table->size = [];
|
||||
$table->data = [];
|
||||
$table->size[0] = '30%';
|
||||
$table->size[1] = '30%';
|
||||
$table->size[2] = '30%';
|
||||
|
||||
$table->data[0][0] = __('Host address');
|
||||
$table->data[0][1] = html_print_input_text(
|
||||
'snmp_host_address',
|
||||
$snmp_host_address,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
$table->data[0][0] = html_print_label_input_block(
|
||||
__('Host address'),
|
||||
html_print_input_text(
|
||||
'snmp_host_address',
|
||||
$snmp_host_address,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[0][2] = __('Community');
|
||||
$table->data[0][3] = html_print_input_text(
|
||||
'snmp_community',
|
||||
$snmp_community,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
$table->data[0][1] = html_print_label_input_block(
|
||||
__('Community'),
|
||||
html_print_input_text(
|
||||
'snmp_community',
|
||||
$snmp_community,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[2][0] = __('Enterprise String');
|
||||
$table->data[2][1] = html_print_input_text(
|
||||
'snmp_oid',
|
||||
$snmp_oid,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
$table->data[0][2] = html_print_label_input_block(
|
||||
__('Enterprise String'),
|
||||
html_print_input_text(
|
||||
'snmp_oid',
|
||||
$snmp_oid,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[2][2] = __('Value');
|
||||
$table->data[2][3] = html_print_input_text(
|
||||
'snmp_value',
|
||||
$snmp_value,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
$table->data[1][1] = html_print_label_input_block(
|
||||
__('Value'),
|
||||
html_print_input_text(
|
||||
'snmp_value',
|
||||
$snmp_value,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
$table->data[3][0] = __('SNMP Agent');
|
||||
$table->data[3][1] = html_print_input_text(
|
||||
'snmp_agent',
|
||||
$snmp_agent,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[3][2] = __('SNMP Type');
|
||||
$table->data[3][3] = html_print_input_text(
|
||||
'snmp_type',
|
||||
$snmp_type,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
$table->data[1][2] = html_print_label_input_block(
|
||||
__('SNMP Agent'),
|
||||
html_print_input_text(
|
||||
'snmp_agent',
|
||||
$snmp_agent,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);
|
||||
/*
|
||||
$table->data[1][3] = html_print_label_input_block(
|
||||
__('SNMP Type'),
|
||||
html_print_input_text(
|
||||
'snmp_type',
|
||||
$snmp_type,
|
||||
'',
|
||||
50,
|
||||
255,
|
||||
true
|
||||
)
|
||||
);*/
|
||||
|
||||
$types = [
|
||||
0 => 'Cold start (0)',
|
||||
|
@ -152,24 +167,50 @@ $types = [
|
|||
5 => 'EGP neighbor loss (5)',
|
||||
6 => 'Enterprise (6)',
|
||||
];
|
||||
$table->data[3][3] = html_print_select(
|
||||
$types,
|
||||
'snmp_type',
|
||||
$snmp_type,
|
||||
'',
|
||||
__('Select'),
|
||||
-1,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
$table->data[1][3] = html_print_label_input_block(
|
||||
__('SNMP Type'),
|
||||
html_print_select(
|
||||
$types,
|
||||
'snmp_type',
|
||||
$snmp_type,
|
||||
'',
|
||||
__('Select'),
|
||||
-1,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
'width: 100%'
|
||||
)
|
||||
);
|
||||
|
||||
$searchForm = '<form method="POST" action="index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_trap_generator">';
|
||||
$searchForm .= html_print_table($table, true);
|
||||
$searchForm .= html_print_div(
|
||||
[
|
||||
'class' => 'action-buttons',
|
||||
'content' => html_print_submit_button(
|
||||
__('Generate trap'),
|
||||
'btn_generate_trap',
|
||||
false,
|
||||
['class' => 'sub cog'],
|
||||
true
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
$searchForm .= html_print_input_hidden('generate_trap', 1, true);
|
||||
$searchForm .= '</form>';
|
||||
|
||||
$traps_generator .= html_print_table($table, true);
|
||||
$traps_generator .= '<div style="width:'.$table->width.'; text-align: right;">'.html_print_submit_button(__('Generate trap'), 'btn_generate_trap', false, 'class="sub cog"', true).'</div>';
|
||||
$traps_generator .= html_print_input_hidden('generate_trap', 1, true);
|
||||
|
||||
unset($table);
|
||||
$traps_generator .= '</form>';
|
||||
|
||||
echo $traps_generator;
|
||||
ui_toggle(
|
||||
$searchForm,
|
||||
'<span class="subsection_header_title">'.__('Trap').'</span>',
|
||||
'filter_form',
|
||||
'',
|
||||
false,
|
||||
false,
|
||||
'',
|
||||
'white-box-content',
|
||||
'box-flat white_table_graph fixed_filter_bar'
|
||||
);
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: sketchtool 61.2 (101010) - https://sketch.com -->
|
||||
<title>EF4DAB07-B64C-4C55-97AB-23DF4EA7EF22@svg</title>
|
||||
<desc>Created with sketchtool.</desc>
|
||||
<g id="Login---v2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Mockup---login-v4h" transform="translate(-162.000000, -25.000000)" fill="#8190AD">
|
||||
<g id="Extra-links" transform="translate(20.000000, 20.000000)">
|
||||
<g id="Group" transform="translate(142.000000, 5.000000)">
|
||||
<g id="Support">
|
||||
<path fill="#3F3F3F" d="M15.2701641,-1.77635684e-15 C15.4858494,-1.27409902e-15 15.6979436,0.0348396041 15.8989225,0.101403078 L12.7070316,3.29366835 C12.3167579,3.68432574 12.3167579,4.31737481 12.7070316,4.7080322 L14.6666667,6.66808379 L15.2912682,7.29281808 C15.6515751,7.65347905 16.2187925,7.68127953 16.6111153,7.37629716 L16.7053314,7.29311863 C16.7053816,7.29306854 16.7054316,7.29301844 16.7053314,7.29281808 L19.898705,4.10024399 C19.9485744,4.25090439 19.9806182,4.40780887 19.9935232,4.56778861 L20,4.72867607 L20,9.00123799 L16.0046868,13 L10.9984579,13 L10.497,12.499 L2.98434067,19.9968645 L0,19.9968645 L0,16.9968645 L7.499,9.5 L7,9.00123799 L7,4.00313044 L10.9984579,-1.77635684e-15 L15.2701641,-1.77635684e-15 Z"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -752,7 +752,7 @@ function filemanager_file_explorer(
|
|||
&& ($readOnly === false)
|
||||
) {
|
||||
$data[4] .= '<form method="post" action="'.$url.'" style="">';
|
||||
$data[4] .= '<input type="image" style="margin-top: 2px;height:21px" class="invert_filter" src="images/cross.png" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[4] .= '<input type="image" style="margin-top: 2px;height:21px" class="invert_filter" src="images/delete.svg" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
|
||||
$data[4] .= html_print_input_hidden('filename', $fileinfo['realpath'], true);
|
||||
$data[4] .= html_print_input_hidden('hash', md5($fileinfo['realpath'].$config['server_unique_identifier']), true);
|
||||
$data[4] .= html_print_input_hidden('delete_file', 1, true);
|
||||
|
|
Loading…
Reference in New Issue