mirror of
https://github.com/Karaka-Management/oms-Monitoring.git
synced 2026-01-23 13:58:41 +00:00
Prepare file security template
This commit is contained in:
parent
11e498d39e
commit
60143b8835
|
|
@ -21,4 +21,16 @@ return [
|
|||
'verb' => RouteVerb::GET,
|
||||
],
|
||||
],
|
||||
'^.*/backend/admin/monitoring/security/dashboard.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Monitoring\Controller:viewMonitoringSecurityDashboard',
|
||||
'verb' => RouteVerb::GET,
|
||||
],
|
||||
],
|
||||
'^.*/backend/admin/monitoring/security/file/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Monitoring\Controller:viewMonitoringSecurityFileList',
|
||||
'verb' => RouteVerb::GET,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -139,4 +139,23 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param mixed $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function viewMonitoringSecurityDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
|
||||
{
|
||||
$view = new View($this->app, $request, $response);
|
||||
$view->setTemplate('/Modules/Monitoring/Theme/Backend/monitoring-security');
|
||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000706001, $request, $response));
|
||||
|
||||
return $view;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,4 +14,5 @@ return ['Navigation' => [
|
|||
'List' => 'List',
|
||||
'Logs' => 'Logs',
|
||||
'Monitoring' => 'Monitoring',
|
||||
'Security' => 'Security',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ return ['Monitoring' => [
|
|||
'Total' => 'Total',
|
||||
'OS' => 'OS',
|
||||
'Penetrators' => 'Penetrators',
|
||||
'PHPSettings' => 'PHP Settings',
|
||||
'RAMUsage' => 'RAM Usage',
|
||||
'Release' => 'Release',
|
||||
'Report' => 'Report',
|
||||
|
|
|
|||
|
|
@ -13,14 +13,6 @@
|
|||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response);
|
||||
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
||||
|
||||
$footerView->setPages(0 / 25);
|
||||
$footerView->setPage(1);
|
||||
$footerView->setResults(0);
|
||||
|
||||
$logs = array_reverse($this->app->logger->get(25), true);
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
|
|
|||
41
Theme/Backend/monitoring-security-file-list.tpl.php
Normal file
41
Theme/Backend/monitoring-security-file-list.tpl.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.2
|
||||
*
|
||||
* @package TBD
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://website.orange-management.de
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
$files = \phpOMS\System\File\Local\Directory(__DIR__ . '/../../../../phpOMS', '^.+\.php$');
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="box col-xs-12 wf-100">
|
||||
<table class="table red">
|
||||
<caption><?= $this->getHtml('Files') ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="wf-100"><?= $this->getHtml('File') ?>
|
||||
<td><?= $this->getHtml('Unicode') ?>
|
||||
<td><?= $this->getHtml('Deprecated') ?>
|
||||
<td><?= $this->getHtml('Integrity') ?>
|
||||
<tbody>
|
||||
<?php foreach ($files as $key => $file) : $source = file_get_contents($file); ?>
|
||||
<tr>
|
||||
<td><?= $file; ?>
|
||||
<td><?= \phpOMS\Security\PhpCode::hasUnicode($source); ?>
|
||||
<td><?= \phpOMS\Security\PhpCode::hasDeprecatedFunction($source); ?>
|
||||
<td><?= \phpOMS\Security\PhpCode::validateFileIntegrity($file, ''); ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.2
|
||||
*
|
||||
* @package TBD
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://website.orange-management.de
|
||||
*/
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('PHPSettings'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<tr><td><?= $this->getHtml('DeprecatedFunctions'); ?><td><?= \phpOMS\Security\PhpCode::isDisabled(\phpOMS\Security\PhpCode::$disabledFunctions); ?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user