123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <html>
- <head>
- <title>ngrok</title>
- <link href="/static/bootstrap.min.css" rel="stylesheet">
- <link href="/static/highlight.min.css" rel="stylesheet">
- <script src="/static/highlight.min.js"></script>
- <script src="/static/jquery-1.9.1.min.js"></script>
- <script>hljs.initHighlightingOnLoad();</script>
- <script type="text/javascript">
- $(function() {
- $("ul.request.nav a").click(function() {
- $(this).closest("div").find(".raw, .headers, .summary").hide();
- $(this).closest("div").find("." + $(this).attr("target")).show();
- $(this).closest("ul").find("li.active").removeClass("active");
- $(this).parent().addClass("active");
- return false;
- });
- $(".replay").click(function() {
- $.ajax({
- type: "POST",
- url: "/http/in/replay",
- data: { txnid: $(this).closest(".txn").attr("txnid") }
- });
-
- return false;
- });
- });
- </script>
- <style type="text/css">
- body { margin-top: 50px; }
- ul.history > li { none; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #ccc; }
- .headers, .raw { display: none; }
- table.params { font-family: Courier, monospace; }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="navbar navbar-inverse navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <a class="brand" href="#">ngrok</a>
- <ul class="nav">
- <li class="active"><a href="#">Inbound Requests</a></li>
- <li><a href="#">Outbound Requests</a></li>
- <li><a href="#">Configuration</a></li>
- </ul>
- </div>
- </div>
- </div>
- <ul class="history unstyled">
- {{ range .HttpRequests.Slice }}
- <li class="txn" txnid="{{ .Id }}">
- <div class="row">
- <div class="span6">
- {{ with .Req }}
- <h3>{{ .Method }} {{ .URL.Path }}</h3>
- <ul class="request nav nav-pills">
- <li class="active"><a target="summary" href="#">Summary</a></li>
- <li><a href="#" target="headers">Headers</a></li>
- <li><a href="#" target="raw">Raw</a></li>
- <li class="pull-right"><button class="replay btn btn-primary">Replay</button></li>
- </ul>
- <div class="raw">
- {{ with $raw := dumpRequest . }}
- <pre><code class="http">{{ $raw }}</code></pre>
- {{ end }}
- </div>
- <div class="headers">
- {{ with .Header }}
- <h6>Headers</h6>
- <table class="table params">
- {{ range $key, $value := .}}
- <tr>
- <th> {{ $key }} </th>
- <td> {{ $value }} </td>
- </tr>
- {{ end }}
- </table>
- {{ end }}
- </div>
- <div class="summary">
- {{ with .URL.Query }}
- <h6>Query Params</h6>
- <table class="table params">
- {{ range $key, $value := .}}
- <tr>
- <th> {{ $key }} </th>
- <td> {{ $value }} </td>
- </tr>
- {{ end }}
- </table>
- {{ end }}
- {{ template "body" . }}
- </div>
- {{ end }}
- </div>
- <div class="span6">
- {{ with .Resp }}
- <h3 class="{{ classForStatus .Status }}">{{ .Status }}</h3>
- {{ with $raw := dumpResponse . }}
- <pre><code class="http">{{ $raw }}</code></pre>
- {{ end }}
- {{ end }}
- </div>
- </div>
- </li>
- {{ end }}
- </ul>
- </div>
- </body>
- </html>
|