diff --git a/app/src/components/admin/ControllerPage.js b/app/src/components/admin/ControllerPage.js index 4873f351..126132c6 100644 --- a/app/src/components/admin/ControllerPage.js +++ b/app/src/components/admin/ControllerPage.js @@ -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 - You can view the Controller at {CONTROLLER_URI} - -} - - export function ControllerPage() { return ( @@ -1303,7 +1298,6 @@ export function ControllerPage() { - ); } diff --git a/controller/defaults.py b/controller/defaults.py index b585a1b9..4cb3a515 100644 --- a/controller/defaults.py +++ b/controller/defaults.py @@ -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)", },