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-17.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed Sep 28, 2017
2 parents 13689a9 + 46507e2 commit b9523c8
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added

### Changed
- Fix to bugreport #827

### Removed

Expand Down
2 changes: 1 addition & 1 deletion module/Client/view/client/client/details.phtml
Expand Up @@ -91,7 +91,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Client/view/client/client/index.phtml
Expand Up @@ -67,7 +67,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Dashboard/view/dashboard/dashboard/index.phtml
Expand Up @@ -45,7 +45,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Fileset/view/fileset/fileset/details.phtml
Expand Up @@ -64,7 +64,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Job/view/job/job/actions.phtml
Expand Up @@ -85,7 +85,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Job/view/job/job/details.phtml
Expand Up @@ -110,7 +110,7 @@ $this->headTitle($title);


<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
6 changes: 3 additions & 3 deletions module/Job/view/job/job/index.phtml
Expand Up @@ -91,7 +91,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down Expand Up @@ -259,9 +259,9 @@ $this->headTitle($title);
case 'W':
switch(row.type) {
case 'B':
return '<a class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="top" href="<?php echo $this->basePath() . '/job/index?action=rerun&jobid='; ?>'+row.jobid+'" title="<?php echo $this->translate("Rerun"); ?>" id="btn-1"><span class="glyphicon glyphicon-repeat"></span></a>&nbsp;<a class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="top" href="<?php echo $this->basePath(); ?>/restore/?type=client&mergefilesets=1&mergejobs=1&client='+row.client+'&jobid='+row.jobid+'" title="<?php echo $this->translate("Show Files"); ?>" id="btn-1"><span class="glyphicon glyphicon-folder-open"></span></a>';
return '<a class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="top" href="<?php echo $this->basePath() . '/job/index?action=rerun&jobid='; ?>'+row.jobid+'" title="<?php echo $this->translate("Rerun"); ?>" id="btn-1"><span class="glyphicon glyphicon-repeat"></span></a>&nbsp;<a class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="top" href="<?php echo $this->basePath(); ?>/restore/?type=client&mergefilesets=1&mergejobs=1&client='+row.client+'&jobid='+row.jobid+'" title="<?php echo $this->translate("Restore"); ?>" id="btn-1"><span class="glyphicon glyphicon-download-alt"></span></a>';
case 'C':
return '<a class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="top" href="<?php echo $this->basePath(); ?>/restore/?type=client&mergefilesets=1&mergejobs=1&client='+row.client+'&jobid='+row.jobid+'" title="<?php echo $this->translate("Show Files"); ?>" id="btn-1"><span class="glyphicon glyphicon-folder-open"></span></a>';
return '<a class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="top" href="<?php echo $this->basePath(); ?>/restore/?type=client&mergefilesets=1&mergejobs=1&client='+row.client+'&jobid='+row.jobid+'" title="<?php echo $this->translate("Restore"); ?>" id="btn-1"><span class="glyphicon glyphicon-download-alt"></span></a>';
}
case 'E':
case 'e':
Expand Down
2 changes: 1 addition & 1 deletion module/Media/view/media/media/details.phtml
Expand Up @@ -103,7 +103,7 @@ $this->headTitle($title);


<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Media/view/media/media/index.phtml
Expand Up @@ -70,7 +70,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Pool/view/pool/pool/details.phtml
Expand Up @@ -102,7 +102,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Pool/view/pool/pool/index.phtml
Expand Up @@ -69,7 +69,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Schedule/view/schedule/schedule/index.phtml
Expand Up @@ -86,7 +86,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Storage/view/storage/storage/details.phtml
Expand Up @@ -170,7 +170,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
2 changes: 1 addition & 1 deletion module/Storage/view/storage/storage/index.phtml
Expand Up @@ -65,7 +65,7 @@ $this->headTitle($title);
</div>

<?php
echo $this->headScript()->prependFile($this->basePath() . '/js/datatables.functions.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/custom-functions.js');
echo $this->headLink()->prependStylesheet($this->basePath() . '/css/bootstrap-table.min.css');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-locale-all.min.js');
echo $this->headScript()->prependFile($this->basePath() . '/js/bootstrap-table-cookie.min.js');
Expand Down
Expand Up @@ -165,14 +165,23 @@ function formatJobLevel(data) {
}

function formatRetention(data) {
var retention;
//retention = Math.round( (data / 60 / 60 / 24) );
retention = Math.floor((data % 31536000) / 86400);
if(retention == 0) {
return '-';
if( Math.floor(data / 31536000) >= 1 ) {
return Math.floor(data / 31536000) + ' ' + iJS._('year(s)');
}
else if( Math.floor(data / 2678400) >= 1 ) {
return Math.floor(data / 2678400) + ' ' + iJS._('month(s)');
}
else if( Math.floor(data / 86400) >= 1 ) {
return Math.floor(data / 86400) + ' ' + iJS._('day(s)');
}
else if( Math.floor(data / 3600) >= 1 ) {
return Math.floor(data / 3600) + ' ' + iJS._('hour(s)');
}
else if( Math.floor(data / 60) >= 1 ) {
return Math.floor(data / 60) + ' ' + iJS._('second(s)');
}
else {
return retention + ' ' + iJS._('day(s)');
return '-';
}
}

Expand Down Expand Up @@ -202,7 +211,7 @@ function formatExpiration(volstatus, lastwritten, volretention) {
}
}
else {
return Math.ceil((volretention / 60 / 60 / 24)) + ' ' + iJS._("day(s)");
return formatRetention(volretention);
}
}

Expand Down

0 comments on commit b9523c8

Please sign in to comment.