diff --git a/app/sovran_systemsos_web/server.py b/app/sovran_systemsos_web/server.py
index 747df5c..30a287c 100644
--- a/app/sovran_systemsos_web/server.py
+++ b/app/sovran_systemsos_web/server.py
@@ -2162,6 +2162,7 @@ async def api_service_detail(unit: str, icon: str | None = None):
"credentials": resolved_creds,
"needs_domain": needs_domain,
"domain": domain,
+ "domain_name": domain_key,
"domain_status": domain_status,
"port_requirements": port_requirements,
"port_statuses": port_statuses,
diff --git a/app/sovran_systemsos_web/static/css/tiles.css b/app/sovran_systemsos_web/static/css/tiles.css
index 9acd4c7..5d7346e 100644
--- a/app/sovran_systemsos_web/static/css/tiles.css
+++ b/app/sovran_systemsos_web/static/css/tiles.css
@@ -310,6 +310,12 @@
text-decoration: underline;
}
+/* ── Service detail: Domain configure button ─────────────────────── */
+
+.svc-detail-domain-btn {
+ margin-top: 12px;
+}
+
/* ── Service detail: Addon feature toggle ────────────────────────── */
.svc-detail-addon-row {
diff --git a/app/sovran_systemsos_web/static/js/service-detail.js b/app/sovran_systemsos_web/static/js/service-detail.js
index 0708870..0d9b10c 100644
--- a/app/sovran_systemsos_web/static/js/service-detail.js
+++ b/app/sovran_systemsos_web/static/js/service-detail.js
@@ -244,8 +244,8 @@ async function openServiceDetailModal(unit, name, icon) {
'
Find the domain you purchased for this service' +
'Create a Dynamic DNS record pointing to your external IP: ' + escHtml(ds.expected_ip || "—") + '' +
'Copy the DDNS curl command from Njal.la\'s dashboard' +
- 'You can re-enter it in the Feature Manager to update your configuration' +
'' +
+ '' +
'';
} else {
domainBadge = '' + escHtml(data.domain) + '';
@@ -257,9 +257,9 @@ async function openServiceDetailModal(unit, name, icon) {
'To get this service working:
' +
'' +
'- Purchase a subdomain at njal.la (if you haven\'t already)
' +
- '- Go to the Feature Manager in the sidebar
' +
- '- Find this service and configure your domain through the setup wizard
' +
+ '- Use the button below to configure your domain through the setup wizard
' +
'
' +
+ '' +
'';
}
@@ -385,6 +385,26 @@ async function openServiceDetailModal(unit, name, icon) {
});
}
}
+
+ // Configure Domain button (for non-feature services that need a domain)
+ var configDomainBtn = document.getElementById("svc-detail-config-domain-btn");
+ var reconfigDomainBtn = document.getElementById("svc-detail-reconfig-domain-btn");
+ var domainBtn = configDomainBtn || reconfigDomainBtn;
+ if (domainBtn && data.needs_domain && data.domain_name) {
+ var pseudoFeat = {
+ id: data.domain_name,
+ name: name,
+ domain_name: data.domain_name,
+ needs_ddns: true,
+ extra_fields: []
+ };
+ domainBtn.addEventListener("click", function() {
+ closeCredsModal();
+ openDomainSetupModal(pseudoFeat, function() {
+ openServiceDetailModal(unit, name, icon);
+ });
+ });
+ }
} catch (err) {
if ($credsBody) $credsBody.innerHTML = 'Could not load service details.
';
}