#12695 wip removing warnings
This commit is contained in:
parent
6e1fb2f061
commit
d590961e69
|
@ -496,6 +496,10 @@ function mainAgentsModules()
|
|||
$agents = [];
|
||||
}
|
||||
|
||||
if (isset($agents_id) === false) {
|
||||
$agents_id = '';
|
||||
}
|
||||
|
||||
$filter_agents = html_print_label_input_block(
|
||||
__('Agents'),
|
||||
html_print_select(
|
||||
|
|
|
@ -91,7 +91,7 @@ function mainModuleGroups()
|
|||
$module_group_search = get_parameter('module_group_search', '');
|
||||
|
||||
// Check the user's group permissions.
|
||||
$user_groups = users_get_groups($config['user'], 'AR');
|
||||
$user_groups = users_get_groups($config['id_user'], 'AR');
|
||||
$info = array_filter(
|
||||
$info,
|
||||
function ($v) use ($user_groups) {
|
||||
|
@ -112,7 +112,7 @@ function mainModuleGroups()
|
|||
);
|
||||
|
||||
if (empty($info) === false) {
|
||||
$groups_view = ($is_not_paginated) ? $info : array_slice(
|
||||
$groups_view = (isset($is_not_paginated) === true) ? $info : array_slice(
|
||||
$info,
|
||||
$offset,
|
||||
$config['block_size']
|
||||
|
@ -374,6 +374,10 @@ function mainModuleGroups()
|
|||
'…'
|
||||
);
|
||||
$j = 1;
|
||||
if (isset($background_color) === false) {
|
||||
$background_color = 'none';
|
||||
}
|
||||
|
||||
if (isset($array_data[$key])) {
|
||||
foreach ($value['gm'] as $k => $v) {
|
||||
if (isset($array_data[$key][$k])) {
|
||||
|
|
|
@ -431,6 +431,10 @@ if ($get_agent_alerts_datatable === true) {
|
|||
if (empty($filter_alert['free_search']) === false) {
|
||||
$free_search_alert = $filter_alert['free_search'];
|
||||
} else {
|
||||
if (isset($filter_alert['free_search_alert']) === false) {
|
||||
$filter_alert['free_search_alert'] = '';
|
||||
}
|
||||
|
||||
$free_search_alert = $filter_alert['free_search_alert'];
|
||||
}
|
||||
|
||||
|
@ -635,6 +639,10 @@ if ($get_agent_alerts_datatable === true) {
|
|||
}
|
||||
|
||||
$alerts = [];
|
||||
if (isset($agent_view_page) === false) {
|
||||
$agent_view_page = false;
|
||||
}
|
||||
|
||||
if ($agent_view_page === true) {
|
||||
$options_simple = ['order' => $order];
|
||||
} else {
|
||||
|
|
|
@ -1279,7 +1279,7 @@ function agents_get_group_agents(
|
|||
}
|
||||
|
||||
if (is_array($search) === true) {
|
||||
if (!$search['all_agents']) {
|
||||
if (isset($search['all_agents']) === false) {
|
||||
$filter['disabled'] = 0;
|
||||
if (isset($search['disabled']) === true) {
|
||||
$filter['disabled'] = (int) $search['disabled'];
|
||||
|
|
|
@ -737,6 +737,10 @@ function grafico_modulo_sparse($params)
|
|||
$params['backgroundColor'] = 'white';
|
||||
}
|
||||
|
||||
if (isset($params['vconsole']) === false) {
|
||||
$params['vconsole'] = false;
|
||||
}
|
||||
|
||||
if (isset($params['only_image']) === true && $params['vconsole'] !== true) {
|
||||
$params['backgroundColor'] = 'transparent';
|
||||
}
|
||||
|
@ -903,6 +907,10 @@ function grafico_modulo_sparse($params)
|
|||
|
||||
// Format of the graph.
|
||||
if (empty($params['unit']) === true) {
|
||||
if (isset($module_data['unit']) === false) {
|
||||
$module_data['unit'] = '';
|
||||
}
|
||||
|
||||
$params['unit'] = $module_data['unit'];
|
||||
if (modules_is_unit_macro($params['unit'])) {
|
||||
$params['unit'] = '';
|
||||
|
@ -1008,6 +1016,10 @@ function grafico_modulo_sparse($params)
|
|||
$data_module_graph = [];
|
||||
}
|
||||
|
||||
if (isset($series_suffix) === false) {
|
||||
$series_suffix = '';
|
||||
}
|
||||
|
||||
$data_module_graph['series_suffix'] = $series_suffix;
|
||||
|
||||
// Check available data.
|
||||
|
|
|
@ -4082,11 +4082,13 @@ function ui_print_datatable(array $parameters)
|
|||
|
||||
$filter .= '<ul class="datatable_filter content filter_table no_border">';
|
||||
|
||||
foreach ($parameters['form']['inputs'] as $input) {
|
||||
if ($input['type'] === 'date_range') {
|
||||
$filter .= '<li><label>'.$input['label'].'</label>'.html_print_select_date_range('date', true).'</li>';
|
||||
} else {
|
||||
$filter .= html_print_input(($input + ['return' => true]), 'li');
|
||||
if (isset($parameters['form']['inputs']) === true) {
|
||||
foreach ($parameters['form']['inputs'] as $input) {
|
||||
if ($input['type'] === 'date_range') {
|
||||
$filter .= '<li><label>'.$input['label'].'</label>'.html_print_select_date_range('date', true).'</li>';
|
||||
} else {
|
||||
$filter .= html_print_input(($input + ['return' => true]), 'li');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -205,6 +205,14 @@ function flot_area_graph(
|
|||
$red_inverse = false;
|
||||
}
|
||||
} else if (isset($params['combined']) === false || !$params['combined']) {
|
||||
if (isset($data_module_graph['w_min']) === false) {
|
||||
$data_module_graph['w_min'] = '';
|
||||
}
|
||||
|
||||
if (isset($data_module_graph['c_min']) === false) {
|
||||
$data_module_graph['c_min'] = '';
|
||||
}
|
||||
|
||||
$yellow_threshold = $data_module_graph['w_min'];
|
||||
$red_threshold = $data_module_graph['c_min'];
|
||||
// Get other required module datas to draw warning and critical.
|
||||
|
|
|
@ -43,7 +43,11 @@ function unserialize_in_temp($serial_id=null, $delete=true, $ttl=1)
|
|||
}
|
||||
}
|
||||
|
||||
$content = file_get_contents($file_path);
|
||||
if (file_exists($file_path) === false) {
|
||||
return false;
|
||||
} else {
|
||||
$content = file_get_contents($file_path);
|
||||
}
|
||||
|
||||
if ($content === false) {
|
||||
return false;
|
||||
|
|
|
@ -211,7 +211,7 @@ function printFormFilterAlert(
|
|||
)
|
||||
);
|
||||
|
||||
$data .= html_print_table($table, true);
|
||||
$data = html_print_table($table, true);
|
||||
|
||||
if ($return) {
|
||||
return $data;
|
||||
|
|
|
@ -358,6 +358,9 @@ if (is_metaconsole() === true) {
|
|||
}
|
||||
|
||||
ob_start();
|
||||
if (isset($agent_view_page) === false) {
|
||||
$agent_view_page = false;
|
||||
}
|
||||
|
||||
if ($agent_view_page === true) {
|
||||
ui_print_datatable(
|
||||
|
@ -550,6 +553,8 @@ if (isset($id_agente)) {
|
|||
}
|
||||
|
||||
echo '<div id="system_higher" class="invisible_important agent_details_agent_data flex_important"><img src="images/alert-yellow@svg.svg" width="10%" class="mrgn_right_20px">'.__('Your system has a much higher rate of modules per agent than recommended (200 modules per agent). This implies performance problems in the system, please consider reducing the number of modules in this agent.').'</div>';
|
||||
} else {
|
||||
$system_higher = false;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -464,6 +464,7 @@ function print_table(
|
|||
$url_if_bandwidth_usage_out .= $selected_agents_query_str.'&'.$selected_interfaces_query_str;
|
||||
$last_data .= $selected_agents_query_str.'&'.$selected_interfaces_query_str;
|
||||
|
||||
$recursion = get_parameter_switch('recursion', '');
|
||||
$url_if_agent_name .= '&recursion='.$recursion;
|
||||
$url_if_name .= '&recursion='.$recursion;
|
||||
$url_if_speed .= '&recursion='.$recursion;
|
||||
|
|
|
@ -58,6 +58,10 @@ $autosearch = false;
|
|||
$sec = (string) get_parameter('sec', 'view');
|
||||
$agent_id = (int) get_parameter('id_agente', 0);
|
||||
|
||||
if (isset($subpage) === false) {
|
||||
$subpage = '';
|
||||
}
|
||||
|
||||
if ($sec === 'view') {
|
||||
ui_print_standard_header(
|
||||
__('Interface view').$subpage,
|
||||
|
|
|
@ -228,6 +228,10 @@ if ($load_filter_id > 0) {
|
|||
$loaded_filter = db_get_row_sql($sql);
|
||||
}
|
||||
|
||||
if (isset($loaded_filter['id_filter']) === false) {
|
||||
$loaded_filter['id_filter'] = 0;
|
||||
}
|
||||
|
||||
if ($loaded_filter['id_filter'] > 0) {
|
||||
$query_filter['id_filter'] = $load_filter_id;
|
||||
$filter = db_get_row_filter('tmonitor_filter', $query_filter, false);
|
||||
|
@ -2370,6 +2374,10 @@ if (empty($result) === false) {
|
|||
ui_print_info_message(['no_close' => true, 'message' => __('Please apply a filter to display the data')]);
|
||||
}
|
||||
|
||||
if (isset($tablePagination) === false) {
|
||||
$tablePagination = '';
|
||||
}
|
||||
|
||||
if (is_metaconsole() !== true) {
|
||||
html_print_action_buttons(
|
||||
'',
|
||||
|
|
Loading…
Reference in New Issue