mirror of
https://github.com/Karaka-Management/oms-Monitoring.git
synced 2026-01-26 07:18:41 +00:00
Admin tpl flexbox implementation
This commit is contained in:
parent
b4e1fcdb27
commit
fb371e61a6
|
|
@ -18,48 +18,56 @@ $penetrators = $this->app->logger->getHighestPerpetrator();
|
|||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-33 floatLeft">
|
||||
<header><h1><?= $this->getText('System') ?></h1></header>
|
||||
<div class="inner">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<tr><td><?= $this->getText('OS') ?><td><?= php_uname('s'); ?>
|
||||
<tr><td><?= $this->getText('Version') ?><td><?= php_uname('v'); ?>
|
||||
<tr><td><?= $this->getText('Release') ?><td><?= php_uname('r'); ?>
|
||||
<tr><td><?= $this->getText('RAMUsage') ?><td><?= memory_get_usage(true)/(1024*1024); ?> MB
|
||||
<tr><td><?= $this->getText('MemoryLimit') ?><td><?= ini_get('memory_limit'); ?>
|
||||
<tr><td><?= $this->getText('SystemRAM') ?><td><?= \phpOMS\System\SystemUtils::getRAM()/(1024); ?> MB
|
||||
<tr><td><?= $this->getText('CPUUsage') ?><td><?= \phpOMS\System\SystemUtils::getCpuUsage(); ?>%
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getText('System') ?></h1></header>
|
||||
<div class="inner">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<tr><td><?= $this->getText('OS') ?><td><?= php_uname('s'); ?>
|
||||
<tr><td><?= $this->getText('Version') ?><td><?= php_uname('v'); ?>
|
||||
<tr><td><?= $this->getText('Release') ?><td><?= php_uname('r'); ?>
|
||||
<tr><td><?= $this->getText('RAMUsage') ?><td><?= memory_get_usage(true)/(1024*1024); ?> MB
|
||||
<tr><td><?= $this->getText('MemoryLimit') ?><td><?= ini_get('memory_limit'); ?>
|
||||
<tr><td><?= $this->getText('SystemRAM') ?><td><?= \phpOMS\System\SystemUtils::getRAM()/(1024); ?> MB
|
||||
<tr><td><?= $this->getText('CPUUsage') ?><td><?= \phpOMS\System\SystemUtils::getCpuUsage(); ?>%
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="box w-33 floatLeft">
|
||||
<header><h1><?= $this->getText('Logs') ?></h1></header>
|
||||
<div class="inner">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<tr><td><?= $this->getText('Emergencies') ?><td><?= $logs['emergency'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Criticals') ?><td><?= $logs['critical'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Errors') ?><td><?= $logs['error'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Warnings') ?><td><?= $logs['warning'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Alerts') ?><td><?= $logs['alert'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Notices') ?><td><?= $logs['notice'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Info') ?><td><?= $logs['info'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Debug') ?><td><?= $logs['debug'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Total') ?><td><?= array_sum($logs); ?>
|
||||
</table>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getText('Logs') ?></h1></header>
|
||||
<div class="inner">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<tr><td><?= $this->getText('Emergencies') ?><td><?= $logs['emergency'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Criticals') ?><td><?= $logs['critical'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Errors') ?><td><?= $logs['error'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Warnings') ?><td><?= $logs['warning'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Alerts') ?><td><?= $logs['alert'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Notices') ?><td><?= $logs['notice'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Info') ?><td><?= $logs['info'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Debug') ?><td><?= $logs['debug'] ?? 0; ?>
|
||||
<tr><td><?= $this->getText('Total') ?><td><?= array_sum($logs); ?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="box w-33 floatLeft">
|
||||
<header><h1><?= $this->getText('Penetrators') ?></h1></header>
|
||||
<div class="inner">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<?php foreach($penetrators as $ip => $count) : ?>
|
||||
<tr><td><?= $ip; ?><td><?= $count; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getText('Penetrators') ?></h1></header>
|
||||
<div class="inner">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<?php foreach($penetrators as $ip => $count) : ?>
|
||||
<tr><td><?= $ip; ?><td><?= $count; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
@ -28,30 +28,32 @@ $logs = array_reverse($this->app->logger->get(25), true);
|
|||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<div class="box w-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->getText('Logs'); ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getText('Timestamp'); ?>
|
||||
<td><?= $this->getText('Level'); ?>
|
||||
<td><?= $this->getText('Source'); ?>
|
||||
<td class="wf-100"><?= $this->getText('Message'); ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
<?php foreach ($logs as $key => $value) :
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/monitoring/logs/single?id=' . $key);?>
|
||||
<tr>
|
||||
<td><a href=<?= $url; ?>><i class="fa fa-clock-o"></i> <?= $value[0] ?? ''; ?></a>
|
||||
<td><a href=<?= $url; ?>><i class="fa fa-<?= in_array($value[1], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'; ?>"></i> <?= $value[1] ?? ''; ?></a>
|
||||
<td><a href=<?= $url; ?>><i class="fa fa-wifi"></i> <?= $value[2] ?? ''; ?></a>
|
||||
<td><a href=<?= $url; ?>><i class="fa fa-commenting"></i> <?= $value[7] ?? ''; ?></a>
|
||||
<?php endforeach;
|
||||
if (!isset($key)) : ?>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="box col-xs-12 wf-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->getText('Logs'); ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getText('Timestamp'); ?>
|
||||
<td><?= $this->getText('Level'); ?>
|
||||
<td><?= $this->getText('Source'); ?>
|
||||
<td class="wf-100"><?= $this->getText('Message'); ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
<?php foreach ($logs as $key => $value) :
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/monitoring/logs/single?id=' . $key);?>
|
||||
<tr>
|
||||
<td><a href=<?= $url; ?>><i class="fa fa-clock-o"></i> <?= $value[0] ?? ''; ?></a>
|
||||
<td><a href=<?= $url; ?>><i class="fa fa-<?= in_array($value[1], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'; ?>"></i> <?= $value[1] ?? ''; ?></a>
|
||||
<td><a href=<?= $url; ?>><i class="fa fa-wifi"></i> <?= $value[2] ?? ''; ?></a>
|
||||
<td><a href=<?= $url; ?>><i class="fa fa-commenting"></i> <?= $value[7] ?? ''; ?></a>
|
||||
<?php endforeach;
|
||||
if (!isset($key)) : ?>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user