forked from rweigel/datacache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync.htm
More file actions
149 lines (147 loc) · 5.54 KB
/
Copy pathsync.htm
File metadata and controls
149 lines (147 loc) · 5.54 KB
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
<!DOCTYPE html>
<html ng-app>
<head>
<title>Data Cache</title>
<link rel="stylesheet" type="text/css" href="asset/bootstrap.css">
<link rel="stylesheet" type="text/css" href="asset/bootstrap-responsive.css">
<link rel="stylesheet" type="text/css" href="asset/main.css">
<link rel="icon" type="image/ico" href="asset/favicon.ico"/>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="http://datacache.org/">DataCache</a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="async">Async</a></li>
<li class="active"><a href="sync">Sync</a></li>
<li><a href="/cache">Cache</a></li>
<li><a href="https://github.com/rweigel/datacache">Source</a></li>
<li><a href="log">Log</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div id='input' class="span6">
<h2>Submit URLs</h2>
<br/>
<form id="urlForm" action="sync" method="post" target='response'>
<p>
Response: include
<input type='checkbox' name='includeData' value='true' > data</input>
<input type='checkbox' name='includeMeta' value='true' > metadata</input>
<input type='checkbox' name='includeHeader' checked='checked' value='true' > HTTP header</input>
<input type='checkbox' name='includeLstat' checked='checked' value='true' > lstat</input>
</p>
<p>
Response: return:
<select style="width:5em;height:2.0em;" name='return'>
<option value="report">report</option>
<option value="json">json</option>
<option value="xml">xml</option>
<option value="jsons">jsons</option>
</select>
<!-- input type='checkbox' name='compressResponse' value='false' > Don't compress response</input -->
</p>
<p>
Processing:
<input type='checkbox' name='forceUpdate' value='true' ><span title="Writes new md5url.* files if md5url.data has changed."> Update <a href='cache'>cache</a></span></input>
<input type='checkbox' name='forceWrite' value='true' ><span title="Writes new md5url.* even if response md5url.data is same as cached md5url.data."> Force <a href='cache'>cache</a> write.</span></input>
<select style="width:3em;height:2.0em" name='maxTries'>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
Max attempt(s)
</p>
<p>
Processing:
<span style="vertical-align:middle">Plug-in: <input type='text' name='plugin' value="" style="width: 4em;height:1em;"/></span>
<span style="vertical-align:middle"> Cache subdir: <input type='text' name='dir' style="width: 4em;height:1em;"/></span>
</p>
<p>
Processing:
<span style="vertical-align:middle">Data Line Regex: <input type='text' name='lineRegExp' value="^[0-9]" style="width: 4em;height:1em;"/></span>
</p>
<p>
Processing:
<span style="vertical-align:middle">Extract Data: <input type='text' name='extractData' value='' style="width: 10em;height:1em;"/></span>
</p>
<p>
URLs: <span style="vertical-align:middle">Prefix: <input type='text' name='prefix' style="width: 12em;height:1em;"/></span>
</p>
<p>
URLs: <span style="vertical-align:middle">Postfix: <input type='text' name='postfix' style="width: 12em;height:1em;"/></span>
</p>
<p>
URLs: <span style="vertical-align:middle">Template expander: <input type='text' name='templateExpander' style="width: 12em;height:1em;"/></span>
</p>
<p>
URLs: Enter one per line or use a pre-generated list <span id="presets"></span>
</p>
<p>
<textarea id='urls' rows='5' cols='100' name='source'></textarea>
</p>
<p>
<button type='submit'>Submit</button> <button type='submit'>Expand</button>
</p>
</form>
</div>
<div id='response' class="span6">
<div class="row">
<h2>Response</h2>
<br/>
<iframe style="height:450px" name='response'></iframe>
</div>
</div>
</div>
<hr>
<footer>
</footer>
</div>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="asset/bootstrap.min.js"></script>
<script type="text/javascript" src="asset/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// $('#urlForm').ajaxForm();
$.getJSON("api/presets", function(data){
$("#presets").append("<select id='presetselect' style='height:2.0em;width:10em'/>");
$("#presetselect").append("<option id='title'>-lists-</option>");
for (i = 0; i < data.length; i++) {
var o = $("<option/>")
.click(function(){$("#urls").val(data[i].urls);})
.attr("id",i)
.html(data[i].name);
if (data[i].name == "_httpdemo") {
o.attr('selected',true);
}
$("#presetselect").append(o);
}
$("#presetselect").change(function () {
var id = $(this).find("option:selected").attr("id");
if (id !== "title") {
$("#urls").text(data[parseInt(id)].urls);
} else {
$("#urls").text("");
}
})
$("#presetselect").trigger('change');
})
})
</script>
</body>
</html>