Agent view fixed and other minor fixes

This commit is contained in:
jose.gonzalez@pandorafms.com 2022-11-15 08:05:04 +01:00
parent bf678b55dc
commit 325bbea8db
9 changed files with 474 additions and 604 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2210,8 +2210,8 @@ if ($disable_module) {
}
// UPDATE GIS.
$updateGIS = get_parameter('update_gis', 0);
if ($updateGIS) {
$updateGIS = (bool) get_parameter('update_gis', 0);
if ($updateGIS === true) {
$updateGisData = get_parameter('update_gis_data');
$lastLatitude = get_parameter('latitude');
$lastLongitude = get_parameter('longitude');

View File

@ -2139,20 +2139,25 @@ function html_print_extended_select_for_time(
'font-size: xx-small;'.$select_style
);
// The advanced control is only for admins.
if ($admin) {
echo ' <a href="javascript:">'.html_print_image(
if ($admin === true) {
html_print_anchor(
[
'href' => 'javascript:',
'content' => html_print_image(
'images/pencil.png',
true,
[
'class' => $uniq_name.'_toggler '.$class.' invert_filter',
'alt' => __('Custom'),
'title' => __('Custom'),
'style' => 'width: 18px; margin-bottom: -5px;'.$style_icon,
'style' => 'width: 18px; margin-bottom: -5px; margin-left: 10px'.$style_icon,
],
false,
false,
true
).'</a>';
true,
),
]
);
}
echo '</div>';
@ -6132,7 +6137,7 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
[$id_agente]
);
$name = 'secondary_groups'.$options['extra_id'];
$name = 'secondary_groups_selected'.$options['extra_id'];
if ($options['only_select'] === true) {
$name = 'secondary_groups'.$options['extra_id'].'[]';
}
@ -6152,7 +6157,7 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
$name,
// Selected.
// No select any by default.
'',
$secondary_groups_selected['for_select'],
// Script.
// Javascript onChange code.
'',
@ -6179,7 +6184,7 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
false,
// Style.
// Inline styles (default).
'min-width:170px;',
'',
// Option_style.
// Option style select (default).
false,
@ -6212,7 +6217,7 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
]
)
);
/*
$adv_secondary_groups_arrows = html_print_input_image(
'add_secondary',
'images/darrowright_green.png',
@ -6265,7 +6270,7 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
// Style.
'min-width:170px;'
);
*/
$output = '';
if (isset($options['container']) === true
&& $options['container'] === true
@ -6276,13 +6281,14 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
$output .= '<div class="sg_source">';
$output .= $adv_secondary_groups_left;
$output .= '</div>';
/*
$output .= '<div class="secondary_group_arrows">';
$output .= $adv_secondary_groups_arrows;
$output .= '</div>';
$output .= '<div class="sg_target">';
$output .= $adv_secondary_groups_right;
$output .= '</div>';
*/
if (isset($options['container']) === true
&& $options['container'] === true
) {

View File

@ -5724,7 +5724,7 @@ function reporting_get_agents_by_status($data, $graph_width=250, $graph_height=1
$agent_data = [];
$agent_data[0] = html_print_image('images/agent_ok.png', true, ['title' => __('Agents ok')]);
$agent_data[1] = "<a style='color: ".COL_NORMAL.";' href='".$links['agents_ok']."'><b><span class='green_color font_12pt bolder big_data'>".format_numeric($data['agent_ok']).'</span></b></a>';
$agent_data[1] = "<a style='color: ".COL_NORMAL.";' href='".$links['agents_ok']."'><b><span class='pandora_green_text font_12pt bolder big_data'>".format_numeric($data['agent_ok']).'</span></b></a>';
$agent_data[2] = html_print_image('images/agent_unknown.png', true, ['title' => __('Agents unknown')]);
$agent_data[3] = "<a style='color: ".COL_UNKNOWN.";' href='".$links['agents_unknown']."'><b><span class='grey_color font_12pt bolder big_data'>".format_numeric($data['agent_unknown']).'</span></b></a>';
@ -5844,7 +5844,7 @@ function reporting_get_events($data, $links=false)
$table_events->data[0][1] = html_print_image('images/module_warning.png', true, ['title' => __('Warning events')]);
$table_events->data[0][1] .= '&nbsp;&nbsp;&nbsp;'."<a class='font_12pt bolder yellow_color' style='".$style."' href='".$links['warning']."'><b><span class='font_12pt bolder yellow_color;'>".format_numeric($data['warning']).'</span></b></a>';
$table_events->data[0][2] = html_print_image('images/module_ok.png', true, ['title' => __('OK events')]);
$table_events->data[0][2] .= '&nbsp;&nbsp;&nbsp;'."<a class='font_12pt bolder green_color' style='".$style."' href='".$links['normal']."'><b class='font_12pt bolder green_color'>".format_numeric($data['normal']).'</b></a>';
$table_events->data[0][2] .= '&nbsp;&nbsp;&nbsp;'."<a class='font_12pt bolder pandora_green_text' style='".$style."' href='".$links['normal']."'><b class='font_12pt bolder pandora_green_text'>".format_numeric($data['normal']).'</b></a>';
$table_events->data[0][3] = html_print_image('images/module_unknown.png', true, ['title' => __('Unknown events')]);
$table_events->data[0][3] .= '&nbsp;&nbsp;&nbsp;'."<a class='font_12pt bolder grey_color' style='".$style."' href='".$links['unknown']."'><b><span class='font_12pt bolder grey_color'>".format_numeric($data['unknown']).'</span></b></a>';
}

View File

@ -274,7 +274,7 @@ var QRCode;
})() : (function () { // Drawing in Canvas
function _onMakeImage() {
this._elImage.src = this._elCanvas.toDataURL("image/png");
this._elImage.style.display = "block";
this._elImage.style.display = "inline";
this._elCanvas.style.display = "none";
}

View File

@ -373,7 +373,7 @@ class WuxWidget extends Widget
$output .= '</span>';
} else {
$output .= __('Global status').': ';
$output .= "<span class='color_82b92e font_20px'>";
$output .= "<span class='pandora_green_bg font_20px'>";
$output .= __('Ok');
$output .= '</span>';
}

View File

@ -34,6 +34,7 @@
text-align: center;
box-sizing: border-box;
padding: 20px 0px;
margin-top: 22px;
display: flex;
justify-content: center;
flex-direction: column;
@ -44,13 +45,10 @@ a#qr_code_agent_view {
margin-top: 5px;
}
.p-switch {
margin-right: 1em;
}
.sg_source,
.sg_target {
width: 35%;
width: 100%;
height: 110px;
}
.sg_source select,

View File

@ -166,7 +166,9 @@
border-top-right-radius: 16px !important;
border-bottom-left-radius: 16px !important;
border-bottom-right-radius: 16px !important;
box-shadow: 5px 5px 19px #4e4e4e;
box-shadow: 0 10px 6px 0 rgb(0 0 0 / 13%);
border-radius: 8px;
border: 1px solid #e5e9ed;
padding: 0;
}
.ui-dialog-titlebar {

View File

@ -865,7 +865,7 @@ select:-internal-list-box {
margin: 0;
}
.box-shadow {
box-shadow: 0px 0px 15px -4px #dadada;
box-shadow: 0 3px 6px 0 rgb(0 0 0 / 13%);
}
.align-top td {
vertical-align: top;
@ -935,10 +935,9 @@ div#container {
div#main {
width: 100%;
margin: 0 auto;
margin-left: 3em;
margin-bottom: 3em;
position: relative;
min-height: 850px;
}
textarea.conf_editor {
@ -5383,22 +5382,30 @@ div.label_select_child_left > span {
padding: 7px 14px;
margin-right: -1px;
border: 1px solid #cbcbcb;
border-radius: 4px;
transition: all 0.1s ease-in-out;
}
.switch_radio_button label:first-child {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.switch_radio_button label:last-child {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
margin-right: 0px;
}
.switch_radio_button label:hover {
cursor: pointer;
}
.switch_radio_button input:checked + label {
background-color: #82b92e;
background-color: #1d7873;
box-shadow: none;
color: #fff !important;
}
.switch_radio_button label:last-child {
margin-right: 0px;
}
/*
@ -5511,9 +5518,7 @@ div#bullets_modules div {
.blue_color_ligther {
color: #5bb6e5;
}
.green_color {
color: #82b92e;
}
/* First row in agent view */
#agent_details_first_row {
display: flex;
@ -5654,9 +5659,9 @@ div#status_pie {
}
/* White tables to show graphs */
.white_table_graph,
.mgn_btt_20px {
.white_table_graph {
margin-bottom: 20px;
max-width: 1064px;
}
.white_table_graph_header {
@ -6032,11 +6037,11 @@ form#modal_form_feedback ul.wizard li > textarea {
/* Generic classes to reuse and facilitate the creation of custom themes */
.pandora_green_text {
color: #82b92e;
color: #1d7873;
}
.pandora_green_bg {
background-color: #82b92e;
background-color: #1d7873;
}
.default_container {
@ -7299,9 +7304,7 @@ div.graph div.legend table {
.color_67 {
color: #676767;
}
.color_82b92e {
color: #82b92e;
}
.networkconsole {
width: 100%;
height: 100%;
@ -9013,7 +9016,8 @@ input[readonly],
input:disabled,
textarea:disabled,
select:disabled,
.select2-container .select2-selection--single:disabled {
.select2-container .select2-selection--single:disabled,
.select2.select2-container.select2-container--default.select2-container--disabled {
background-color: #e5e9ed;
color: #8a96a6;
}
@ -9482,13 +9486,6 @@ button.ui-button.ui-widget.submit-cancel:active {
line-height: 32px;
}
table#simple > tbody > tr {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
align-items: center;
}
/* Custom Checkbox Style */
.custom_checkbox {
display: inline-flex;
@ -9522,16 +9519,39 @@ table#simple > tbody > tr {
/* End custom checkbox style */
table#simple tr td {
min-height: 42px;
table#simple tr td,
table#advanced tr td {
display: flex;
flex-direction: row;
align-items: center;
align-self: flex-start;
align-self: center;
}
table#simple tr td:first-child {
width: 180px;
table#simple > tbody > tr,
table#advanced > tbody > tr {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
align-items: center;
min-height: 55px;
}
table#simple tr td:nth-child(even):not(:nth-child(2)) {
margin: 0 24px;
}
table#simple tr td:nth-child(odd),
table#advanced tr td:nth-child(odd) {
font-size: 10pt;
}
table tr td:first-child {
width: 190px;
align-self: flex-start !important;
}
#secondary_groups_selected > .select2-container {
width: 480px;
}
.module_thresholds_fields em {
@ -9561,6 +9581,21 @@ span.ColorPickerDivSample {
border-radius: 8px;
border: 1px solid #c0ccdc;
}
.custom_fields_elements {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
}
.custom_fields_elements > div {
width: 48%;
margin: 5px;
}
tr.bring_next_field {
min-height: 36px !important;
}
/* FINISH */
/* select */
@ -9588,6 +9623,30 @@ span.ColorPickerDivSample {
-webkit-user-select: none;
}
.select2-container .select2-selection--multiple {
background-color: #f6f7fb !important;
height: 53px !important;
border: 1px solid #c0ccdc !important;
border-radius: 8px !important;
padding-left: 0px !important;
font: normal normal normal 12px Pandora-Light !important;
color: #2b3332 !important;
-webkit-box-sizing: border-box !important;
-moz-box-sizing: border-box !important;
box-sizing: border-box !important;
}
.sg_source > .select2-container .select2-selection--multiple {
width: 480px !important;
height: 90px !important;
overflow: overlay;
}
.select2-container--default
.select2-selection--multiple
.select2-selection__choice__remove {
margin-top: -4px;
}
.select2-hidden-accessible {
border: 0 !important;
clip: rect(0 0 0 0) !important;