diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..aba78f6b5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "home-assistant-polymer"] + path = home-assistant-polymer + url = https://github.com/home-assistant/home-assistant-polymer diff --git a/hassio/api/__init__.py b/hassio/api/__init__.py index c037ee53c..44a656a69 100644 --- a/hassio/api/__init__.py +++ b/hassio/api/__init__.py @@ -1,5 +1,6 @@ """Init file for HassIO rest api.""" import logging +from pathlib import Path from aiohttp import web @@ -96,6 +97,13 @@ class RestAPI(object): self.webapp.router.add_post('/security/totp', api_security.totp) self.webapp.router.add_post('/security/session', api_security.session) + def register_panel(self): + """Register panel for homeassistant.""" + panel_dir = Path(__file__).parents[1].joinpath('panel') + + self.webapp.router.register_resource( + web.StaticResource('/panel', str(panel_dir))) + async def start(self): """Run rest api webserver.""" self._handler = self.webapp.make_handler(loop=self.loop) diff --git a/hassio/panel/hassio-main.html.gz b/hassio/panel/hassio-main.html.gz new file mode 100644 index 000000000..4e830f571 Binary files /dev/null and b/hassio/panel/hassio-main.html.gz differ diff --git a/home-assistant-polymer b/home-assistant-polymer new file mode 160000 index 000000000..a341ccf94 --- /dev/null +++ b/home-assistant-polymer @@ -0,0 +1 @@ +Subproject commit a341ccf9440fc2028dff54d569e7f5897bf42b2f