Skip to content

Commit

Permalink
Merge pull request #452 from ARCANEDEV/develop
Browse files Browse the repository at this point in the history
Merge the develop changes into master
  • Loading branch information
arcanedev-maroc authored Mar 17, 2024
2 parents 0bd0b39 + 2c273cc commit a9f9893
Show file tree
Hide file tree
Showing 11 changed files with 782 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2]
php: [8.2, 8.3]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LogViewer/rel
| `sv` | Swedish |
| `th` | Thai |
| `tr` | Turkish |
| `uz` | Uzbek |
| `uk` | Ukrainian |
| `zh` | Chinese (Simplified) |
| `zh-TW` | Chinese (Traditional) |
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^8.1",
"php": "^8.2",
"ext-json": "*",
"arcanedev/support": "^10.0",
"arcanedev/support": "^11.0",
"psr/log": "^1.0|^2.0|^3.0"
},
"require-dev": {
"laravel/framework": "^10.0",
"laravel/framework": "^11.0",
"mockery/mockery": "^1.5.1",
"orchestra/testbench-core": "^8.0",
"phpunit/phpunit": "^10.0"
"orchestra/testbench-core": "^9.0",
"phpunit/phpunit": "^10.1"
},
"autoload": {
"psr-4": {
Expand All @@ -39,11 +39,11 @@
"scripts": {
"test": "phpunit --colors=always",
"test:dox": "phpunit --testdox --colors=always",
"test:cov": "phpunit --coverage-html coverage"
"test:cov": "phpunit --coverage-html build/coverage"
},
"extra": {
"branch-alias": {
"dev-develop": "10.x-dev"
"dev-develop": "11.x-dev"
},
"laravel": {
"providers": [
Expand Down
11 changes: 8 additions & 3 deletions config/log-viewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@
| Theme
| -----------------------------------------------------------------
| Supported themes :
| 'bootstrap-3', 'bootstrap-4'
| Make your own theme by adding a folder to the views directory and specifying it here.
| 'bootstrap-5'
| 'bootstrap-4'
| 'bootstrap-3'
|
| You can make your own theme by adding a folder to the views directory and specifying it here.
*/

'theme' => 'bootstrap-4',
'theme' => 'bootstrap-5',

/* -----------------------------------------------------------------
| Route settings
Expand All @@ -55,6 +58,8 @@

'middleware' => env('ARCANEDEV_LOGVIEWER_MIDDLEWARE') ? explode(',', env('ARCANEDEV_LOGVIEWER_MIDDLEWARE')) : null,
],

'show' => 'log-viewer::logs.show'
],

/* -----------------------------------------------------------------
Expand Down
8 changes: 5 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix="Test.php">./tests</directory>
<directory>./tests</directory>
</testsuite>
</testsuites>
<coverage>
<source>
<include>
<directory suffix=".php">./src</directory>
<directory>./src</directory>
</include>
</source>
<coverage>
<report>
<clover outputFile="build/coverage/clover.xml"/>
<html outputDirectory="build/coverage/html"/>
Expand Down
1 change: 1 addition & 0 deletions src/Http/Controllers/LogViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function __construct(LogViewerContract $logViewer)
{
$this->logViewer = $logViewer;
$this->perPage = config('log-viewer.per-page', $this->perPage);
$this->showRoute = config('log-viewer.route.show', $this->showRoute);
}

/* -----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/LogViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LogViewer implements LogViewerContract
/**
* LogViewer Version
*/
const VERSION = '9.0.0';
const VERSION = '10.1.0';

/* -----------------------------------------------------------------
| Properties
Expand Down
277 changes: 277 additions & 0 deletions views/bootstrap-5/_master.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,277 @@
<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="LogViewer">
<meta name="author" content="ARCANEDEV">
<title>LogViewer - Created by ARCANEDEV</title>
{{-- Styles --}}
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700|Source+Sans+Pro:400,600' rel='stylesheet' type='text/css'>
<style>
html {
position: relative;
min-height: 100%;
}
body {
font-size: .875rem;
margin-bottom: 60px;
}
.main-footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
line-height: 60px;
background-color: #E8EAF6;
}
.main-footer p {
margin-bottom: 0;
}
.main-footer .fa.fa-heart {
color: #C62828;
}
.page-header {
border-bottom: 1px solid #8a8a8a;
}
/*
* Navbar
*/
.navbar-brand {
padding: .75rem 1rem;
font-size: 1rem;
}
.navbar-nav .nav-link {
padding-right: .5rem;
padding-left: .5rem;
}
/*
* Boxes
*/
.box {
display: block;
padding: 0;
min-height: 70px;
background: #fff;
width: 100%;
box-shadow: 0 1px 1px rgba(0,0,0,0.1);
border-radius: .25rem;
}
.box > .box-icon > i,
.box .box-content .box-text,
.box .box-content .box-number {
color: #FFF;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}
.box > .box-icon {
border-radius: 2px 0 0 2px;
display: block;
float: left;
height: 70px; width: 70px;
text-align: center;
font-size: 40px;
line-height: 70px;
background: rgba(0,0,0,0.2);
}
.box .box-content {
padding: 5px 10px;
margin-left: 70px;
}
.box .box-content .box-text {
display: block;
font-size: 1rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 600;
}
.box .box-content .box-number {
display: block;
}
.box .box-content .progress {
background: rgba(0,0,0,0.2);
margin: 5px -10px 5px -10px;
}
.box .box-content .progress .progress-bar {
background-color: #FFF;
}
/*
* Log Menu
*/
.log-menu .list-group-item.disabled {
cursor: not-allowed;
}
.log-menu .list-group-item.disabled .level-name {
color: #D1D1D1;
}
/*
* Log Entry
*/
.stack-content {
color: #AE0E0E;
font-family: consolas, Menlo, Courier, monospace;
white-space: pre-line;
font-size: .8rem;
}
/*
* Colors: Badge & Infobox
*/
.badge.badge-env,
.badge.badge-level-all,
.badge.badge-level-emergency,
.badge.badge-level-alert,
.badge.badge-level-critical,
.badge.badge-level-error,
.badge.badge-level-warning,
.badge.badge-level-notice,
.badge.badge-level-info,
.badge.badge-level-debug,
.badge.empty {
color: #FFF;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}
.badge.badge-level-all,
.box.level-all {
background-color: {{ log_styler()->color('all') }};
}
.badge.badge-level-emergency,
.box.level-emergency {
background-color: {{ log_styler()->color('emergency') }};
}
.badge.badge-level-alert,
.box.level-alert {
background-color: {{ log_styler()->color('alert') }};
}
.badge.badge-level-critical,
.box.level-critical {
background-color: {{ log_styler()->color('critical') }};
}
.badge.badge-level-error,
.box.level-error {
background-color: {{ log_styler()->color('error') }};
}
.badge.badge-level-warning,
.box.level-warning {
background-color: {{ log_styler()->color('warning') }};
}
.badge.badge-level-notice,
.box.level-notice {
background-color: {{ log_styler()->color('notice') }};
}
.badge.badge-level-info,
.box.level-info {
background-color: {{ log_styler()->color('info') }};
}
.badge.badge-level-debug,
.box.level-debug {
background-color: {{ log_styler()->color('debug') }};
}
.badge.empty,
.box.empty {
background-color: {{ log_styler()->color('empty') }};
}
.badge.badge-env {
background-color: #6A1B9A;
}
#entries {
overflow-wrap: anywhere;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark sticky-top bg-dark p-0">
<a href="{{ route('log-viewer::dashboard') }}" class="navbar-brand mr-0">
<i class="fa fa-fw fa-book"></i> LogViewer
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mr-auto">
<li class="nav-item {{ Route::is('log-viewer::dashboard') ? 'active' : '' }}">
<a href="{{ route('log-viewer::dashboard') }}" class="nav-link">
<i class="fa fa-dashboard"></i> @lang('Dashboard')
</a>
</li>
<li class="nav-item {{ Route::is('log-viewer::logs.list') ? 'active' : '' }}">
<a href="{{ route('log-viewer::logs.list') }}" class="nav-link">
<i class="fa fa-archive"></i> @lang('Logs')
</a>
</li>
</ul>
</div>
</nav>

<div class="container-fluid">
<main role="main" class="pt-3">
@yield('content')
</main>
</div>

{{-- Footer --}}
<footer class="main-footer">
<div class="container-fluid">
<p class="text-muted pull-left">
LogViewer - <span class="badge text-bg-info">version {{ log_viewer()->version() }}</span>
</p>
<p class="text-muted pull-right">
Created with <i class="fa fa-heart"></i> by ARCANEDEV <sup>&copy;</sup>
</p>
</div>
</footer>

{{-- Scripts --}}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.0/chart.umd.min.js" integrity="sha512-SIMGYRUjwY8+gKg7nn9EItdD8LCADSDfJNutF9TPrvEo86sQmFMh6MyralfIyhADlajSxqc7G0gs7+MwWF/ogQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
function ready(fn) {
if (document.readyState !== 'loading'){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
</script>

@yield('modals')
@yield('scripts')
</body>
</html>
Loading

0 comments on commit a9f9893

Please sign in to comment.