Minor changes in configurar_agente

This commit is contained in:
fbsanchez 2019-05-27 17:12:35 +02:00
parent 0280547465
commit 556c07ad99
3 changed files with 49 additions and 33 deletions

View File

@ -165,7 +165,7 @@ if ($disk_conf_delete) {
@unlink($filename['conf']); @unlink($filename['conf']);
} }
echo '<form name="conf_agent" method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">'; echo '<form name="conf_agent" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente">';
// Custom ID. // Custom ID.
$custom_id_div = '<div class="label_select">'; $custom_id_div = '<div class="label_select">';
@ -186,26 +186,12 @@ $custom_id_div .= html_print_input_text(
if (!$new_agent && $alias != '') { if (!$new_agent && $alias != '') {
$table_agent_name = '<div class="label_select"><p class="input_label">'.__('Agent name').': '.ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true).'</p>'; $table_agent_name = '<div class="label_select"><p class="input_label">'.__('Agent name').': '.ui_print_help_tip(__("The agent's name must be the same as the one defined at the console"), true).'</p>';
$table_agent_name .= '<div class="label_select_parent">'; $table_agent_name .= '<div class="label_select_parent">';
$table_agent_name .= '<div class="label_select_child_left">'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'</div>'; $table_agent_name .= '<div class="label_select_child_left" style="width: 60%;">'.html_print_input_text('agente', $nombre_agente, '', 50, 100, true).'</div>';
$table_agent_name .= '<div class="label_select_child_right agent_options_agent_name">'; $table_agent_name .= '<div class="label_select_child_right agent_options_agent_name" style="width: 40%;">';
// QR code div.
$table_qr_code = '<div class="agent_qr white_box">';
$table_qr_code .= '<p class="input_label">'.__('QR Code Agent view').': </p>';
$table_qr_code .= '<div id="qr_container_image"></div>';
if ($id_agente) {
$table_qr_code .= "<a id='qr_code_agent_view' href='javascript: show_dialog_qrcode(null, \"".ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente)."\" );'></a>";
}
// Add Custom id div.
$table_qr_code .= '<br />';
$table_qr_code .= $custom_id_div;
$table_qr_code .= '</div>';
if ($id_agente) { if ($id_agente) {
$table_agent_name .= '<span>'.__('ID').' '.$id_agente.'</span>'; $table_agent_name .= '<label>'.__('ID').'</label><input style="width: 50%;" type="text" disabled="true" value="'.$id_agente.'" />';
$table_agent_name .= '<a href="index.php?sec=gagente&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'">'; $table_agent_name .= '<a href="index.php?sec=gagente&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'">';
$table_agent_name .= html_print_image( $table_agent_name .= html_print_image(
'images/zoom.png', 'images/zoom.png',
true, true,
@ -222,6 +208,14 @@ if (!$new_agent && $alias != '') {
// Delete link from here. // Delete link from here.
$table_agent_name .= "<a onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\" href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=$id_agente&search=&offset=0&sort_field=&sort=none'>".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'</a>'; $table_agent_name .= "<a onClick=\"if (!confirm('".__('Are you sure?')."')) return false;\" href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&borrar_agente=$id_agente&search=&offset=0&sort_field=&sort=none'>".html_print_image('images/cross.png', true, ['title' => __('Delete agent')]).'</a>';
// Help link.
$table_agent_name .= ui_print_help_icon(
$help_header,
true,
'',
'images/help_g.png'
);
// Remote configuration available. // Remote configuration available.
if (isset($filename)) { if (isset($filename)) {
if (file_exists($filename['md5'])) { if (file_exists($filename['md5'])) {
@ -229,7 +223,7 @@ if (!$new_agent && $alias != '') {
$agent_name = io_safe_output($agent_name); $agent_name = io_safe_output($agent_name);
$agent_md5 = md5($agent_name, false); $agent_md5 = md5($agent_name, false);
$table_agent_name .= '<a href="index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'tab=remote_configuration&amp;'.'id_agente='.$id_agente.'&amp;'.'disk_conf='.$agent_md5.'">'; $table_agent_name .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=remote_configuration&id_agente='.$id_agente.'&disk_conf='.$agent_md5.'">';
$table_agent_name .= html_print_image( $table_agent_name .= html_print_image(
'images/application_edit.png', 'images/application_edit.png',
true, true,
@ -246,6 +240,19 @@ if (!$new_agent && $alias != '') {
} }
$table_agent_name .= '</div></div></div>'; $table_agent_name .= '</div></div></div>';
// QR code div.
$table_qr_code = '<div class="agent_qr white_box">';
$table_qr_code .= '<p class="input_label">'.__('QR Code Agent view').': </p>';
$table_qr_code .= '<div id="qr_container_image"></div>';
if ($id_agente) {
$table_qr_code .= "<a id='qr_code_agent_view' href='javascript: show_dialog_qrcode(null, \"".ui_get_full_url('mobile/index.php?page=agent&id='.$id_agente)."\" );'></a>";
}
// Add Custom id div.
$table_qr_code .= '<br />';
$table_qr_code .= $custom_id_div;
$table_qr_code .= '</div>';
} }
if ($new_agent) { if ($new_agent) {
@ -365,13 +372,14 @@ $table_server .= html_print_select(
// Description. // Description.
$table_description = '<div class="label_select"><p class="input_label">'.__('Description').': </p>'; $table_description = '<div class="label_select"><p class="input_label">'.__('Description').': </p>';
$table_description .= html_print_input_text( $table_description .= html_print_textarea(
'comentarios', 'comentarios',
3,
10,
$comentarios, $comentarios,
'', '',
45, true,
200, 'agent_description'
true
).'</div>'; ).'</div>';
// QR code. // QR code.
@ -511,7 +519,7 @@ if (enterprise_installed()) {
if (!$new_agent && isset($filename) && file_exists($filename['md5'])) { if (!$new_agent && isset($filename) && file_exists($filename['md5'])) {
$table_adv_remote .= date('F d Y H:i:s', fileatime($filename['md5'])); $table_adv_remote .= date('F d Y H:i:s', fileatime($filename['md5']));
// Delete remote configuration // Delete remote configuration
$table_adv_remote .= '<a href="index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'tab=main&amp;'.'disk_conf_delete=1&amp;'.'id_agente='.$id_agente.'">'; $table_adv_remote .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&disk_conf_delete=1&id_agente='.$id_agente.'">';
$table_adv_remote .= html_print_image( $table_adv_remote .= html_print_image(
'images/cross.png', 'images/cross.png',
true, true,

View File

@ -674,12 +674,15 @@ if ($id_agente) {
agents_get_alias($id_agente), agents_get_alias($id_agente),
'images/setup.png', 'images/setup.png',
false, false,
$help_header, // Previous: $help_header.
'',
true, true,
$onheader, $onheader,
false, false,
'', '',
$config['item_title_size_text'] $config['item_title_size_text'],
'',
''
); );
} else { } else {
// Create agent. // Create agent.

View File

@ -1283,7 +1283,6 @@ div.title_line {
align-items: flex-end; align-items: flex-end;
justify-content: space-between; justify-content: space-between;
border-bottom: 2px solid #82b92e; border-bottom: 2px solid #82b92e;
max-height: 50px;
min-height: 50px; min-height: 50px;
width: 100%; width: 100%;
padding-right: 0px; padding-right: 0px;
@ -1436,8 +1435,9 @@ div#agent_wizard_subtabs {
#menu_tab_left li a, #menu_tab_left li a,
#menu_tab_left li span { #menu_tab_left li span {
color: #343434; color: #343434;
font-size: 16pt; font-family: "lato-bolder", "Open Sans", sans-serif !important;
line-height: 16pt; font-size: 20pt;
line-height: 20pt;
} }
/* /*
@ -2422,6 +2422,8 @@ select {
-moz-border-radius: 3px; -moz-border-radius: 3px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
font-family: "lato-bolder", "Open Sans", sans-serif;
font-size: 10pt;
} }
/* plugins */ /* plugins */
@ -5622,6 +5624,7 @@ table.info_table.policy_sub_table {
.agent_options_column_right { .agent_options_column_right {
width: 50%; width: 50%;
box-sizing: border-box; box-sizing: border-box;
min-width: 400px;
} }
.agent_options_column_left { .agent_options_column_left {
@ -5746,10 +5749,12 @@ a#qr_code_agent_view {
margin-right: 5px; margin-right: 5px;
} }
#text-comentarios, .agent_description {
min-height: 4.8em !important;
}
.agent_custom_id { .agent_custom_id {
padding-bottom: 2em; padding-bottom: 0.7em;
background: #ececec !important; padding-top: 0.5em;
display: inline-block; display: inline-block;
border-radius: 5px !important; border-radius: 5px !important;
border: 1px solid #ccc; border: 1px solid #ccc;