mirror of
https://github.com/unraid/webgui.git
synced 2026-01-20 08:30:14 -06:00
Merge pull request #284 from bergware/6.4-wip
Corrected memory display on Dashboard page
This commit is contained in:
@@ -31,5 +31,5 @@ $(getUPSstatus);
|
||||
|
||||
<table class="tablesorter shift">
|
||||
<thead><tr><th style="width:15%">Key</th><th style="width:35%">Value</th><th style="width:15%">Key</th><th style="width:35%">Value</th></tr></thead>
|
||||
<tbody id="ups_status"><tr><td colspan="4" style="text-align:center"><i class="fa fa-spinner fa-spin icon"></i><em>Please wait, retrieving UPS information...</em></td></tr></tbody>
|
||||
<tbody id="ups_status"><tr><td colspan="4" style="text-align:center;padding:24px"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
@@ -41,7 +41,7 @@ th.three{width:3%}
|
||||
<span class="status" style="margin-top:-44px"><span><input type="checkbox" class="advancedview"></span></span>
|
||||
<table class="tablesorter shift" id="docker_containers">
|
||||
<thead><tr><th></th><th>Application</th><th>Version</th><th>Network</th><th>Port Mappings <small>(App to Host)</small></th><th>Volume Mappings <small>(App to Host)</small></th><th width="80px" style="text-align:center">Autostart</th><th class="three">Log</th></tr></thead>
|
||||
<tbody id="docker_list"><tr><td colspan='8' style='text-align:center;padding-top:12px'><i class='fa fa-spinner fa-spin icon'></i>Please wait... retrieving container information</td></tr></tbody>
|
||||
<tbody id="docker_list"><tr><td colspan='8' style='text-align:center;padding:24px'><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" onclick="addContainer()" value="Add Container" style="display:none">
|
||||
<input type="button" onclick="startAll()" value="Start all Containers" style="display:none">
|
||||
|
||||
@@ -71,5 +71,5 @@ $(function() {
|
||||
</script>
|
||||
<table class='tablesorter plugins shift' id='plugin_table'>
|
||||
<thead><tr><th></th><th>Plugin</th><th>Author</th><th>Version</th><th>Status</th><th>Uninstall</th></tr></thead>
|
||||
<tbody id="plugin_list"><tr><td colspan='6' style='text-align:center;padding-top:12px'><i class='fa fa-spinner fa-spin icon'></i><em>Please wait, retrieving and updating plugin information ...</em></td><tr></tbody>
|
||||
<tbody id="plugin_list"><tr><td colspan='6' style='text-align:center;padding:24px'><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td><tr></tbody>
|
||||
</table>
|
||||
|
||||
@@ -15,7 +15,7 @@ Tag="thumbs-up"
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$empty = "<tr><td colspan='6' style='text-align:center;padding-top:12px'><i class='fa fa-spinner fa-spin icon'></i><em>Please wait, retrieving and updating system information ...</em></td><tr>";
|
||||
$empty = "<tr><td colspan='6' style='text-align:center;padding:24px'><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td><tr>";
|
||||
$version = $date = 'unknown';
|
||||
|
||||
if (file_exists('/boot/previous/changes.txt')) {
|
||||
|
||||
@@ -112,7 +112,7 @@ th.five{width:5%}
|
||||
</style>
|
||||
<table class="tablesorter shift kvm" id="kvm_table">
|
||||
<thead><tr><th><i class="fa fa-th-list"></i></th><th>Name</th><th>Description</th><th>CPUs</th><th>Memory</th><th>vDisks</th><th>Graphics</th><th class="five">Autostart</th><th class="five"><i class="fa fa-sort"></i></th></tr></thead>
|
||||
<tbody id="kvm_list"><tr><td colspan='9' style='text-align:center;padding-top:12px'><i class='fa fa-spinner fa-spin icon'></i>Please wait... retrieving VM information</td></tr></tbody>
|
||||
<tbody id="kvm_list"><tr><td colspan='9' style='text-align:center;padding:24px'><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" onclick="addVM()" id="btnAddVM" value="Add VM" style="display:none">
|
||||
<input type="button" onclick="startAll()" value="Start all VMs" style="display:none">
|
||||
|
||||
@@ -33,6 +33,6 @@ $(function(){
|
||||
</script>
|
||||
<table class="indexer tablesorter">
|
||||
<thead><tr><th>Type</th><th class='sorter-text'>Name</th><th>Size</th><th>Last Modified</th><th>Location</th></tr></thead>
|
||||
<tbody><tr><td colspan="5" style="text-align:center;padding-top:12px"><i class='fa fa-spinner fa-spin icon'></i><em>Please wait, loading information ...</em></td></tr></tbody>
|
||||
<tbody><tr><td colspan="5" style="text-align:center;padding:24px"><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done('Browse')">
|
||||
|
||||
@@ -29,8 +29,14 @@ foreach ($shares as $share) {
|
||||
$total = exec("awk '/^MemTotal/{print $2*1024/1.048576}' /proc/meminfo");
|
||||
exec("ls /sys/class/net|grep -Po '^(lo|(bond|eth)\d+)$'",$ports);
|
||||
|
||||
$memory_installed = exec("dmidecode -t 17 | awk -F: '/^\tSize: [0-9]+ MB$/{t+=$2} /^\tSize: [0-9]+ GB$/{t+=$2*1024} END{print t}'")/1024;
|
||||
$memory_maximum = exec("dmidecode -t 16 | awk -F: '/^\tMaximum Capacity: [0-9]+ GB$/{t+=$2} END{print t}'");
|
||||
$memory_installed = exec("dmidecode -qt17|awk -F: '/^\tSize: [0-9]+ MB\$/{t+=\$2};/^\tSize: [0-9]+ GB\$/{t+=\$2*1024};/^\tSize: [0-9]+ TB\$/{t+=\$2*1048576} END{print t}'");
|
||||
list($memory_maximum,$ecc_support) = array_map('trim',explode('#',exec("dmidecode -qt16|awk -F: '/^\tMaximum Capacity: [0-9]+ GB\$/{t+=\$2*1024};/^\tMaximum Capacity: [0-9]+ TB\$/{t+=\$2*1048576};/^\tError Correction Type:/{e=\$2} END{print t\"#\"e}'")));
|
||||
if ($memory_installed >= 1024) {
|
||||
$memory_installed = round($memory_installed/1024);
|
||||
$memory_maximum = round($memory_maximum/1024);
|
||||
$unit = 'GB';
|
||||
} else $unit = 'MB';
|
||||
|
||||
// If maximum < installed then roundup maximum to the next power of 2 size of installed. E.g. 6 -> 8 or 12 -> 16
|
||||
if ($memory_maximum < $memory_installed) $memory_maximum = pow(2,ceil(log($memory_installed)/log(2)));
|
||||
|
||||
@@ -229,7 +235,7 @@ $dck = exec("df /var/lib/docker|grep -om1 '^/'");
|
||||
<tr class='wide'><td>flash log docker</td><td><div class='usage-disk sys'><span id='sys1' style='width:0'></span></div></td><td><div class='usage-disk sys'><span id='sys2' style='width:0'></span></div></td>
|
||||
<td><?if ($dck):?><div class='usage-disk sys'><span id='sys3' style='width:0'></span></div><?else:?>Not available<?endif;?></td></tr>
|
||||
<tr><td rowspan='2'>Memory size</td><td>allocated</td><td colspan='2' class='blue'><?=my_scale($total,$unit,3)." $unit"?></td></tr>
|
||||
<tr><td>installed</td><td colspan='2' class='blue'><?="$memory_installed GB (max. capacity $memory_maximum GB)"?></td></tr>
|
||||
<tr><td>installed</td><td colspan='2' class='blue'><?="$memory_installed $unit ".($ecc_support=='None'?'':$ecc_support)."<br>max. installable capacity $memory_maximum $unit"?></td></tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<?if (count($ports)>1):?><tr class='view1'><td rowspan='<?=count($ports)?>'><?else:?><tr class='view1 wide'><td><?endif;?>Network</td>
|
||||
|
||||
@@ -24,7 +24,7 @@ $(function() {
|
||||
</script>
|
||||
<table class='share_status small'>
|
||||
<thead><td style="width:40px">#</td><td>Attribute Name</td><td>Flag</td><td>Value</td><td>Worst</td><td>Threshold</td><td>Type</td><td>Updated</td><td>Failed</td><td style="width:145px">Raw Value</td></thead>
|
||||
<tbody id="disk_attributes"><tr><td colspan='10' style='text-align:center;padding-top:12px'><i class='fa fa-spinner fa-spin'></i> <em>Please wait... retrieving S.M.A.R.T. information!</em></td></tr></tbody>
|
||||
<tbody id="disk_attributes"><tr><td colspan='10' style='text-align:center;padding:24px'><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ $(function() {
|
||||
</script>
|
||||
<table class='share_status small'>
|
||||
<thead><td style="width:33%">Feature</td><td>Value</td><td>Information</td></thead>
|
||||
<tbody id="disk_capabilities"><tr><td colspan='3' style='text-align:center;padding-top:12px'><i class='fa fa-spinner fa-spin'></i> <em>Please wait... retrieving S.M.A.R.T. information!</em></td></tr></tbody>
|
||||
<tbody id="disk_capabilities"><tr><td colspan='3' style='text-align:center;padding:24px'><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ $(function() {
|
||||
|
||||
<table class='share_status small'>
|
||||
<thead><td style="width:33%">Title</td><td>Information</td></thead>
|
||||
<tbody id="disk_identify"><tr><td colspan='2' style='text-align:center;padding-top:12px'><i class='fa fa-spinner fa-spin'></i> <em>Please wait... retrieving S.M.A.R.T. information!</em></td></tr></tbody>
|
||||
<tbody id="disk_identify"><tr><td colspan='2' style='text-align:center;padding:24px'><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Cond="$var['fsState']!='Stopped' && $var['shareDisk']!='no'"
|
||||
function displayDisks(all) {
|
||||
if (all == 'yes') {
|
||||
$.cookie('ssz','ssz',{path:'/'});
|
||||
$('#disk_list').html("<tr><td colspan='8' style='text-align:center'><i class='fa fa-spinner fa-spin icon'></i>Please wait... computing disk shares!</td></tr>");
|
||||
$('#disk_list').html("<tr><td colspan='8' style='text-align:center;padding:24px'><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr>");
|
||||
}
|
||||
$.get('/webGui/include/DiskList.php',{compute:all,path:'<?=$path?>',scale:'<?=$display['scale']?>',number:'<?=$display['number']?>',fill:$.cookie('ssz')},function(data){
|
||||
$.removeCookie('ssz',{path:'/'})
|
||||
|
||||
@@ -81,6 +81,6 @@ $(function(){
|
||||
</script>
|
||||
<table class="tablesorter left shift" id="archive_table">
|
||||
<thead><tr><th>Time</th><th>Event</th><th>Subject</th><th>Description</th><th>Importance</th><th><?if ($files):?><a href="#" onclick="askConfirmation();return false" title="Delete all notifications"><i class="fa fa-trash"></i></a><?endif;?></th></tr></thead>
|
||||
<tbody id="archive_list"><tr><td></td><td colspan="4" style="text-align:center;padding-top:12px"><i class='fa fa-spinner fa-spin icon'></i><em>Please wait, loading information ...</em></td><td></td></tr></tbody>
|
||||
<tbody id="archive_list"><tr><td></td><td colspan="4" style="text-align:center;padding:24px"><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td><td></td></tr></tbody>
|
||||
</table>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
|
||||
@@ -52,7 +52,7 @@ $tasks = find_tasks();
|
||||
<script>
|
||||
function provisionSSL(button) {
|
||||
var oldlabel = $.trim($(button).text());
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i> "+oldlabel+"ing");
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-circle-o-notch fa-spin\" aria-hidden=\"true\"></i> "+oldlabel+"ing");
|
||||
var msg = "Your Let's Encrypt SSL Certificate has been provisioned and a DNS record for local IP address <?=$internalip?> has been created on unraid.net.";
|
||||
var failure = function(data) {
|
||||
var status = data.status;
|
||||
@@ -86,7 +86,7 @@ function provisionSSL(button) {
|
||||
$.post("/webGui/include/ProvisionCert.php",success_provision).fail(failure);
|
||||
}
|
||||
function updateDNS(button) {
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i> Updating DNS");
|
||||
$(button).prop("disabled", true).html("<i class=\"fa fa-circle-o-notch fa-spin\" aria-hidden=\"true\"></i> Updating DNS");
|
||||
var failure = function(data) {
|
||||
var status = data.status;
|
||||
var obj = data.responseJSON;
|
||||
|
||||
@@ -72,7 +72,7 @@ SMART extended self-test:
|
||||
> This feature is only available when the disk is in active mode.
|
||||
|
||||
Last SMART test result:
|
||||
: <span id="test_result"><i class='fa fa-spinner fa-spin'></i> <em>Please wait... retrieving S.M.A.R.T. information!</em></span>
|
||||
: <span id="test_result"><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></span>
|
||||
|
||||
> When no test is running it will show here the latest obtained self-test result (if available).
|
||||
> Otherwise a progress indicator (percentage value) is shown for a running test.
|
||||
|
||||
@@ -19,7 +19,7 @@ Cond="$var['fsState']!='Stopped' && $var['shareUser']=='e'"
|
||||
function displayShares(all) {
|
||||
if (all == 'yes') {
|
||||
$.cookie('ssz','ssz',{path:'/'});
|
||||
$('#share_list').html("<tr><td colspan='8' style='text-align:center'><i class='fa fa-spinner fa-spin icon'></i>Please wait... computing user shares!</td></tr>");
|
||||
$('#share_list').html("<tr><td colspan='8' style='text-align:center;padding:24px'><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr>");
|
||||
}
|
||||
$.get('/webGui/include/ShareList.php',{compute:all,path:'<?=addslashes(htmlspecialchars($path))?>',scale:'<?=$display['scale']?>',number:'<?=$display['number']?>',fill:$.cookie('ssz')},function(data){
|
||||
$.removeCookie('ssz',{path:'/'})
|
||||
|
||||
@@ -37,19 +37,19 @@ $(function(){
|
||||
<p class="notice">Warning: Your system has booted with the PCIe ACS Override setting enabled. The below list doesn't not reflect the way IOMMU would naturally group devices. To see natural IOMMU groups for your hardware, go to the <b><a href="/Settings/VMSettings">VM Settings</a></b> page and set the <b>PCIe ACS Override</b> setting to <b>No</b>.</p>
|
||||
<?endif;?>
|
||||
|
||||
<pre><table id='t1' class='pre'><tr><td><i class='fa fa-spinner fa-spin'></i> Please wait... retrieving information!</td></tr></table></pre><br>
|
||||
<pre><table id='t1' class='pre'><tr><td><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></table></pre><br>
|
||||
|
||||
**CPU Thread Pairings**
|
||||
|
||||
> This displays a list of CPU thread pairings.
|
||||
|
||||
<pre><table id='t2' class='pre'><tr><td><i class='fa fa-spinner fa-spin'></i> Please wait... retrieving information!</td></tr></table></pre><br>
|
||||
<pre><table id='t2' class='pre'><tr><td><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></table></pre><br>
|
||||
|
||||
**USB Devices**
|
||||
|
||||
> This displays the output of the `lsusb` command. The numeric identifiers are used to configure PCI pass-through.
|
||||
|
||||
<pre><table id='t3' class='pre'><tr><td><i class='fa fa-spinner fa-spin'></i> Please wait... retrieving information!</td></tr></table></pre><br>
|
||||
<pre><table id='t3' class='pre'><tr><td><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></table></pre><br>
|
||||
|
||||
**SCSI Devices**
|
||||
|
||||
@@ -57,5 +57,5 @@ $(function(){
|
||||
>
|
||||
> Note that linux groups ATA, SATA and SAS devices with true SCSI devices.
|
||||
|
||||
<pre><table id='t4' class='pre'><tr><td><i class='fa fa-spinner fa-spin'></i> Please wait... retrieving information!</td></tr></table></pre>
|
||||
<pre><table id='t4' class='pre'><tr><td><i class='fa fa-circle-o-notch fa-spin fa-3x fa-fw'></i></td></tr></table></pre>
|
||||
<input type="button" value="Done" onclick="done()">
|
||||
|
||||
@@ -32,9 +32,9 @@ if (pgrep('dockerd')!==false && ($display=='icons' || $display=='docker')) {
|
||||
$id = $ct['Id'];
|
||||
$imageID = $ct['ImageId'];
|
||||
$is_autostart = $info['autostart'] ? 'true':'false';
|
||||
$updateStatus = $info['updated']=='true'||$info[$name]['updated']=='undef' ? 'true':'false';
|
||||
$updateStatus = $info['updated']=='true'||$info['updated']=='undef' ? 'true':'false';
|
||||
$running = $ct['Running'] ? 'true':'false';
|
||||
$template = $info[$name]['template'];
|
||||
$template = $info['template'];
|
||||
$webGui = html_entity_decode($info['url']);
|
||||
$support = html_entity_decode($info['Support']);
|
||||
$project = html_entity_decode($info['Project']);
|
||||
|
||||
Reference in New Issue
Block a user