Skip to content

Commit

Permalink
Merge pull request #998 from bareos/dev/fbergkemper/master/s4848
Browse files Browse the repository at this point in the history
webui: add inchanger column to volume tables
  • Loading branch information
pstorz committed Nov 26, 2021
2 parents eefeb8b + 3f36294 commit a099212
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https:
- packages: Build also for Fedora_35 [PR #972]
- cmake: check for chflags() function and enable FreeBSD File Flags support [PR #963]
- plugin: added mariabackup python plugin, added systemtest for mariabackup and updated systemtest for percona-xtrabackup [PR #967]
- webui: add inchanger column to volume tables [PR #998]


### Changed
Expand Down
2 changes: 1 addition & 1 deletion webui/module/Media/view/media/media/details.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ $this->headTitle($title);
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo addslashes($this->translate("In changer")); ?></th>');
html.push('<td>' + row.inchanger + '</td>');
html.push('<td>' + formatInchanger(row.inchanger) + '</td>');
html.push('</tr>');
html.push('<tr>');
html.push('<th><?php echo addslashes($this->translate("Volume Files")); ?></th>');
Expand Down
13 changes: 13 additions & 0 deletions webui/module/Media/view/media/media/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ $this->headTitle($title);
data-filter-control-placeholder="<?php echo $this->translate("Status"); ?>">
<?php echo $this->translate("Status"); ?>
</th>
<th
data-field="inchanger"
data-filter-control="input"
data-filter-control-placeholder="<?php echo $this->translate("In changer"); ?>">
<?php echo $this->translate("In changer"); ?>
</th>
<th
data-field="retention"
data-filter-control="input"
Expand Down Expand Up @@ -195,6 +201,13 @@ $this->headTitle($title);
field: 'volstatus',
sortable: true,
},
{
field: 'inchanger',
sortable: true,
formatter: function(value) {
return formatInchanger(value);
}
},
{
field: 'retention',
sortable: true,
Expand Down
13 changes: 13 additions & 0 deletions webui/module/Pool/view/pool/pool/details.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ $this->headTitle($title);
data-filter-control-placeholder="<?php echo $this->translate("Status"); ?>">
<?php echo $this->translate("Status"); ?>
</th>
<th
data-field="inchanger"
data-filter-control="input"
data-filter-control-placeholder="<?php echo $this->translate("In changer"); ?>">
<?php echo $this->translate("In changer"); ?>
</th>
<th
data-field="retention"
data-filter-control="input"
Expand Down Expand Up @@ -265,6 +271,13 @@ $this->headTitle($title);
field: 'volstatus',
sortable: true,
},
{
field: 'inchanger',
sortable: true,
formatter: function(value) {
return formatInchanger(value);
}
},
{
field: 'retention',
sortable: true,
Expand Down
11 changes: 11 additions & 0 deletions webui/public/js/bootstrap-table-formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ function formatRecycle(data) {
return r;
}

function formatInchanger(data) {
var r;
if(data == 1) {
r = '<span class="label label-success">' + iJS._("Yes") + '</span>';
}
else {
r = '<span class="label label-default">' + iJS._("No") + '</span>';
}
return r;
}

function formatJobStatus(data) {
var output;
switch(data) {
Expand Down

0 comments on commit a099212

Please sign in to comment.