summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/widgets
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-02-09 06:29:29 +0545
committerPhil Davis <phil.davis@inf.org>2016-02-09 06:29:29 +0545
commitd477dbb1e438aa7c58feeaf2cb360d8565918f88 (patch)
tree523bd828ef8027fff3c7ba9fa6e6ae5ed876c024 /src/usr/local/www/widgets
parent7b512ab3f7b64508c3015f69e47148e1eb6adcec (diff)
downloadpfsense-d477dbb1e438aa7c58feeaf2cb360d8565918f88.zip
pfsense-d477dbb1e438aa7c58feeaf2cb360d8565918f88.tar.gz
Use IEC MiB units on dashboard
1) physmem calculation is already in MiB 2) swapinfo -m actually reports in MiB - good 3) The code that gathers the disk space data already uses "df -h" which reports in IEC units, but the output just has the single char "M", "G" etc. We can always add "iB" here. As it happens all these numbers are already in powers of 1024 - it just needs the "iB" to be explicitly shown.
Diffstat (limited to 'src/usr/local/www/widgets')
-rw-r--r--src/usr/local/www/widgets/widgets/system_information.widget.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php
index d624e42..9bbaac1 100644
--- a/src/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/src/usr/local/www/widgets/widgets/system_information.widget.php
@@ -269,7 +269,7 @@ $filesystems = get_mounted_filesystems();
<div id="memUsagePB" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?=$memUsage?>" aria-valuemin="0" aria-valuemax="100" style="width: <?=$memUsage?>%">
</div>
</div>
- <span id="memusagemeter"><?=$memUsage?></span><span>% of <?= sprintf("%.0f", get_single_sysctl('hw.physmem') / (1024*1024)) ?> MB</span>
+ <span id="memusagemeter"><?=$memUsage?></span><span>% of <?= sprintf("%.0f", get_single_sysctl('hw.physmem') / (1024*1024)) ?> MiB</span>
</td>
</tr>
<?php if ($showswap == true): ?>
@@ -281,7 +281,7 @@ $filesystems = get_mounted_filesystems();
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?=$swapusage?>" aria-valuemin="0" aria-valuemax="100" style="width: <?=$swapusage?>%">
</div>
</div>
- <span><?=$swapusage?>% of <?= sprintf("%.0f", `/usr/sbin/swapinfo -m | /usr/bin/grep -v Device | /usr/bin/awk '{ print $2;}'`) ?> MB</span>
+ <span><?=$swapusage?>% of <?= sprintf("%.0f", `/usr/sbin/swapinfo -m | /usr/bin/grep -v Device | /usr/bin/awk '{ print $2;}'`) ?> MiB</span>
</td>
</tr>
<?php endif; ?>
@@ -293,7 +293,7 @@ $filesystems = get_mounted_filesystems();
<tr>
<th><?=$fs['mountpoint']?></th>
<td><?=$fs['type'] . ("md" == substr(basename($fs['device']), 0, 2) ? " " . gettext("in RAM") : "")?></td>
- <td><?=$fs['total_size']?></td>
+ <td><?=$fs['total_size']?>iB</td>
<td>
<span><?=$fs['percent_used']?>%</span>
</td>
OpenPOWER on IntegriCloud