This commit is contained in:
Arturo Gonzalez 2016-12-30 12:57:16 +01:00
commit bbf04bc309
3 changed files with 15 additions and 21 deletions

View File

@ -1992,24 +1992,18 @@ else {
"reporting_" . $activeTab . "_tab", false, $buttons); "reporting_" . $activeTab . "_tab", false, $buttons);
} }
if ($resultOperationDB !== null) { if ($resultOperationDB !== null) {
$err = ''; $err = '';
/* switch ($_POST['type']) {
if($_POST[sla_min]==''){ case 'custom_graph':
$err.='You must enter some character in SLA min field<br>'; $err.='You must enter custom graph';
break;
case 'SLA':
$err.='You must enter some character in SLA limit field';
default:
$err.='';
break;
} }
if($_POST[sla_max]==''){
$err.='You must enter some character in SLA max field<br>';
}
*/
if($_POST[sla_limit]==''){
$err.='You must enter some character in SLA limit field';
}
ui_print_result_message ($resultOperationDB, __('Successfull action'), __('Unsuccessfull action<br><br>'.$err)); ui_print_result_message ($resultOperationDB, __('Successfull action'), __('Unsuccessfull action<br><br>'.$err));
} }

View File

@ -881,10 +881,10 @@ function createGauge(name, etiqueta, value, min, max, min_warning,max_warning,mi
//var range = config.max - config.min; //var range = config.max - config.min;
var range = config.max - config.min; var range = config.max - config.min;
if (value !== false) { if (value !== false) {
if ( min_warning > 0 ) { if ( min_warning >= 0 && ( min_warning != max_warning ) ) {
config.yellowZones = [{ from: min_warning, to: max_warning }]; config.yellowZones = [{ from: min_warning, to: max_warning }];
} }
if ( min_critical > 0 ) { if ( min_critical >= 0 && ( min_critical != max_critical ) ) {
config.redZones = [{ from: min_critical, to: max_critical }]; config.redZones = [{ from: min_critical, to: max_critical }];
} }
} }
@ -959,12 +959,12 @@ function createGauges(data, width, height, font_size, no_data_image, font) {
mininum = 0; mininum = 0;
if (mininum == maxinum) if (mininum == maxinum)
mininum = 0; mininum = 0;
/*
if (maximun_critical == 0 ) if (maximun_critical == 0 )
maximun_critical = maxinum; maximun_critical = maxinum;
if (maximun_warning == 0 ) if (maximun_warning == 0 )
maximun_warning = minimun_critical; maximun_warning = minimun_critical;
*/
if ( maxinum <= minimun_warning ) { if ( maxinum <= minimun_warning ) {
minimun_warning = 0; minimun_warning = 0;
maximun_warning = 0; maximun_warning = 0;

View File

@ -598,8 +598,8 @@ foreach ($agents as $agent) {
$data[3] = '<span style="font-size:6.5pt;">'.human_time_description_raw($agent["intervalo"])."</span>"; $data[3] = '<span style="font-size:6.5pt;">'.human_time_description_raw($agent["intervalo"])."</span>";
$data[4] = ui_print_group_icon ($agent["id_grupo"], true); $data[4] = ui_print_group_icon ($agent["id_grupo"], true);
$agent['not_init_count'] = $agent['notinit_count'];
$data[5] = reporting_tiny_stats($agent, true, 'agent', ':', $strict_user); $data[5] = reporting_tiny_stats($agent, true, ' ', ':', $strict_user);
$data[6] = $status_img; $data[6] = $status_img;