Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI: show storage space in XiB (binary - 1024) to follow DVR config
  • Loading branch information
perexg committed Dec 3, 2015
1 parent 18a4a8c commit 7040074
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/webui/static/app/tvheadend.js
Expand Up @@ -716,12 +716,12 @@ tvheadend.RootTabPanel = Ext.extend(Ext.TabPanel, {
setDiskSpace: function(bfree, btotal) {
if (!('storage' in this.extra)) return;
human = function(val) {
if (val > 1000000000)
val = parseInt(val / 1000000000) + _('GB');
if (val > 1000000)
val = parseInt(val / 1000000) + _('MB');
if (val > 1000)
val = parseInt(val / 1000) + _('KB');
if (val > 1073741824)
val = parseInt(val / 1073741824) + _('GiB');
if (val > 1048576)
val = parseInt(val / 1048576) + _('MiB');
if (val > 1024)
val = parseInt(val / 1024) + _('KiB');
return val;
};
text = _('Storage space') + ':&nbsp;<b>' + human(bfree) + '/' + human(btotal) + '</b>';
Expand Down

0 comments on commit 7040074

Please sign in to comment.