Fix service status refresh, DNS zones, Docker page, SSL manager, input styling, updates

- Service status: data-svc-status/data-svc-dot attrs + refreshSvcStatus() updates in-place after restart/stop/start
- svc-check endpoint: lightweight is-active poll for single service
- Docker page: fix function signature (was docker(el), now returns HTML)
- DNS zones: fix records response (array not object), fix add-record content field, fix delete-zone accept zone_id
- DNS create-zone: allow admin to create zones without account_id
- SSL manager: add Generate CSR modal (openssl req), Upload Custom SSL modal, explain both options
- nova.css: add input:not([type]), date/search/tel/time types, .form-control to styling selector; fix date picker icon
- Updates: fix panel-up check (was fsockopen on HTTPS port, now curl -sk); add set_time_limit(180/300)
- apply-os-update: set_time_limit(300)
- DB engine manager: fix duplicate INSERT line

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 11:56:14 +00:00
parent 5ef458dfb0
commit 99eb8ede67
5 changed files with 196 additions and 66 deletions
+10 -6
View File
@@ -24,11 +24,10 @@ match ($action) {
})(),
'records' => (function() use ($db, $body) {
$zoneId = (int)($_GET['zone_id'] ?? 0);
$zoneId = (int)($_GET['zone_id'] ?? $body['zone_id'] ?? 0);
if (!$zoneId) Response::error("zone_id required");
$records = $db->fetchAll("SELECT * FROM dns_records WHERE zone_id = ? ORDER BY type, name", [$zoneId]);
$zone = $db->fetchOne("SELECT * FROM dns_zones WHERE id = ?", [$zoneId]);
Response::success(['zone' => $zone, 'records' => $records]);
Response::success($records);
})(),
'add-record' => (function() use ($db, $body, $accountId) {
@@ -68,10 +67,11 @@ match ($action) {
'create-zone' => (function() use ($db, $body, $accountId, $user) {
Auth::getInstance()->require('admin', 'reseller');
$domain = strtolower(trim($body['domain'] ?? ''));
$acctId = (int)($body['account_id'] ?? $accountId ?? 0);
$domain = strtolower(trim($body['domain'] ?? ''));
$acctId = (int)($body['account_id'] ?? $accountId ?? 0);
if (!$domain) Response::error("Domain required");
if (!$acctId) Response::error("account_id required");
// Admins can create zones not tied to any account (acctId = 0)
if (!$acctId && $user['role'] !== 'admin') Response::error("account_id required");
DNSManager::createZone($acctId, $domain);
audit('dns.create-zone', $domain);
Response::success(null, "DNS zone created for $domain");
@@ -80,6 +80,10 @@ match ($action) {
'delete-zone' => (function() use ($db, $body, $user) {
Auth::getInstance()->require('admin');
$domain = trim($body['domain'] ?? '');
if (!$domain && isset($body['zone_id'])) {
$row = $db->fetchOne("SELECT domain FROM dns_zones WHERE id = ?", [(int)$body['zone_id']]);
$domain = $row['domain'] ?? '';
}
if (!$domain) Response::error("Domain required");
DNSManager::removeZone($domain);
audit('dns.delete-zone', $domain);