PEP8 style fixes for HTTPInterface
parent
e586d8debc
commit
416816cef7
|
@ -265,20 +265,20 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|||
"<html>"
|
||||
"<head><title>Home Assistant</title>"
|
||||
"<link rel='stylesheet' type='text/css' "
|
||||
"href='/static/style.css'>"
|
||||
" href='/static/style.css'>"
|
||||
"<link rel='icon' href='/static/favicon.ico' "
|
||||
"type='image/x-icon' />"
|
||||
" type='image/x-icon' />"
|
||||
"</head>"
|
||||
"<body>"
|
||||
"<div class='container'>"
|
||||
"<form class='form-signin' action='{}' method='GET'>"
|
||||
|
||||
"<input type='text' class='form-control' name='api_password' "
|
||||
"placeholder='API Password for Home Assistant' "
|
||||
"required autofocus>"
|
||||
" placeholder='API Password for Home Assistant' "
|
||||
" required autofocus>"
|
||||
|
||||
"<button class='btn btn-lg btn-primary btn-block' "
|
||||
"type='submit'>Enter</button>"
|
||||
" type='submit'>Enter</button>"
|
||||
|
||||
"</form>"
|
||||
"</div>"
|
||||
|
@ -299,14 +299,13 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|||
write(("<html>"
|
||||
"<head><title>Home Assistant</title>"
|
||||
"<link rel='stylesheet' type='text/css' "
|
||||
"href='/static/style.css'>"
|
||||
" href='/static/style.css'>"
|
||||
"<link rel='icon' href='/static/favicon.ico' "
|
||||
"type='image/x-icon' />"
|
||||
" type='image/x-icon' />"
|
||||
"</head>"
|
||||
"<body>"
|
||||
"<div class='container'>"
|
||||
"<div class='page-header'><h1>Home Assistant</h1></div>"
|
||||
))
|
||||
"<div class='page-header'><h1>Home Assistant</h1></div>"))
|
||||
|
||||
# Flash message support
|
||||
if self.server.flash_message:
|
||||
|
@ -321,9 +320,9 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|||
"<div class='col-xs-12'>"
|
||||
"<div class='panel panel-primary'>"
|
||||
"<div class='panel-heading'><h2 class='panel-title'>"
|
||||
"States</h2></div>"
|
||||
" States</h2></div>"
|
||||
"<form method='post' action='/change_state' "
|
||||
"class='form-change-state'>"
|
||||
" class='form-change-state'>"
|
||||
"<input type='hidden' name='api_password' value='{}'>"
|
||||
"<table class='table'><tr>"
|
||||
"<th>Entity ID</th><th>State</th>"
|
||||
|
@ -350,11 +349,11 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|||
|
||||
# Change state form
|
||||
write(("<tr><td><input name='entity_id' class='form-control' "
|
||||
"placeholder='Entity ID'></td>"
|
||||
" placeholder='Entity ID'></td>"
|
||||
"<td><input name='new_state' class='form-control' "
|
||||
"placeholder='New State'></td>"
|
||||
" placeholder='New State'></td>"
|
||||
"<td><textarea rows='3' name='attributes' class='form-control' "
|
||||
"placeholder='State Attributes (JSON, optional)'>"
|
||||
" placeholder='State Attributes (JSON, optional)'>"
|
||||
"</textarea></td>"
|
||||
"<td><button type='submit' class='btn btn-default'>"
|
||||
"Set State</button></td></tr>"
|
||||
|
@ -368,7 +367,7 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|||
"<div class='col-xs-6'>"
|
||||
"<div class='panel panel-primary'>"
|
||||
"<div class='panel-heading'><h2 class='panel-title'>"
|
||||
"Services</h2></div>"
|
||||
" Services</h2></div>"
|
||||
"<table class='table'>"
|
||||
"<tr><th>Domain</th><th>Service</th></tr>"))
|
||||
|
||||
|
@ -382,45 +381,45 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|||
"<div class='col-xs-6'>"
|
||||
"<div class='panel panel-primary'>"
|
||||
"<div class='panel-heading'><h2 class='panel-title'>"
|
||||
"Call Service</h2></div>"
|
||||
" Call Service</h2></div>"
|
||||
"<div class='panel-body'>"
|
||||
"<form method='post' action='/call_service' "
|
||||
"class='form-horizontal form-fire-event'>"
|
||||
" class='form-horizontal form-fire-event'>"
|
||||
"<input type='hidden' name='api_password' value='{}'>"
|
||||
|
||||
"<div class='form-group'>"
|
||||
"<label for='domain' class='col-xs-3 control-label'>"
|
||||
"Domain</label>"
|
||||
"<div class='col-xs-9'>"
|
||||
"<input type='text' class='form-control' id='domain'"
|
||||
" <label for='domain' class='col-xs-3 control-label'>"
|
||||
" Domain</label>"
|
||||
" <div class='col-xs-9'>"
|
||||
" <input type='text' class='form-control' id='domain'"
|
||||
" name='domain' placeholder='Service Domain'>"
|
||||
"</div>"
|
||||
" </div>"
|
||||
"</div>"
|
||||
|
||||
"<div class='form-group'>"
|
||||
"<label for='service' class='col-xs-3 control-label'>"
|
||||
"Service</label>"
|
||||
"<div class='col-xs-9'>"
|
||||
"<input type='text' class='form-control' id='service'"
|
||||
" <label for='service' class='col-xs-3 control-label'>"
|
||||
" Service</label>"
|
||||
" <div class='col-xs-9'>"
|
||||
" <input type='text' class='form-control' id='service'"
|
||||
" name='service' placeholder='Service name'>"
|
||||
"</div>"
|
||||
" </div>"
|
||||
"</div>"
|
||||
|
||||
"<div class='form-group'>"
|
||||
"<label for='service_data' class='col-xs-3 control-label'>"
|
||||
"Service data</label>"
|
||||
"<div class='col-xs-9'>"
|
||||
"<textarea rows='3' class='form-control' id='service_data'"
|
||||
" <label for='service_data' class='col-xs-3 control-label'>"
|
||||
" Service data</label>"
|
||||
" <div class='col-xs-9'>"
|
||||
" <textarea rows='3' class='form-control' id='service_data'"
|
||||
" name='service_data' placeholder='Service Data "
|
||||
"(JSON, optional)'></textarea>"
|
||||
"</div>"
|
||||
" </div>"
|
||||
"</div>"
|
||||
|
||||
"<div class='form-group'>"
|
||||
"<div class='col-xs-offset-3 col-xs-9'>"
|
||||
"<button type='submit' class='btn btn-default'>"
|
||||
"Call Service</button>"
|
||||
"</div>"
|
||||
" <div class='col-xs-offset-3 col-xs-9'>"
|
||||
" <button type='submit' class='btn btn-default'>"
|
||||
" Call Service</button>"
|
||||
" </div>"
|
||||
"</div>"
|
||||
"</form>"
|
||||
"</div></div></div>"
|
||||
|
@ -431,7 +430,7 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|||
"<div class='col-xs-6'>"
|
||||
"<div class='panel panel-primary'>"
|
||||
"<div class='panel-heading'><h2 class='panel-title'>"
|
||||
"Events</h2></div>"
|
||||
" Events</h2></div>"
|
||||
"<table class='table'>"
|
||||
"<tr><th>Event</th><th>Listeners</th></tr>"))
|
||||
|
||||
|
@ -445,36 +444,36 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|||
"<div class='col-xs-6'>"
|
||||
"<div class='panel panel-primary'>"
|
||||
"<div class='panel-heading'><h2 class='panel-title'>"
|
||||
"Fire Event</h2></div>"
|
||||
" Fire Event</h2></div>"
|
||||
"<div class='panel-body'>"
|
||||
"<form method='post' action='/fire_event' "
|
||||
"class='form-horizontal form-fire-event'>"
|
||||
" class='form-horizontal form-fire-event'>"
|
||||
"<input type='hidden' name='api_password' value='{}'>"
|
||||
|
||||
"<div class='form-group'>"
|
||||
"<label for='event_type' class='col-xs-3 control-label'>"
|
||||
"Event type</label>"
|
||||
"<div class='col-xs-9'>"
|
||||
"<input type='text' class='form-control' id='event_type'"
|
||||
" <label for='event_type' class='col-xs-3 control-label'>"
|
||||
" Event type</label>"
|
||||
" <div class='col-xs-9'>"
|
||||
" <input type='text' class='form-control' id='event_type'"
|
||||
" name='event_type' placeholder='Event Type'>"
|
||||
"</div>"
|
||||
" </div>"
|
||||
"</div>"
|
||||
|
||||
"<div class='form-group'>"
|
||||
"<label for='event_data' class='col-xs-3 control-label'>"
|
||||
"Event data</label>"
|
||||
"<div class='col-xs-9'>"
|
||||
"<textarea rows='3' class='form-control' id='event_data'"
|
||||
" <label for='event_data' class='col-xs-3 control-label'>"
|
||||
" Event data</label>"
|
||||
" <div class='col-xs-9'>"
|
||||
" <textarea rows='3' class='form-control' id='event_data'"
|
||||
" name='event_data' placeholder='Event Data "
|
||||
"(JSON, optional)'></textarea>"
|
||||
"</div>"
|
||||
" </div>"
|
||||
"</div>"
|
||||
|
||||
"<div class='form-group'>"
|
||||
"<div class='col-xs-offset-3 col-xs-9'>"
|
||||
"<button type='submit' class='btn btn-default'>"
|
||||
"Fire Event</button>"
|
||||
"</div>"
|
||||
" <div class='col-xs-offset-3 col-xs-9'>"
|
||||
" <button type='submit' class='btn btn-default'>"
|
||||
" Fire Event</button>"
|
||||
" </div>"
|
||||
"</div>"
|
||||
"</form>"
|
||||
"</div></div></div>"
|
||||
|
|
Loading…
Reference in New Issue