mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-24 09:36:31 +00:00
Fix version conflicts
This commit is contained in:
commit
dc341c8af8
@ -185,10 +185,11 @@ class RestAPI(CoreSysAttributes):
|
||||
|
||||
def _register_panel(self):
|
||||
"""Register panel for homeassistant."""
|
||||
def create_response(build_type):
|
||||
panel_dir = Path(__file__).parent.joinpath("panel")
|
||||
|
||||
def create_response(panel_file):
|
||||
"""Create a function to generate a response."""
|
||||
path = Path(__file__).parent.joinpath(
|
||||
f"panel/{build_type}.html")
|
||||
path = panel_dir.joinpath(f"{panel_file!s}.html")
|
||||
return lambda request: web.FileResponse(path)
|
||||
|
||||
# This route is for backwards compatibility with HA < 0.58
|
||||
@ -202,10 +203,7 @@ class RestAPI(CoreSysAttributes):
|
||||
])
|
||||
|
||||
# This route is for HA > 0.61
|
||||
self.webapp.add_routes([
|
||||
web.get('/app-es5/index.html', create_response('index')),
|
||||
web.get('/app-es5/hassio-app.html', create_response('hassio-app')),
|
||||
])
|
||||
self.webapp.add_routes([web.static('/app-es5', panel_dir)])
|
||||
|
||||
async def start(self):
|
||||
"""Run rest api webserver."""
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -11,27 +11,28 @@
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<script src='/frontend_es5/custom-elements-es5-adapter.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
<hassio-app></hassio-app>
|
||||
<script>
|
||||
function addScript(src) {
|
||||
var e = document.createElement('script');
|
||||
e.src = src;
|
||||
document.head.appendChild(e);
|
||||
}
|
||||
if (!window.parent.HASS_DEV) {
|
||||
addScript('/frontend_es5/custom-elements-es5-adapter.js');
|
||||
}
|
||||
var webComponentsSupported = (
|
||||
'customElements' in window &&
|
||||
'import' in document.createElement('link') &&
|
||||
'content' in document.createElement('template'));
|
||||
if (!webComponentsSupported) {
|
||||
addScript('/static/webcomponents-lite.js');
|
||||
}
|
||||
function addScript(src) {
|
||||
var e = document.createElement('script');
|
||||
e.src = src;
|
||||
document.write(e.outerHTML);
|
||||
}
|
||||
var webComponentsSupported = (
|
||||
'customElements' in window &&
|
||||
'import' in document.createElement('link') &&
|
||||
'content' in document.createElement('template'));
|
||||
if (!webComponentsSupported) {
|
||||
addScript('/static/webcomponents-bundle.js');
|
||||
}
|
||||
</script>
|
||||
<!--
|
||||
Disabled while we make Home Assistant able to serve the right files.
|
||||
<script src="./app.js"></script>
|
||||
-->
|
||||
<link rel='import' href='./hassio-app.html'>
|
||||
<link rel='import' href='/static/mdi.html' async>
|
||||
</body>
|
||||
</html>
|
||||
|
Binary file not shown.
@ -34,7 +34,7 @@ class APIProxy(CoreSysAttributes):
|
||||
try:
|
||||
data = None
|
||||
headers = {}
|
||||
method = getattr(self._websession_ssl, request.method.lower())
|
||||
method = getattr(self.sys_websession_ssl, request.method.lower())
|
||||
params = request.query or None
|
||||
|
||||
# read data
|
||||
|
@ -35,11 +35,10 @@ class SecurityMiddleware(CoreSysAttributes):
|
||||
_LOGGER.debug("Passthrough %s", request.path)
|
||||
return await handler(request)
|
||||
|
||||
# Need to be removed later
|
||||
# Unknown API access
|
||||
if not hassio_token:
|
||||
_LOGGER.warning("Invalid token for access %s", request.path)
|
||||
request[REQUEST_FROM] = 'UNKNOWN'
|
||||
return await handler(request)
|
||||
raise HTTPUnauthorized()
|
||||
|
||||
# Home-Assistant
|
||||
if hassio_token == self.sys_homeassistant.uuid:
|
||||
|
@ -2,7 +2,7 @@
|
||||
from pathlib import Path
|
||||
from ipaddress import ip_network
|
||||
|
||||
HASSIO_VERSION = '103'
|
||||
HASSIO_VERSION = '104'
|
||||
|
||||
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
|
||||
'hassio/{}/version.json')
|
||||
|
@ -63,6 +63,10 @@ class Hardware:
|
||||
@property
|
||||
def audio_devices(self):
|
||||
"""Return all available audio interfaces."""
|
||||
if not ASOUND_CARDS.exists():
|
||||
_LOGGER.info("No audio devices found")
|
||||
return {}
|
||||
|
||||
try:
|
||||
with ASOUND_CARDS.open('r') as cards_file:
|
||||
cards = cards_file.read()
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 38e1b16031c397dda15399c63bfa40c40a5d0351
|
||||
Subproject commit e158709b1e13a5af867c6c5436e881839dffa476
|
11
setup.py
11
setup.py
@ -40,13 +40,14 @@ setup(
|
||||
],
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
'async_timeout==2.0.1',
|
||||
'aiohttp==3.1.2',
|
||||
'docker==3.2.0',
|
||||
'attr==0.3.1',
|
||||
'async_timeout==3.0.0',
|
||||
'aiohttp==3.2.1',
|
||||
'docker==3.3.0',
|
||||
'colorlog==3.1.2',
|
||||
'voluptuous==0.11.1',
|
||||
'gitpython==2.1.8',
|
||||
'pytz==2018.3',
|
||||
'gitpython==2.1.10',
|
||||
'pytz==2018.4',
|
||||
'pyudev==0.21.0',
|
||||
'pycryptodome==3.4.11'
|
||||
]
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"hassio": "103.3",
|
||||
"hassio": "104",
|
||||
"homeassistant": "0.70.0",
|
||||
"resinos": "1.3",
|
||||
"resinhup": "0.3",
|
||||
|
Loading…
x
Reference in New Issue
Block a user