webserver: Coding style.
- Remove unnecessary function. - More import tidying.
This commit is contained in:
parent
d1e538f5f3
commit
96b148d450
1 changed files with 10 additions and 14 deletions
|
|
@ -10,10 +10,10 @@ import pickle
|
|||
import sys
|
||||
import urllib.parse
|
||||
|
||||
import fill3
|
||||
import termstr
|
||||
|
||||
import eris.tools as tools
|
||||
import fill3
|
||||
|
||||
|
||||
USAGE = """Usage:
|
||||
|
|
@ -40,18 +40,6 @@ def make_page(body_html, title):
|
|||
return gzip.compress(text.encode("utf-8"))
|
||||
|
||||
|
||||
def make_main_body():
|
||||
return """
|
||||
<table style="height:100%;width:100%;">
|
||||
<tr>
|
||||
<td style="height:100%;width:38.198%;">
|
||||
<iframe name=summary src="summary"></iframe></td>
|
||||
<td style="height:100%;">
|
||||
<iframe name=listing></iframe></td>
|
||||
</tr>
|
||||
</table>"""
|
||||
|
||||
|
||||
@functools.lru_cache(maxsize=100)
|
||||
def make_listing_page(url_path):
|
||||
unquoted_path = urllib.parse.unquote(url_path)
|
||||
|
|
@ -88,7 +76,15 @@ class Webserver(http.server.BaseHTTPRequestHandler):
|
|||
|
||||
|
||||
def make_main_page(project_name):
|
||||
body_html = make_main_body()
|
||||
body_html = """
|
||||
<table style="height:100%;width:100%;">
|
||||
<tr>
|
||||
<td style="height:100%;width:38.198%;">
|
||||
<iframe name=summary src="summary"></iframe></td>
|
||||
<td style="height:100%;">
|
||||
<iframe name=listing></iframe></td>
|
||||
</tr>
|
||||
</table>"""
|
||||
return make_page(body_html, "Summary of " + project_name)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue