diff --git a/css/style.scss b/css/style.scss
index 9a91bfc6..add3d5e1 100644
--- a/css/style.scss
+++ b/css/style.scss
@@ -2,21 +2,12 @@
max-width: 100vw;
}
-.table-wrapper {
- overflow-x: auto;
-}
-
-.server-infos-table {
- margin-bottom: 25px;
-}
-
-.server-infos-table td:first-child {
- width: 120px;
-}
-
.monitoring-wrapper {
display: -webkit-flex;
display: flex;
+ position: left;
+ max-width: 50%;
+ min-width: 50%;
}
.monitoring-wrapper > input {
diff --git a/js/script.js b/js/script.js
index 519841b8..6fa41ea6 100644
--- a/js/script.js
+++ b/js/script.js
@@ -139,23 +139,31 @@
});
}
- $cpuFooterInfo.text(t('serverinfo', 'Load average') + ": " + cpu1 + " (" + t('serverinfo', 'Last minute') + ")");
+ $cpuFooterInfo.text(t('serverinfo', 'Load average: {cpu} (last minute)', { cpu: cpu1 }));
cpuLoadLine.append(new Date().getTime(), cpu1);
}
+
+ function isMemoryStat(memTotal, memFree) {
+ if (memTotal === 'N/A' || memFree === 'N/A') {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ function isSwapStat(swapTotal, swapFree) {
+ if (swapTotal === 'N/A' || swapFree === 'N/A') {
+ return false;
+ } else {
+ return true;
+ }
+ }
function updateMemoryStatistics(memTotal, memFree, swapTotal, swapFree) {
var $memFooterInfo = $('#memFooterInfo');
+ var $swapFooterInfo = $('#swapFooterInfo');
var $memoryCanvas = $('#memorycanvas');
- if (memTotal === 'N/A' || memFree === 'N/A') {
- $memFooterInfo.text(t('serverinfo', 'Memory info not available'));
- $memoryCanvas.addClass('hidden');
- return;
-
- } else if ($memoryCanvas.hasClass('hidden')) {
- $memoryCanvas.removeClass('hidden');
- }
-
var memTotalBytes = memTotal * 1024,
memUsageBytes = (memTotal - memFree) * 1024,
memTotalGB = memTotal / (1024 * 1024),
@@ -196,12 +204,24 @@
});
}
- $memFooterInfo
- .text("RAM: " + t('serverinfo', 'Total') + ": " + OC.Util.humanFileSize(memTotalBytes) + " - " + t('serverinfo', 'Current usage') + ": " + OC.Util.humanFileSize(memUsageBytes));
- memoryUsageLine.append(new Date().getTime(), memUsageGB);
- $('#swapFooterInfo')
- .text("SWAP: " + t('serverinfo', 'Total') + ": " + OC.Util.humanFileSize(swapTotalBytes) + " - " + t('serverinfo', 'Current usage') + ": " + OC.Util.humanFileSize(swapUsageBytes));
- swapUsageLine.append(new Date().getTime(), swapUsageGB);
+ if (isMemoryStat(memTotal, memFree)) {
+ $memFooterInfo.text(t('serverinfo','RAM: Total: {memTotalBytes}/Current usage: {memUsageBytes}', { memTotalBytes: OC.Util.humanFileSize(memTotalBytes), memUsageBytes: OC.Util.humanFileSize(memUsageBytes) }));
+ memoryUsageLine.append(new Date().getTime(), memUsageGB);
+
+ if ($memoryCanvas.hasClass('hidden')) {
+ $memoryCanvas.removeClass('hidden');
+ }
+ } else {
+ $memFooterInfo.text(t('serverinfo', 'RAM info not available'));
+ $memoryCanvas.addClass('hidden');
+ }
+
+ if (isSwapStat(swapTotal, swapFree)) {
+ $swapFooterInfo.text(t('serverinfo','SWAP: Total: {swapTotalBytes}/Current usage: {swapUsageBytes}', { swapTotalBytes: OC.Util.humanFileSize(swapTotalBytes), swapUsageBytes: OC.Util.humanFileSize(swapUsageBytes) }));
+ swapUsageLine.append(new Date().getTime(), swapUsageGB);
+ } else {
+ $swapFooterInfo.text(t('serverinfo', 'SWAP info not available'));
+ }
}
function updateShareStatistics() {
@@ -231,7 +251,7 @@
t('serverinfo', 'Users'),
t('serverinfo', 'Groups'),
t('serverinfo', 'Links'),
- t('serverinfo', 'Mails'),
+ t('serverinfo', 'Emails'),
t('serverinfo', 'Federated sent'),
t('serverinfo', 'Federated received'),
t('serverinfo', 'Talk conversations'),
diff --git a/templates/settings-admin.php b/templates/settings-admin.php
index 2067866b..1e1ed001 100644
--- a/templates/settings-admin.php
+++ b/templates/settings-admin.php
@@ -54,36 +54,26 @@ function FormatMegabytes(int $byte): string {
-
| t('Operating System')); ?>: | -- |
| t('CPU')); ?>: | -- |
| t('Memory')); ?>: | -getMemTotal())) ?> | -
| t('Server time')); ?>: | -- |
| t('Uptime')); ?>: | -- |
t('Operating System').':'); ?>
+t('CPU').':'); ?> + +
+ + t('Unknown Processor')) ?> + +t('Memory').':'); ?> + getMemTotal() > 0): ?> getMemTotal())) ?>
+ +t('Server time').':'); ?>
+t('Uptime').':'); ?>
+t('Files:')); ?>
-t('Storages:')); ?>
+t('Files').':'); ?>
+t('Storages').':'); ?>
-t('Free Space:')); ?>
+t('Free Space').':'); ?>
- t('Total users:')); ?> + t('Total users').':'); ?>
@@ -276,19 +266,19 @@ class="barchart"- t('Version:')); ?> + t('Version').':'); ?>
- t('Memory Limit:')); ?> + t('Memory limit').':'); ?>
- t('Max Execution Time:')); ?> + t('Max execution time').':'); ?>
- t('Upload max size:')); ?> + t('Upload max size').':'); ?>
- t('Type:')); ?> + t('Type').':'); ?>
- t('Version:')); ?> + t('Version').':'); ?>
- t('Size:')); ?> + t('Size').':'); ?>
- t('You can connect an external monitoring tool by using this end point:')); ?> + t('You can connect an external monitoring tool by using this end point').':'); ?>
- t('To use an access token please generate one then set it using the following command:')); ?> + t('To use an access token please generate one then set it using the following command').':'); ?>