-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·167 lines (136 loc) · 5.96 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>μ-Crawler</title>
<link rel="stylesheet" type="text/css" href="style/screen.css" />
<link rel="stylesheet" type="text/css" href="bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css" />
<link rel="stylesheet" type="text/css" href="bower_components/jquery-ui/themes/smoothness/jquery.ui.theme.css" />
</head>
<body>
<div id="header">
<h1>μ-Crawler</h1>
<p>A micro-crawler</p>
</div>
<div id="inside">
<div class="column">
<div id="minibrowser" class="square">
<h2>Mini-browser</h2>
URL: <input type="text" id="starturl" value="sites/" /> <button id="btn-load">Go</button><br />
Domain: <input type="text" id="domain" value="" />
<input type="checkbox" id="restrictDomain" checked="true" /> Restrict Domain<br />
<iframe id="navwindow">
An error occurred
</iframe>
</div>
<div class="square">
<h2>Oracles</h2>
<p>Stop oracle:</p>
<textarea id="stop-oracle">WebStateMachine.stop_oracle = function(dom) {
return false;
};</textarea>
<p>Test oracle:</p>
<textarea id="test-oracle">WebStateMachine.test_oracle = function(dom) {
return true;
};</textarea>
<div><button id="btn-define-oracles">Redefine</button></div>
</div>
</div><!-- /column 1 -->
<div class="column">
<div class="square" id="wsm-settings">
<h2>WSM settings</h2>
<ul>
<li>WSM preset:
<select id="wsmtype">
<option value="vanilla">Vanilla</option>
<option value="nobacktrack">No-backtrack</option>
<option value="onepointoh">Web 1.0</option>
<option value="backtrack">Backtrack</option>
<option value="tansuo">Tansuo</option>
</select>
<button id="btn-instantiate-wsm">Instantiate</button>
</li>
<li><input type="checkbox" id="automode" checked="true" /> Explore automatically</li>
<li><input type="checkbox" id="ignoreattributes" checked="true" /> Ignore attributes</li>
<li><input type="checkbox" id="useTimeout" checked="true" /> Use timeout between exploration steps</li>
<li><div id="poll-interval-slider"></div> Exploration speed: <span id="poll-interval">0.5 s</span></li>
</ul>
</div>
<div id="wsm-stats" class="square">
<h2>WSM statistics</h2>
<p id="no-stats-panel">No WSM has been instantiated. Instantiate a WSM first.</p>
<ul id="stats-panel">
<li>Step #<span id="stepid"></span></li>
<li>Current node ID: <span id="nodeid"></span></li>
<li>Next element to click: <a id="elpath" href="#" title="Click here to perform next exploration step"></a><br/>
<input type="checkbox" id="highlight" /> Highlight in window
</li>
<li>WSM size: <span id="wsm-size-nodes"></span> nodes, <span id="wsm-size-edges"></span> edges, <span id="wsm-size-bytes"></span> bytes</li>
</ul>
</div>
<div id="iframe-status" class="square">
<h2>iframe status</h2>
<table>
<tr>
<th>Current Status</th>
<td><a id="iframeStatus"></a></td>
</tr>
<tr>
<th>Href</th>
<td><a id="href"></a></td>
</tr>
<tr>
<th>Host</th>
<td id="host"></td>
</tr>
<tr>
<th>Path Name</th>
<td><a id="pathname"></a></td>
</tr>
<tr>
<th>Protocol</th>
<td id="protocol"></td>
</tr>
<tr>
<th>Pages Loaded</th>
<td id="pagesLoaded"></td>
</tr>
</table>
</div>
<!-- Contents of the current node in the WSM's memory -->
<pre id="nodecontents"></pre>
<div class="square">
<h2>Output file</h2>
<div>
<input type="radio" name="outputType" value="dot" checked="checked" /> DOT
<input type="radio" name="outputType" value="xml" /> XML
</div>
<textarea id="dot-contents"></textarea>
<div><button id="btn-dot-refresh">Refresh</button> <input type="checkbox" id="dot-autorefresh" /> Auto Refresh</div>
</div>
</div><!-- /column 2 -->
<div class="column">
<div class="square">
<h2>GraphViz</h2>
<div id="dot-graph"></div>
<div><button id="btn-graph-refresh">Refresh</button><input type="checkbox" id="graph-autorefresh" /> Auto Refresh (slower)</div>
</div>
</div><!-- /column 3 -->
</div> <!-- /inside -->
<div class="clearer"></div>
<div id="footer">Visit us on <a href="http://www.github.com/webmole/" target="_blank">GitHub</a></div>
<!-- They say it's better in the footer -->
<script type="text/javascript" src="bower_components/jquery/jquery.min.js"></script>
<script type="text/javascript" src="bower_components/jquery-ui/ui/minified/jquery-ui.min.js"></script>
<script type="text/javascript" src="bower_components/viz.js/viz.js"></script>
<script type="text/javascript" src="node_modules/Web-State-Machine/src/Dom.js"></script>
<script type="text/javascript" src="node_modules/Web-State-Machine/src/Wsm.js"></script>
<script type="text/javascript" src="node_modules/Web-State-Machine/src/VanillaWsm.js"></script>
<script type="text/javascript" src="node_modules/Web-State-Machine/src/NoBacktrackWsm.js"></script>
<script type="text/javascript" src="node_modules/Web-State-Machine/src/WebOnePointOhWsm.js"></script>
<script type="text/javascript" src="node_modules/Web-State-Machine/src/BacktrackWsm.js"></script>
<script type="text/javascript" src="node_modules/Web-State-Machine/src/TansuoWsm.js"></script>
<script type="text/javascript" src="scripts/AjaxListener.js"></script>
<script type="text/javascript" src="scripts/Scaffold.js"></script>
</body>
</html>