blob: 5326b769646a4174b537156a177a428b08fb7ffc [file] [log] [blame]
Scott Bakere41c9082014-10-27 23:02:48 -07001<script src="{{ STATIC_URL }}/js/vendor/underscore-min.js"></script>
2<script src="{{ STATIC_URL }}/js/vendor/backbone.js"></script>
3<script src="{{ STATIC_URL }}/js/vendor/backbone.syphon.js"></script>
4<script src="{{ STATIC_URL }}/js/vendor/backbone.wreqr.js"></script>
5<script src="{{ STATIC_URL }}/js/vendor/backbone.babysitter.js"></script>
6<script src="{{ STATIC_URL }}/js/vendor/backbone.marionette.js"></script>
7
8<link rel="stylesheet" type="text/css" href="{% static 'css/test.css' %}" media="all" >
9
10<script src="{{ STATIC_URL }}/js/xoslib/xos-backbone.js"></script>
11<script src="{{ STATIC_URL }}/js/test.js"></script>
12
13<p>This shows all of the things you can see using xosLib</p>
14
15<h3>Deployments</h3>
16<div id="deploymentList">
17</div>
18
19<h3>Images</h3>
20<div id="imageList">
21</div>
22
23<h3>Network Templates</h3>
24<div id="networkTemplateList">
25</div>
26
27<h3>Networks</h3>
28<div id="networkList">
29</div>
30
31<h3>Nodes</h3>
32<div id="nodeList">
33</div>
34
35<h3>Services</h3>
36<div id="serviceList">
37</div>
38
39<h3>Sites</h3>
40<div id="siteList">
41</div>
42
43<h3>Slices</h3>
44<div id="sliceList">
45</div>
46
47<h3>Slivers</h3>
48<div id="sliverList">
49</div>
50
Scott Baker6cea3a12014-10-28 15:06:54 -070051<h3>Users</h3>
52<div id="userList">
53</div>
54
Scott Bakerd044c8f2014-10-28 14:46:13 -070055<div id="rightSide">
Scott Baker33c84ac2014-10-28 21:40:20 -070056<div id="successBox">
57</div>
Scott Bakerd044c8f2014-10-28 14:46:13 -070058<div id="errorBox">
59</div>
60
Scott Baker3df41942014-10-28 12:44:13 -070061<div id="detailBox">
62<button id="close-detail-view">Close Detail View</button>
63<div id="detail"></div>
64<div id="linkedObjs1"></div>
65<div id="linkedObjs2"></div>
66</div>
Scott Bakerd044c8f2014-10-28 14:46:13 -070067</div>
68
69<script type="text/template" id="test-error-template">
70 <button id="close-error-box">Close Error Message</button>
71 <h3>An error has occurred.</h3>
72 <table class="test-error-table">
73 <tr><td>Code:</td><td><%= status %></td></tr>
74 <tr><td>Message:</td><td><%= statusText %></td></tr>
75 </table>
76</script>
Scott Baker3df41942014-10-28 12:44:13 -070077
Scott Baker33c84ac2014-10-28 21:40:20 -070078<script type="text/template" id="test-success-template">
79 <button id="close-success-box">Close Success Message</button>
80 <h3>Success!</h3>
81 <table class="test-success-table">
82 <tr><td>Code:</td><td><%= status %></td></tr>
83 <tr><td>Message:</td><td><%= statusText %></td></tr>
84 </table>
85</script>
86
Scott Bakere41c9082014-10-27 23:02:48 -070087<!-- Deployment -->
88
89<script type="text/template" id="test-deployment-list-template">
90 <table class="test-table">
91 <thead><tr>
92 <th>id</th>
93 <th>name</th>
94 <th>backend</th>
95 <th>admin_tenant</th>
96 <th># sites</th>
97 </tr></thead>
98 <tbody></tbody>
99 </table>
100</script>
101
102
103<script type="text/template" id="test-deployment-listitem-template">
104 <td><%= id %></td>
105 <td><%= name %></td>
106 <td><%= backend_type %></td>
107 <td><%= admin_tenant %></td>
108 <td><%= sites.length %></td>
109</script>
110
Scott Baker3df41942014-10-28 12:44:13 -0700111<script type="text/template" id="test-deployment-detail-template">
112 <h3>Detail View: Deployment</h3>
113 <form>
114 <table>
115 <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
116 <tr><td>Backend:</td><td><input type="text" name="backend_type" value="<%= backend_type %>"></td></tr>
117 <tr><td>Admin Tenant:</td><td><input type="text" name="admin_tenant" value="<%= admin_tenant %>"></td></tr>
118 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
119 </table>
120 </form>
121</script>
122
Scott Bakere41c9082014-10-27 23:02:48 -0700123<!-- Image -->
124
125<script type="text/template" id="test-image-list-template">
126 <table class="test-table">
127 <thead><tr>
128 <th>id</th>
129 <th>name</th>
130 <th>disk_format</th>
131 <th>container_format</th>
132 <th>path</th>
133 </tr></thead>
134 <tbody></tbody>
135 </table>
136</script>
137
Scott Bakere41c9082014-10-27 23:02:48 -0700138<script type="text/template" id="test-image-listitem-template">
139 <td><%= id %></td>
140 <td><%= name %></td>
141 <td><%= disk_format %></td>
142 <td><%= container_format %></td>
143 <td><%= path %></td>
144</script>
145
Scott Baker3df41942014-10-28 12:44:13 -0700146<script type="text/template" id="test-image-detail-template">
147 <h3>Detail View: Image</h3>
148 <form>
149 <table>
150 <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
151 <tr><td>Disk Format:</td><td><input type="text" name="backend_type" value="<%= disk_format %>"></td></tr>
152 <tr><td>Container Format:</td><td><input type="text" name="admin_tenant" value="<%= container_format %>"></td></tr>
153 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
154 </table>
155 </form>
156</script>
157
Scott Bakere41c9082014-10-27 23:02:48 -0700158<!-- NetworkTemplate -->
159
160<script type="text/template" id="test-networkTemplate-list-template">
161 <table class="test-table">
162 <thead><tr>
163 <th>id</th>
164 <th>name</th>
165 <th>description</th>
166 <th>visibility</th>
167 <th>translation</th>
168 <th>sharedNetworkName</th>
169 <th>sharedNetworkId</th>
170 </tr></thead>
171 <tbody></tbody>
172 </table>
173</script>
174
175
176<script type="text/template" id="test-networkTemplate-listitem-template">
177 <td><%= id %></td>
178 <td><%= name %></td>
179 <td><%= description %></td>
180 <td><%= visibility %></td>
181 <td><%= translation %></td>
182 <td><%= sharedNetworkName %></td>
183 <td><%= sharedNetworkId %></td>
184</script>
185
Scott Baker3df41942014-10-28 12:44:13 -0700186<script type="text/template" id="test-networkTemplate-detail-template">
187 <h3>Detail View: NetworkTemplate</h3>
188 <form>
189 <table>
190 <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
191 <tr><td>description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>
192 <tr><td>Visibility:</td><td><input type="text" name="visibility" value="<%= visibility %>"></td></tr>
193 <tr><td>Translation:</td><td><input type="text" name="translation" value="<%= translation %>"></td></tr>
194 <tr><td>Shared Network Name:</td><td><input type="text" name="sharedNetworkName" value="<%= sharedNetworkName %>"></td></tr>
195 <tr><td>Shared Network Id:</td><td><input type="text" name="sharedNetworkId" value="<%= sharedNetworkId %>"></td></tr>
196 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
197 </table>
198 </form>
199</script>
200
Scott Bakere41c9082014-10-27 23:02:48 -0700201<!-- Network -->
202
203<script type="text/template" id="test-network-list-template">
204 <table class="test-table">
205 <thead><tr>
206 <th>id</th>
207 <th>name</th>
208 <th>template</th>
209 <th>ports</th>
210 <th>labels</th>
211 <th>owner</th>
212 </tr></thead>
213 <tbody></tbody>
214 </table>
215</script>
216
217
218<script type="text/template" id="test-network-listitem-template">
219 <td><%= id %></td>
220 <td><%= name %></td>
221 <td><%= template %></td>
222 <td><%= ports %></td>
223 <td><%= labels %></td>
224 <td><%= owner %></td>
225</script>
226
Scott Baker3df41942014-10-28 12:44:13 -0700227<script type="text/template" id="test-network-detail-template">
228 <h3>Detail View: Network</h3>
229 <form>
230 <table>
231 <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
232 <tr><td>Template:</td><td><input type="text" name="template" value="<%= template %>"></td></tr>
233 <tr><td>Ports:</td><td><input type="text" name="ports" value="<%= ports %>"></td></tr>
234 <tr><td>Labels:</td><td><input type="text" name="labels" value="<%= labels %>"></td></tr>
235 <tr><td>Owner:</td><td><input type="text" name="owner" value="<%= owner %>"></td></tr>
236 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
237 </table>
238 </form>
239</script>
240
Scott Bakere41c9082014-10-27 23:02:48 -0700241<!-- Node -->
242
243<script type="text/template" id="test-node-list-template">
244 <table class="test-table">
245 <thead><tr>
246 <th>id</th>
247 <th>name</th>
248 <th>site</th>
249 <th>deployment</th>
250 </tr></thead>
251 <tbody></tbody>
252 </table>
253</script>
254
255
256<script type="text/template" id="test-node-listitem-template">
257 <td><%= id %></td>
258 <td><%= name %></td>
259 <td><%= site %></td>
260 <td><%= deployment %></td>
261</script>
262
Scott Baker3df41942014-10-28 12:44:13 -0700263<script type="text/template" id="test-node-detail-template">
264 <h3>Detail View: Node</h3>
265 <form>
266 <table>
267 <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
268 <tr><td>Site:</td><td><input type="text" name="site" value="<%= site %>"></td></tr>
269 <tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>
270 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
271 </table>
272 </form>
273</script>
274
Scott Bakere41c9082014-10-27 23:02:48 -0700275<!-- Service -->
276
277<script type="text/template" id="test-service-list-template">
278 <table class="test-table">
279 <thead><tr>
280 <th>id</th>
281 <th>name</th>
282 <th>description</th>
283 <th>enabled</th>
284 <th>versionNumber</th>
285 <th>published</th>
286 </tr></thead>
287 <tbody></tbody>
288 </table>
289</script>
290
291
292<script type="text/template" id="test-service-listitem-template">
293 <td><%= id %></td>
294 <td><%= name %></td>
295 <td><%= description %></td>
296 <td><%= enabled %></td>
297 <td><%= versionNumber %></td>
298 <td><%= published %></td>
299</script>
300
Scott Baker3df41942014-10-28 12:44:13 -0700301<script type="text/template" id="test-service-detail-template">
302 <h3>Detail View: Service</h3>
303 <form>
304 <table>
305 <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
306 <tr><td>description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>
307 <tr><td>Version Number:</td><td><input type="text" name="versionNumber" value="<%= versionNumber %>"></td></tr>
308 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
309 </table>
310 </form>
311</script>
312
Scott Bakere41c9082014-10-27 23:02:48 -0700313<!-- Site -->
314
315<script type="text/template" id="test-site-list-template">
316 <table class="test-table">
317 <thead><tr>
318 <th>id</th>
319 <th>name</th>
320 <th>url</th>
321 <th>enabled</th>
322 <th>login_base</th>
323 <th>is_public</th>
324 <th>abbreviated_name</th>
325 </tr></thead>
326 <tbody></tbody>
327 </table>
328</script>
329
330
331<script type="text/template" id="test-site-listitem-template">
332 <td><%= id %></td>
333 <td><%= name %></td>
334 <td><%= site_url %></td>
335 <td><%= enabled %></td>
336 <td><%= login_base %></td>
337 <td><%= is_public %></td>
338 <td><%= abbreviated_name %></td>
339</script>
340
Scott Baker3df41942014-10-28 12:44:13 -0700341<script type="text/template" id="test-site-detail-template">
342 <h3>Detail View: Site</h3>
343 <form>
344 <table>
345 <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
346 <tr><td>url:</td><td><input type="text" name="site_url" value="<%= site_url %>"></td></tr>
347 <tr><td>login_base:</td><td><input type="text" name="login_base" value="<%= login_base %>"></td></tr>
348 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
349 </table>
350 </form>
351</script>
352
Scott Bakere41c9082014-10-27 23:02:48 -0700353<!-- Slice -->
354
355<script type="text/template" id="test-slice-list-template">
356 <table class="test-table">
357 <thead><tr>
358 <th>id</th>
359 <th>name</th>
360 <th>enabled</th>
361 <th>omf_friendly</th>
362 <th>description</th>
363 <th>slice_url</th>
364 <th>site</th>
365 <th>max_slivers</th>
366 <th>service</th>
367 </tr></thead>
368 <tbody></tbody>
369 </table>
370</script>
371
Scott Bakere41c9082014-10-27 23:02:48 -0700372<script type="text/template" id="test-slice-listitem-template">
373 <td><%= id %></td>
374 <td><%= name %></td>
375 <td><%= enabled %></td>
376 <td><%= omf_friendly %></td>
377 <td><%= description %></td>
378 <td><%= slice_url %></td>
379 <td><%= site %></td>
380 <td><%= max_slivers %></td>
381 <td><%= service %></td>
382</script>
383
Scott Baker3df41942014-10-28 12:44:13 -0700384<script type="text/template" id="test-slice-detail-template">
385 <h3>Detail View: Slice</h3>
386 <form>
387 <table>
388 <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
389 <tr><td>Enabled:</td><td><input type="checkbox" name="enabled" <% if (enabled) print("checked"); %>></td></tr>
390 <tr><td>Description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>
391 <tr><td>Url:</td><td><input type="text" name="slice_url" value="<%= slice_url %>"></td></tr>
392 <tr><td>Max Slivers:</td><td><input type="text" name="max_slivers" value="<%= max_slivers %>"></td></tr>
393 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
394 </table>
395 </form>
396</script>
397
Scott Bakere41c9082014-10-27 23:02:48 -0700398<!-- Sliver -->
399
400<script type="text/template" id="test-sliver-list-template">
401 <table class="test-table">
402 <thead><tr>
403 <th>id</th>
404 <th>name</th>
405 <th>instance_id</th>
406 <th>instance_name</th>
407 <th>image</th>
408 <th>creator</th>
409 <th>slice</th>
410 <th>node</th>
411 <th>deploymentNetwork</th>
412 <th>flavor</th>
413 <th>userData</th>
414 </tr></thead>
415 <tbody></tbody>
416 </table>
417</script>
418
419
420<script type="text/template" id="test-sliver-listitem-template">
421 <td><%= id %></td>
422 <td><%= name %></td>
423 <td><%= instance_id %></td>
424 <td><%= instance_name %></td>
425 <td><%= image %></td>
426 <td><%= creator %></td>
427 <td><%= slice %></td>
428 <td><%= node %></td>
429 <td><%= deploymentNetwork %></td>
430 <td><%= flavor %></td>
431 <td><%= userData %></td>
432</script>
433
Scott Baker3df41942014-10-28 12:44:13 -0700434<script type="text/template" id="test-sliver-detail-template">
435 <h3>Detail View: Sliver</h3>
436 <form>
437 <table>
438 <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
439 <tr><td>instance_id:</td><td><input type="text" name="instance_id" value="<%= instance_id %>"></td></tr>
440 <tr><td>instance_name:</td><td><input type="text" name="instance_name" value="<%= instance_name %>"></td></tr>
441 <tr><td>Image:</td><td><input type="text" name="image" value="<%= image %>"></td></tr>
442 <tr><td>Creator:</td><td><input type="text" name="creator" value="<%= creator %>"></td></tr>
443 <tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>
444 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
445 </table>
446 </form>
447</script>
448
Scott Baker6cea3a12014-10-28 15:06:54 -0700449<!-- User -->
450
451<script type="text/template" id="test-user-list-template">
452 <table class="test-table">
453 <thead><tr>
Scott Baker7f809022014-10-28 15:07:40 -0700454 <th>id</th>
Scott Baker6cea3a12014-10-28 15:06:54 -0700455 <th>username</th>
456 <th>firstname</th>
457 <th>lastname</th>
458 <th>phone</th>
459 <th>user_url</th>
460 <th>site</th>
461 </tr></thead>
462 <tbody></tbody>
463 </table>
464</script>
465
466
467<script type="text/template" id="test-user-listitem-template">
468 <td><%= id %></td>
469 <td><%= username %></td>
470 <td><%= firstname %></td>
471 <td><%= lastname %></td>
472 <td><%= phone %></td>
473 <td><%= user_url %></td>
474 <td><%= site %></td>
475</script>
476
477<script type="text/template" id="test-user-detail-template">
Scott Baker7f809022014-10-28 15:07:40 -0700478 <h3>Detail View: User</h3>
Scott Baker6cea3a12014-10-28 15:06:54 -0700479 <form>
480 <table>
481 <tr><td>User Name:</td><td><input type="text" name="username" value="<%= username %>"></td></tr>
482 <tr><td>First Name:</td><td><input type="text" name="firstname" value="<%= firstname %>"></td></tr>
483 <tr><td>Last Name:</td><td><input type="text" name="lastname" value="<%= lastname %>"></td></tr>
484 <tr><td>Phone:</td><td><input type="text" name="phone" value="<%= phone %>"></td></tr>
485 <tr><td>Url:</td><td><input type="text" name="user_url" value="<%= user_url %>"></td></tr>
486 <tr><td>Site:</td><td><input type="text" name="site" value="<%= site %>"></td></tr>
487 <tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
488 </table>
489 </form>
490</script>
491
Scott Bakere41c9082014-10-27 23:02:48 -0700492</script>
493