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