aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/templates
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-04-29 16:22:33 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-04-29 16:22:53 +1200
commitf2b11e5d5c56c95acb10962ebb78ec32c502b696 (patch)
tree47514f0e724e536f2f792a6be6eadcc5caea290d /libpathod/templates
parentfd946f0c04c2471ab9e579087af3f4cb645be41a (diff)
downloadmitmproxy-f2b11e5d5c56c95acb10962ebb78ec32c502b696.tar.gz
mitmproxy-f2b11e5d5c56c95acb10962ebb78ec32c502b696.tar.bz2
mitmproxy-f2b11e5d5c56c95acb10962ebb78ec32c502b696.zip
Add logging, expose logs through the web app interface.
Diffstat (limited to 'libpathod/templates')
-rw-r--r--libpathod/templates/frame.html17
-rw-r--r--libpathod/templates/log.html23
-rw-r--r--libpathod/templates/onelog.html10
3 files changed, 39 insertions, 11 deletions
diff --git a/libpathod/templates/frame.html b/libpathod/templates/frame.html
index 08dbd1ae..eaff5c02 100644
--- a/libpathod/templates/frame.html
+++ b/libpathod/templates/frame.html
@@ -4,16 +4,15 @@
<meta charset="utf-8">
<title>Pathod</title>
<link href="/static/bootstrap.min.css" rel="stylesheet">
- <style type="text/css">
- body {
- padding-top: 60px;
- }
+ <style>
+ body {
+ padding-top: 45px;
+ }
</style>
</head>
<body>
-
- <div class="navbar navbar-fixed">
+ <div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="#">Pathod</a>
@@ -31,10 +30,8 @@
{% block body %}
{% end %}
- <footer>
- <p>made by <a href="http://corte.si">Aldo Cortesi</a> </p>
- </footer>
-
+ <hr>
+ <p>by <a href="http://corte.si">Aldo Cortesi</a> </p>
</div> <!-- /container -->
</body>
diff --git a/libpathod/templates/log.html b/libpathod/templates/log.html
index 3539291a..e8bf113a 100644
--- a/libpathod/templates/log.html
+++ b/libpathod/templates/log.html
@@ -1,5 +1,26 @@
{% extends frame.html %}
{% block body %}
- <h1> Log </h1>
+ <form style="float: right" method="POST" action="/log/clear">
+ <button type="submit" class="btn">clear</button>
+ </form>
+ <h1> Logs </h1>
+ <hr>
+
+ <table class="table table-striped table-condensed">
+ <thead>
+ <tr>
+ <th>id</th>
+ <th>url</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for i in log %}
+ <tr>
+ <td>{{ i["id"] }}</td>
+ <td><a href="/log/{{ i["id"] }}">{{ i["request"]["full_url"] }}</a></td>
+ </tr>
+ {% end %}
+ </tbody>
+ </table>
{% end %}
diff --git a/libpathod/templates/onelog.html b/libpathod/templates/onelog.html
new file mode 100644
index 00000000..378bac32
--- /dev/null
+++ b/libpathod/templates/onelog.html
@@ -0,0 +1,10 @@
+{% extends frame.html %}
+{% block body %}
+ <h2> Log entry {{ lid }} </h2>
+ <hr>
+<pre>
+{{ alog }}
+</pre>
+
+{% end %}
+