Skip to content

Commit

Permalink
Hotfix 21 2 (#2302)
Browse files Browse the repository at this point in the history
* Update frontend

Conflicts:
	homeassistant/components/frontend/version.py
	homeassistant/components/frontend/www_static/core.js.gz
	homeassistant/components/frontend/www_static/frontend.html
	homeassistant/components/frontend/www_static/frontend.html.gz
	homeassistant/components/frontend/www_static/home-assistant-polymer
	homeassistant/components/frontend/www_static/service_worker.js
	homeassistant/components/frontend/www_static/service_worker.js.gz

* Add a default OPTIONS handler for wsgi (#2301)

When a browser makes a CORS request, it often makes a 'preflight'
options request in order to make sure the resource is valid, and that
it has the right CORS access. This adds a default OPTIONS handler for
all views. If a view needs to customize the OPTIONS handler for some
reason, it's free to, but this way CORS will work.

* Version bump to 0.21.2
  • Loading branch information
balloob authored Jun 15, 2016
1 parent 952afeb commit 2036c44
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 16 deletions.
1 change: 1 addition & 0 deletions homeassistant/components/frontend/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
Home Assistant had trouble<br>connecting to the server.<br><br><a href='/'>TRY AGAIN</a>
</div>
<home-assistant icons='{{ icons }}'></home-assistant>
{# <script src='/static/home-assistant-polymer/build/_demo_data_compiled.js'></script> #}
<script src='/static/{{ core_url }}'></script>
<link rel='import' href='/static/{{ ui_url }}' onerror='initError()' async>
<link rel='import' href='/static/{{ icons_url }}' async>
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/frontend/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""DO NOT MODIFY. Auto-generated by build_frontend script."""
CORE = "88b6966e3a74256ecca41ed8ad005c34"
UI = "c6fc10efa7789ab041a1bb0b6849eb6b"
CORE = "7962327e4a29e51d4a6f4ee6cca9acc3"
UI = "570e1b8744a58024fc4e256f5e024424"
9 changes: 4 additions & 5 deletions homeassistant/components/frontend/www_static/core.js

Large diffs are not rendered by default.

Binary file modified homeassistant/components/frontend/www_static/core.js.gz
Binary file not shown.
10 changes: 5 additions & 5 deletions homeassistant/components/frontend/www_static/frontend.html

Large diffs are not rendered by default.

Binary file modified homeassistant/components/frontend/www_static/frontend.html.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


/* eslint-disable quotes, comma-spacing */
var PrecacheConfig = [["/","5113b71ee83242d02b525f3331a5d8cc"],["/devEvent","5113b71ee83242d02b525f3331a5d8cc"],["/devInfo","5113b71ee83242d02b525f3331a5d8cc"],["/devService","5113b71ee83242d02b525f3331a5d8cc"],["/devState","5113b71ee83242d02b525f3331a5d8cc"],["/devTemplate","5113b71ee83242d02b525f3331a5d8cc"],["/history","5113b71ee83242d02b525f3331a5d8cc"],["/logbook","5113b71ee83242d02b525f3331a5d8cc"],["/map","5113b71ee83242d02b525f3331a5d8cc"],["/states","5113b71ee83242d02b525f3331a5d8cc"],["/static/core-88b6966e3a74256ecca41ed8ad005c34.js","dec9792a59ab21903b7dda457784db98"],["/static/frontend-c6fc10efa7789ab041a1bb0b6849eb6b.html","5113b71ee83242d02b525f3331a5d8cc"],["/static/mdi-9ee3d4466a65bef35c2c8974e91b37c0.html","9a6846935116cd29279c91e0ee0a26d0"],["static/favicon-192x192.png","419903b8422586a7e28021bbe9011175"],["static/fonts/roboto/Roboto-Bold.ttf","d329cc8b34667f114a95422aaad1b063"],["static/fonts/roboto/Roboto-Light.ttf","7b5fb88f12bec8143f00e21bc3222124"],["static/fonts/roboto/Roboto-Medium.ttf","fe13e4170719c2fc586501e777bde143"],["static/fonts/roboto/Roboto-Regular.ttf","ac3f799d5bbaf5196fab15ab8de8431c"],["static/images/card_media_player_bg.png","a34281d1c1835d338a642e90930e61aa"],["static/webcomponents-lite.min.js","b0f32ad3c7749c40d486603f31c9d8b1"]];
var PrecacheConfig = [["/","595e12c9755af231fd80191e4cc74d2e"],["/devEvent","595e12c9755af231fd80191e4cc74d2e"],["/devInfo","595e12c9755af231fd80191e4cc74d2e"],["/devService","595e12c9755af231fd80191e4cc74d2e"],["/devState","595e12c9755af231fd80191e4cc74d2e"],["/devTemplate","595e12c9755af231fd80191e4cc74d2e"],["/history","595e12c9755af231fd80191e4cc74d2e"],["/logbook","595e12c9755af231fd80191e4cc74d2e"],["/map","595e12c9755af231fd80191e4cc74d2e"],["/states","595e12c9755af231fd80191e4cc74d2e"],["/static/core-7962327e4a29e51d4a6f4ee6cca9acc3.js","9c07ffb3f81cfb74f8a051b80cc8f9f0"],["/static/frontend-570e1b8744a58024fc4e256f5e024424.html","595e12c9755af231fd80191e4cc74d2e"],["/static/mdi-9ee3d4466a65bef35c2c8974e91b37c0.html","9a6846935116cd29279c91e0ee0a26d0"],["static/favicon-192x192.png","419903b8422586a7e28021bbe9011175"],["static/fonts/roboto/Roboto-Bold.ttf","d329cc8b34667f114a95422aaad1b063"],["static/fonts/roboto/Roboto-Light.ttf","7b5fb88f12bec8143f00e21bc3222124"],["static/fonts/roboto/Roboto-Medium.ttf","fe13e4170719c2fc586501e777bde143"],["static/fonts/roboto/Roboto-Regular.ttf","ac3f799d5bbaf5196fab15ab8de8431c"],["static/images/card_media_player_bg.png","a34281d1c1835d338a642e90930e61aa"],["static/webcomponents-lite.min.js","b0f32ad3c7749c40d486603f31c9d8b1"]];
/* eslint-enable quotes, comma-spacing */
var CacheNamePrefix = 'sw-precache-v1--' + (self.registration ? self.registration.scope : '') + '-';

Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions homeassistant/components/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,7 @@ def file(self, request, fil, mimetype=None):

return self.Response(wrap_file(request.environ, fil),
mimetype=mimetype, direct_passthrough=True)

def options(self, request):
"""Default handler for OPTIONS (necessary for CORS preflight)."""
return self.Response('', status=200)
2 changes: 1 addition & 1 deletion homeassistant/const.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
"""Constants used by Home Assistant components."""

__version__ = "0.21.1"
__version__ = "0.21.2"
REQUIRED_PYTHON_VER = (3, 4)

PLATFORM_FORMAT = '{}.{}'
Expand Down
4 changes: 3 additions & 1 deletion script/build_frontend
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

cd "$(dirname "$0")/.."

cd homeassistant/components/frontend/www_static/home-assistant-polymer
cd homeassistant/components/frontend/www_static/home-assistant-polymer/home-assistant-js/
npm run prod
cd ..
npm run frontend_prod

cp bower_components/webcomponentsjs/webcomponents-lite.min.js ..
Expand Down

0 comments on commit 2036c44

Please sign in to comment.