Commit d6005213 authored by Pascal Dreissen's avatar Pascal Dreissen

Dashboard limit dashlet bug since commit (32239152)

parent 32239152
......@@ -289,4 +289,7 @@ $wb['nagios_password_txt'] = 'Nagios/Check_MK Password';
$wb['nagios_url_error_regex'] = 'Invalid Nagios/Check_MK URL';
$wb['nagios_url_note_txt'] = 'Check_MK is being autodetected. Placeholder:';
$wb['mailinglist_manager_txt'] = 'Mailinglist Manager';
$wb['backup_tmp_txt'] = 'Backup tijdelijke map voor zip';
$wb['tmpdir_path_error_empty'] = 'tmp-dir map is leeg.';
$wb['tmpdir_path_error_regex'] = 'Ongeldige tmp-dir map.';
?>
......@@ -165,8 +165,11 @@ class dashlet_limits {
}
else $usage = $this->_get_limit_usage($limit);
$percentage = ($value == '-1' || $value == 0 ? 0 : round(100 * $usage / $value));
$progressbar = $percentage > 100 ? 100 : $percentage;
if($value == $wb['unlimited_txt'] || $value == '-1') {
$progressbar = '-1';
} else {
$progressbar = $percentage > 100 ? 100 : $percentage;
}
$rows[] = array('field' => $field,
'field_txt' => $wb[$field.'_txt'],
'value' => $value_formatted,
......
......@@ -28,4 +28,7 @@ $wb['limit_client_txt'] = 'Aantal klanten';
$wb['limit_database_txt'] = 'Aantal databases';
$wb['limit_mailmailinglist_txt'] = 'Aantal mailing lijsten';
$wb['limit_domain_txt'] = 'Aantal domeinen';
$wb['limit_mailquota_txt'] = 'Toegewezen mailbox quota';
$wb['limit_web_quota_txt'] = 'Toegewezen webquota';
$wb['limit_database_quota_txt'] = 'Toegewezen databasequota';
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment