page.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <html>
  2. <head>
  3. <title>ngrok</title>
  4. <link href="/static/css/highlight.min.css" rel="stylesheet">
  5. <link href="/static/css/bootstrap.min.css" rel="stylesheet">
  6. <script src="/static/js/highlight.min.js"></script>
  7. <script src="/static/js/vkbeautify.js"></script>
  8. <script src="/static/js/jquery-1.9.1.min.js"></script>
  9. <script src="/static/js/jquery.timeago.js"></script>
  10. <script src="/static/js/angular.js"></script>
  11. <script src="/static/js/angular-sanitize.min.js"></script>
  12. <script src="/static/js/base64.js"></script>
  13. <script src="/static/js/ngrok.js"></script>
  14. <script type="text/javascript">
  15. window.data = JSON.parse({% . %});
  16. </script>
  17. <style type="text/css">
  18. body { margin-top: 50px; }
  19. table.params { font-size: 12px; font-family: Courier, monospace; }
  20. .txn-selector tr { cursor: pointer; }
  21. .txn-selector tr:hover { background-color: #ddd; }
  22. tr.selected, tr.selected:hover {
  23. background-color: #ff9999;
  24. background-color: #000000;
  25. color:white;
  26. }
  27. .path {
  28. width: 100%;
  29. }
  30. .wrapped {
  31. word-wrap: break-word;
  32. word-break: break-word;
  33. overflow: hidden;
  34. }
  35. </style>
  36. </head>
  37. <body ng-app="ngrok">
  38. <div class="container" ng-controller="HttpTxns">
  39. <div class="navbar navbar-inverse navbar-fixed-top">
  40. <div class="navbar-inner">
  41. <div class="container">
  42. <a class="brand" href="#">ngrok</a>
  43. <ul class="nav">
  44. <li class="active"><a href="#">Inbound Requests</a></li>
  45. <!--
  46. <li><a href="#">Outbound Requests</a></li>
  47. <li><a href="#">Configuration</a></li>
  48. -->
  49. </ul>
  50. </div>
  51. </div>
  52. </div>
  53. <div ng-show="txns.length==0" class="row">
  54. <div class="span6 offset3">
  55. <div class="well" style="padding: 20px 50px;">
  56. <h4>No requests to display yet</h4>
  57. <hr />
  58. <h5>To get started, make a request to one of your tunnel URLs:</h5>
  59. <ul>
  60. <li ng-repeat="t in tunnels"><p class="lead"><a target="_blank" href="{{ t.PublicUrl }}">{{ t.PublicUrl }}</a></p></li>
  61. </ul>
  62. </p>
  63. </div>
  64. </div>
  65. </div>
  66. <div ng-show="txns.length>0" class="row">
  67. <div class="span6">
  68. <h4>All Requests</h4>
  69. <table class="table txn-selector">
  70. <tr ng-controller="TxnNavItem" ng-class="{'selected':isActive()}" ng-repeat="txn in txns" ng-click="makeActive()">
  71. <td class="wrapped"><div class="path">{{ txn.Req.MethodPath }}</div></td>
  72. <td>{{ txn.Resp.Status }}</td>
  73. <td><span class="pull-right">{{ txn.Duration }}</span></td>
  74. </tr>
  75. </table>
  76. </div>
  77. <div class="span6" ng-controller="HttpTxn" ng-show="!!Txn">
  78. <div class="row-fluid">
  79. <div class="span4">
  80. <span title="{{ISO8601(Txn.Start)}}" class="muted">
  81. {{TimeFormat(Txn.Start)}}
  82. </span>
  83. </div>
  84. <div class="span4">
  85. <i class="icon-time"></i> Duration
  86. <span style="margin-left: 8px;" class="muted">{{Txn.Duration}}</span>
  87. </div>
  88. <div class="span4">
  89. <i class="icon-user"></i> IP
  90. <span style="margin-left: 8px;" class="muted">{{Txn.ConnCtx.ClientAddr.split(":")[0]}}</span>
  91. </div>
  92. </div>
  93. <hr />
  94. <div ng-show="!!Req" ng-controller="HttpRequest">
  95. <h3 class="wrapped">{{ Req.MethodPath }}</h3>
  96. <div onbtnclick="replay()" btn="Replay" tabs="Summary,Headers,Raw,Binary">
  97. </div>
  98. <div ng-show="isTab('Summary')">
  99. <keyval title="Query Params" tuples="Req.Params"></keyval>
  100. <div body="Req.Body" binary="Req.Binary"></div>
  101. </div>
  102. <div ng-show="isTab('Headers')">
  103. <keyval title="Headers" tuples="Req.Header"></keyval>
  104. </div>
  105. <div ng-show="isTab('Raw')">
  106. <pre><code class="http">{{ Req.RawText }}</code></pre>
  107. </div>
  108. <div ng-show="isTab('Binary')">
  109. <pre><code>{{ Req.RawBytes }}</code></pre>
  110. </div>
  111. </div>
  112. <hr style="margin: 40px 0 20px" />
  113. <div ng-show="!!Resp" ng-controller="HttpResponse">
  114. <h3 ng-class="Resp.statusClass">{{ Resp.Status }}</h3>
  115. <div tabs="Summary,Headers,Raw,Binary"></div>
  116. <div ng-show="isTab('Summary')">
  117. <div body="Resp.Body" binary="Resp.Binary"></div>
  118. </div>
  119. <div ng-show="isTab('Headers')">
  120. <keyval title="Headers" tuples="Resp.Header"></keyval>
  121. </div>
  122. <div ng-show="isTab('Raw')">
  123. <pre><code class="http">{{ Resp.RawText }}</code></pre>
  124. </div>
  125. <div ng-show="isTab('Binary')">
  126. <pre><code>{{ Resp.RawBytes }}</code></pre>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. <!-- UserVoice JavaScript SDK (only needed once on a page) -->
  133. <script>(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/4KUmdF6WZd302MfwoayMw.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})()</script>
  134. <!-- A tab to launch the Classic Widget -->
  135. <script>
  136. UserVoice = window.UserVoice || [];
  137. UserVoice.push(['showTab', 'classic_widget', {
  138. mode: 'feedback',
  139. primary_color: '#cc6d00',
  140. link_color: '#007dbf',
  141. forum_id: 211925,
  142. tab_label: 'Feedback',
  143. tab_color: '#cc6d00',
  144. tab_position: 'middle-left',
  145. tab_inverted: false
  146. }]);
  147. </script>
  148. </body>
  149. </html>