agent view styling
This commit is contained in:
parent
9a12b34847
commit
348f0c2a65
|
@ -793,7 +793,13 @@ $table = new stdClass();
|
|||
$table->width = '100%';
|
||||
$table->class = 'custom_fields_table';
|
||||
|
||||
$table->head = [];
|
||||
$table->head = [
|
||||
0 => __('Click to display').ui_print_help_tip(
|
||||
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url]'),
|
||||
true
|
||||
),
|
||||
];
|
||||
$table->class = 'info_table';
|
||||
$table->style = [];
|
||||
$table->style[0] = 'font-weight: bold;';
|
||||
$table->data = [];
|
||||
|
@ -811,10 +817,6 @@ foreach ($fields as $field) {
|
|||
|
||||
$data[0] = '<div class="field_title" onclick="show_custom_field_row('.$id_custom_field.')">';
|
||||
$data[0] .= '<b>'.$field['name'].'</b>';
|
||||
$data[0] .= ui_print_help_tip(
|
||||
__('This field allows url insertion using the BBCode\'s url tag').'.<br />'.__('The format is: [url=\'url to navigate\']\'text to show\'[/url]').'.<br /><br />'.__('e.g.: [url=google.com]Google web search[/url]'),
|
||||
true
|
||||
);
|
||||
$data[0] .= '</div>';
|
||||
$combo = [];
|
||||
$combo = $field['combo_values'];
|
||||
|
@ -837,8 +839,11 @@ foreach ($fields as $field) {
|
|||
$custom_value = '';
|
||||
}
|
||||
|
||||
$table->rowstyle[$i] = 'cursor: pointer;';
|
||||
if (!empty($custom_value)) {
|
||||
$table->rowstyle[($i + 1)] = 'display: table-row;';
|
||||
} else {
|
||||
$table->rowstyle[($i + 1)] = 'display: none;';
|
||||
}
|
||||
|
||||
if ($field['is_password_type']) {
|
||||
|
@ -911,7 +916,6 @@ if (!empty($fields)) {
|
|||
|
||||
echo '<div class="action-buttons" style="display: flex; justify-content: flex-end; align-items: center; width: '.$table->width.'">';
|
||||
|
||||
|
||||
// The context help about the learning mode.
|
||||
if ($modo == 0) {
|
||||
echo "<span id='modules_not_learning_mode_context_help' style='padding-right:8px;'>";
|
||||
|
|
|
@ -2784,7 +2784,14 @@ function ui_toggle(
|
|||
|
||||
// Link to toggle.
|
||||
$output = '';
|
||||
$output .= '<a href="javascript:" id="tgl_ctrl_'.$uniqid.'">'.html_print_image($original, true, ['title' => $title, 'id' => 'image_'.$uniqid]).' <b>'.$name.'</b></a>';
|
||||
$output .= '<a href="javascript:" id="tgl_ctrl_'.$uniqid.'">'.html_print_image(
|
||||
$original,
|
||||
true,
|
||||
[
|
||||
'title' => $title,
|
||||
'id' => 'image_'.$uniqid,
|
||||
]
|
||||
).' <b>'.$name.'</b></a>';
|
||||
// $output .= '<br />';
|
||||
// if (!defined("METACONSOLE"))
|
||||
// $output .= '<br />';
|
||||
|
|
|
@ -5990,22 +5990,21 @@ div#bullets_modules div {
|
|||
}
|
||||
|
||||
.agent_details_col_left {
|
||||
width: 49.5%;
|
||||
min-width: 455px;
|
||||
width: 35%;
|
||||
min-width: 390px;
|
||||
}
|
||||
.agent_details_col_right {
|
||||
width: 49.5%;
|
||||
width: 64%;
|
||||
min-width: 455px;
|
||||
}
|
||||
@media screen and (max-width: 1200px) {
|
||||
@media screen and (max-width: 1400px) {
|
||||
.agent_details_col {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.agent_details_content .agent_details_bullets {
|
||||
position: relative;
|
||||
left: -20%;
|
||||
.agent_details_bullets {
|
||||
padding-bottom: 2em;
|
||||
}
|
||||
|
||||
.buttons_agent_view {
|
||||
|
@ -6023,6 +6022,10 @@ div#bullets_modules div {
|
|||
}
|
||||
|
||||
/* Agent details in agent view */
|
||||
div#status_pie path {
|
||||
stroke-width: 15px !important;
|
||||
}
|
||||
|
||||
.agent_details_header {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
@ -6042,15 +6045,17 @@ div#bullets_modules div {
|
|||
align-items: center;
|
||||
}
|
||||
|
||||
.agent_details_remote_cfg {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.agent_details_graph {
|
||||
width: 205px;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.agent_details_info {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
max-width: 45%;
|
||||
}
|
||||
|
||||
.agent_details_info p {
|
||||
|
@ -6066,8 +6071,7 @@ div#bullets_modules div {
|
|||
|
||||
.agent_details_bullets #bullets_modules {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.agent_details_bullets #bullets_modules > div {
|
||||
|
@ -6076,10 +6080,6 @@ div#bullets_modules div {
|
|||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.agent_details_bullets #bullets_modules > div:last-child {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
#agent_contact_main tr td img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
|
|
@ -222,13 +222,34 @@ $table_agent_count_modules = reporting_tiny_stats(
|
|||
true
|
||||
);
|
||||
|
||||
$has_remote_conf = enterprise_hook(
|
||||
'config_agents_has_remote_configuration',
|
||||
[$agent['id_agente']]
|
||||
);
|
||||
|
||||
if ($has_remote_conf) {
|
||||
$remote_cfg = '<p>'.html_print_image('images/remote_configuration.png', true);
|
||||
$remote_cfg .= __('Remote configuration enabled').'</p>';
|
||||
} else {
|
||||
$remote_cfg = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// $table_agent_count_modules .= ui_print_help_tip(__('Agent statuses are re-calculated by the server, they are not shown in real time.'), true);
|
||||
$table_agent = '<div class="agent_details_header">'.$table_agent_header.'</div>
|
||||
<div class="agent_details_content">
|
||||
<div class="agent_details_graph">'.$table_agent_graph.'</div>
|
||||
<div class="agent_details_bullets">'.$table_agent_count_modules.'</div>
|
||||
</div>
|
||||
<div class="agent_details_info">'.$table_agent_os.$table_agent_ip.$table_agent_version.$table_agent_description.'</div>';
|
||||
$table_agent = '
|
||||
<div class="agent_details_header">'.$table_agent_header.'</div>
|
||||
<div class="agent_details_content">
|
||||
<div class="agent_details_graph">
|
||||
'.$table_agent_graph.'
|
||||
</div>
|
||||
<div class="agent_details_info">
|
||||
'.$table_agent_os.$table_agent_ip.$table_agent_version.$table_agent_description.$remote_cfg.'
|
||||
</div>
|
||||
</div>
|
||||
<div class="agent_details_bullets">
|
||||
'.$table_agent_count_modules.'
|
||||
</div>';
|
||||
|
||||
/*
|
||||
* END: TABLE AGENT BUILD.
|
||||
|
@ -317,6 +338,18 @@ if (!$secondary_groups) {
|
|||
|
||||
$table_contact->data[] = $data;
|
||||
|
||||
if (enterprise_installed()) {
|
||||
$data = [];
|
||||
$data[0] = '<b>'.__('Parent').'</b>';
|
||||
if ($agent['id_parent'] == 0) {
|
||||
$data[1] = '<em>'.__('N/A').'</em>';
|
||||
} else {
|
||||
$data[1] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_parent'].'">'.agents_get_alias($agent['id_parent']).'</a>';
|
||||
}
|
||||
|
||||
$table_contact->data[] = $data;
|
||||
}
|
||||
|
||||
/*
|
||||
* END: TABLE CONTACT BUILD
|
||||
*/
|
||||
|
@ -341,32 +374,6 @@ $table_data->head[0] = html_print_image(
|
|||
$table_data->head[0] .= ' <span style="vertical-align: middle; font-weight:bold; padding-left:20px">'.__('Agent info').'</span>';
|
||||
$table_data->head_colspan[0] = 4;
|
||||
|
||||
$has_remote_conf = enterprise_hook(
|
||||
'config_agents_has_remote_configuration',
|
||||
[$agent['id_agente']]
|
||||
);
|
||||
|
||||
if (enterprise_installed()) {
|
||||
$data = [];
|
||||
|
||||
$data[0] = '<b>'.__('Parent').'</b>';
|
||||
if ($agent['id_parent'] == 0) {
|
||||
$data[1] = '<em>'.__('N/A').'</em>';
|
||||
} else {
|
||||
$data[1] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_parent'].'">'.agents_get_alias($agent['id_parent']).'</a>';
|
||||
}
|
||||
|
||||
|
||||
$data[2] = '<b>'.__('Remote configuration').'</b>';
|
||||
if (!$has_remote_conf) {
|
||||
$data[3] = __('Disabled');
|
||||
} else {
|
||||
$data[3] = __('Enabled');
|
||||
}
|
||||
|
||||
$table_data->data[] = $data;
|
||||
}
|
||||
|
||||
// Gis and url address.
|
||||
$data_opcional = [];
|
||||
// Position Information.
|
||||
|
@ -431,7 +438,6 @@ foreach ($data_opcional as $key => $value) {
|
|||
$table_data->data[] = $data_opcional[$key];
|
||||
}
|
||||
|
||||
|
||||
// Custom fields.
|
||||
$fields = db_get_all_rows_filter(
|
||||
'tagent_custom_fields',
|
||||
|
@ -466,8 +472,7 @@ foreach ($fields as $field) {
|
|||
}
|
||||
|
||||
$custom_fields_count = count($custom_fields);
|
||||
|
||||
for ($i = 0; $i <= $custom_fields_count; $i++) {
|
||||
for ($i = 0; $i < $custom_fields_count; $i++) {
|
||||
$first_column = $custom_fields[$i];
|
||||
$j = ($i + 1);
|
||||
$second_column = $custom_fields[$j];
|
||||
|
|
Loading…
Reference in New Issue