Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,18 @@
});
}

$cpuFooterInfo.text(t('serverinfo', 'Load average') + ": " + cpu1 + " (" + t('serverinfo', 'Last minute') + ")");
$cpuFooterInfo.text(t('serverinfo', 'Load average') + ": " + cpu1 + " (" + t('serverinfo', 'last minute') + ")");
cpuLoadLine.append(new Date().getTime(), cpu1);
}

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'));
$swapFooterInfo.text(t('serverinfo', 'Memory info not available'));
$memoryCanvas.addClass('hidden');
return;

Expand Down
54 changes: 22 additions & 32 deletions templates/settings-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,26 @@ function FormatMegabytes(int $byte): string {
<img class="infoicon" src="<?php p(image_path('core', 'actions/screen.svg')); ?>">
<?php p($_['hostname']); ?>
</h2>
<div class="table-wrapper">
<table class="server-infos-table">
<thead>
</thead>
<tbody>
<tr>
<td><?php p($l->t('Operating System')); ?>:</td>
<td><?php p($_['osname']); ?></td>
</tr>
<tr>
<td><?php p($l->t('CPU')); ?>:</td>
<td><?php p($_['cpu']) ?></td>
</tr>
<tr>
<td><?php p($l->t('Memory')); ?>:</td>
<td><?php p(FormatMegabytes($memory->getMemTotal())) ?></td>
</tr>
<tr>
<td><?php p($l->t('Server time')); ?>:</td>
<td><span class="info" id="servertime"></span></td>
</tr>
<tr>
<td><?php p($l->t('Uptime')); ?>:</td>
<td><span class="info" id="uptime"></span></td>
</tr>
</tbody>
</table>
</div>
</div>

<div class="col col-12">
<p><?php p($l->t('Operating System:')); ?> <strong id="numFilesStorage"><?php p($_['osname']); ?></strong></p>
<p><?php p($l->t('CPU:')); ?>
<?php if ($_['cpu'] !== 'Unknown Processor'): ?>
<strong id="numFilesStorage"><?php p($_['cpu']) ?></strong></p>
<?php else: ?>
<strong id="numFilesStorage"><?php p($l->t('Unknown Processor')) ?></strong></p>
<?php endif; ?>
<p><?php p($l->t('Memory:')); ?>
<?php if ($memory->getMemTotal() > 0): ?> <strong id="numFilesStorage"><?php p(FormatMegabytes($memory->getMemTotal())) ?></strong></p>
<?php endif; ?>
<p><?php p($l->t('Server time:')); ?> <strong id="numFilesStorage"><span class="info" id="servertime"></span></strong></p>
<p><?php p($l->t('Uptime:')); ?> <strong id="numFilesStorage"><span class="info" id="uptime"></span></strong></p>
</div>
</div>
</div>

<div class="section server-infos-two">
<div class="row">
<div class="col col-6 col-l-12">
<h2>
<img class="infoicon" src="<?php p(image_path('core', 'actions/screen.svg')); ?>">
Expand Down Expand Up @@ -280,11 +270,11 @@ class="barchart"
<em id="phpVersion"><?php p($_['php']['version']); ?></em>
</p>
<p>
<?php p($l->t('Memory Limit:')); ?>
<?php p($l->t('Memory limit:')); ?>
<em id="phpMemLimit"><?php p($_['php']['memory_limit']); ?></em>
</p>
<p>
<?php p($l->t('Max Execution Time:')); ?>
<?php p($l->t('Max execution time:')); ?>
<em id="phpMaxExecTime"><?php p($_['php']['max_execution_time']); ?></em>
</p>
<p>
Expand Down Expand Up @@ -324,7 +314,7 @@ class="barchart"
<!-- EXTERNAL MONITORING-->
<div class="section monitoring">
<div class="row">
<div class="col col-6 col-m-12">
<div class="col col-m-12">
<!-- OCS ENDPOINT -->
<h2><?php p($l->t('External monitoring tool')); ?></h2>
<p>
Expand Down