diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index e2420824df6709004eee3f11e0af92a9991e8342..99fc014e2ec6c86df39631e329c2b86e4fe326dd 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -18,7 +18,7 @@ import homeassistant.components as core_components import homeassistant.components.group as group -# pylint: disable=too-many-branches +# pylint: disable=too-many-branches, too-many-statements def from_config_dict(config, hass=None): """ Tries to configure Home Assistant from a config dict. diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index 751194b25293799c4deae248655d11cba63138d1..df7f85e82c9017bf39253fcd9b47dfbcc14d5b9f 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -164,6 +164,7 @@ def setup(hass, config): class HomeAssistantHTTPServer(ThreadingMixIn, HTTPServer): """ Handle HTTP requests in a threaded fashion. """ + # pylint: disable=too-many-arguments def __init__(self, server_address, RequestHandlerClass, hass, api_password, development=False): super().__init__(server_address, RequestHandlerClass) @@ -182,7 +183,6 @@ class HomeAssistantHTTPServer(ThreadingMixIn, HTTPServer): if development: self.logger.info("running frontend in development mode") - def start(self): """ Starts the server. """ @@ -405,8 +405,7 @@ class RequestHandler(BaseHTTPRequestHandler): " user-scalable=no, initial-scale=1.0, " " minimum-scale=1.0, maximum-scale=1.0' />" "</head>" - "<body unresolved fullbleed" - " style='background-color: #E5E5E5'>" + "<body>" "<home-assistant-main auth='{}'></home-assistant-main>" "</body></html>").format(app_url, self.server.api_password)) diff --git a/homeassistant/components/http/www_static/polymer/home-assistant-main.html b/homeassistant/components/http/www_static/polymer/home-assistant-main.html index 721b2daf766325c546b4a493172a28d054e076fc..b3d9aa995d10b7ec9b734f6ccdd3ec2c211acd57 100644 --- a/homeassistant/components/http/www_static/polymer/home-assistant-main.html +++ b/homeassistant/components/http/www_static/polymer/home-assistant-main.html @@ -19,6 +19,7 @@ height: 100%; overflow: auto; -webkit-overflow-scrolling: touch; + background-color: #E5E5E5; } core-toolbar { @@ -42,7 +43,7 @@ <home-assistant-api auth="{{auth}}" id="api"></home-assistant-api> - <core-header-panel layout> + <core-header-panel unresolved fullbleed> <core-toolbar> <div flex> diff --git a/homeassistant/components/http/www_static/script.js b/homeassistant/components/http/www_static/script.js deleted file mode 100644 index b9f4f1cf3d5ab6f9b3053479c1751779345d5d3c..0000000000000000000000000000000000000000 --- a/homeassistant/components/http/www_static/script.js +++ /dev/null @@ -1,34 +0,0 @@ -// from http://stackoverflow.com/questions/1403888/get-escaped-url-parameter -function getURLParameter(name) { - return decodeURI( - (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] - ); -} - - -$(function() { - $("[data-service]").click(function() { - var form = $(".form-call-service"); - - var el = $(this); - var parts = el.attr("data-service").split("/"); - - form.find("#domain").val(parts[0]); - form.find("#service").val(parts[1]); - - var entity_id = el.attr("data-entity_id"); - - if(entity_id) { - form.find("#service_data").val(JSON.stringify({entity_id: entity_id})); - } else { - form.find("#service_data").val(""); - } - - // if it has the attirbute autofire we submit the form - if(el.is("[data-service-autofire]")) { - form.submit(); - } - - return false; - }) -}) \ No newline at end of file diff --git a/homeassistant/components/http/www_static/style.css b/homeassistant/components/http/www_static/style.css deleted file mode 100644 index 419ddcd4cdf5ec289afa731d6f0eec2e590858cf..0000000000000000000000000000000000000000 --- a/homeassistant/components/http/www_static/style.css +++ /dev/null @@ -1,57 +0,0 @@ -@import url(//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.2/css/bootstrap.min.css); - -.states td .glyphicon, .services td .glyphicon { - margin-top: 2px; -} - -.states td:nth-child(1), .services td:nth-child(1) { - width: 22px; - padding-right: 0px; -} - -.states td:nth-child(4) { - max-width: 550px; - word-break: break-word; -} - -.states td:nth-child(5) { - white-space: nowrap; -} - -.panel > form, .panel > form > .table { - margin-bottom: 0; -} - -.panel .table { - font-size: inherit; -} - -.form-signin { - max-width: 330px; - margin: 0 auto; -} - -.form-signin .form-control { - margin-top: 40px; - position: relative; - font-size: 16px; - height: auto; - padding: 10px; - margin-bottom: -1px; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - text-align: center; -} - -.form-signin .btn-primary { - border-top-left-radius: 0; - border-top-right-radius: 0; -} - -.form-fire-event, .form-call-service { - margin-bottom: 0px; -} - -.form-fire-event .form-group:last-child { - margin-bottom: 0; -}