index.html revision c407dc5cd9bdc5668497f21b26b09d988ab439de
1<html>
2<!--
3Copyright (c) 2010 The Chromium Authors. All rights reserved.
4Use of this source code is governed by a BSD-style license that can be
5found in the LICENSE file.
6-->
7  <head>
8    <link rel="stylesheet" href="main.css">
9    <script src="util.js"></script>
10    <script src="view.js"></script>
11    <script src="tabswitcherview.js"></script>
12    <script src="dataview.js"></script>
13    <script src="httpcacheview.js"></script>
14    <script src="testview.js"></script>
15    <script src="main.js"></script>
16    <script src="dnsview.js"></script>
17    <script src="requestsview.js"></script>
18    <script src="detailsview.js"></script>
19    <script src="sourceentry.js"></script>
20    <script src="resizableverticalsplitview.js"></script>
21    <script src="topmidbottomview.js"></script>
22    <script src="timelineviewpainter.js"></script>
23    <script src="logviewpainter.js"></script>
24    <script src="loggrouper.js"></script>
25    <script src="proxyview.js"></script>
26  </head>
27  <body onload="onLoaded()">
28    <!-- Tab switcher for main categories. -->
29    <div id=categoryTabHandles>
30      <ul>
31        <li><a href="#data" id=dataTab>Data</a></li>
32        <li><a href="#proxy" id=proxyTab>Proxy</a></li>
33        <li><a href="#requests" id=requestsTab>Requests</a></li>
34        <li><a href="#dns" id=dnsTab>DNS</a></li>
35        <li><a href="#sockets" id=socketsTab>Sockets</a></li>
36        <li><a href="#httpCache" id=httpCacheTab>HTTP Cache</a></li>
37        <li><a href="#tests" id=testTab>Tests</a></li>
38      </ul>
39      <div style="clear: both;"></div>
40    </div>
41    <!-- Proxy info -->
42    <div id=proxyTabContent>
43      <h4>
44        Current proxy settings
45        <input type=button value="Reload settings" id=proxyReloadSettings />
46      </h4>
47      <pre id=proxyCurrentConfig></pre>
48
49      <h4>
50        Proxies which have failed recently, and are marked as bad
51        <input type=button value="Clear bad proxies" id=clearBadProxies />
52      </h4>
53      <table class="styledTable">
54        <thead>
55          <tr>
56            <th>Bad proxy server</th>
57            <th>Time for next retry</th>
58          </tr>
59        </thead>
60        <tbody id=badProxiesTableBody></tbody>
61      </table>
62    </div>
63    <!-- Host resolver info -->
64    <div id=dnsTabContent>
65      <h4>
66        Host resolver cache
67        <input type=button value="Clear host cache" id=clearHostResolverCache />
68      </h4>
69      <ul>
70        <li>Capacity: <span id=hostResolverCacheCapacity></span></li>
71        <li>Time to live (ms) for success entries:
72            <span id=hostResolverCacheTTLSuccess></span></li>
73        <li>Time to live (ms) for failure entries:
74            <span id=hostResolverCacheTTLFailure></span></li>
75      </ul>
76
77      <table class="styledTable">
78        <thead>
79          <tr>
80            <th>Hostname</th>
81            <th>Family</th>
82            <th>Addresses</th>
83            <th>Expires</th>
84          </tr>
85        </thead>
86        <tbody id=hostResolverCacheTbody>
87        </tbody>
88      </table>
89    </div>
90    <!-- Sections TODO -->
91    <div id=socketsTabContent>TODO: display socket information (outstanding connect jobs)</div>
92    <div id=httpCacheTabContent>
93      <h4>Entries</h4>
94      <a href="chrome://view-http-cache" target=_blank>Explore cache entries</a>
95
96      <h4>Statistics</h4>
97      <div id=httpCacheStats>Nothing loaded yet.</div>
98    </div>
99    <!-- Import/Export data -->
100    <div id=dataTabContent>
101
102<h2>How to get data for bug reports</h2>
103
104<ol>
105<li>Reproduce the network problem.</li>
106<li>Click this button:
107  <button id=exportToText style="font-size: 110%"><b>Dump to text</b> </button>
108</li>
109
110<li>Copy-paste the data on this page to a text file.</li>
111
112<li>Email the text file to the bug investigator,
113  <b>along with an explanation of what went wrong.</b>
114</li>
115
116</ol>
117
118<script>
119function toggleMoreExplanation() {
120  var div = document.getElementById('moreExplanation');
121  var isToggled = div.style.display == '';
122  document.getElementById('moreExplanationIcon').innerText =
123      isToggled ? 'Show' : 'Hide';
124  setNodeDisplay(div, !isToggled);
125}
126</script>
127
128<a href="javascript:toggleMoreExplanation()">
129  <span id=moreExplanationIcon>Show</span> more explanation</a>
130
131<div style="display:none; margin-left: 15px;" id=moreExplanation>
132
133<ul>
134<li>The network log <b>may contain personally identifying information</b> like
135  IP addresses, URLs, and cookies.</li>
136<ul>
137<li>You can edit the log to obscure information if you like, but sometimes it
138  is relevant to the bug.</li>
139</ul>
140<li>Ideally you would have this tool running <b>before</b> you reproduce the 
141  bug.
142  If that isn't possible (perhaps the bug happens unpredictably), then the
143  next best thing is to load chrome://net-internals/ <b>as soon as you can
144  after</b> the problem has occurred.</li>
145</ul>
146
147<h2>How it works</h2>
148
149<ul>
150<li>While this page is open, it will capture the network events that are
151  happening in Chrome. You can view that in real-time by going to the
152  <a href='#requests'>Requests</a> tab.</li>
153<li>Once you close this window, the data it had captured is discarded.</li>
154<li>Chrome keeps around a small buffer of network events for the
155  <b>most recent</b> requests. That way if you open chrome://net-internals/
156  <b>shortly after</b> encountering a problem, you can still find the relevant
157  data. </b>
158  These <b>passively captured</b> events are less accurate however, and will
159  be prefixed in the log with <span style="font-family: monospace;">(P)</span>.
160</li>
161</ul>
162</div>
163
164       <pre id=exportedDataText></pre>
165    </div>
166    <!-- Connection tests -->
167    <div id=testTabContent>
168      <p>Input a URL which failed to load, and then click the button to run some
169         tests for why it failed.</p>
170      <form id=connectionTestsForm>
171        URL: <input type=text id=testUrlInput />
172        <input type=submit value="Start tests" />
173      </form>
174      <div id=testSummary></div>
175    </div>
176
177    <!-- ================= Requests view =================== -->
178
179    <!-- Filter Box: This the top bar which contains the search box.  -->
180    <div id=filterBox>
181      <table width=100%>
182        <tr>
183          <td width=1%>Filter:</td>
184          <td width=98%><input type="search" incremental id=filterInput /></td>
185          <td width=1% id=filterCount>(1 of 34)</td>
186        </tr>
187      </table>
188    </div>
189    <!-- Requests Box: This the panel on the left which lists the requests -->
190    <div id=requestsBox>
191      <table id=requestsListTable cellspacing=0 cellpadding=0 width=100%>
192        <thead>
193          <tr>
194            <td><input type=checkbox id=selectAll /></td>
195            <td>ID</td>
196            <td>Source</td>
197            <td width=99%>Description</td>
198          </tr>
199        </thead>
200        <!-- Requests table body: This is where request rows go into -->
201        <tbody id=requestsListTableBody></tbody>
202      </table>
203    </div>
204    <!-- Action Box: This is a button bar along the bottom -->
205    <div id=actionBox>
206      <input type=button value="Stop capturing" onclick="alert('TODO')" />
207      <input type=button value="Delete selected" id=deleteSelected />
208    </div>
209    <!-- Splitter Box: This is a handle to resize the vertical divider -->
210    <div id=splitterBox></div>
211    <!-- Details box: This is the panel on the right which shows information -->
212    <div id=detailsTabHandles>
213      <table class=tabSwitcher cellspacing=0>
214        <tr>
215          <th id=detailsLogTab>Log</th>
216          <td class=tabSwitcherSpacer>&nbsp;</td>
217          <th id=detailsTimelineTab>Timeline</th>
218        </tr>
219      </table>
220      <div class=tabSwitcherLine></div>
221    </div>
222    <div id=detailsLogBox></div>
223    <div id=detailsTimelineBox></div>
224  </body>
225</html>
226