mirror of
https://github.com/myronblair/novacpx
synced 2026-07-28 13:14:33 -05:00
Streaming terminals for PHP extensions, SSL certificates; UFW logging state fix
- php.php: install-extension and remove-extension now stream via SSE (real-time progress, proper error detection, sudo) - ssl.php: issue action now streams certbot output via SSE - admin.js: phpExtInstall/Remove use streaming terminal modal - admin.js: adminIssueBulkSSL uses streaming modal with per-domain progress - admin.js: adminRenewCert now confirms before renewing - admin.js: adminIssueSingleSSL helper for per-domain streaming SSL - admin.js: firewall page pre-selects current UFW logging level from API response - admin.js: fwSetLogging reloads firewall page on success - firewall.php: ufw_status() now parses and returns logging level Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -100,10 +100,17 @@ function ufw_status(): array {
|
||||
|
||||
// Default policy
|
||||
preg_match('/Default:\s+(\w+) \(incoming\),\s+(\w+) \(outgoing\)/', $raw, $pol);
|
||||
// Logging level
|
||||
preg_match('/Logging:\s+(\S+)/i', $raw, $logm);
|
||||
$logging = strtolower($logm[1] ?? 'off');
|
||||
if ($logging === 'on (low)') $logging = 'low';
|
||||
// Normalise: strip parentheses if present e.g. "on (low)" → "low"
|
||||
if (preg_match('/\((\w+)\)/', $logging, $lm)) $logging = $lm[1];
|
||||
return [
|
||||
'active' => $active,
|
||||
'default_incoming' => $pol[1] ?? 'deny',
|
||||
'default_outgoing' => $pol[2] ?? 'allow',
|
||||
'logging' => $logging,
|
||||
'rules' => $rules,
|
||||
'raw' => $raw,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user