From 9a575eb6d6f91d694501eabba78825ec649f297e Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 8 Aug 2016 17:35:27 -0700 Subject: [PATCH] Link prefetch panels (#2748) * Add link=prefetch to index.html * Improve http request logging --- homeassistant/components/frontend/__init__.py | 2 +- homeassistant/components/frontend/templates/index.html | 7 +++++-- homeassistant/components/http.py | 8 ++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index 552ac3567d1..cec18b66511 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -196,6 +196,6 @@ class IndexView(HomeAssistantView): resp = template.render( core_url=core_url, ui_url=ui_url, no_auth=no_auth, icons_url=icons_url, icons=FINGERPRINTS['mdi.html'], - panel_url=panel_url) + panel_url=panel_url, panels=PANELS) return self.Response(resp, mimetype='text/html') diff --git a/homeassistant/components/frontend/templates/index.html b/homeassistant/components/frontend/templates/index.html index 31e347627fa..859b2af53f0 100644 --- a/homeassistant/components/frontend/templates/index.html +++ b/homeassistant/components/frontend/templates/index.html @@ -8,6 +8,9 @@ + {% for panel in panels.values() -%} + + {% endfor -%} @@ -86,9 +89,9 @@ {# #} - {% if panel_url %} + {% if panel_url -%} - {% endif %} + {% endif -%}