Unify the styles of Discovery with Pandora - #4004
This commit is contained in:
parent
4b7f9e4882
commit
f5114918b5
|
@ -594,11 +594,11 @@ class HostDevices extends Wizard
|
||||||
if (isset($this->page) === false
|
if (isset($this->page) === false
|
||||||
|| $this->page == 0
|
|| $this->page == 0
|
||||||
) {
|
) {
|
||||||
|
|
||||||
// Comment input
|
// Comment input
|
||||||
$comment_input ='<div class="label_select"><label>'.__('Comment').':</label></div>';
|
$comment_input = '<div class="label_select"><label>'.__('Comment').':</label></div>';
|
||||||
|
|
||||||
$comment_input .= $this->printInput([
|
$comment_input .= $this->printInput(
|
||||||
|
[
|
||||||
'name' => 'comment',
|
'name' => 'comment',
|
||||||
'rows' => 1,
|
'rows' => 1,
|
||||||
'columns' => 1,
|
'columns' => 1,
|
||||||
|
@ -606,49 +606,55 @@ class HostDevices extends Wizard
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
'size' => 25,
|
'size' => 25,
|
||||||
'class' => 'discovery_textarea_input',
|
'class' => 'discovery_textarea_input',
|
||||||
'return' => true
|
'return' => true,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
|
|
||||||
// Task input
|
// Task input
|
||||||
$taskname_input_label = '<div class="label_select"><label>'.__('Task name').':</label></div>';
|
$taskname_input_label = '<div class="label_select"><label>'.__('Task name').':</label></div>';
|
||||||
|
|
||||||
$taskname_input = $this->printInput([
|
$taskname_input = $this->printInput(
|
||||||
|
[
|
||||||
'name' => 'taskname',
|
'name' => 'taskname',
|
||||||
'value' => $this->task['name'],
|
'value' => $this->task['name'],
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'size' => 25,
|
'size' => 25,
|
||||||
'class' => 'discovery_full_width_input'
|
'class' => 'discovery_full_width_input',
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
|
|
||||||
// Network input
|
// Network input
|
||||||
$network_input_label .= '<div class="label_select discovery_label_hint"><label>'.__('Network').':</label>'.ui_print_help_tip(__('You can specify several networks, separated by commas, for example: 192.168.50.0/24,192.168.60.0/24'), true).'</div>';
|
$network_input_label .= '<div class="label_select discovery_label_hint"><label>'.__('Network').':</label>'.ui_print_help_tip(__('You can specify several networks, separated by commas, for example: 192.168.50.0/24,192.168.60.0/24'), true).'</div>';
|
||||||
|
|
||||||
$network_input = $this->printInput([
|
$network_input = $this->printInput(
|
||||||
|
[
|
||||||
'name' => 'network',
|
'name' => 'network',
|
||||||
'value' => $this->task['subnet'],
|
'value' => $this->task['subnet'],
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'size' => 25,
|
'size' => 25,
|
||||||
'class' => 'discovery_full_width_input',
|
'class' => 'discovery_full_width_input',
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
|
|
||||||
// Discovery server input
|
// Discovery server input
|
||||||
$discovery_server_select_label = '<div class="label_select discovery_label_hint"><label>'.__('Discovery server').':</label>'.ui_print_help_tip(__('You must select a Discovery Server to run the Task, otherwise the Recon Task will never run'), true).'</div>';
|
$discovery_server_select_label = '<div class="label_select discovery_label_hint"><label>'.__('Discovery server').':</label>'.ui_print_help_tip(__('You must select a Discovery Server to run the Task, otherwise the Recon Task will never run'), true).'</div>';
|
||||||
|
|
||||||
$discovery_server_select = $this->printInput([
|
$discovery_server_select = $this->printInput(
|
||||||
'type' => 'select_from_sql',
|
[
|
||||||
'sql' => sprintf(
|
'type' => 'select_from_sql',
|
||||||
'SELECT id_server, name
|
'sql' => sprintf(
|
||||||
|
'SELECT id_server, name
|
||||||
FROM tserver
|
FROM tserver
|
||||||
WHERE server_type = %d
|
WHERE server_type = %d
|
||||||
ORDER BY name',
|
ORDER BY name',
|
||||||
SERVER_TYPE_DISCOVERY
|
SERVER_TYPE_DISCOVERY
|
||||||
),
|
),
|
||||||
'name' => 'id_recon_server',
|
'name' => 'id_recon_server',
|
||||||
'selected' => $this->task['id_recon_server'],
|
'selected' => $this->task['id_recon_server'],
|
||||||
'return' => true,
|
'return' => true,
|
||||||
'style' => 'width: 100%',
|
'style' => 'width: 100%',
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
|
|
||||||
// Interval input
|
// Interval input
|
||||||
$interv_manual = 0;
|
$interv_manual = 0;
|
||||||
|
@ -658,38 +664,40 @@ class HostDevices extends Wizard
|
||||||
|
|
||||||
$interval_input_label = '<div class="label_select discovery_label_hint" style="padding-top: 6px;"><label>'.__('Interval').':</label>'.ui_print_help_tip(__('Manual interval means that it will run only on demand.'), true).'</div>';
|
$interval_input_label = '<div class="label_select discovery_label_hint" style="padding-top: 6px;"><label>'.__('Interval').':</label>'.ui_print_help_tip(__('Manual interval means that it will run only on demand.'), true).'</div>';
|
||||||
|
|
||||||
$interval_input = $this->printInput([
|
$interval_input = $this->printInput(
|
||||||
'type' => 'select',
|
[
|
||||||
'selected' => $interv_manual,
|
'type' => 'select',
|
||||||
'fields' => [
|
'selected' => $interv_manual,
|
||||||
0 => __('Defined'),
|
'fields' => [
|
||||||
1 => __('Manual'),
|
0 => __('Defined'),
|
||||||
],
|
1 => __('Manual'),
|
||||||
'name' => 'interval_manual_defined',
|
],
|
||||||
'return' => true,
|
'name' => 'interval_manual_defined',
|
||||||
'style' => 'float: right;'
|
'return' => true,
|
||||||
]);
|
'style' => 'float: right;',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
$interval_input_extra = '<span id="interval_manual_container">'.html_print_extended_select_for_time(
|
$interval_input_extra = '<span id="interval_manual_container">'.html_print_extended_select_for_time(
|
||||||
'interval',
|
'interval',
|
||||||
$this->task['interval_sweep'],
|
$this->task['interval_sweep'],
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'0',
|
'0',
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false
|
false
|
||||||
).ui_print_help_tip(
|
).ui_print_help_tip(
|
||||||
__('The minimum recomended interval for Recon Task is 5 minutes'),
|
__('The minimum recomended interval for Recon Task is 5 minutes'),
|
||||||
true
|
true
|
||||||
).'</span>';
|
).'</span>';
|
||||||
|
|
||||||
|
|
||||||
// Group select
|
// Group select
|
||||||
$group_select = '<div class="label_select"><label>'.__('Group').':</label></div>';
|
$group_select = '<div class="label_select"><label>'.__('Group').':</label></div>';
|
||||||
|
|
||||||
$group_select .= $this->printInput([
|
$group_select .= $this->printInput(
|
||||||
|
[
|
||||||
'name' => 'id_group',
|
'name' => 'id_group',
|
||||||
'returnAllGroup' => false,
|
'returnAllGroup' => false,
|
||||||
'privilege' => 'PM',
|
'privilege' => 'PM',
|
||||||
|
@ -699,15 +707,18 @@ class HostDevices extends Wizard
|
||||||
'class' => 'discovery_list_input',
|
'class' => 'discovery_list_input',
|
||||||
'size' => 9,
|
'size' => 9,
|
||||||
'simple_multiple_options' => true,
|
'simple_multiple_options' => true,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
|
|
||||||
if (isset($this->task['id_rt']) === true) {
|
if (isset($this->task['id_rt']) === true) {
|
||||||
//Propagate ID
|
// Propagate ID
|
||||||
$task_hidden = $this->printInput([
|
$task_hidden = $this->printInput(
|
||||||
'name' => 'task',
|
[
|
||||||
'value' => $this->task['id_rt'],
|
'name' => 'task',
|
||||||
'type' => 'hidden'
|
'value' => $this->task['id_rt'],
|
||||||
]);
|
'type' => 'hidden',
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$task_url = '';
|
$task_url = '';
|
||||||
|
@ -725,32 +736,20 @@ class HostDevices extends Wizard
|
||||||
|
|
||||||
// XXX: Could be improved validating inputs before continue (JS)
|
// XXX: Could be improved validating inputs before continue (JS)
|
||||||
// Print NetScan page 0.
|
// Print NetScan page 0.
|
||||||
//$this->printForm($form);
|
// $this->printForm($form);
|
||||||
|
|
||||||
echo '<form action="'.$this->url.'&mode=netscan&page='.($this->page + 1).$task_url.'" method="POST">';
|
echo '<form action="'.$this->url.'&mode=netscan&page='.($this->page + 1).$task_url.'" method="POST">';
|
||||||
echo $task_hidden;
|
echo $task_hidden;
|
||||||
|
|
||||||
echo '<div class="white_box">
|
echo '<div class="white_box">
|
||||||
<div class="edit_discovery_info" style="margin-bottom: 15px;">
|
<div class="edit_discovery_info" style="margin-bottom: 15px;">
|
||||||
<div style="width: 25%; padding: 9px;">'
|
<div style="width: 25%; padding: 9px;">'.'<div style="height: 50%; margin-bottom: 35px;">'.html_print_image('images/wizard/netscan_green.png', true, ['title' => __('Close')], false).'</div>'.'<div class="edit_discovery_input"><div style="display: flex;">'.$interval_input_label.'<div style="margin-left: 15 px; width: 50%;">'.$interval_input.'</div></div>'.$interval_input_extra.'</div>'.'</div>
|
||||||
.'<div style="height: 50%; margin-bottom: 35px;">'.html_print_image ("images/wizard/netscan_green.png", true, array ("title" => __('Close'), "style" => 'width: 60%;'), false).'</div>'
|
|
||||||
.'<div class="edit_discovery_input"><div style="display: flex;">'.$interval_input_label.'<div style="margin-left: 15 px; width: 50%;">'.$interval_input.'</div></div>'.$interval_input_extra.'</div>'
|
|
||||||
.'</div>
|
|
||||||
|
|
||||||
<div style="width: 40%; padding-left: 5%; padding-right: 12%;">
|
<div style="width: 40%; padding-left: 5%; padding-right: 12%;">
|
||||||
<div class="edit_discovery_input">'.$taskname_input_label.'<div class="discovery_text_input">'.$taskname_input.'</div></div>'
|
<div class="edit_discovery_input">'.$taskname_input_label.'<div class="discovery_text_input">'.$taskname_input.'</div></div>'.'<div class="edit_discovery_input discovery_select_input">'.$discovery_server_select_label.$discovery_server_select.'<div class="discovery_hint"></div></div>'.'<div class="edit_discovery_input">'.$network_input_label.'<div class="discovery_text_input">'.$network_input.'</div></div>'.'</div>'.'<div style="width: 35%;">'.$group_select.'</div>'.'</div>'.'<div class="edit_discovery_info">
|
||||||
.'<div class="edit_discovery_input discovery_select_input">'.$discovery_server_select_label.$discovery_server_select.'<div class="discovery_hint"></div></div>'
|
|
||||||
.'<div class="edit_discovery_input">'.$network_input_label.'<div class="discovery_text_input">'.$network_input.'</div></div>'
|
|
||||||
.'</div>'
|
|
||||||
.'<div style="width: 35%;">'.$group_select.'</div>'
|
|
||||||
.'</div>'
|
|
||||||
|
|
||||||
.'<div class="edit_discovery_info">
|
|
||||||
<div style="width: 100%;">
|
<div style="width: 100%;">
|
||||||
'.$comment_input.'
|
'.$comment_input.'
|
||||||
</div>
|
</div>
|
||||||
</div>'
|
</div>'.'</div>';
|
||||||
.'</div>';
|
|
||||||
|
|
||||||
$str = __('Next');
|
$str = __('Next');
|
||||||
|
|
||||||
|
@ -778,7 +777,6 @@ class HostDevices extends Wizard
|
||||||
}).change();
|
}).change();
|
||||||
|
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -443,7 +443,7 @@ class CustomNetScan extends Wizard
|
||||||
'name' => 'taskname',
|
'name' => 'taskname',
|
||||||
'value' => $this->task['name'],
|
'value' => $this->task['name'],
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'size' => 25,
|
'size' => 50,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -465,7 +465,7 @@ class CustomNetScan extends Wizard
|
||||||
'name' => 'comment',
|
'name' => 'comment',
|
||||||
'value' => $this->task['description'],
|
'value' => $this->task['description'],
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'size' => 25,
|
'size' => 50,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ class CustomNetScan extends Wizard
|
||||||
'value' => $explanation,
|
'value' => $explanation,
|
||||||
'return' => true,
|
'return' => true,
|
||||||
'attributes' => 'style="width: 388px;"',
|
'attributes' => 'style="width: 388px;"',
|
||||||
'class' => 'discovery_textarea_input'
|
'class' => 'discovery_textarea_input',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ span.breadcrumb_link {
|
||||||
|
|
||||||
.edit_discovery_info {
|
.edit_discovery_info {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
padding-top: 25px;
|
padding-top: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,63 +181,41 @@ span.breadcrumb_link {
|
||||||
|
|
||||||
label {
|
label {
|
||||||
color: #343434 !important;
|
color: #343434 !important;
|
||||||
font-size: 1.5em;
|
|
||||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 0px 0px 5px 0px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.discovery_full_width_input {
|
.discovery_full_width_input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
li > input[type="text"],
|
||||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
li > input[type="password"],
|
||||||
font-size: 1.6em !important;
|
.discovery_text_input > input[type="password"],
|
||||||
color: #686868;
|
.discovery_text_input > input[type="text"],
|
||||||
|
#interval_manual > input[type="text"] {
|
||||||
|
background-color: transparent !important;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
border-bottom: 1px solid #343434;
|
||||||
|
padding: 0px 0px 2px 0px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
select > option {
|
#interval_manual > input[type="text"] {
|
||||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
|
||||||
font-size: 1em !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
li > input[type=text], li > input[type=password], .discovery_text_input > input[type=password], .discovery_text_input > input[type=text], #interval_manual > input[type=text] {
|
|
||||||
background-color: transparent !important;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0 !important;
|
|
||||||
border-bottom: 1px solid #343434;
|
|
||||||
padding: 0px 0px 2px 0px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
|
||||||
font-size: 1.6em;
|
|
||||||
}
|
|
||||||
|
|
||||||
li > input[type=text]:focus, li > input[type=password]:focus, .discovery_text_input > input[type=password]:focus, .discovery_text_input > input[type=text]:focus, #interval_manual > input[type=text]:focus {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#interval_manual > input[type=text] {
|
|
||||||
width: 50px;
|
width: 50px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.discovery_list_input {
|
.discovery_list_input {
|
||||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
|
||||||
font-size: 1.6em !important;
|
|
||||||
color: #686868;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 240px;
|
border: 1px solid #cbcbcb;
|
||||||
border: 1px solid #CBCBCB;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.discovery_list_input option {
|
.discovery_list_input option {
|
||||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
text-align: center;
|
||||||
font-size: 1.1em !important;
|
|
||||||
padding-left: 30%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.discovery_list_input option:checked {
|
.discovery_list_input option:checked {
|
||||||
|
@ -253,11 +231,9 @@ li > input[type=text]:focus, li > input[type=password]:focus, .discovery_text_in
|
||||||
max-height: 100px;
|
max-height: 100px;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
||||||
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
resize: none;
|
resize: none;
|
||||||
font-family: "lato-bolder", "Open Sans", sans-serif !important;
|
|
||||||
font-size: 1.4em !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.tip {
|
a.tip {
|
||||||
|
@ -270,4 +246,4 @@ a.tip {
|
||||||
|
|
||||||
.discovery_interval_select_width {
|
.discovery_interval_select_width {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,8 @@ ul.wizard {
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.wizard li {
|
ul.wizard li {
|
||||||
padding: 10px;
|
padding-bottom: 10px;
|
||||||
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.wizard li > label:not(.p-switch) {
|
ul.wizard li > label:not(.p-switch) {
|
||||||
|
|
Loading…
Reference in New Issue