rueckbau
All checks were successful
Deploy / deploy-staging (push) Successful in 7s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-27 00:11:03 +02:00
parent 39ea8da129
commit 7ce9173d57
11 changed files with 259 additions and 345 deletions

View File

@@ -398,44 +398,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
}
$moduleStatusPanel = null;
if ($moduleName === 'boersenchecker') {
$quotaApiKey = trim((string) ($current['bavest_api_key'] ?? ''));
if ($quotaApiKey === '') {
$moduleStatusPanel = [
'title' => 'Bavest Quota',
'type' => 'hint',
'text' => 'Kein Bavest API Key hinterlegt. Nach dem Speichern wird hier die aktuelle Quota automatisch angezeigt.',
'stats' => [],
];
} else {
$quotaTimeout = (int) ($current['bavest_timeout_sec'] ?? 10);
$quotaTimeout = $quotaTimeout > 0 ? $quotaTimeout : 10;
$quotaResult = $fetchJsonWithApiKey('https://api.bavest.co/v2/account/quota', $quotaApiKey, $quotaTimeout);
if (!empty($quotaResult['ok'])) {
$quotaData = is_array($quotaResult['data']['data'] ?? null) ? $quotaResult['data']['data'] : [];
$moduleStatusPanel = [
'title' => 'Bavest Quota',
'type' => 'success',
'text' => 'Quota erfolgreich geprueft.',
'stats' => [
['label' => 'Periode', 'value' => (string) ($quotaData['period'] ?? '-')],
['label' => 'Verbrauch', 'value' => (string) ($quotaData['usage'] ?? '0')],
['label' => 'Limit', 'value' => ($quotaData['limit'] ?? null) !== null ? (string) $quotaData['limit'] : 'unbegrenzt'],
['label' => 'Verbleibend', 'value' => ($quotaData['remaining'] ?? null) !== null ? (string) $quotaData['remaining'] : 'unbegrenzt'],
['label' => 'API-Key ID', 'value' => (string) ($quotaData['apiKey'] ?? '-')],
],
];
} else {
$moduleStatusPanel = [
'title' => 'Bavest Quota',
'type' => 'error',
'text' => 'Quota konnte nicht geprueft werden: ' . (string) ($quotaResult['message'] ?? 'Unbekannter Fehler'),
'stats' => [],
];
}
}
}
$activeDbGroup = $testGroup !== null && array_key_exists($testGroup, $dbGroups)
? $testGroup