diff --git a/hassio/api/__init__.py b/hassio/api/__init__.py index 8888b7de4..fd906336d 100644 --- a/hassio/api/__init__.py +++ b/hassio/api/__init__.py @@ -139,13 +139,18 @@ class RestAPI(object): def register_panel(self): """Register panel for homeassistant.""" - panel = Path(__file__).parents[1].joinpath('panel/hassio-main.html') + def create_panel_response(build_type): + """Create a function to generate a response.""" + path = Path(__file__).parents[1].joinpath( + 'panel/hassio-main-{}.html'.format(build_type)) - def get_panel(request): - """Return file response with panel.""" - return web.FileResponse(panel) + return lambda request: web.FileResponse(path) - self.webapp.router.add_get('/panel', get_panel) + # This route is for backwards compatibility with HA < 0.58 + self.webapp.router.add_get('/panel', create_panel_response('es5')) + self.webapp.router.add_get('/panel_es5', create_panel_response('es5')) + self.webapp.router.add_get( + '/panel_latest', create_panel_response('latest')) async def start(self): """Run rest api webserver.""" diff --git a/hassio/const.py b/hassio/const.py index 10bfa3413..56c7a0110 100644 --- a/hassio/const.py +++ b/hassio/const.py @@ -2,7 +2,7 @@ from pathlib import Path from ipaddress import ip_network -HASSIO_VERSION = '0.74' +HASSIO_VERSION = '0.75' URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/' 'hassio/{}/version.json') diff --git a/hassio/dock/homeassistant.py b/hassio/dock/homeassistant.py index 1a62e6cc3..09a2d8918 100644 --- a/hassio/dock/homeassistant.py +++ b/hassio/dock/homeassistant.py @@ -52,6 +52,7 @@ class DockerHomeAssistant(DockerInterface): hostname=self.name, detach=True, privileged=True, + init=True, devices=self.devices, network_mode='host', environment={ diff --git a/hassio/panel/hassio-main-es5.html b/hassio/panel/hassio-main-es5.html new file mode 100644 index 000000000..8668928e7 --- /dev/null +++ b/hassio/panel/hassio-main-es5.html @@ -0,0 +1,75 @@ +
Hostname | [[data.hostname]] |
Type | [[data.type]] |
OS | [[data.os]] |
Host Control version | [[data.version]] |
Latest available version | [[data.last_version]] |
Current version | [[data.version]] |
Latest version | [[data.last_version]] |
Version | [[data.version]] |
Beta channel | [[data.beta_channel]] |
Latest available version | [[data.last_version]] |
Container | Host |
---|---|
[[item.container]] |
[[addonLogs]]
Configure which add-on repositories to fetch data from. One repository per line.
[[addon.description]]
Made available via repository [[addon.repository]].
This add-on will built locally on the device.
[[logs]]
[[_error]]
Looks like you don't have any snapshots yet.
Hostname | [[data.hostname]] |
Type | [[data.type]] |
OS | [[data.os]] |
Host Control version | [[data.version]] |
Latest available version | [[data.last_version]] |
Current version | [[data.version]] |
Latest version | [[data.last_version]] |
Version | [[data.version]] |
Beta channel | [[data.beta_channel]] |
Latest available version | [[data.last_version]] |
Container | Host |
---|---|
[[item.container]] |
[[addonLogs]]
Configure which add-on repositories to fetch data from. One repository per line.
[[addon.description]]
Made available via repository [[addon.repository]].
This add-on will built locally on the device.
[[logs]]
[[_error]]
Looks like you don't have any snapshots yet.
Hostname | [[data.hostname]] |
Type | [[data.type]] |
OS | [[data.os]] |
Host Control version | [[data.version]] |
Latest available version | [[data.last_version]] |
Current version | [[data.version]] |
Latest version | [[data.last_version]] |
Version | [[data.version]] |
Beta channel | [[data.beta_channel]] |
Latest available version | [[data.last_version]] |
Container | Host |
---|---|
[[item.container]] |
[[addonLogs]]
Configure which add-on repositories to fetch data from. One repository per line.
[[addon.description]]
Made available via repository [[addon.repository]].
This add-on will built locally on the device.
[[logs]]
[[_error]]
Looks like you don't have any snapshots yet.