mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 19:31:01 -06:00
Clean up debug views.
This commit is contained in:
parent
2283f3e786
commit
66f309f5ed
@ -133,13 +133,14 @@ class DebugController extends Controller
|
||||
$toSandbox = var_export(env('BUNQ_USE_SANDBOX', 'unknown'), true);
|
||||
$trustedProxies = env('TRUSTED_PROXIES', '(none)');
|
||||
$displayErrors = ini_get('display_errors');
|
||||
$storageDisks = implode(', ', config('filesystems.disks.upload.disks'));
|
||||
$errorReporting = $this->errorReporting((int)ini_get('error_reporting'));
|
||||
$appEnv = env('APP_ENV', '');
|
||||
$appDebug = var_export(env('APP_DEBUG', false), true);
|
||||
$logChannel = env('LOG_CHANNEL', '');
|
||||
$appLogLevel = env('APP_LOG_LEVEL', 'info');
|
||||
$packages = $this->collectPackages();
|
||||
$cacheDriver = env('CACHE_DRIVER', 'unknown');
|
||||
$loginProvider = env('LOGIN_PROVIDER', 'unknown');
|
||||
|
||||
// set languages, see what happens:
|
||||
$original = setlocale(LC_ALL, 0);
|
||||
@ -170,13 +171,15 @@ class DebugController extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
// last few lines
|
||||
$logContent = 'Truncated from this point <----|' . substr($logContent, -8192);
|
||||
if (strlen($logContent) > 0) {
|
||||
// last few lines
|
||||
$logContent = 'Truncated from this point <----|' . substr($logContent, -8192);
|
||||
}
|
||||
|
||||
return view(
|
||||
'debug', compact(
|
||||
'phpVersion', 'extensions', 'localeAttempts', 'appEnv', 'appDebug', 'logChannel', 'appLogLevel', 'now', 'packages', 'drivers',
|
||||
'currentDriver',
|
||||
'phpVersion', 'extensions', 'localeAttempts', 'appEnv', 'appDebug', 'logChannel', 'appLogLevel', 'now', 'drivers',
|
||||
'currentDriver', 'loginProvider','storageDisks',
|
||||
'userAgent', 'displayErrors', 'errorReporting', 'phpOs', 'interface', 'logContent', 'cacheDriver', 'isDocker', 'isSandstorm',
|
||||
'trustedProxies',
|
||||
'toSandbox'
|
||||
|
@ -33,32 +33,6 @@ use Log;
|
||||
*/
|
||||
trait GetConfigurationData
|
||||
{
|
||||
|
||||
/**
|
||||
* All packages that are installed.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function collectPackages(): array // get configuration
|
||||
{
|
||||
$packages = [];
|
||||
$file = \dirname(__DIR__, 4) . '/vendor/composer/installed.json';
|
||||
if (file_exists($file)) {
|
||||
// file exists!
|
||||
$content = file_get_contents($file);
|
||||
$json = json_decode($content, true);
|
||||
foreach ($json as $package) {
|
||||
$packages[]
|
||||
= [
|
||||
'name' => $package['name'],
|
||||
'version' => $package['version'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $packages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Some common combinations.
|
||||
*
|
||||
|
@ -34,6 +34,8 @@ Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION
|
||||
{% endfor %}
|
||||
| DB drivers | {{ drivers }} |
|
||||
| Current driver | {{ currentDriver }} |
|
||||
| Login provider | {{ loginProvider }} |
|
||||
| Storage disks | {{ storageDisks }} |
|
||||
| Using Sandstorm? | {% if SANDSTORM == true %}yes{% else %}no{% endif %} |
|
||||
{% if SANDSTORM == true %}| Sandstorm anon? | {% if SANDSTORM_ANON == true %}yes{% else %}no{% endif %} |{% endif %}
|
||||
| Is Sandstorm (.env) | {{ isSandstorm }} |
|
||||
@ -42,7 +44,6 @@ Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION
|
||||
| Trusted proxies (.env) | {{ trustedProxies }} |
|
||||
| User agent | {{ userAgent }} |
|
||||
| Loaded extensions | {{ extensions }} |
|
||||
| Installed packages | {% for package in packages %}{{ package.name }}@{{ package.version }}, {% endfor %} |
|
||||
</textarea>
|
||||
|
||||
<p style="font-family:Arial, Arial, Helvetica, sans-serif;font-size:12pt;width:600px;color:#a00;">
|
||||
|
Loading…
Reference in New Issue
Block a user