update web interface

This commit is contained in:
加里 2014-08-28 11:53:39 +08:00
parent 6b6708ee29
commit 1f32f77c8c
4 changed files with 15 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "anyproxy",
"version": "1.3.0",
"version": "1.3.1",
"description": "a charles/fiddler like proxy written in NodeJs, which can handle HTTPS requests and CROS perfectly.",
"main": "proxy.js",
"bin": {

View File

@ -54,6 +54,14 @@
width: 180px;
}
.mainTableWrapper .col_mime{
width: 150px;
}
.mainTableWrapper .col_time{
width: 160px;
}
.mainTableWrapper tr.row_odd{
background: #f5f5f5;
}

View File

@ -21,6 +21,7 @@
<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>
@ -42,6 +43,7 @@
<td title="<%= host %>"><%= host %></td>
<td title="<%= path %>"><%= path %></td>
<td><%= mime %></td>
<td><%= startTimeStr %></td>
</script>
<script type="text/template" id="detail_tpl">

View File

@ -146,9 +146,6 @@ seajs.use(['$','Underscore' ,'Backbone'], function($, _, Backbone) {
$(document).on("keyup",function(e){
if(e.keyCode == 88 && e.ctrlKey){ // ctrl + x
clearLogs();
}else{
console.log("key up");
console.log(e);
}
});
@ -161,6 +158,10 @@ seajs.use(['$','Underscore' ,'Backbone'], function($, _, Backbone) {
dataSocket.onmessage = function(event){
var data = JSON.parse(event.data);
var reqDate = new Date(data.startTime);
data.startTimeStr = reqDate.toLocaleDateString()+ " " + reqDate.toLocaleTimeString();
var previous;
if(previous = recList.get(data.id)){
previous.set(data);