autofixes

This commit is contained in:
Dennis Eichhorn 2020-08-30 20:13:11 +02:00
parent 461686f20e
commit f5b46788db
6 changed files with 33 additions and 30 deletions

View File

@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
abstract class PermissionState extends Enum abstract class PermissionState extends Enum
{ {
public const DASHBOARD = 1; public const DASHBOARD = 1;
public const LOG = 2; public const LOG = 2;
public const SECURITY = 3; public const SECURITY = 3;
} }

View File

@ -34,7 +34,7 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<section class="box wf-100"> <section class="box wf-100">
<header><h1><?= $this->getHtml('Logs') ?></h1></header> <header><h1><?= $this->getHtml('Logs'); ?></h1></header>
<div class="inner"> <div class="inner">
<table class="list w-100"> <table class="list w-100">
@ -43,50 +43,50 @@ echo $this->getData('nav')->render(); ?>
<td><i class="fa fa-anchor"></i> <td><i class="fa fa-anchor"></i>
<td class="wf-100"><?= $this->printHtml((int) $this->request->getData('id') ?? 0); ?> <td class="wf-100"><?= $this->printHtml((int) $this->request->getData('id') ?? 0); ?>
<tr> <tr>
<td><?= $this->getHtml('Time') ?> <td><?= $this->getHtml('Time'); ?>
<td><i class="fa fa-clock-o"></i> <td><i class="fa fa-clock-o"></i>
<td><?= $this->printHtml($log['datetime']); ?> <td><?= $this->printHtml($log['datetime']); ?>
<tr> <tr>
<td><?= $this->getHtml('Uri') ?> <td><?= $this->getHtml('Uri'); ?>
<td><i class="fa fa-globe"></i> <td><i class="fa fa-globe"></i>
<td><?= $this->printHtml($log['path']); ?> <td><?= $this->printHtml($log['path']); ?>
<tr> <tr>
<td><?= $this->getHtml('Source') ?> <td><?= $this->getHtml('Source'); ?>
<td><i class="fa fa-wifi"></i> <td><i class="fa fa-wifi"></i>
<td><?= $this->printHtml($log['ip']); ?> <td><?= $this->printHtml($log['ip']); ?>
<tr> <tr>
<td><?= $this->getHtml('Level') ?> <td><?= $this->getHtml('Level'); ?>
<td> <td>
<i class="fa fa-<?= $this->printHtml(\in_array($log['level'], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'); ?>"></i> <i class="fa fa-<?= $this->printHtml(\in_array($log['level'], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'); ?>"></i>
<td><?= $this->printHtml($log['level']); ?> <td><?= $this->printHtml($log['level']); ?>
<tr> <tr>
<td><?= $this->getHtml('Message') ?> <td><?= $this->getHtml('Message'); ?>
<td><i class="fa fa-commenting"></i> <td><i class="fa fa-commenting"></i>
<td><?= $this->printHtml($log['message']); ?> <td><?= $this->printHtml($log['message']); ?>
<tr> <tr>
<td><?= $this->getHtml('File') ?> <td><?= $this->getHtml('File'); ?>
<td><i class="fa fa-file"></i> <td><i class="fa fa-file"></i>
<td><?= $this->printHtml($log['file']); ?> <td><?= $this->printHtml($log['file']); ?>
<tr> <tr>
<td><?= $this->getHtml('Line') ?> <td><?= $this->getHtml('Line'); ?>
<td><i class="fa fa-commenting"></i> <td><i class="fa fa-commenting"></i>
<td><?= $this->printHtml($log['line']); ?> <td><?= $this->printHtml($log['line']); ?>
<tr> <tr>
<td><?= $this->getHtml('Version') ?> <td><?= $this->getHtml('Version'); ?>
<td><i class="fa fa-pencil"></i> <td><i class="fa fa-pencil"></i>
<td><?= $this->printHtml($log['version']); ?> <td><?= $this->printHtml($log['version']); ?>
<tr> <tr>
<td><?= $this->getHtml('OS') ?> <td><?= $this->getHtml('OS'); ?>
<td><i class="fa fa-laptop"></i> <td><i class="fa fa-laptop"></i>
<td><?= $this->printHtml($log['os']); ?> <td><?= $this->printHtml($log['os']); ?>
<tr> <tr>
<td colspan="3"><?= $this->getHtml('Backtrace') ?> <td colspan="3"><?= $this->getHtml('Backtrace'); ?>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<pre><?= $this->printHtml(\json_encode($log['backtrace'], \JSON_PRETTY_PRINT)); ?></pre> <pre><?= $this->printHtml(\json_encode($log['backtrace'], \JSON_PRETTY_PRINT)); ?></pre>
<tr> <tr>
<td colspan="3" style="padding-top: 10px"><a tabindex="0" class="button" target="_blank" <td colspan="3" style="padding-top: 10px"><a tabindex="0" class="button" target="_blank"
href="https://gitreports.com/issue/Orange-Management/Orange-Management/?name=Guest&issue_title=<?= $this->printHtml(\urlencode($log['message'])); ?>&details=<?= $this->printHtml(\urlencode($details)); ?>"><?= $this->getHtml('Report') ?></a> href="https://gitreports.com/issue/Orange-Management/Orange-Management/?name=Guest&issue_title=<?= $this->printHtml(\urlencode($log['message'])); ?>&details=<?= $this->printHtml(\urlencode($details)); ?>"><?= $this->getHtml('Report'); ?></a>
</table> </table>
</div> </div>
</section> </section>

View File

@ -22,19 +22,19 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="box col-xs-12 wf-100"> <div class="box col-xs-12 wf-100">
<table class="default"> <table class="default">
<caption><?= $this->getHtml('Logs') ?><i class="fa fa-download floatRight download btn"></i></caption> <caption><?= $this->getHtml('Logs'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->getHtml('Timestamp') ?> <td><?= $this->getHtml('Timestamp'); ?>
<td><?= $this->getHtml('Level') ?> <td><?= $this->getHtml('Level'); ?>
<td><?= $this->getHtml('Source') ?> <td><?= $this->getHtml('Source'); ?>
<td class="wf-100"><?= $this->getHtml('Message') ?> <td class="wf-100"><?= $this->getHtml('Message'); ?>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="5"> <td colspan="5">
<tbody> <tbody>
<?php foreach ($logs as $key => $value) : <?php foreach ($logs as $key => $value) :
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/monitoring/logs/single?{?}&id=' . $key);?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/monitoring/logs/single?{?}&id=' . $key); ?>
<tr> <tr>
<td><a href=<?= $this->printHtml($url); ?>><i class="fa fa-clock-o"></i> <?= $this->printHtml($value[0] ?? ''); ?></a> <td><a href=<?= $this->printHtml($url); ?>><i class="fa fa-clock-o"></i> <?= $this->printHtml($value[0] ?? ''); ?></a>
<td><a href=<?= $this->printHtml($url); ?>><i class="fa fa-<?= $this->printHtml(\in_array($value[1], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'); ?>"></i> <?= $this->printHtml($value[1] ?? ''); ?></a> <td><a href=<?= $this->printHtml($url); ?>><i class="fa fa-<?= $this->printHtml(\in_array($value[1], ['notice', 'info', 'debug']) ? 'info-circle' : 'warning'); ?>"></i> <?= $this->printHtml($value[1] ?? ''); ?></a>

View File

@ -28,13 +28,13 @@ echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<div class="box col-xs-12 wf-100"> <div class="box col-xs-12 wf-100">
<table class="default"> <table class="default">
<caption><?= $this->getHtml('Files') ?><i class="fa fa-download floatRight download btn"></i></caption> <caption><?= $this->getHtml('Files'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead> <thead>
<tr> <tr>
<td class="wf-100"><?= $this->getHtml('File') ?> <td class="wf-100"><?= $this->getHtml('File'); ?>
<td><?= $this->getHtml('Unicode') ?> <td><?= $this->getHtml('Unicode'); ?>
<td><?= $this->getHtml('Deprecated') ?> <td><?= $this->getHtml('Deprecated'); ?>
<td><?= $this->getHtml('Integrity') ?> <td><?= $this->getHtml('Integrity'); ?>
<tbody> <tbody>
<?php foreach ($files as $key => $file) : $source = \file_get_contents($file); ?> <?php foreach ($files as $key => $file) : $source = \file_get_contents($file); ?>
<tr> <tr>

View File

@ -41,15 +41,15 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box wf-100"> <div class="box wf-100">
<table class="default"> <table class="default">
<caption><?= $this->getHtml('Inspection') ?><i class="fa fa-download floatRight download btn"></i></caption> <caption><?= $this->getHtml('Inspection'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead> <thead>
<tr> <tr>
<td><?= $this->getHtml('Status') ?> <td><?= $this->getHtml('Status'); ?>
<td class="wf-100"><?= $this->getHtml('File') ?> <td class="wf-100"><?= $this->getHtml('File'); ?>
<td><?= $this->getHtml('Unicode') ?> <td><?= $this->getHtml('Unicode'); ?>
<td><?= $this->getHtml('Deprecated') ?> <td><?= $this->getHtml('Deprecated'); ?>
<td><?= $this->getHtml('Modified') ?> <td><?= $this->getHtml('Modified'); ?>
<td><?= $this->getHtml('Integrity') ?> <td><?= $this->getHtml('Integrity'); ?>
<tbody> <tbody>
<?php <?php
$files = Directory::listByExtension(__DIR__ . '/../../../../phpOMS/', 'php', 'tests(\/|\\\)'); $files = Directory::listByExtension(__DIR__ . '/../../../../phpOMS/', 'php', 'tests(\/|\\\)');

View File

@ -20,6 +20,7 @@ namespace Modules\Monitoring\tests\Admin;
class AdminTest extends \PHPUnit\Framework\TestCase class AdminTest extends \PHPUnit\Framework\TestCase
{ {
protected const MODULE_NAME = 'Monitoring'; protected const MODULE_NAME = 'Monitoring';
protected const URI_LOAD = ''; protected const URI_LOAD = '';
use \Modules\tests\ModuleTestTrait; use \Modules\tests\ModuleTestTrait;