Server Command Center: add subdomain + Cloudflare provisioning
- Migration: added subdomain, server_ip, server_port columns - Seed: rewritten with hardcoded identifiers + full subdomain/IP/port data from Chronicler #87 audit (no more Pterodactyl API dependency) - Route: POST /:id/provision-subdomain creates A + SRV records via Cloudflare API, saves subdomain to server_config - Card: subdomain section shows FQDN if provisioned, provision button with inline input if not Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b483680bfa
commit
a193523f31
@@ -74,6 +74,35 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Subdomain -->
|
||||
<div class="mb-3" id="subdomain-<%= server.identifier %>">
|
||||
<span class="text-gray-500 dark:text-gray-400 block text-xs mb-1">Subdomain</span>
|
||||
<% if (config && config.subdomain) { %>
|
||||
<div class="text-xs">
|
||||
<span class="text-green-600 dark:text-green-400 font-mono">🌐 <%= config.subdomain %>.firefrostgaming.com</span>
|
||||
<span class="text-gray-400 ml-2"><%= config.server_ip || '' %>:<%= config.server_port || 25565 %></span>
|
||||
</div>
|
||||
<% } else if (config && config.server_ip) { %>
|
||||
<div class="text-xs">
|
||||
<span class="text-gray-400">🌐 No subdomain</span>
|
||||
<span class="text-gray-400 ml-2"><%= config.server_ip %>:<%= config.server_port || 25565 %></span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 mt-1">
|
||||
<input type="text" name="subdomain" placeholder="e.g. stoneblock4"
|
||||
class="text-xs font-mono border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white rounded px-2 py-1 w-32"
|
||||
id="sd-input-<%= server.identifier %>">
|
||||
<button hx-post="/admin/servers/<%= server.identifier %>/provision-subdomain"
|
||||
hx-include="#sd-input-<%= server.identifier %>"
|
||||
hx-target="#subdomain-<%= server.identifier %>"
|
||||
class="text-xs bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-400 px-2 py-1 rounded hover:bg-purple-200 dark:hover:bg-purple-900/50">
|
||||
+ Provision
|
||||
</button>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<span class="text-gray-400 dark:text-gray-500 text-xs italic">No server config</span>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<!-- Discord Channel Status -->
|
||||
<div class="mb-3">
|
||||
<span class="text-gray-500 dark:text-gray-400 block text-xs mb-1">Discord Channels</span>
|
||||
|
||||
Reference in New Issue
Block a user