Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round

This commit is contained in:
Jonathan 2023-03-15 13:53:34 +01:00
commit 19b295060b
21 changed files with 192 additions and 94 deletions

View File

@ -827,12 +827,6 @@ if ($id_agente) {
'link' => '',
'label' => $tab_name,
],
],
[
'id_element' => $id_agente,
'url' => 'godmode/agentes/configurar_agente&tab=main&id_agente='.$id_agente,
'label' => agents_get_alias($id_agente),
'section' => 'Agents',
]
);
}

View File

@ -718,7 +718,7 @@ if ($is_management_allowed === true
'tfavmenu_user',
[
'id_element' => $id_group,
'section' => 'Tactic_group',
'section' => 'Groups',
'id_user' => $config['id_user'],
]
);
@ -906,7 +906,6 @@ if ($tab == 'tree') {
foreach ($groups as $key => $group) {
$url_edit = 'index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo'];
$url_tactical = 'index.php?sec=gagente&sec2=godmode/groups/tactical&id_group='.$group['id_grupo'];
if (is_metaconsole()) {
$url_delete = 'index.php?sec=gagente&sec2=godmode/groups/group_list&delete_group=1&id_group='.$group['id_grupo'].'&tab=groups';
} else {
@ -915,7 +914,7 @@ if ($tab == 'tree') {
$table->data[$key][0] = $group['id_grupo'];
if ($is_management_allowed === true) {
$table->data[$key][1] = '<a href="'.$url_tactical.'">'.$group['nombre'].'</a>';
$table->data[$key][1] = '<a href="'.$url_edit.'">'.$group['nombre'].'</a>';
} else {
$table->data[$key][1] = $group['nombre'];
}

View File

@ -72,14 +72,14 @@ if (is_metaconsole() === false) {
],
[
'link' => '',
'label' => __('Tactic group'),
'label' => __('Tactical group view'),
],
],
[
'id_element' => $id_group,
'url' => 'gagent&sec2=godmode/groups/tactical&id_group='.$id_group,
'label' => groups_get_name($id_group),
'section' => 'Tactic_group',
'section' => 'Groups',
]
);
}
@ -187,7 +187,7 @@ try {
[
'id' => 'list_agents_tactical',
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $columnNames,
'return' => true,
@ -196,6 +196,7 @@ try {
'method' => 'getAgentsByGroup',
'id_group' => $id_group,
],
'dom_elements' => 'lpfti',
'no_sortable_columns' => [-1],
'order' => [
'field' => 'alias',

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 20 / web@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-web" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M10,0 C4.4771525,0 0,4.4771525 0,10 C0,15.5228475 4.4771525,20 10,20 C15.5228475,20 20,15.5228475 20,10 C19.9945565,4.47940886 15.5205911,0.00544352451 10,0 Z M10.0288333,17.4971042 C10.0246667,17.4971042 10.0206042,17.4983125 10.0163333,17.4983125 C9.68185417,17.3901458 9.011375,16.3172917 8.56475,14.3237292 C9.04327083,14.3508125 9.52308333,14.375 10,14.375 C10.4774375,14.375 10.9581042,14.3508958 11.437375,14.3237292 C10.9950208,16.3143958 10.3361458,17.3863125 10.0288333,17.4971042 Z M10,11.875 C9.35577083,11.875 8.75960417,11.8472292 8.19702083,11.8032917 C8.15291667,11.2406875 8.125,10.6442292 8.125,10 C8.125,9.35577083 8.15277083,8.75960417 8.19670833,8.19702083 C8.7593125,8.15291667 9.35577083,8.125 10,8.125 C10.6442292,8.125 11.2403958,8.15277083 11.8029792,8.19670833 C11.8470833,8.7593125 11.875,9.35577083 11.875,10 C11.875,10.6442292 11.8472292,11.2403958 11.8032917,11.8029792 C11.2406875,11.8470833 10.6442292,11.875 10,11.875 Z M2.50289583,10.0288333 C2.50289583,10.0246667 2.5016875,10.0206042 2.5016875,10.0163333 C2.60985417,9.68185417 3.68270833,9.011375 5.67627083,8.56475 C5.64927083,9.04327083 5.625,9.52316667 5.625,10 C5.625,10.4774375 5.64910417,10.9581042 5.67627083,11.437375 C3.68560417,10.9950208 2.6136875,10.3361458 2.50289583,10.0288333 Z M9.97116667,2.50289583 C9.97533333,2.50289583 9.97939583,2.5016875 9.98366667,2.5016875 C10.3181458,2.60985417 10.988625,3.68270833 11.43525,5.67627083 C10.9567292,5.64927083 10.4768333,5.625 10,5.625 C9.5225625,5.625 9.04189583,5.64910417 8.562625,5.67627083 C9.00497917,3.68560417 9.66385417,2.6136875 9.97116667,2.50289583 Z M14.3237292,8.562625 C16.3143958,9.00497917 17.3862292,9.66385417 17.4971042,9.97116667 C17.4971042,9.97533333 17.4983125,9.97939583 17.4983125,9.98366667 C17.3901458,10.3181458 16.3172917,10.988625 14.3237292,11.43525 C14.3508125,10.9567292 14.375,10.4769167 14.375,10 C14.375,9.5225625 14.3508958,9.04189583 14.3237292,8.562625 Z M16.671,6.64397917 C15.8116964,6.34280615 14.9276165,6.11763659 14.0289375,5.9710625 C13.8823634,5.07238349 13.6571938,4.18830364 13.3560208,3.329 C14.7866526,4.05165344 15.9483466,5.21334744 16.671,6.64397917 L16.671,6.64397917 Z M6.64375,3.329 C6.34261768,4.18830554 6.11749674,5.07238609 5.97097917,5.9710625 C5.0723873,6.11755451 4.18838995,6.34264769 3.32916667,6.64375 C4.05172797,5.21324363 5.21327996,4.05163323 6.64375,3.329 L6.64375,3.329 Z M3.32916667,13.35625 C4.1884091,13.6574028 5.07243613,13.8825243 5.9710625,14.0290208 C6.11753664,14.9276164 6.34263021,15.8116153 6.64375,16.6708333 C5.21325958,15.948307 4.05169302,14.7867404 3.32916667,13.35625 Z M13.35625,16.6708333 C13.6573853,15.8115856 13.8825065,14.9275601 14.0290208,14.0289375 C14.9276665,13.8824423 15.8117189,13.6573493 16.671,13.35625 C15.9483668,14.78672 14.7867564,15.948272 13.35625,16.6708333 L13.35625,16.6708333 Z" id="Shape" fill="#3F3F3F"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1750,7 +1750,9 @@ if (check_login()) {
INNER JOIN tagente
ON tagente_modulo.id_agente = tagente.id_agente
INNER JOIN tagente_estado
ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo'
ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
WHERE %s',
$where
);
$recordsTotal = db_get_value_sql($sql_count);
@ -1795,6 +1797,32 @@ if (check_login()) {
}
}
if (in_array(0, $servers_ids) === true) {
$sql = sprintf(
'SELECT
tagente_modulo.nombre,
tagente.alias,
tagente.id_agente,
tagente_estado.last_status_change,
tagente_estado.estado
FROM tagente_modulo
INNER JOIN tagente
ON tagente_modulo.id_agente = tagente.id_agente
INNER JOIN tagente_estado
ON tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
WHERE %s',
$where
);
$res_sql = db_get_all_rows_sql($sql);
foreach ($res_sql as $row_sql) {
$row_sql['server_name'] = __('Metaconsole');
$row_sql['server_url'] = $config['homeurl'];
array_push($data, $row_sql);
}
}
// Drop temporary table if exist.
db_process_sql('DROP TEMPORARY TABLE IF EXISTS temp_modules_status;');
@ -1852,7 +1880,9 @@ if (check_login()) {
$sql_count = sprintf(
'SELECT COUNT(*) AS "total"
FROM temp_modules_status'
FROM temp_modules_status
WHERE %s',
$where
);
$recordsTotal = db_get_value_sql($sql_count);

View File

@ -157,11 +157,12 @@ class TipsWindow
View::render(
'dashboard/tipsWindow',
[
'title' => $initialTip['title'],
'text' => $initialTip['text'],
'url' => $initialTip['url'],
'files' => $initialTip['files'],
'id' => $initialTip['id'],
'title' => $initialTip['title'],
'text' => $initialTip['text'],
'url' => $initialTip['url'],
'files' => $initialTip['files'],
'id' => $initialTip['id'],
'totalTips' => $this->getTotalTipsShowUser(),
]
);
}

View File

@ -723,7 +723,23 @@ function ui_print_group_icon($id_group, $return=false, $path='', $style='', $lin
$output .= '<span title="'.groups_get_name($id_group, true).'">'.groups_get_name($id_group, true).'&nbsp;</span>';
} else {
if (empty($icon) === true) {
$output .= '<span title="'.groups_get_name($id_group, true).'">&nbsp;&nbsp;</span>';
$output .= '<span title="'.groups_get_name($id_group, true).'">';
$output .= '</span>';
$output .= html_print_image(
'images/unknown@groups.svg',
true,
[
'style' => $style,
'class' => 'main_menu_icon '.$class,
'alt' => groups_get_name($id_group, true),
'title' => groups_get_name($id_group, true),
],
false,
false,
false,
true
);
$output .= '</span>';
} else {
if (empty($class) === true) {
$class = 'bot';
@ -3879,8 +3895,8 @@ function ui_print_datatable(array $parameters)
}
$js .= 'if ($("#'.$table_id.' tr td").length == 1) {
$("div[id^=info_box_]").show();
$("div[id^=info_box_]").removeClass(\'invisible_important\');
$(".datatable-msg-info-'.$table_id.'").show();
$(".datatable-msg-info-'.$table_id.'").removeClass(\'invisible_important\');
$("table#'.$table_id.'").hide();
$("div.dataTables_paginate").hide();
$("div.dataTables_info").hide();
@ -3891,7 +3907,7 @@ function ui_print_datatable(array $parameters)
$(".dataTables_paginate.paging_simple_numbers").show()
}
} else {
$("div[id^=info_box_]").hide();
$(".datatable-msg-info-'.$table_id.'").hide();
$("table#'.$table_id.'").show();
$("div.dataTables_paginate").show();
$("div.dataTables_info").show();
@ -4028,7 +4044,7 @@ function ui_print_datatable(array $parameters)
// Order.
$info_msg_arr = [];
$info_msg_arr['message'] = $emptyTable;
$info_msg_arr['div_class'] = 'info_box_container invisible_important';
$info_msg_arr['div_class'] = 'info_box_container invisible_important datatable-msg-info-'.$table_id;
$info_msg = '<div>'.ui_print_info_message($info_msg_arr).'</div>';
$err_msg = '<div id="error-'.$table_id.'"></div>';

View File

@ -316,8 +316,8 @@ class AvgSumMaxMinModule extends Widget
$values['unit'] = $decoder['unit'];
}
if (isset($decoder['layout']) === true) {
$values['layout'] = $decoder['layout'];
if (isset($decoder['horizontal']) === true) {
$values['horizontal'] = $decoder['horizontal'];
}
return $values;
@ -505,14 +505,14 @@ class AvgSumMaxMinModule extends Widget
],
];
// Layout.
// Horizontal.
$inputs[] = [
'label' => __('Layout').ui_print_help_tip(__('Off: vertical. On: horizontal'), true),
'label' => __('Horizontal').ui_print_help_tip(__('If not, layout is vertical'), true),
'arguments' => [
'wrapper' => 'div',
'name' => 'layout',
'name' => 'horizontal',
'type' => 'switch',
'value' => $values['layout'],
'value' => $values['horizontal'],
'return' => true,
],
];
@ -541,7 +541,7 @@ class AvgSumMaxMinModule extends Widget
$values['sizeLabel'] = \get_parameter_switch('sizeLabel');
$values['text_color'] = \get_parameter('text_color', 0);
$values['unit'] = \get_parameter_switch('unit');
$values['layout'] = \get_parameter_switch('layout');
$values['horizontal'] = \get_parameter_switch('horizontal');
return $values;
}
@ -643,8 +643,8 @@ class AvgSumMaxMinModule extends Widget
$output .= '<div class="container-center" id="container-'.$uuid.'">';
$orientation = '';
if ((int) $this->values['layout'] === 1) {
$orientation = 'flex';
if ((int) $this->values['horizontal'] === 1) {
$orientation = 'flex aligni_center';
} else {
$orientation = 'grid';
}
@ -653,7 +653,7 @@ class AvgSumMaxMinModule extends Widget
$output .= '<div class="'.$orientation.'" id="general-'.$uuid.'">';
// Div value.
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_20px" style="font-size:'.$sizeValue.'px;'.$text_color.'">';
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_20px" style="line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px;'.$text_color.'">';
if (is_numeric($data) === true) {
$dataDatos = remove_right_zeros(
@ -679,7 +679,7 @@ class AvgSumMaxMinModule extends Widget
if (empty($label) === false) {
// Div Label.
$output .= '<div class="pdd_l_15px pdd_r_15px" style="font-size:'.$sizeLabel.'px;'.$text_color.'">'.$label.'</div>';
$output .= '<div class="pdd_l_15px pdd_r_15px" style="line-height: '.$sizeLabel.'px; font-size:'.$sizeLabel.'px;'.$text_color.'">'.$label.'</div>';
}
$output .= '</div>';

View File

@ -179,7 +179,7 @@ class ModulesByStatus extends Widget
// This forces at least a first configuration.
// This forces at least a first configuration.
$this->configurationRequired = false;
if (empty($this->values['status']) === true) {
if (empty($this->values['status']) === true && $this->values['status'] !== '0') {
$this->configurationRequired = true;
}
@ -311,6 +311,8 @@ class ModulesByStatus extends Widget
$nodes_fields[$server['id']] = $server['server_name'];
}
$nodes_fields[0] = __('Metaconsola');
$nodes_selected = explode(',', $values['nodes']);
(isset($values['nodes']) === false) ? $nodes_selected = $servers_ids : '';
@ -369,6 +371,8 @@ class ModulesByStatus extends Widget
{
$this->size = parent::getSize();
global $config;
$output = '';
if (is_metaconsole() === true) {
@ -413,7 +417,7 @@ class ModulesByStatus extends Widget
[
'id' => $tableId,
'class' => 'info_table align-left-important',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'include/ajax/module',
@ -430,6 +434,26 @@ class ModulesByStatus extends Widget
'direction' => 'desc',
],
'csv' => 0,
'pagination_options' => [
[
5,
10,
25,
100,
200,
500,
1000,
],
[
5,
10,
25,
100,
200,
500,
1000,
],
],
]
);
} catch (\Exception $e) {

View File

@ -284,11 +284,16 @@ class AlertsFiredWidget extends Widget
if (isset($groups) === true && is_array($groups) === true) {
$table = new \StdClass();
$table->class = 'databox data';
$table->class = 'databox data centered';
$table->cellspacing = '0';
$table->width = '90%';
$table->width = '100%';
$table->data = [];
$table->size = [];
$table->style = [];
$table->style[0] = 'text-align: left;';
$table->style[1] = 'text-align: left;';
$table->style[2] = 'text-align: left;';
$table->style[3] = 'text-align: left;';
$url = $config['homeurl'];
$url .= 'index.php?sec=estado&sec2=operation/agentes/alerts_status';
@ -335,7 +340,7 @@ class AlertsFiredWidget extends Widget
if ($flag === true) {
$height = (count($table->data) * 30);
$style = 'min-width:300px; min-height:'.$height.'px;';
$output .= '<div class="container-center" style="'.$style.'">';
$output .= '<div class="" style="'.$style.'">';
$output .= html_print_table($table, true);
$output .= '</div>';
} else {

View File

@ -305,8 +305,8 @@ class ModuleIconWidget extends Widget
$values['imageSrc'] = $decoder['imageSrc'];
}
if (isset($decoder['layout']) === true) {
$values['layout'] = $decoder['layout'];
if (isset($decoder['horizontal']) === true) {
$values['horizontal'] = $decoder['horizontal'];
}
return $values;
@ -486,14 +486,14 @@ class ModuleIconWidget extends Widget
],
];
// Layout.
// Horizontal.
$inputs[] = [
'label' => __('Layout').ui_print_help_tip(__('Off: vertical. On: horizontal'), true),
'label' => __('Horizontal').ui_print_help_tip(__('If not, layout is vertical'), true),
'arguments' => [
'wrapper' => 'div',
'name' => 'layout',
'name' => 'horizontal',
'type' => 'switch',
'value' => $values['layout'],
'value' => $values['horizontal'],
'return' => true,
],
];
@ -520,7 +520,7 @@ class ModuleIconWidget extends Widget
$values['sizeValue'] = \get_parameter('sizeValue', 0);
$values['sizeLabel'] = \get_parameter_switch('sizeLabel');
$values['sizeIcon'] = \get_parameter_switch('sizeIcon');
$values['layout'] = \get_parameter_switch('layout');
$values['horizontal'] = \get_parameter_switch('horizontal');
return $values;
}
@ -563,7 +563,7 @@ class ModuleIconWidget extends Widget
$output .= '<div class="container-center" id="container-'.$uuid.'">';
$orientation = '';
if ((int) $this->values['layout'] === 1) {
if ((int) $this->values['horizontal'] === 1) {
$orientation = 'flex aligni_center';
} else {
$orientation = 'grid';
@ -596,7 +596,7 @@ class ModuleIconWidget extends Widget
// Div image.
$style_icon = 'flex: 0 1 '.$sizeIcon.'px;';
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 0 1 '.$sizeIcon.'px;">';
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_25px" style="flex: 0 1 '.$sizeIcon.'px; height: '.$sizeIcon.'px;">';
$output .= html_print_image(
'images/console/icons/'.$icon.$color_icon.'.png',
true,
@ -604,7 +604,7 @@ class ModuleIconWidget extends Widget
);
$output .= '</div>';
// Div value.
$output .= '<div class="mrgn_btn_15px" style="flex: 0 1 10px; font-size:'.$sizeValue.'px;">';
$output .= '<div class="mrgn_btn_15px" style="flex: 0 1 10px; line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px;">';
$output .= remove_right_zeros(
number_format($data_module, $config['graph_precision'], $config['decimal_separator'], $config['thousand_separator'])
).$unit;
@ -612,7 +612,7 @@ class ModuleIconWidget extends Widget
if (empty($label) === false) {
// Div Label.
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 1; font-size:'.$sizeLabel.'px;">'.$label.'</div>';
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 1; line-height: '.$sizeLabel.'px; font-size:'.$sizeLabel.'px;">'.$label.'</div>';
}
$output .= '</div>';

View File

@ -300,8 +300,8 @@ class ModuleStatusWidget extends Widget
$values['imageSrc'] = $decoder['imageSrc'];
}
if (isset($decoder['layout']) === true) {
$values['layout'] = $decoder['layout'];
if (isset($decoder['horizontal']) === true) {
$values['horizontal'] = $decoder['horizontal'];
}
return $values;
@ -465,14 +465,14 @@ class ModuleStatusWidget extends Widget
],
];
// Layout.
// Horizontal.
$inputs[] = [
'label' => __('Layout').ui_print_help_tip(__('Off: vertical. On: horizontal'), true),
'label' => __('Horizontal').ui_print_help_tip(__('If not, layout is vertical'), true),
'arguments' => [
'wrapper' => 'div',
'name' => 'layout',
'name' => 'horizontal',
'type' => 'switch',
'value' => $values['layout'],
'value' => $values['horizontal'],
'return' => true,
],
];
@ -499,7 +499,7 @@ class ModuleStatusWidget extends Widget
$values['sizeValue'] = \get_parameter('sizeValue', 0);
$values['sizeLabel'] = \get_parameter_switch('sizeLabel');
$values['sizeIcon'] = \get_parameter_switch('sizeIcon');
$values['layout'] = \get_parameter_switch('layout');
$values['horizontal'] = \get_parameter_switch('horizontal');
return $values;
}
@ -560,7 +560,7 @@ class ModuleStatusWidget extends Widget
$output .= '<div class="container-center" id="container-'.$uuid.'">';
$orientation = '';
if ((int) $this->values['layout'] === 1) {
if ((int) $this->values['horizontal'] === 1) {
$orientation = 'flex aligni_center';
} else {
$orientation = 'grid';
@ -570,7 +570,7 @@ class ModuleStatusWidget extends Widget
$output .= '<div class="'.$orientation.'" id="general-'.$uuid.'">';
// Div image.
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 0 1 '.$sizeIcon.'px;">';
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_25px" style="flex: 0 1 '.$sizeIcon.'px; height: '.$sizeIcon.'px;">';
$output .= html_print_image(
'images/console/icons/'.$icon,
true,
@ -580,7 +580,7 @@ class ModuleStatusWidget extends Widget
if (empty($label) === false) {
// Div Label.
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 1 1 '.$sizeLabel.'px; font-size:'.$sizeLabel.'px;">'.$label.'</div>';
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 1 1 '.$sizeLabel.'px; line-height: '.$sizeLabel.'px; font-size:'.$sizeLabel.'px;">'.$label.'</div>';
}
$output .= '</div>';

View File

@ -284,8 +284,8 @@ class ModuleValueWidget extends Widget
$values['sizeLabel'] = $decoder['sizeLabel'];
}
if (isset($decoder['layout']) === true) {
$values['layout'] = $decoder['layout'];
if (isset($decoder['horizontal']) === true) {
$values['horizontal'] = $decoder['horizontal'];
}
return $values;
@ -389,14 +389,14 @@ class ModuleValueWidget extends Widget
],
];
// Layout.
// Horizontal.
$inputs[] = [
'label' => __('Layout').ui_print_help_tip(__('Off: vertical. On: horizontal'), true),
'label' => __('Horizontal').ui_print_help_tip(__('If not, layout is vertical'), true),
'arguments' => [
'wrapper' => 'div',
'name' => 'layout',
'name' => 'horizontal',
'type' => 'switch',
'value' => $values['layout'],
'value' => $values['horizontal'],
'return' => true,
],
];
@ -421,7 +421,7 @@ class ModuleValueWidget extends Widget
$values['moduleId'] = \get_parameter('moduleId', 0);
$values['sizeValue'] = \get_parameter('sizeValue', 0);
$values['sizeLabel'] = \get_parameter_switch('sizeLabel');
$values['layout'] = \get_parameter_switch('layout');
$values['horizontal'] = \get_parameter_switch('horizontal');
return $values;
}
@ -471,8 +471,8 @@ class ModuleValueWidget extends Widget
$output .= '<div class="container-center" id="container-'.$uuid.'">';
$orientation = '';
if ((int) $this->values['layout'] === 1) {
$orientation = 'flex';
if ((int) $this->values['horizontal'] === 1) {
$orientation = 'flex aligni_center';
} else {
$orientation = 'grid';
}
@ -481,7 +481,7 @@ class ModuleValueWidget extends Widget
$output .= '<div class="'.$orientation.'" id="general-'.$uuid.'">';
// Div value.
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_20px" style="flex: 0 1 '.$sizeValue.'px; font-size:'.$sizeValue.'px; color: '.$color.'">';
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_20px" style="flex: 0 1 '.$sizeValue.'px; line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px; color: '.$color.'">';
if (is_numeric($data_module) === true) {
$dataDatos = remove_right_zeros(
@ -502,7 +502,7 @@ class ModuleValueWidget extends Widget
if (empty($label) === false) {
// Div Label.
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 1 1 '.$sizeLabel.'px; font-size:'.$sizeLabel.'px;">'.$label.'</div>';
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 1 1 '.$sizeLabel.'px; line-height: '.$sizeLabel.'px; font-size:'.$sizeLabel.'px;">'.$label.'</div>';
}
$output .= '</div>';

View File

@ -300,18 +300,20 @@ class OsQuickReportWidget extends Widget
$table->style[1] = 'background-color: '.$values['background'].';';
$table->style[2] = 'background-color: '.$values['background'].'; font-size: 1.5em; font-weight: bolder;';
$table->style[3] = 'background-color: '.$values['background'].'; font-size: 1.5em; font-weight: bolder;';
$table->style[4] = 'background-color: '.$values['background'].'; font-size: 1.5em; font-weight: bolder;';
$table->style[5] = 'background-color: '.$values['background'].'; font-size: 1.5em; font-weight: bolder;';
$table->style[4] = 'background-color: '.$values['background'].';';
$table->style[5] = 'background-color: '.$values['background'].';';
foreach ($result as $id => $os) {
$data = [];
($os['critical'] > 0) ? $color_critical = 'color: '.COL_CRITICAL.';' : $color_critical = '';
($os['unknown'] > 0) ? $color_unknown = 'color: '.COL_UNKNOWN.';' : $color_unknown = '';
$data[0] = ui_print_os_icon($id, false, true);
$data[1] = $os['name'];
$data[2] = $os['total'];
$data[3] = $os['normal'];
$data[4] = $os['critical'];
$data[5] = $os['unknown'];
$data[4] = '<span class="widget-module-tabs-data" style="'.$color_critical.'">'.$os['critical'].'</span>';
$data[5] = '<span class="widget-module-tabs-data" style="'.$color_unknown.'">'.$os['unknown'].'</span>';
$table->data[] = $data;
}

View File

@ -289,8 +289,8 @@ class SLAPercentWidget extends Widget
$values['period'] = $decoder['period'];
}
if (isset($decoder['layout']) === true) {
$values['layout'] = $decoder['layout'];
if (isset($decoder['horizontal']) === true) {
$values['horizontal'] = $decoder['horizontal'];
}
return $values;
@ -408,14 +408,14 @@ class SLAPercentWidget extends Widget
],
];
// Layout.
// Horizontal.
$inputs[] = [
'label' => __('Layout').ui_print_help_tip(__('Off: vertical. On: horizontal'), true),
'label' => __('Horizontal').ui_print_help_tip(__('If not, layout is vertical'), true),
'arguments' => [
'wrapper' => 'div',
'name' => 'layout',
'name' => 'horizontal',
'type' => 'switch',
'value' => $values['layout'],
'value' => $values['horizontal'],
'return' => true,
],
];
@ -441,7 +441,7 @@ class SLAPercentWidget extends Widget
$values['period'] = \get_parameter('period', 0);
$values['sizeValue'] = \get_parameter('sizeValue', '');
$values['sizeLabel'] = \get_parameter('sizeLabel', '');
$values['layout'] = \get_parameter_switch('layout');
$values['horizontal'] = \get_parameter_switch('horizontal');
return $values;
}
@ -516,8 +516,8 @@ class SLAPercentWidget extends Widget
$output .= '<div class="container-center" id="container-'.$uuid.'">';
$orientation = '';
if ((int) $this->values['layout'] === 1) {
$orientation = 'flex';
if ((int) $this->values['horizontal'] === 1) {
$orientation = 'flex aligni_center';
} else {
$orientation = 'grid';
}
@ -525,13 +525,13 @@ class SLAPercentWidget extends Widget
// General div.
$output .= '<div class="'.$orientation.'" id="general-'.$uuid.'">';
// Div value.
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_20px" style="flex: 0 1 '.$sizeValue.'px; font-size:'.$sizeValue.'px;">';
$output .= '<div class="pdd_l_15px pdd_r_15px mrgn_btn_20px" style="flex: 0 1 '.$sizeValue.'px; line-height: '.$sizeValue.'px; font-size:'.$sizeValue.'px;">';
$output .= $sla_array['sla_fixed'].'%';
$output .= '</div>';
if (empty($label) === false) {
// Div Label.
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 1 1; font-size:'.$sizeLabel.'px; text-align: left;">'.$label.'</div>';
$output .= '<div class="pdd_l_15px pdd_r_15px" style="flex: 1 1; line-height: '.$sizeLabel.'px; font-size:'.$sizeLabel.'px; text-align: left;">'.$label.'</div>';
}
$output .= '</div>';

View File

@ -806,3 +806,7 @@ div[id^="auto-os-"] > img {
.dataTables_paginate.paging_simple_numbers {
margin-right: 0;
}
.w22px {
width: 22px;
}

View File

@ -29,3 +29,6 @@ rect {
.graph-distribution-so {
margin-top: 55px;
}
#list_agents_tactical_wrapper .dataTables_length {
margin-bottom: 10px;
}

View File

@ -12,7 +12,7 @@
padding: 0px;
}
.window {
background-image: linear-gradient(180deg, #fffce8 0%, #ffffff 100%);
background-image: white;
width: 640px;
width: 100%;
border-radius: 5px;
@ -145,9 +145,6 @@
color: #14524f;
font-weight: 600;
}
#url_tip .arrow_tips {
font-size: 20px;
}
span.count-round-tip {
width: 6px !important;
height: 6px !important;
@ -211,3 +208,7 @@ span.disable {
.buttons_actions input {
width: 32px;
}
.hide-button {
opacity: 0;
pointer-events: none;
}

View File

@ -321,7 +321,7 @@ if (empty($result_groups) === false) {
$link = "<a href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_']."'>";
} else {
$deep = groups_get_group_deep($data['_id_']);
$link = "<a href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_']."'>";
$link = "<a href='index.php?sec=view&sec2=godmode/groups/tactical&id_group=".$data['_id_']."'>";
}
$group_name = '<b><span>'.ui_print_truncate_text($data['_name_'], 50).'</span></b>';

View File

@ -1940,6 +1940,12 @@ if ((bool) $config['pure'] === false) {
'link' => '',
'label' => $tab_name,
],
],
[
'id_element' => $id_agente,
'url' => 'operation/agentes/ver_agente&id_agente='.$id_agente,
'label' => agents_get_alias($id_agente),
'section' => 'Agents',
]
);
}

View File

@ -73,10 +73,13 @@ $output .= '<p id="text_tip">';
$output .= $text;
$output .= '</p>';
$link_class = 'invisible';
if (empty($url) === false && $url !== '') {
$output .= '<a href="'.$url.'" target="_blank" id="url_tip">'.__('See more info').'<span class="arrow_tips">→</span></a>';
$link_class = '';
}
$output .= '<a href="'.$url.'" class="'.$link_class.'" target="_blank" id="url_tip">'.__('See more info').'</a>';
$output .= '</div>';
$output .= '<div class="ui-dialog-buttonset">';
@ -116,7 +119,7 @@ if ($preview === true) {
'',
[
'onclick' => 'next_tip()',
'class' => 'mini',
'class' => ($totalTips === '1') ? 'mini hide-button' : 'mini',
],
true
);