1.1 --- a/gmyth-stream/server/0.2/lib/server.py Tue May 15 18:25:19 2007 +0100
1.2 +++ b/gmyth-stream/server/0.2/lib/server.py Thu May 17 14:07:27 2007 +0100
1.3 @@ -138,10 +138,6 @@
1.4 return ret
1.5 # _nav_items()
1.6
1.7 - def _create_html_item(self, opt):
1.8 - return "<li>%s</li>\n" % opt
1.9 - # _create_html_item
1.10 -
1.11 def serve_main(self, body):
1.12 self.send_response(200)
1.13 self.send_header("Content-Type", "text/html")
1.14 @@ -234,13 +230,13 @@
1.15 self.send_header("Content-Type", "text/html")
1.16 self.send_header('Connection', 'close')
1.17 self.end_headers()
1.18 + stopone = ""
1.19
1.20 if body:
1.21 tl = self.server.get_transcoders()
1.22 if not tl:
1.23 running = "<p>No running transcoder.</p>\n"
1.24 stopall = ""
1.25 - stopone = ""
1.26
1.27 elif self.query.get("ip") and self.query.get("file"):
1.28 for transcoder, request in tl:
1.29 @@ -254,14 +250,15 @@
1.30
1.31 else:
1.32 running = "<p>Running transcoders:</p>\n"
1.33 - stopall = self._create_html_item("<a href='%s?request=all'>"
1.34 + stopall = utils._create_html_item("<a href='%s?request=all'>"
1.35 "[STOP ALL]</a>" %
1.36 self.menu["Stop"])
1.37
1.38 for transcoder, request in tl:
1.39 - stopone = self._create_html_item("%s: %s:%s<a href='%s?"
1.40 - "request=%s:%s'>"
1.41 - "[STOP]</a> - Status: %s%%"\
1.42 + stopone += utils._create_html_item("%s: %s:%s<a href='%s?"
1.43 + "request=%s:%s'>"
1.44 + "[STOP]</a> - "
1.45 + "Status: %s%%"\
1.46 % (
1.47 transcoder, request.client_address[0],
1.48 request.client_address[1],
1.49 @@ -269,11 +266,11 @@
1.50 request.client_address[1],
1.51 transcoder.status) )
1.52
1.53 - self.wfile.write(utils.getHTML("status",
1.54 - {"menu": self._nav_items(),
1.55 - "running": running,
1.56 - "stopall": stopall,
1.57 - "stopone": stopone}))
1.58 + self.wfile.write(utils.getHTML("status",
1.59 + {"menu": self._nav_items(),
1.60 + "running": running,
1.61 + "stopall": stopall,
1.62 + "stopone": stopone}))
1.63 # serve_status()
1.64
1.65