mirror of
https://github.com/Karaka-Management/oms-Monitoring.git
synced 2026-01-26 23:38:41 +00:00
Implement test for file inspection
This commit is contained in:
parent
4d68e7a615
commit
45a6627e6a
|
|
@ -19,22 +19,30 @@ return ['Monitoring' => [
|
|||
'CreatedBy' => 'Created By',
|
||||
'Criticals' => 'Criticals',
|
||||
'Debug' => 'Debug',
|
||||
'Deprecated' => 'Deprecated',
|
||||
'Description' => 'Description',
|
||||
'DisabledFunctions' => 'Disabled Functions',
|
||||
'DiskUsage' => 'DiskUsage',
|
||||
'Emergencies' => 'Emergencies',
|
||||
'Errors' => 'Errors',
|
||||
'Exception' => 'Exception',
|
||||
'File' => 'File',
|
||||
'Info' => 'Info',
|
||||
'Inspect' => 'Inspect',
|
||||
'Inspection' => 'Inspection',
|
||||
'Integrity' => 'Integrity',
|
||||
'Level' => 'Level',
|
||||
'Line' => 'Line',
|
||||
'Logs' => 'Logs',
|
||||
'MemoryLimit' => 'Memory Limit',
|
||||
'Message' => 'Message',
|
||||
'Modified' => 'Modified',
|
||||
'NG' => 'NG',
|
||||
'Notices' => 'Notices',
|
||||
'Status' => 'Status',
|
||||
'System' => 'System',
|
||||
'Total' => 'Total',
|
||||
'OK' => 'OK',
|
||||
'OS' => 'OS',
|
||||
'Penetrators' => 'Penetrators',
|
||||
'PHPSettings' => 'PHP Settings',
|
||||
|
|
@ -46,6 +54,7 @@ return ['Monitoring' => [
|
|||
'Theme' => 'Theme',
|
||||
'Time' => 'Time',
|
||||
'Timestamp' => 'Timestamp',
|
||||
'Unicode' => 'Unicode',
|
||||
'Uri' => 'Uri',
|
||||
'Version' => 'Version',
|
||||
'Warnings' => 'Warnings',
|
||||
|
|
|
|||
|
|
@ -10,6 +10,13 @@
|
|||
* @version 1.0.0
|
||||
* @link http://website.orange-management.de
|
||||
*/
|
||||
|
||||
use phpOMS\Security\PhpCode;
|
||||
use phpOMS\System\File\Local\Directory;
|
||||
use phpOMS\System\File\Local\File;
|
||||
|
||||
$files = Directory::listByExtension(__DIR__ . '/../../../../phpOMS/', 'php');
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<div class="row">
|
||||
|
|
@ -19,9 +26,38 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="inner">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<tr><td><?= $this->getHtml('DeprecatedFunctions'); ?><td><?= \phpOMS\Security\PhpCode::isDisabled(\phpOMS\Security\PhpCode::$disabledFunctions); ?>
|
||||
<tr><td><?= $this->getHtml('DisabledFunctions'); ?><td><?= PhpCode::isDisabled(PhpCode::$disabledFunctions) ? $this->getHtml('OK') : $this->getHtml('NG'); ?>
|
||||
<tr><td><button><?= $this->getHtml('Inspect'); ?></button>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box wf-100">
|
||||
<table class="table red">
|
||||
<caption><?= $this->getHtml('Inspection') ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Status') ?>
|
||||
<td class="wf-100"><?= $this->getHtml('File') ?>
|
||||
<td><?= $this->getHtml('Unicode') ?>
|
||||
<td><?= $this->getHtml('Deprecated') ?>
|
||||
<td><?= $this->getHtml('Modified') ?>
|
||||
<td><?= $this->getHtml('Integrity') ?>
|
||||
<tbody>
|
||||
<?php foreach ($files as $file) : $content = file_get_contents(__DIR__ . '/../../../../phpOMS/' . $file); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= $file; ?>
|
||||
<td><?= PhpCode::hasUnicode($content) ? $this->getHtml('NG') : $this->getHtml('OK'); ?>
|
||||
<td><?= PhpCode::hasDeprecatedFunction($content) ? $this->getHtml('NG') : $this->getHtml('OK'); ?>
|
||||
<td><?= File::changed(__DIR__ . '/../../../../phpOMS/' . $file)->format('Y-m-d'); ?>
|
||||
<td>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user