Removing Controller link in favor of the button in services.

This commit is contained in:
Roland 2026-04-09 15:03:16 -06:00
parent 657e88539a
commit a720818625
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
2 changed files with 4 additions and 10 deletions

View file

@ -154,7 +154,9 @@ function useServiceRow(service, onAction) {
const protocol = service.use_https ? 'https' : 'http';
const host = window.location.hostname;
const path = service.view_path || '';
viewUrl = `${protocol}://${host}:${service.port}${path}`;
const isDefaultPort = (protocol === 'https' && service.port === 443) || (protocol === 'http' && service.port === 80);
const portSuffix = isDefaultPort ? '' : `:${service.port}`;
viewUrl = `${protocol}://${host}${portSuffix}${path}`;
}
return {
@ -1289,13 +1291,6 @@ function AdminControlsSection() {
);
}
function ControllerLink() {
return <HandPointMessage>
You can view the Controller at <a href={CONTROLLER_URI}>{CONTROLLER_URI}</a>
</HandPointMessage>
}
export function ControllerPage() {
return (
<Container fluid>
@ -1303,7 +1298,6 @@ export function ControllerPage() {
<ServicesSection/>
<SambaSection/>
<DiskSection/>
<ControllerLink/>
</Container>
);
}

View file

@ -22,7 +22,7 @@ DEFAULT_CONFIG = {
"name": "wrolpi-controller",
"systemd_name": "wrolpi-controller",
"port": 80,
"viewable": False,
"viewable": True,
"use_https": False,
"description": "Controller API (FastAPI)",
},