agent view styling
This commit is contained in:
parent
9a12b34847
commit
348f0c2a65
|
@ -793,7 +793,13 @@ $table = new stdClass();
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->class = 'custom_fields_table';
|
$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 = [];
|
||||||
$table->style[0] = 'font-weight: bold;';
|
$table->style[0] = 'font-weight: bold;';
|
||||||
$table->data = [];
|
$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] = '<div class="field_title" onclick="show_custom_field_row('.$id_custom_field.')">';
|
||||||
$data[0] .= '<b>'.$field['name'].'</b>';
|
$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>';
|
$data[0] .= '</div>';
|
||||||
$combo = [];
|
$combo = [];
|
||||||
$combo = $field['combo_values'];
|
$combo = $field['combo_values'];
|
||||||
|
@ -837,8 +839,11 @@ foreach ($fields as $field) {
|
||||||
$custom_value = '';
|
$custom_value = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$table->rowstyle[$i] = 'cursor: pointer;';
|
||||||
if (!empty($custom_value)) {
|
if (!empty($custom_value)) {
|
||||||
$table->rowstyle[($i + 1)] = 'display: table-row;';
|
$table->rowstyle[($i + 1)] = 'display: table-row;';
|
||||||
|
} else {
|
||||||
|
$table->rowstyle[($i + 1)] = 'display: none;';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($field['is_password_type']) {
|
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.'">';
|
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.
|
// The context help about the learning mode.
|
||||||
if ($modo == 0) {
|
if ($modo == 0) {
|
||||||
echo "<span id='modules_not_learning_mode_context_help' style='padding-right:8px;'>";
|
echo "<span id='modules_not_learning_mode_context_help' style='padding-right:8px;'>";
|
||||||
|
|
|
@ -2784,7 +2784,14 @@ function ui_toggle(
|
||||||
|
|
||||||
// Link to toggle.
|
// Link to toggle.
|
||||||
$output = '';
|
$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 />';
|
// $output .= '<br />';
|
||||||
// if (!defined("METACONSOLE"))
|
// if (!defined("METACONSOLE"))
|
||||||
// $output .= '<br />';
|
// $output .= '<br />';
|
||||||
|
|
|
@ -5990,22 +5990,21 @@ div#bullets_modules div {
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent_details_col_left {
|
.agent_details_col_left {
|
||||||
width: 49.5%;
|
width: 35%;
|
||||||
min-width: 455px;
|
min-width: 390px;
|
||||||
}
|
}
|
||||||
.agent_details_col_right {
|
.agent_details_col_right {
|
||||||
width: 49.5%;
|
width: 64%;
|
||||||
min-width: 455px;
|
min-width: 455px;
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 1200px) {
|
@media screen and (max-width: 1400px) {
|
||||||
.agent_details_col {
|
.agent_details_col {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent_details_content .agent_details_bullets {
|
.agent_details_bullets {
|
||||||
position: relative;
|
padding-bottom: 2em;
|
||||||
left: -20%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons_agent_view {
|
.buttons_agent_view {
|
||||||
|
@ -6023,6 +6022,10 @@ div#bullets_modules div {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Agent details in agent view */
|
/* Agent details in agent view */
|
||||||
|
div#status_pie path {
|
||||||
|
stroke-width: 15px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.agent_details_header {
|
.agent_details_header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
@ -6042,15 +6045,17 @@ div#bullets_modules div {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.agent_details_remote_cfg {
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
.agent_details_graph {
|
.agent_details_graph {
|
||||||
width: 205px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent_details_info {
|
.agent_details_info {
|
||||||
display: flex;
|
max-width: 45%;
|
||||||
justify-content: space-around;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent_details_info p {
|
.agent_details_info p {
|
||||||
|
@ -6066,8 +6071,7 @@ div#bullets_modules div {
|
||||||
|
|
||||||
.agent_details_bullets #bullets_modules {
|
.agent_details_bullets #bullets_modules {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
justify-content: flex-start;
|
||||||
align-items: flex-start;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent_details_bullets #bullets_modules > div {
|
.agent_details_bullets #bullets_modules > div {
|
||||||
|
@ -6076,10 +6080,6 @@ div#bullets_modules div {
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent_details_bullets #bullets_modules > div:last-child {
|
|
||||||
padding-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#agent_contact_main tr td img {
|
#agent_contact_main tr td img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,13 +222,34 @@ $table_agent_count_modules = reporting_tiny_stats(
|
||||||
true
|
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_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>
|
$table_agent = '
|
||||||
<div class="agent_details_content">
|
<div class="agent_details_header">'.$table_agent_header.'</div>
|
||||||
<div class="agent_details_graph">'.$table_agent_graph.'</div>
|
<div class="agent_details_content">
|
||||||
<div class="agent_details_bullets">'.$table_agent_count_modules.'</div>
|
<div class="agent_details_graph">
|
||||||
</div>
|
'.$table_agent_graph.'
|
||||||
<div class="agent_details_info">'.$table_agent_os.$table_agent_ip.$table_agent_version.$table_agent_description.'</div>';
|
</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.
|
* END: TABLE AGENT BUILD.
|
||||||
|
@ -317,6 +338,18 @@ if (!$secondary_groups) {
|
||||||
|
|
||||||
$table_contact->data[] = $data;
|
$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
|
* 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[0] .= ' <span style="vertical-align: middle; font-weight:bold; padding-left:20px">'.__('Agent info').'</span>';
|
||||||
$table_data->head_colspan[0] = 4;
|
$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.
|
// Gis and url address.
|
||||||
$data_opcional = [];
|
$data_opcional = [];
|
||||||
// Position Information.
|
// Position Information.
|
||||||
|
@ -431,7 +438,6 @@ foreach ($data_opcional as $key => $value) {
|
||||||
$table_data->data[] = $data_opcional[$key];
|
$table_data->data[] = $data_opcional[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Custom fields.
|
// Custom fields.
|
||||||
$fields = db_get_all_rows_filter(
|
$fields = db_get_all_rows_filter(
|
||||||
'tagent_custom_fields',
|
'tagent_custom_fields',
|
||||||
|
@ -466,8 +472,7 @@ foreach ($fields as $field) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$custom_fields_count = count($custom_fields);
|
$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];
|
$first_column = $custom_fields[$i];
|
||||||
$j = ($i + 1);
|
$j = ($i + 1);
|
||||||
$second_column = $custom_fields[$j];
|
$second_column = $custom_fields[$j];
|
||||||
|
|
Loading…
Reference in New Issue