-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
266 lines (230 loc) · 11.2 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
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
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="./resources/css/style.css">
<link type="text/css" rel="stylesheet" href="./resources/css/im-tables/main.sandboxed.css">
<script type="text/javascript" src="./resources/js/d3/d3.v3.js"></script>
<script type="text/javascript" src="./resources/js/d3/d3.layout.js"></script>
<script type="text/javascript" src="./resources/js/im-tables/imtables.min.js"></script>
</head>
<body>
<div id="qb">
<div id="titleBar" class="flexrow">
<span name="title" class="flexrow">
<!-- A cute little mascot. -->
<img name="qblogo" title="QB" src="./resources/images/QB-logo.png"></img>
QB: A Query Builder for InterMine
</span>
<!-- The list of available mines. -->
<div id="mine-ctrls" class="flexrow">
<label>Mine</label>
<select id="mlist"></select>
<label>API Token</label>
<input disabled id="token" type="text" placeholder="Not implemented"></input>
</div>
</div> <!-- end of titleBar -->
<div id="tooltray" class="flexrow">
<div class="flexrow">
<img id="mineLogo" src=""></img>
<div id="runquery" title="Click to run. Shift-click to run at the mine. Alt-click to edit at the mine.">
Run this query
</div>
<div id="querycount" class="flexrow syncoff">
<i class="material-icons button sync" title="Count autosync is OFF. Click to turn it ON.">sync_disabled</i>
<label>Count:</label>
<span></span>
<i class="material-icons error">error</i>
</div>
</div>
<div class="spacer5"></div>
<div name="undoRedoButtons" class="flexrow">
<i id="undoButton" title="Undo" class="material-icons button undo">undo</i>
<i id="redoButton" title="Redo" class="material-icons button redo">redo</i>
</div>
<div class="spacer8"></div>
<div class="flexrow">
<div id="editView" class="flexrow">
<label>View</label>
<select>
<option value="queryMain">Query (main)</option>
<option value="columnOrder">Column order</option>
<option value="sortOrder">Sort order</option>
<option value="constraintLogic">Constraint logic</option>
</select>
</div>
<i class="material-icons button" name="openclose"></i>
</div>
<div class="spacer1"></div>
</div> <!-- end of tooltray -->
<!-- Template info section. Shows template's name, description, etc. -->
<div id="tInfoBar" class="flexrow">
<div class="flexcolumn">
<!-- Here live the controls for starting a new query. -->
<div name="editTarget" class="flexrow">
<div id="editSourceSelector" class="flexcolumn">
<label>Query</label>
<select name="in">
<option value="newqclist">Start from class</option>
<option value="tlist">Edit saved</option>
<option value="importxml">Import XML</option>
<option value="importjson">Import JSON</option>
</select>
</div>
<!-- The list of saved templates. -->
<div id="tlist" class="flexcolumn option">
<label>Select saved query</label>
<select name="in"></select>
</div>
<!-- Start from scratch. List of classes. -->
<div id="newqclist" class="flexcolumn option">
<label>Select starting class</label>
<select name="in"></select>
</div>
<!-- Import from XML -->
<div id="importxml" class="flexcolumn option">
<label>Paste query XML</label>
<textarea id="xmltextarea" name="in" cols=40 rows=2 ></textarea>
</div>
<!-- Import from JSON -->
<div id="importjson" class="flexcolumn option">
<label>Paste query JSON</label>
<textarea id="jsontextarea" name="in" cols=40 rows=2 ></textarea>
</div>
</div> <!-- end of editTarget -->
<div id="tInfo" class="flexcolumn">
<div class="flexrow">
<!-- Name of current template -->
<div name="name" class="flexcolumn">
<label>Name</label>
<input type="text" ></input>
</div>
<!-- Title of current template -->
<div name="title" class="flexcolumn">
<label>Title</label>
<input type="text" ></input>
</div>
</div>
<div class="flexrow">
<!-- Description text -->
<div name="description" class="flexcolumn">
<label>Description</label>
<textarea cols="40" rows="7"></textarea>
</div>
<!-- Comment text -->
<div name="comment" class="flexcolumn">
<label>Comment</label>
<textarea cols="40" rows="7"></textarea>
</div>
</div>
</div> <!-- end of tInfo -->
</div>
<!-- Where the query text is dumped with every update. -->
<div id="ttext" class="flexcolumn xml">
<label>
<i name="ttextExpand" class="material-icons button closed"></i>
Query text:
<span name="xml">XML</span>
<span name="json">JSON</span>
</label>
<div id="ttextdiv" tabindex="-1"> <!-- tabindex makes it focusable-->
</div>
</div> <!-- end of ttext -->
</div> <!-- end of tInfoBar -->
<!-- The container where the SVG drawing goes. -->
<div id="svgContainer">
<div name="logicExpression" class="flexrow">
<label>Constraint logic</label>
<input size="40" type="text" ></input>
</div>
<svg><g></g></svg>
</div> <!-- end of svgContainer -->
<!-- The container where the query is executed and displayed using im-tables -->
<div id="queryContainer" class="flexrow">
<div id="imTablesQuery"></div>
<div id="imTablesQueryAfter"></div>
</div>
<!-- The dropdown dialog you get when you click on a node. -->
<div id="dialog">
<!-- Displays basic info about the node. -->
<div name="header">
<div name="dialogTitle">
<label>Name: </label>
<span></span>
</div>
<div name="fullPath">
<label>Path: </label>
<div></div>
</div>
<div name="type">
<label>Type: </label>
<div></div>
</div>
</div>
<!-- Where the user gets to select/unselect an attribute to return.
Only display for attributes (not for refs/colls) -->
<div name="selsort-ctrls" class="flexrow">
<div name="select-ctrl"class="flexcolumn">
<label>Select</label>
<div class="swatch">
<i class="material-icons done">done</i>
</div>
</div>
<div name="sort-ctrl" class="flexcolumn">
<label>Sort</label>
<div class="swatch">
<i class="material-icons arrow_upward">arrow_upward</i>
<i class="material-icons arrow_downward">arrow_downward</i>
</div>
</div>
</div>
<!-- Where the current set of constraints on this node are displayed. -->
<div class="constraintSection">
<div class="add-button">
<i class="material-icons add">add_box</i>
<label>Add constraint</label>
</div>
</div>
<div name="showSummary" class="flexrow">
<i class="material-icons button showSummaryFields">playlist_add_check</i>
<span>Show summary fields</span>
</div>
<!-- where the attrs/refs/colls of a class are displayed.
Only shown for nodes representing refs/colls, i.e., not for attrs. -->
<div class="attrContainer flexcolumn">
<table class="attributes"></table>
</div>
<!-- where the delete button lurks. -->
<div class="footer">
<i class="material-icons button remove" title="Remove this node">delete_forever</i>
<i class="material-icons button close" title="Close dialog">close</i>
</div>
</div>
<!-- Constraint editor. The little popup you get when you edit a constraint at a node. -->
<div id="constraintEditor">
<i class="material-icons button sync" title="Generate option list" >sync</i>
<select class="in" name="op" placeholder="constraint operator"></select>
<!-- -->
<input class="in" name="value" type="text" placeholder="value"></input>
<select class="in" name="values"></select>
<div name="code"></div>
<!-- -->
<i class="material-icons button save" title="Save changes">check</i>
<i class="material-icons button cancel" title="Cancel" >close</i>
<div name="overlay"></div>
</div>
<!-- The page footer -->
<div id="footer" class="flexrow">
<div class="flexrow left" >
<span name="version"></span>
</div>
<div class="center">
<a target="_blank" href="https://github.com/JoelRichardson/qb">QB@GitHub</a>
</div>
<div class="right">
<span>Powered by <a target="_blank" href="http://intermine.org">InterMine</a> and <a target="_blank" href="https://d3js.org/">D3</a>.</span>
</div>
</div>
</div>
<script type="text/javascript" src="./dist/qb.bundle.js"> </script>
</body>
</html>