<!DOCTYPE html>
<html>
<head>
    <title>Anyproxy</title>
    <link rel="stylesheet" href="/css/uikit.gradient.min.css" />
    <link rel="stylesheet" href="/css/page.css" />
    <link rel="icon" type="image/png" href="/favico.png" />
    <script charset="utf-8" id="seajsnode"src="http://static.alipayobjects.com/seajs/??seajs/2.2.0/sea.js,seajs-combo/1.0.1/seajs-combo.js,seajs-style/1.0.2/seajs-style.js"></script>
    
</head>
<body>
	<div class="topHead">
		<h1>Anyproxy</h1>
		<a href="#" class="J_clearBtn"><span class="topBtn">Clear Logs(Ctrl+X)</span></a>
		<a href="#" class="J_statusBtn"><span class="topBtn">Stop</span></a>
		<a href="#" class="J_statusBtn btn_disable"><span class="topBtn">Resume</span></a>
		<a href="http://localhost:{{proxyConfigPort}}"><span class="topBtn">Config Local Response(beta)</span></a>
	</div>
	<div class="ruleDesc">
		<h4>rule : <strong>{{rule}}</strong></h4>
	</div>
	<div class="mainTableWrapper J_mainTable">
		<table class="uk-table uk-table-condensed uk-table-hover">
			<thead>
				<tr>
					<th class="col_id">id</th>
					<th class="col_method">method</th>
					<th class="col_code">code</th>
					<th class="col_host">host</th>
					<th class="col_path">path</th>
					<th class="col_mime">mime type</th>
					<th class="col_time">time</th>
				</tr>
			</thead>
			<tbody class="J_tableBody"></tbody>
		</table>
	</div>

	<div class="recordDetailOverlay J_recordDetailOverlay" style="display:none">
		<div id="dragbar"></div>
		<span class="escBtn J_escBtn">Close (ESC)</span>
		<div class="J_recordDetailOverlayContentWrapper">
			<div class="J_recordDetailOverlayContent"></div>
		</div>
	</div>

	<input type="hidden" id="socketPort" value="{{webSocketPort}}" />

	<script type="text/template" id="main_table_row">
		<td class="data_id"><%= _id %></td>
		<td><%= method %></td>
		<td class="http_status http_status_<%= statusCode %>"><%= statusCode %></td>
		<td title="<%= host %>"><%= host %></td>
		<td title="<%= path %>"><%= path %></td>
		<td><%= mime %></td>
		<td><%= startTimeStr %></td>
	</script>

	<script type="text/template" id="detail_tpl">
		<section class="req">
			<h4 class="subTitle">request</h4>
			<div class="detail">
				<ul class="uk-list">
				    <li><%= method %> <%= host %></li>
				    <li><span title="<%= path %>"><%= path %></span></li>
				    <% _.each(reqHeader, function(v,k) { %> <li><strong><%= k %></strong> : <%= v %></li><% }); %>
				</ul>
			</div>
		</section>

		<section class="reqBody">
			<h4 class="subTitle">request body</h4>
			<div class="detail">
				<p><%= reqBody %></p>
			</div>
		</section>

		<% if(statusCode) { %>
			<section class="resHeader">
				<h4 class="subTitle">response header</h4>
				<div class="detail">
					<ul class="uk-list">
					    <li>HTTP/1.1 <span class="http_status http_status_<%= statusCode %>"><%= statusCode %></span></li>
					    <% _.each(resHeader, function(v,k) { %> <li><strong><%= k %></strong> : <%= v %></li><% }); %>
					</ul>
				</div>
			</section>

			<section class="resBody">
				<h4 class="subTitle">response body</h4>
				<div class="detail">
					<form class="uk-form">
					    <textarea class="J_responseBody">loading...</textarea>
					</form>
				</div>
			</section>
		<% } %>
	</script>

	<script src="/page.js"></script>

</body>
</html>