Agent changes

This commit is contained in:
jose.gonzalez@pandorafms.com 2022-11-16 12:24:11 +01:00
parent 03157caefe
commit 6e41c4d1bb
4 changed files with 54 additions and 26 deletions

View File

@ -308,6 +308,8 @@ if (enterprise_installed() === true) {
$paramsParentAgent['selectbox_id'] = 'cascade_protection_module';
$paramsParentAgent['javascript_is_function_select'] = true;
$paramsParentAgent['cascade_protection'] = true;
$paramsParentAgent['class'] = 'w540px';
if ($id_agente !== 0) {
// Deletes the agent's offspring.
$paramsParentAgent['delete_offspring_agents'] = $id_agente;
@ -353,7 +355,7 @@ $tableAgent->rowspan = [];
// Agent name.
if ($new_agent === false) {
$tableAgent->data['caption_name'][0] = __('Agent name');
$tableAgent->data['name'][0] = html_print_input_text('agente', $nombre_agente, '', 76, 100, true);
$tableAgent->data['name'][0] = html_print_input_text('agente', $nombre_agente, '', 76, 100, true, false, false, '', 'w540px');
$tableAgent->data['name'][0] .= html_print_div(
[
'class' => 'moduleIdBox',
@ -367,7 +369,7 @@ if ($new_agent === false) {
// Alias.
$tableAgent->data['caption_alias'][0] = __('Alias');
$tableAgent->data['alias'][0] = html_print_input_text('alias', $alias, '', 50, 100, true, false, true);
$tableAgent->data['alias'][0] = html_print_input_text('alias', $alias, '', 50, 100, true, false, true, '', 'w540px');
if ($new_agent === true) {
$tableAgent->rowclass['additional_alias'] = 'subinput';
$tableAgent->data['additional_alias'][0] = html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true);
@ -392,7 +394,7 @@ if ($new_agent === true) {
// Ip adress.
$tableAgent->data['caption_ip_address'] = __('IP Address');
$tableAgent->data['ip_address'][0] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true);
$tableAgent->data['ip_address'][0] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true, false, false, '', 'w540px');
$tableAgent->rowclass['additional_ip_address'] = 'subinput';
$tableAgent->data['additional_ip_address'][0] = html_print_checkbox_switch('unique_ip', 1, $config['unique_ip'], true);
@ -412,7 +414,7 @@ $tableAgent->data['additional_ip_address'][3] .= ui_print_help_tip(__('Avoid aut
// IP Address List.
if ($new_agent === false) {
$tableAgent->data['caption_ip_address_list'] = __('IP Address list');
$tableAgent->data['ip_address_list'][0] = html_print_select(agents_get_addresses($id_agente), 'address_list', $direccion_agente, '', '', 0, true, false, true, 'w220px');
$tableAgent->data['ip_address_list'][0] = html_print_select(agents_get_addresses($id_agente), 'address_list', $direccion_agente, '', '', 0, true, false, true, 'w540px');
$tableAgent->rowclass['additional_ip_address_list'] = 'subinput';
$tableAgent->data['additional_ip_address_list'][0] = html_print_checkbox_switch('delete_ip', 1, false, true);
$tableAgent->data['additional_ip_address_list'][1] = __('Delete selected IPs');
@ -425,13 +427,14 @@ if (isset($groups[$grupo]) === true || $new_agent === true) {
$tableAgent->data['primary_group'][0] = html_print_input(
[
'type' => 'select_groups',
'class' => 'w220px',
'class' => 'w540px',
'returnAllGroup' => false,
'name' => 'grupo',
'selected' => $grupo,
'return' => true,
'required' => true,
'privilege' => 'AW',
'option_style' => 'width: 540px;',
]
);
} else {
@ -478,7 +481,11 @@ $tableAgent->data['os'][0] = html_print_select_from_sql(
'',
'',
'0',
true
true,
false,
true,
false,
'width: 540px;'
);
$tableAgent->data['os'][0] .= html_print_div(
[
@ -504,7 +511,7 @@ $tableAgent->data['server'][0] = html_print_select(
true,
false,
true,
'w220px'
'w540px'
);
// Description.
@ -516,7 +523,7 @@ $tableAgent->data['description'][0] = html_print_textarea(
$comentarios,
'',
true,
'agent_description'
'agent_description w540px'
);
html_print_div(
@ -663,7 +670,10 @@ $tableAdvancedAgent->data['agent_icon'][0] = html_print_select(
'changeIcons();',
__('None'),
'',
true
true,
false,
true,
'w540px'
);
$tableAdvancedAgent->data['agent_icon'][1] = html_print_image(
$path_ok,
@ -700,7 +710,7 @@ if (enterprise_installed() === true) {
true,
false,
false,
'',
'w540px',
'',
'',
// Autocomplete.

View File

@ -81,6 +81,12 @@ function mysql_connect_db(
if ($config['mysqli']) {
if (empty($ssl)) {
$connect_id = mysqli_connect($host, $user, $pass, $db, $port);
hd($host);
hd($user);
hd($pass);
hd($db);
hd($port);
hd(mysqli_connect_errno());
if (mysqli_connect_errno() > 0) {
include 'general/mysqlerr.php';
return false;
@ -104,6 +110,8 @@ function mysql_connect_db(
mysqli_real_connect($connect_id, $host, $user, $pass, $db, $port, null, MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT);
}
hd(mysqli_connect_errno());
exit;
if (mysqli_connect_errno() > 0) {
include 'general/mysqlerr.php';
return false;

View File

@ -167,7 +167,7 @@ a#qr_code_agent_view {
}
.agent_description {
min-height: 4.8em;
height: 126px;
}
.agent_custom_id {
padding-bottom: 0.7em;

View File

@ -4540,8 +4540,8 @@ div#dialog_messages table th:last-child {
-webkit-transition: 0.4s;
transition: 0.4s;
border-radius: 50px;
height: 12px;
width: 26px;
height: 14px;
width: 33px;
padding: 0 !important;
}
@ -4552,10 +4552,10 @@ div#dialog_messages table th:last-child {
.p-slider:before {
position: absolute;
content: "";
height: 14px;
width: 14px;
height: 20px;
width: 20px;
left: -1px;
bottom: -2px;
bottom: -4px;
-webkit-transition: 0.4s;
transition: 0.4s;
border-radius: 50%;
@ -8988,11 +8988,11 @@ input,
textarea,
select {
background-color: #f6f7fb;
height: 32px;
height: 42px;
border: 1px solid #c0ccdc;
border-radius: 8px;
padding-left: 12px;
font: normal normal normal 12px Pandora-Light;
font: normal normal normal 14px Pandora-Light;
color: #2b3332;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
@ -9461,15 +9461,15 @@ button.ui-button.ui-widget.submit-cancel:active {
}
.moduleIdBox {
height: 30px;
height: 40px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
margin-left: -6px;
margin-left: -59px;
border: 1px solid #c0ccdc;
background-color: #f6f7fb;
padding: 0 16px;
z-index: 0;
line-height: 32px;
line-height: 42px;
}
/* Custom Checkbox Style */
@ -9600,11 +9600,11 @@ tr.bring_next_field {
.select2-container .select2-selection--single {
background-color: #f6f7fb !important;
height: 32px !important;
height: 42px !important;
border: 1px solid #c0ccdc !important;
border-radius: 8px !important;
padding-left: 4px !important;
font: normal normal normal 12px Pandora-Light !important;
font: normal normal normal 14px Pandora-Light !important;
color: #2b3332 !important;
box-sizing: border-box;
cursor: pointer;
@ -9651,7 +9651,7 @@ tr.bring_next_field {
border: 0 !important;
height: 17px !important;
margin-left: -4px !important;
margin-top: 7px !important;
margin-top: 12px !important;
position: absolute !important;
width: 17px !important;
background: url(../../images/svg/down.svg) no-repeat content-box !important;
@ -9670,7 +9670,7 @@ tr.bring_next_field {
text-overflow: ellipsis;
white-space: nowrap;
color: #444 !important;
line-height: 32px !important;
line-height: 42px !important;
}
.select2-container--default.select2-container--open.select2-container--below
@ -9705,6 +9705,9 @@ tr.bring_next_field {
border-color: #8a96a6 !important;
}
.select2-container--default > .selection {
font-size: 14px;
}
/* FINISH SELECT2 */
.max_floating_element_size {
@ -9755,5 +9758,12 @@ tr.bring_next_field {
}
.floating_form .p-switch {
margin-top: -6px;
margin-top: -8px;
}
.fixed_action_buttons {
position: fixed;
padding: 0px;
bottom: 50px;
right: 10px;
}