forked from rictic/reconciliation_ui
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrecon.html
359 lines (294 loc) · 19.5 KB
/
recon.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Freebase Loader</title>
<link rel="stylesheet" href="lib/dataTables/media/css/demos.css" type="text/css" media="screen">
<link rel="stylesheet" href="lib/jquery.ui/themes/cupertino/ui.all.css" type="text/css" media="screen" title="Cupertino">
<link rel="stylesheet" href="lib/suggest/freebase-controls.css" type="text/css" media="screen">
<link rel="stylesheet" href="lib/suggest/jquery.freebase.minitopic.css" type="text/css" media="screen">
<link rel="stylesheet" href="lib/suggest/freebase.suggest.css" type="text/css" media="screen">
<link rel="stylesheet" href="recon.css" type="text/css" media="screen">
</head>
<body>
<div id='main_app'>
<!-- Handling the input from the user -->
<div id="gettingInput">
<!-- Ask for a spreadsheet -->
<div id="spreadsheetInput" class="container">
<h3>Paste your spreadsheet here:</h3>
<textarea name="initialInput" id="initialInput" class='spreadsheet' ></textarea><br>
<div class="spinnerHolder">
<img src='resources/spinner.gif' class='inputLoading invisible'>
</div>
<div class='examples'>
Try Freebase Loader with these example spreadsheets:
<button onclick="$('#initialInput')[0].value = sampleData;$('#initialInput').keyup();">Load Simple Movie Example</button>
<button onclick="$('#initialInput')[0].value = complexData;$('#initialInput').keyup();">Load Complex Movie Example</button>
</div>
</div>
<div id='inputWindow'>
<div class="inputWarnings invisible">
<ul>
</ul>
</div>
<!-- If the spreadsheet is ambiguous, ask for clarification -->
<div id="formatDisambiguation" class="container invisible screen">
<h3>Are these <span class='numThings'>several</span> rows about <span class='numThings'>several</span> separate <span class='thingType'>topic</span>s, or just the one named "<span class='thingName'></span>"?</h3>
<button class='dontCombine'>
This is about <span class='numThings'>several</span> separate <span class='thingType'>topic</span>s.
</button>
<button class='doCombine'>
These rows are all about "<span class='thingName'>one thing</span>"
</button>
<table>
<thead>
<tr class='headers'><th></th></tr>
</thead>
<tbody>
<tr><td></td></tr>
</tbody>
</table>
</div>
<!-- Confirm that the parse was correct -->
<div id="spreadsheetPreview" class="container invisible screen">
<h3>Does this look right?</h3>
<div id="spreadsheetDiv" class="container">
</div>
<br>
<button style='float:right;' class='continue'>Yep, Let's Continue ></button>
</div>
</div>
</div>
<!-- The main app area -->
<div id="tabs" class="invisible">
<ul>
<li><a href="#spreadsheetReconcile"><span>Reconcile Record <span class="manual_count">(0)</span></span></a></li>
<li><a href="#reviewScreen"><span>Review</span></a></li>
<li><a href="#spreadsheetRender"><span>Retrieve Your Data</span></a></li>
</ul>
<!-- The reconciliation area -->
<div id="spreadsheetReconcile" class="">
<div class="manualQueueEmpty">
<div class="initialLoadingMessage">
<h3>Loading, just a moment...</h3>
</div>
<div class="nowReconciling invisible">
<h3>Everything's working fine automatically</h3>
As the auto-reconciler finds topics that it's unable to reconcile, they will appear here to give you a chance at resolving them
</div>
<div class="notReconciling invisible">
<h3>All done.</h3>
All of your records are now reconciled. Retrieve your spreadsheet by clicking the tab up above.
</div>
</div>
<!-- Templates are moved here to be displayed -->
<div class='displayArea'>
</div>
<div class='holdingArea invisible'>
<!-- Template for a manual reconciliation case. This is copied and the holes are filled in
in code, so this is safe to edit so long as it has the same general structure.
-->
<div id="manualReconcileTemplate" class="manualReconChoices">
<div class="internalReconciliationPrompt invisible">
<p>There are <span class="count">several</span> <span class='type'>topic</span>s with the name "<span class="name">{name goes here}</span>"</p>
<label class='treat_the_same' for="treat_the_same">I'm sure they're all the same topic.</label><input type="checkbox" name="treat_the_same" class="treat_the_same">
</div>
<div class='manualReconMeat'>
<table>
<thead>
<tr><th class='title' colspan='2'>Match your data:</th></tr>
</thead>
<tbody class='currentRecord'>
<tr class="recordVals"><td></td><td></td></tr>
</tbody>
<tr><th class='title' colspan='4'>to one of these Freebase topics:</th></tr>
<tbody class="manualReconciliationChoices">
</tbody>
</table>
<button class="moreButton">More candidates ↓</button><img src="resources/spinner.gif" class="invisible loadingMoreCandidates">
<h4>Or:</h4>
<button class="skipButton otherSelection" name="">Skip This Item</button>
<button class="newButton otherSelection" name="None">Not in Freebase</button>
<label>Search For Another Topic:</label>
<input type="text" class="find_topic">
<div>
<button class="undo">Undo</button>
</div>
</div>
</div>
</div>
</div>
<!-- Review what's been reconciled so far -->
<div id='reviewScreen'>
<h3>Items reconciled so far:</h3>
<h5 class='subheading'>(items which have the exact same name are faded out)</h5>
<table>
<thead>
<tr><th>Your Input</th><th>Freebase Topic</th></tr>
</thead>
<tbody class="manualReconciliationsToReview invisible">
<tr><th class='mid-table-subheading' colspan='2'>Manual Reconciliations</th></tr>
</tbody>
<tbody><tr><th></th><th></th></tr></tbody>
<tbody class="automaticReconciliationsToReview invisible">
<tr><th class='mid-table-subheading' colspan='2'>Automatic Reconciliations</th></tr>
</tbody>
<tbody><tr><th></th><th></th></tr></tbody>
<tbody class="oldReconciliationsToReview invisible">
<tr><th class='mid-table-subheading' colspan='2'>Items Reconciled Previously</th></tr>
</tbody>
</table>
<table class='invisible templates'>
<tr class='reviewReconciledTemplate'><td><span class='candidateName'>Stevie wonder</span></td><td class='freebaseName'>Stevie Wonder</td></tr>
<tr class='reviewNewTemplate'><td><span class='candidateName'>Stevie wonder</span></td><td>None - create a new one</td></tr>
<tr class='reviewSkippedTemplate'><td><span class='candidateName'>Stevie wonder</span></td><td>Manually Skipped - not reconciled</td></tr>
<tr class='reviewRecGroupTemplate'><td class="candidate"><span class="count">Several</span> <span class="type">topic</span>s named <span class="name">Stevie wonder</span></td><td class='freebaseName'>Stevie Wonder</td></tr>
</table>
</div>
<!-- Give the user their data back -->
<div id="spreadsheetRender" class="container">
<h3>Copy your updated <span class='outputFormatText'>spreadsheet</span> from here:</h3>
<textarea id="outputData" class='spreadsheet'></textarea><br>
Format: <label for="spreadsheet_out">Spreadsheet</label><input type="radio" name='outputFormat' class='outputFormat' value="spreadsheet" id="spreadsheet_out" checked> | <label for="json_out">JSON</label><input type="radio" name='outputFormat' class='outputFormat' value="json" id="json_out">
<h3>Upload your data to Freebase:</h3>
<div class="uploadToFreeQ">
<div class='uploadLogin invisible'>
You need to <a href='http://www.freebase.com/signin/login' target='_blank'>login at Freebase.com</a> before uploading. <button class="checkLogin">Then Click Here To Continue</button>
</div>
<div class='uploadForm invisible'>
<div class="renderingTriples invisible">
One moment, preparing your data for upload... <img src="resources/spinner.gif">
</div>
<div class="triplesRendered invisible">
We've found <span class='triple_count'></span> assertions that you can upload.
<button class="displayTriples">Detailed view ↓</button>
<div>
<pre class='triplesDisplay invisible'></pre>
</div>
<br>
<label for="mdo_name">Name for this Data: </label><input type="text" name="mdo_name" value="" id="mdo_name" size='50'><br>
<label for="mdo_data_source">Source of the Data:</label><input type="text" name="mdo_data_source" value="" id="mdo_data_source"><br>
<input type='hidden' name='mdo_data_source_id' value='' id='mdo_data_source_id'>
<form id="freeq_form" target="_blank" method="POST" accept-charset="utf-8">
<input type='hidden' name='user' value='' id='user'>
<input type='hidden' name="action_type" value="LOAD_TRIPLE" id="action_type">
<input type="hidden" name="operator" value="/user/spreadsheet_bot" id="operator">
<input type="hidden" name="check_params" value="false" id="check_params">
<input type='hidden' name='mdo_info' value='' id='mdo_info'>
<input type="hidden" name="payload" value="" id="payload">
<input type="hidden" name="followMerges" value="true" id="followMerges">
Upload to: <label for='sandbox'>Sandbox</label><input type="radio" class='graphport' name="graphport" value="sandbox" id='sandbox' checked> | <label for='otg'>Freebase.com</label><input type="radio" class='graphport' name="graphport" id='otg' value="otg"><br>
<div id='otg_upload_warning' class='invisible warning'>Please upload to Sandbox first and ensure that the upload is as you expect before uploading to Freebase.com</div>
<input type="submit" value="Upload">
<div class="loginUnknown invisible">
Unable to tell if you're logged in or not.<br>
If you get a 401 Unauthenticated error when uploading, be sure that you're <a href='http://www.freebase.com/signin/login' target='_blank'>logged in on freebase.com</a>.
</div>
<div class="error invisible">
</div>
</form>
</div>
<br>
</div>
</div>
<div class="freeqLoad invisible">
<div class="freeqLoadInProgress invisible">
<div>
Your data is loading now:
</div>
<div id="upload_progressbar"></div>
</div>
<div class="uploadToSandboxComplete invisible">
Your data is finished loading into sandbox! Check the data on sandbox to ensure its quality, then click here: <button class="loadAgainButton">Upload with different settings</button>
</div>
<div class="uploadToOTGComplete invisible">
Your data has been uploaded to Freebase.
<div class="fetchingFreeqIds">
Fetching the ids of newly created topics... <img src="resources/spinner.gif">
</div>
<div class="idsFetched invisible">
The ids of any new topics that were created have been added into to your spreadsheet.
</div>
</div>
<a class="peacock_link" target="_blank">View the status of your data on Peacock</a><br/>
</div>
<div class='uploadSpinner invisible'>
<img src="resources/spinner.gif">
</div>
</div>
</div>
<div id="progresscontainer" class="nowReconciling invisible">
<label class='kind'>Finding automatic topic matches...</label>
<div id='progressbar'>
<label>50%</label>
</div>
</div>
<span class='app_info'>
<a href="http://wiki.freebase.com/wiki/Freebase_Loader" target='_blank' class="documentation">Documentation</a>
| <a href="http://github.com/freebase/reconciliation_ui/" target='_blank' class='view_source'>Source Code</a>
| <a href="http://github.com/rictic/reconciliation_ui/tree/development" class='versionLink' target='_blank'>Version</a>
| <a href="https://bugs.freebase.com/secure/CreateIssueDetails!init.jspa?pid=10148&issuetype=1&priority=3&components=10402&assignee=peter" class='bugReportLink' target="_blank">Found a Bug?</a>
</span>
<a href="#optionsPanel" class='optionsButton' onclick='$("#main_app").hide();$("#optionsPanel").show(); return false;'>Options</a>
</div>
<div id="optionsPanel" class='invisible container'>
<label for="require_exact_name_match">Require Exact Name Match to Autoreconcile</label><input type="checkbox" name="require_exact_name_match" id="require_exact_name_match"><br>
<label for="reconciliation_url">Reconciliation URL: </label><input type="text" name="reconciliation_url" value="" id="reconciliation_url" size='60'><br>
<label for="freebase_url">Freebase URL: </label><input type="text" name="freebase_url" value="" id="freebase_url" size='60'><br>
<label for="freeq_url">FreeQ URL: </label><input type="text" name="freeq_url" value="" id="freeq_url" size='60'><br>
<label for="assert_naked_properties" alt="If this isn't checked then Loader will assert any types which are implied by the properties hanging off of a topic">Assert 'naked' properties</label><input type="checkbox" name="assert_naked_properties" id="assert_naked_properties">
<button onclick='$("#optionsPanel").hide();$("#main_app").show();'>Ok</button>
</div>
<div id="miniTopicFloater" class="invisible" style="position:absolute;"></div>
<noscript>
<div class="fullShadow"> </div>
<div class="noscriptError">
<p>You have javascript disabled. Freebase Loader is a javascript application that runs in your browser, and it can't run with javascript disabled.</p>
<p>You can re-enable javascript in the preferences pane of your browser.</p>
</div>
</noscript>
<div class='invisible'>
<!-- Begin scripts to compile -->
<script charset="utf-8" src="lib/json2.js"></script>
<script charset="utf-8" src="lib/jquery.js"></script>
<script charset="utf-8" src="lib/jquery.ui/ui/ui.core.js"></script>
<script charset="utf-8" src="lib/jquery.ui/ui/ui.tabs.js"></script>
<script charset="utf-8" src="lib/jquery.ui/ui/ui.progressbar.js"></script>
<script charset="utf-8" src="lib/jquery.event.hover.js"></script>
<script charset="utf-8" src="lib/jquery.form.js"></script>
<script charset="utf-8" src="lib/jsobjdump.js"></script>
<script charset="utf-8" src="lib/isISO8601.js"></script>
<script charset="utf-8" src="lib/dataTables/media/js/jquery.dataTables.js"></script>
<script charset="utf-8" src="lib/selection.js"></script>
<script charset="utf-8" src="lib/suggest/jquery.freebase.minitopic.js"></script>
<script charset="utf-8" src="lib/suggest/freebase.suggest.js"></script>
<script charset="utf-8" src="src/events/eventEmitter.js"></script>
<script charset="utf-8" src="src/util/set.js"></script>
<script charset="utf-8" src="src/util/keyedQueue.js"></script>
<script charset="utf-8" src="src/yielder.js"></script>
<script charset="utf-8" src="src/utility.js"></script>
<script charset="utf-8" src="src/util/array.js"></script>
<script charset="utf-8" src="src/util/ui.js"></script>
<script charset="utf-8" src="src/input.js"></script>
<script charset="utf-8" src="src/auto_recon.js"></script>
<script charset="utf-8" src="src/manual_recon.js"></script>
<script charset="utf-8" src="src/recon.js"></script>
<script charset="utf-8" src="src/review.js"></script>
<script charset="utf-8" src="src/output.js"></script>
<script charset="utf-8" src="src/undo.js"></script>
<script charset="utf-8" src="src/entity.js"></script>
<script charset="utf-8" src="src/path.js"></script>
<script charset="utf-8" src="src/freebase.js"></script>
<script charset="utf-8" src="src/options.js"></script>
<script charset="utf-8" src="src/internalReconciler.js"></script>
<script charset="utf-8" src="src/ui.js"></script>
<!-- End scripts to compile -->
<script charset="utf-8" src="examples/sampledata.js" defer async></script>
<script charset="utf-8" src="examples/complexdata.js" defer async></script>
<script charset="utf-8" src="version.js"></script>
<!-- POSTed data goes here -->
</div>
</body>
</html>