mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-03 11:29:24 +01:00
refactor: rimozione completa di debugbar
This commit is contained in:
parent
fe504f22bd
commit
68ca4480f0
@ -45,7 +45,6 @@
|
||||
"league/oauth2-google": "^4.0",
|
||||
"league/flysystem": "^3.0",
|
||||
"league/flysystem-ftp": "^3.0",
|
||||
"maximebf/debugbar": "^1.15",
|
||||
"monolog/monolog": "^1.27",
|
||||
"mpdf/mpdf": "^v8.0.10",
|
||||
"mpociot/vat-calculator": "^2.3",
|
||||
|
12
gulpfile.js
12
gulpfile.js
@ -442,15 +442,6 @@ function i18n() {
|
||||
.pipe(gulp.dest(config.production + '/' + config.paths.js + '/i18n'));
|
||||
}
|
||||
|
||||
// PHP DebugBar assets
|
||||
function phpDebugBar() {
|
||||
return gulp.src([
|
||||
'./vendor/maximebf/debugbar/src/DebugBar/Resources/**/*',
|
||||
'!./vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/**/*',
|
||||
])
|
||||
.pipe(gulpIf('*.css', minifyCSS(), gulpIf('*.js', minifyJS())))
|
||||
.pipe(gulp.dest(config.production + '/php-debugbar'));
|
||||
}
|
||||
|
||||
// Operazioni per la release
|
||||
function release(done) {
|
||||
@ -500,7 +491,6 @@ function release(done) {
|
||||
'!vendor/mpdf/mpdf/ttfonts/*',
|
||||
'vendor/mpdf/mpdf/ttfonts/DejaVuinfo.txt',
|
||||
'vendor/mpdf/mpdf/ttfonts/DejaVu*Condensed*',
|
||||
'!vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/**',
|
||||
'!vendor/respect/validation/tests/**',
|
||||
'!vendor/willdurand/geocoder/tests/**',
|
||||
], {
|
||||
@ -605,7 +595,7 @@ function clean() {
|
||||
}
|
||||
|
||||
// Operazioni di default per la generazione degli assets
|
||||
const bower = gulp.series(clean, gulp.parallel(JS, CSS, images, fonts, phpDebugBar, ckeditor, colorpicker, i18n, pdfjs, hotkeys, chartjs, password_strength, csrf, leaflet, wacom));
|
||||
const bower = gulp.series(clean, gulp.parallel(JS, CSS, images, fonts, ckeditor, colorpicker, i18n, pdfjs, hotkeys, chartjs, password_strength, csrf, leaflet, wacom));
|
||||
|
||||
// Debug su CSS e JS
|
||||
exports.srcJS = srcJS;
|
||||
|
@ -47,11 +47,6 @@ if (Auth::check()) {
|
||||
|
||||
if (App::debug()) {
|
||||
echo '
|
||||
<!-- Fix per le icone di debug -->
|
||||
<style>div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before {
|
||||
font-family: FontAwesome;
|
||||
}</style>
|
||||
|
||||
<!-- Rimozione del messaggio automatico riguardante la modifica di valori nella pagina -->
|
||||
<script>
|
||||
window.onbeforeunload = null;
|
||||
|
@ -142,7 +142,7 @@ class Database extends Util\Singleton
|
||||
*
|
||||
* @since 2.3
|
||||
*
|
||||
* @return DebugBar\DataCollector\PDO\TraceablePDO|PDO
|
||||
* @return PDO
|
||||
*/
|
||||
public function getPDO()
|
||||
{
|
||||
|
@ -1,79 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||
* Copyright (C) DevCode s.r.l.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace Extensions;
|
||||
|
||||
use Illuminate\Database\Capsule\Manager;
|
||||
|
||||
class EloquentCollector extends \DebugBar\DataCollector\PDO\PDOCollector
|
||||
{
|
||||
public function __construct(protected $capsule)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->addConnection($this->getTraceablePdo(), 'Eloquent PDO');
|
||||
}
|
||||
|
||||
// Override
|
||||
public function getName()
|
||||
{
|
||||
return 'eloquent_pdo';
|
||||
}
|
||||
|
||||
// Override
|
||||
public function getWidgets()
|
||||
{
|
||||
return [
|
||||
'eloquent' => [
|
||||
'icon' => 'inbox',
|
||||
'widget' => 'PhpDebugBar.Widgets.SQLQueriesWidget',
|
||||
'map' => 'eloquent_pdo',
|
||||
'default' => '[]',
|
||||
],
|
||||
'eloquent:badge' => [
|
||||
'map' => 'eloquent_pdo.nb_statements',
|
||||
'default' => 0,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Manager;
|
||||
*/
|
||||
protected function getEloquentCapsule()
|
||||
{
|
||||
return $this->capsule;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \PDO
|
||||
*/
|
||||
protected function getEloquentPdo()
|
||||
{
|
||||
return $this->getEloquentCapsule()->getConnection()->getPdo();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \DebugBar\DataCollector\PDO\TraceablePDO
|
||||
*/
|
||||
protected function getTraceablePdo()
|
||||
{
|
||||
return new \DebugBar\DataCollector\PDO\TraceablePDO($this->getEloquentPdo());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user