Skip to content

Commit

Permalink
Merge pull request #1745 from freenas/FIX-64728-stable
Browse files Browse the repository at this point in the history
FIX 64728 stable
  • Loading branch information
erincodepirate committed Jan 11, 2019
2 parents 9000989 + 8a01740 commit bd002eb
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -776,15 +776,16 @@ export class VolumesListComponent extends EntityTableComponent implements OnInit
volume.type = 'zpool';

try {
volume.availStr = (<any>window).filesize(volume.avail, { standard: "iec" });
volume.availStr = (<any>window).filesize(volume.children[0].avail, { standard: "iec" });
} catch (error) {
volume.availStr = "" + volume.avail;
volume.availStr = "" + volume.children[0].avail;
}

try {
volume.usedStr = (<any>window).filesize(volume.used, { standard: "iec" }) + " (" + volume.used_pct + ")";
let used_pct = volume.children[0].used / (volume.children[0].used + volume.children[0].avail);
volume.usedStr = (<any>window).filesize(volume.children[0].used, { standard: "iec" }) + " (" + Math.round(used_pct * 100) / 100 + "%)";
} catch (error) {
volume.usedStr = "" + volume.used;
volume.usedStr = "" + volume.children[0].used;
}
this.zfsPoolRows.push(volume);
});
Expand Down

0 comments on commit bd002eb

Please sign in to comment.