Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Merge branch 'bareos-15.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Apr 22, 2016
2 parents 0e17729 + d3a20e7 commit d0e2410
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 58 deletions.
1 change: 0 additions & 1 deletion module/Application/config/module.config.php
Expand Up @@ -91,7 +91,6 @@
'invokables' => array (
'printDate' => 'Application\View\Helper\Date',
'printJobStatus' => 'Application\View\Helper\JobStatus',
'printJobLevel' => 'Application\View\Helper\JobLevel',
'printJobType' => 'Application\View\Helper\JobType',
'printJobDuration' => 'Application\View\Helper\JobDuration',
'printBytes' => 'Application\View\Helper\Bytes',
Expand Down
53 changes: 0 additions & 53 deletions module/Application/src/Application/View/Helper/JobLevel.php

This file was deleted.

28 changes: 24 additions & 4 deletions public/js/dataTables.functions.js
Expand Up @@ -76,6 +76,22 @@ function formatJobLevel(data) {
return 'Differential';
case 'I':
return 'Incremental';
case 'f':
return 'VirtualFull';
case 'B':
return 'Base';
case 'C':
return 'Catalog';
case 'V':
return 'InitCatalog';
case 'O':
return 'VolumeToCatalog';
case 'd':
return 'DiskToCatalog';
case 'A':
return 'Data';
case ' ':
return 'None';
default:
return data;
}
Expand Down Expand Up @@ -104,18 +120,22 @@ function formatExpiration(volstatus, lastwritten, volretention) {
var b = new Date(a[0]).getTime() / 1000;
var interval = (d - b) / (3600 * 24);
var retention = Math.round(volretention / 60 / 60 / 24);
var expiration = Math.round(retention - interval);
var expiration = (retention - interval).toFixed(2);
if(expiration <= 0) {
return '<span class="label label-danger">expired</span>';
}

if(expiration > 0) {
return '<span class="label label-warning">expires in ' + expiration + ' day(s)</span>';
if(expiration > 0 && expiration <= 1) {
return '<span class="label label-warning">expires in 1 day</span>';
}

if(expiration > 1) {
return '<span class="label label-warning">expires in ' + Math.ceil(expiration) + ' days</span>';
}
}
}
else {
return Math.round((volretention / 60 / 60 / 24)) + ' day(s)';
return Math.ceil((volretention / 60 / 60 / 24)) + ' day(s)';
}
}

Expand Down

0 comments on commit d0e2410

Please sign in to comment.