Ticket 10467 Improve External Tools view

This commit is contained in:
Jose Gonzalez 2023-02-20 14:50:17 +01:00
parent da58e4b9e0
commit 8f21229246
4 changed files with 38 additions and 27 deletions

View File

@ -528,14 +528,16 @@ class ExternalTools extends HTML
// Form table.
$table = new StdClass();
$table->class = 'databox filters w100p';
$table->class = 'fixed_filter_bar';
$table->id = 'externalToolTable';
$table->cellstyle['captions'][0] = 'width: 0';
$table->cellstyle['captions'][1] = 'width: 0';
$table->cellstyle['captions'][2] = 'width: 0';
$table->data = [];
$table->data[0][0] = __('Operation');
$table->data['captions'][0] = __('Operation');
$table->data[0][1] = html_print_select(
$table->data['inputs'][0] = html_print_select(
$commandList,
'operation',
$this->operation,
@ -545,8 +547,8 @@ class ExternalTools extends HTML
true
);
$table->data[0][2] = __('IP Adress');
$table->data[0][3] = html_print_select(
$table->data['captions'][1] = __('IP Adress');
$table->data['inputs'][1] = html_print_select(
$ipsSelect,
'select_ips',
$principal_ip,
@ -556,10 +558,10 @@ class ExternalTools extends HTML
true
);
$table->cellclass[0][4] = 'snmpcolumn';
$table->data[0][4] = __('SNMP Version');
$table->data[0][4] .= ' ';
$table->data[0][4] .= html_print_select(
$table->cellclass['captions'][2] = 'snmpcolumn';
$table->cellclass['inputs'][2] = 'snmpcolumn';
$table->data['captions'][2] = __('SNMP Version');
$table->data['inputs'][2] = html_print_select(
[
'1' => 'v1',
'2c' => 'v2c',
@ -572,10 +574,10 @@ class ExternalTools extends HTML
true
);
$table->cellclass[0][5] = 'snmpcolumn';
$table->data[0][5] = __('SNMP Community');
$table->data[0][5] .= ' ';
$table->data[0][5] .= html_print_input_text(
$table->cellclass['captions'][3] = 'snmpcolumn';
$table->cellclass['inputs'][3] = 'snmpcolumn';
$table->data['captions'][3] = __('SNMP Community');
$table->data['inputs'][3] = html_print_input_text(
'community',
$this->community,
'',
@ -584,7 +586,7 @@ class ExternalTools extends HTML
true
);
$table->data[0][6] = html_print_div(
$table->data['inputs'][4] = html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
@ -719,7 +721,7 @@ class ExternalTools extends HTML
try {
// If caption is not added, don't show anything.
if (empty($caption) === false) {
$output .= sprintf('<h3>%s</h3>', $caption);
$output .= sprintf('<h3 class="external_tools_title">%s</h3>', $caption);
}
$output .= '<pre class="external_tools_output">';
@ -787,7 +789,7 @@ class ExternalTools extends HTML
'format' => '-Oqn',
];
echo '<h3>'.__('SNMP information for ').$ip.'</h3>';
echo '<h3 class="external_tools_title">'.__('SNMP information for ').$ip.'</h3>';
$snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.3.0';
$result = get_h_snmpwalk($snmp_obj);
@ -849,7 +851,7 @@ class ExternalTools extends HTML
html_print_table($table);
} else if ((int) $operation === COMMAND_DIGWHOIS) {
echo '<h3>'.__('Domain and IP information for ').$ip.'</h3>';
echo '<h3 class="external_tools_title">'.__('Domain and IP information for ').$ip.'</h3>';
// Dig execution.
$dig = $this->whereIsTheCommand('dig');

View File

@ -153,7 +153,7 @@ html {
}
body {
background-color: #fbfbfb;
background-color: #f6f7fb;
margin: 0 auto;
display: flex;
flex-direction: column;
@ -1080,14 +1080,14 @@ div#page {
}
body.pure {
background-color: #fbfbfb;
background-color: #f6f7fb;
}
div#container {
margin: 0 auto;
min-width: 960px;
text-align: left;
background: #fbfbfb;
background: #f6f7fb;
width: 100%;
}
@ -1096,7 +1096,7 @@ div#main {
/* width: 100%; */
/* margin-left: 3em; */
background-color: #f6f7fb;
margin-bottom: 3em;
padding-bottom: 3em;
position: relative;
/* margin-top: 8.8em; */
flex-direction: column;
@ -10818,18 +10818,23 @@ tr.bring_next_field {
left: -95px !important;
}
.external_tools_title {
padding: 0 10px;
}
pre.external_tools_output {
padding: 0 10px;
/*
border: 1px solid #e5e9ed;
-moz-box-shadow: 0 3px 6px 0 rgb(0 0 0 / 13%);
-webkit-box-shadow: 0 3px 6px 0 rgb(0 0 0 / 13%);
box-shadow: 0 3px 6px 0 rgb(0 0 0 / 13%);
border-radius: 8px;
color: #cacaca;
padding: 10px;
background-color: #000;
background-image: radial-gradient(rgba(0, 150, 0, 0.75), #000 120%);
font-size: 11pt;
text-shadow: 0 0 5px #000;
*/
}
.dialog_table_form td:first-child {
@ -10919,6 +10924,10 @@ table.table_modal_alternate .select2-selection__arrow {
top: -4px !important;
}
.fixed_filter_bar .select2-selection__arrow b,
.filter_table .select2-selection__arrow b {
margin-top: 11px !important;
}
.filter_table
.select2-container
.select2-selection--single

View File

@ -1456,10 +1456,10 @@ if (__PAN_XHPROF__ === 1) {
}
if ($config['pure'] == 0) {
echo '<div id="both"></div>';
// echo '<div id="both"></div>';
echo '</div>';
// Main.
echo '<div id="both">&nbsp;</div>';
// echo '<div id="both">&nbsp;</div>';
echo '</div>';
// Page (id = page).
} else {
@ -1488,7 +1488,7 @@ if ($config['pure'] == 0) {
echo '</div>';
// Container div.
echo '</div>';
echo '<div id="both"></div>';
// echo '<div id="both"></div>';
echo '</div>';
}

View File

@ -14,7 +14,7 @@
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
*
* ============================================================================
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
* Copyright (c) 2005-2023 Artica Soluciones Tecnologicas
* Please see http://pandorafms.org for full contribution list
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License