fix: preserve service ID on subdomain change, accept localhost as IP
- serviceUrl() now checks service.url before falling back to buildServiceUrl(id) - Service update no longer overwrites ID with the new subdomain - Accept "localhost" as valid IP in service update validation - Find services by ID or URL match when updating Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
141
status/dist/core.js
vendored
141
status/dist/core.js
vendored
File diff suppressed because one or more lines are too long
@@ -77,7 +77,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
function serviceUrl(id) { return buildServiceUrl(id); }
|
||||
function serviceUrl(id) {
|
||||
const svc = window.APPS?.find(a => a.id === id);
|
||||
if (svc?.url) return svc.url.startsWith('http') ? svc.url : 'https://' + svc.url;
|
||||
if (svc?.isExternal && svc.externalUrl) return svc.externalUrl;
|
||||
const dns = SITE.dnsServers?.[id];
|
||||
if (dns) return 'http://' + dns.ip + ':' + (dns.port || 5380);
|
||||
return buildServiceUrl(id);
|
||||
}
|
||||
function el(tag, cls, txt) { const n = document.createElement(tag); if (cls) n.className = cls; if (txt) n.textContent = txt; return n; }
|
||||
|
||||
function buildGrid() {
|
||||
|
||||
Reference in New Issue
Block a user