replace the onclick itemview handler with a naviation/template based one
[plstackapi.git] / planetstack / core / xoslib / templates / xosAdmin.html
1 <!-- Error and Success templates -->
2
3 <script type="text/template" id="xos-error-response">
4   <h5>Error</h5>
5   <table>
6   <tr><td>error:</td><td><%= error %></td></tr>
7   <tr><td>check:</td><td><%= specific_error %></td></tr>
8   </table>
9   <h5>Details:</h5>
10       <table>
11       <tbody>
12       <% _.each(reasons, function(element, index) { %>
13           <tr><td><%= index %></td><td><%= element %></td></tr>
14       <% }); %>
15       </tbody>
16       </table>
17 </script>
18
19 <script type="text/template" id="xos-error-rawresponse">
20   <h5>Error</h5>
21   <pre>The server returned:
22 "<%= responseText %>"</pre>
23 </script>
24
25 <script type="text/template" id="xos-error-template">
26   <button id="close-error-box">Close Error Message</button>
27   <h3>An error has occurred.</h3>
28   <table class="test-error-table">
29   <tr><td>Code:</td><td><%= status %></td></tr>
30   <tr><td>Message:</td><td><%= statusText %></td></tr>
31   </table>
32 </script>
33
34 <script type="text/template" id="xos-success-template">
35   <button id="close-success-box">Close Success Message</button>
36   <h3>Success!</h3>
37   <table class="test-success-table">
38   <tr><td>Code:</td><td><%= status %></td></tr>
39   <tr><td>Message:</td><td><%= statusText %></td></tr>
40   </table>
41 </script>
42
43 <script type="text/template" id="xos-navbutton-old">
44   <button class="btn btn-default btn-xosnav" onclick="<%= router %>.navigate('<%= routeUrl %>', {trigger: true})"><%= name %></button><br>
45 </script>
46
47 <script type="text/template" id="xos-status-template">
48   <div class="xos-status xos-<%= statusclass %>"><%= what %>: <%= statusText %> (<%= status %>)</div>
49 </script>
50
51 <script type="text/template" id="xos-tabs-template">
52   <ul class="xos-nav-list">
53   <% _.each(tabs, function(tab) { %>
54       <li class="xos-nav-item" id="xos-nav-<%= tab["region"] %>"><%= tab["name"] %></li>
55   <% }); %>
56   </ul>
57 </script>
58
59 <script type="text/template" id="xos-title-list">
60   <h3><img src="/static/img/brokencircle.gif" height=16 width=16 id="xos-list-title-spinner"> <%= title %></h3>
61 </script>
62
63 <script type="text/template" id="xos-title-detail">
64   <h3><%= title %></h3>
65 </script>
66
67 <script type="text/template" id="xos-navbutton">
68   <li>
69       <a href="<%= routeUrl %>">
70           <i class="<%= iconClass %>"></i>
71           <%= name %>
72       </a>
73   </li>
74 </script>
75
76 <script type="text/template" id="xos-inline-detail-buttons-template">
77     <tr>
78        <td colspan=2><button class="btn js-submit btn-xos-detail btn-xos-save-leave">Save</button>
79            <button class="btn js-submit btn-xos-detail btn-xos-save-continue">Save and Continue Editing</button>
80            <button class="btn js-submit btn-xos-detail btn-xos-save-another">Save and Add Another</button>
81            <button class="btn js-submit btn-xos-detail btn-xos-delete">Delete</button>
82        </td>
83     </tr>
84 </script>
85
86 <script type="text/template" id="xos-inline-list-buttons-template">
87            <button class="btn js-submit btn-xos-list btn-xos-add">Add</button>
88            <button class="btn js-submit btn-xos-list btn-xos-refresh">Refresh</button>
89        </td>
90     </tr>
91 </script>
92
93 <script type="text/template" id="xos-delete-button-template">
94     <a href="#delete?model=<%= modelName %>&id=<%= id %>">delete</a>
95 </script>
96
97 <script type="text/template" id="xos-delete-button-template">
98     <a href="#delete?model=<%= modelName %>&id=<%= id %>">delete</a>
99 </script>
100
101 <script type="text/template" id="xos-detail-link-template">
102     <a href="#<%= collectionName %>/<%= id %>"><%= text %></a>
103 </script>
104
105 <!-- Deployment -->
106
107 <script type="text/template" id="xosAdmin-deployment-list-template">
108   <h3 class="xos-list-title"><%= title %></h3>
109   <%= xosInlineListButtonsTemplate() %>
110   <table class="test-table">
111   <thead><tr>
112      <th>id</th>
113      <th>name</th>
114      <th>backend</th>
115      <th>admin_tenant</th>
116      <th># sites</th>
117      <th>delete</th>
118   </tr></thead>
119   <tbody></tbody>
120   </table>
121 </script>
122
123
124 <script type="text/template" id="xosAdmin-deployment-listitem-template">
125   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
126   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
127   <td><%= backend_type %></td>
128   <td><%= admin_tenant %></td>
129   <td><%= typeof sites != 'undefined' && sites.length || 0 %></td>
130   <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
131 </script>
132
133 <script type="text/template" id="xosAdmin-deployment-detail-template">
134   <h3 class="xos-detail-title">Detail View: Deployment</h3>
135   <form>
136   <table>\r
137   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
138   <tr><td>Backend:</td><td><input type="text" name="backend_type" value="<%= backend_type %>"></td></tr>\r
139   <tr><td>Admin Tenant:</td><td><input type="text" name="admin_tenant" value="<%= admin_tenant %>"></td></tr>\r
140   <%= xosInlineDetailButtonsTemplate() %>\r
141   </table>\r
142   </form>\r
143 </script>\r
144
145 <!-- Image -->
146
147 <script type="text/template" id="xosAdmin-image-list-template">
148   <h3 class="xos-list-title"><%= title %></h3>
149   <%= xosInlineListButtonsTemplate() %>
150   <table class="test-table">
151   <thead><tr>
152      <th>id</th>
153      <th>name</th>
154      <th>disk_format</th>
155      <th>container_format</th>
156      <th>path</th>
157   </tr></thead>
158   <tbody></tbody>
159   </table>
160 </script>
161
162 <script type="text/template" id="xosAdmin-image-listitem-template">
163   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
164   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
165   <td><%= disk_format %></td>
166   <td><%= container_format %></td>
167   <td><%= path %></td>
168 </script>
169
170 <script type="text/template" id="xosAdmin-image-detail-template">
171   <h3 class="xos-detail-title">Detail View: Image</h3>
172   <form>\r
173   <table>\r
174   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
175   <tr><td>Disk Format:</td><td><input type="text" name="backend_type" value="<%= disk_format %>"></td></tr>\r
176   <tr><td>Container Format:</td><td><input type="text" name="admin_tenant" value="<%= container_format %>"></td></tr>\r
177   <%= xosInlineDetailButtonsTemplate() %>\r
178   </table>\r
179   </form>\r
180 </script>
181
182 <!-- NetworkTemplate -->
183
184 <script type="text/template" id="xosAdmin-networkTemplate-list-template">
185   <h3 class="xos-list-title"><%= title %></h3>
186   <%= xosInlineListButtonsTemplate() %>
187   <table class="test-table">
188   <thead><tr>
189      <th>id</th>
190      <th>name</th>
191      <th>description</th>
192      <th>visibility</th>
193      <th>translation</th>
194      <th>sharedNetworkName</th>
195      <th>sharedNetworkId</th>
196   </tr></thead>
197   <tbody></tbody>
198   </table>
199 </script>
200
201
202 <script type="text/template" id="xosAdmin-networkTemplate-listitem-template">
203   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
204   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
205   <td><%= description %></td>
206   <td><%= visibility %></td>
207   <td><%= translation %></td>
208   <td><%= sharedNetworkName %></td>
209   <td><%= sharedNetworkId %></td>
210 </script>
211
212 <script type="text/template" id="xosAdmin-networkTemplate-detail-template">
213   <h3 class="xos-detail-title">Detail View: NetworkTemplate</h3>
214   <form>\r
215   <table>\r
216   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
217   <tr><td>description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>\r
218   <tr><td>Visibility:</td><td><input type="text" name="visibility" value="<%= visibility %>"></td></tr>\r
219   <tr><td>Translation:</td><td><input type="text" name="translation" value="<%= translation %>"></td></tr>\r
220   <tr><td>Shared Network Name:</td><td><input type="text" name="sharedNetworkName" value="<%= sharedNetworkName %>"></td></tr>\r
221   <tr><td>Shared Network Id:</td><td><input type="text" name="sharedNetworkId" value="<%= sharedNetworkId %>"></td></tr>\r
222   <%= xosInlineDetailButtonsTemplate() %>\r
223   </table>\r
224   </form>\r
225 </script>
226
227 <!-- Network -->
228
229 <script type="text/template" id="xosAdmin-network-list-template">
230   <h3 class="xos-list-title"><%= title %></h3>
231   <%= xosInlineListButtonsTemplate() %>
232   <table class="test-table">
233   <thead><tr>
234      <th>id</th>
235      <th>name</th>
236      <th>template</th>
237      <th>ports</th>
238      <th>labels</th>
239      <th>owner</th>
240   </tr></thead>
241   <tbody></tbody>
242   </table>
243 </script>
244
245 <script type="text/template" id="xosAdmin-network-listitem-template">
246   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
247   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
248   <td><%= idToName(template,"networkTemplates","name") %></td>
249   <td><%= ports %></td>
250   <td><%= labels %></td>
251   <td><%= idToName(owner,"slices","name") %></td>
252 </script>
253
254 <script type="text/template" id="xosAdmin-network-detail-template">
255   <h3 class="xos-detail-title">Detail View: Network</h3>
256   <form>\r
257   <table>\r
258   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
259   <tr><td>Template:</td><td><%= idToSelect("template",template,"networkTemplates","name") %></td></tr>\r
260   <tr><td>Ports:</td><td><input type="text" name="ports" value="<%= ports %>"></td></tr>\r
261   <tr><td>Labels:</td><td><input type="text" name="labels" value="<%= labels %>"></td></tr>\r
262   <tr><td>Owner:</td><td><%= idToSelect("owner",owner,"slices","name") %></td></tr>\r
263   <%= xosInlineDetailButtonsTemplate() %>\r
264   </table>\r
265   </form>\r
266 </script>
267
268 <!-- NetworkSliver -->
269
270 <script type="text/template" id="xosAdmin-networkSliver-list-template">
271   <h3 class="xos-list-title"><%= title %></h3>
272   <%= xosInlineListButtonsTemplate() %>
273   <table class="test-table">
274   <thead><tr>
275      <th>id</th>
276      <th>network</th>
277      <th>sliver</th>
278      <th>ip</th>
279      <th>port_id</th>
280   </tr></thead>
281   <tbody></tbody>
282   </table>
283 </script>
284
285 <script type="text/template" id="xosAdmin-networkSliver-listitem-template">
286   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
287   <td><%= idToName(network,"networks","name") %></td>
288   <td><%= idToName(sliver,"slivers","name") %></td>
289   <td><%= ip %></td>
290   <td><%= port_id %></td>
291 </script>
292
293 <script type="text/template" id="xosAdmin-networkSliver-detail-template">
294   <h3 class="xos-detail-title">Detail View: Network</h3>
295   <form>\r
296   <table>\r
297   <tr><td>Network:</td><td><input type="text" name="network" value="<%= network %>"></td></tr>\r
298   <tr><td>Sliver:</td><td><input type="text" name="sliver" value="<%= sliver %>"></td></tr>\r
299   <tr><td>Ip:</td><td><input type="text" name="ip" value="<%= ip %>"></td></tr>\r
300   <tr><td>Port_id:</td><td><input type="text" name="port_id" value="<%= port_id %>"></td></tr>\r
301   <%= xosInlineDetailButtonsTemplate() %>\r
302   </table>\r
303   </form>\r
304 </script>
305
306 <!-- NetworkDeployment -->
307
308 <script type="text/template" id="xosAdmin-networkDeployment-list-template">
309   <h3 class="xos-list-title"><%= title %></h3>
310   <%= xosInlineListButtonsTemplate() %>
311   <table class="test-table">
312   <thead><tr>
313      <th>id</th>
314      <th>network</th>
315      <th>deployment</th>
316      <th>net_id</th>
317   </tr></thead>
318   <tbody></tbody>
319   </table>
320 </script>
321
322 <script type="text/template" id="xosAdmin-networkDeployment-listitem-template">
323   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
324   <td><%= idToName(network,"networks","name") %></td>
325   <td><%= idToName(deployment,"deployments","name") %></td>
326   <td><%= net_id %></td>
327 </script>
328
329 <script type="text/template" id="xosAdmin-networkDeployment-detail-template">
330   <h3 class="xos-detail-title">Detail View: Network</h3>
331   <form>\r
332   <table>\r
333   <tr><td>Network:</td><td><input type="text" name="network" value="<%= network %>"></td></tr>\r
334   <tr><td>Sliver:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>\r
335   <tr><td>Ip:</td><td><input type="text" name="net_id" value="<%= net_id %>"></td></tr>\r
336   <%= xosInlineDetailButtonsTemplate() %>\r
337   </table>\r
338   </form>\r
339 </script>
340
341 <!-- Node -->
342
343 <script type="text/template" id="xosAdmin-node-list-template">
344   <h3 class="xos-list-title"><%= title %></h3>
345   <%= xosInlineListButtonsTemplate() %>
346   <table class="test-table">
347   <thead><tr>
348      <th>id</th>
349      <th>name</th>
350      <th>site</th>
351      <th>deployment</th>
352   </tr></thead>
353   <tbody></tbody>
354   </table>
355 </script>
356
357
358 <script type="text/template" id="xosAdmin-node-listitem-template">
359   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
360   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
361   <td><%= idToName(site,"sites","name") %></td>
362   <td><%= idToName(deployment,"deployments","name") %></td>
363 </script>
364
365 <script type="text/template" id="xosAdmin-node-detail-template">
366   <h3 class="xos-detail-title">Detail View: Node</h3>
367   <form>\r
368   <table>\r
369   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
370   <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","name") %></td></tr>\r
371   <tr><td>Deployment:</td><td><%= idToSelect("deployment",deployment,"deployments","name") %></td></tr>\r
372   <%= xosInlineDetailButtonsTemplate() %>\r
373   </table>\r
374   </form>\r
375 </script>
376
377 <!-- SliceRole -->
378
379 <script type="text/template" id="xosAdmin-sliceRole-list-template">
380   <h3 class="xos-list-title"><%= title %></h3>
381   <%= xosInlineListButtonsTemplate() %>
382   <table class="test-table">
383   <thead><tr>
384      <th>id</th>
385      <th>role</th>
386   </tr></thead>
387   <tbody></tbody>
388   </table>
389 </script>
390
391
392 <script type="text/template" id="xosAdmin-sliceRole-listitem-template">
393   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
394   <td><%= role %></td>
395 </script>
396
397 <script type="text/template" id="xosAdmin-sliceRole-detail-template">
398   <h3 class="xos-detail-title">Detail View: Service</h3>
399   <form>\r
400   <table>\r
401   <tr><td>Role:</td><td><input type="text" name="role" value="<%= role %>"></td></tr>\r
402   <%= xosInlineDetailButtonsTemplate() %>\r
403   </table>\r
404   </form>\r
405 </script>
406
407 <!-- Service -->
408
409 <script type="text/template" id="xosAdmin-service-list-template">
410   <h3 class="xos-list-title"><%= title %></h3>
411   <%= xosInlineListButtonsTemplate() %>
412   <table class="test-table">
413   <thead><tr>
414      <th>id</th>
415      <th>name</th>
416      <th>description</th>
417      <th>enabled</th>
418      <th>versionNumber</th>
419      <th>published</th>
420   </tr></thead>
421   <tbody></tbody>
422   </table>
423 </script>
424
425
426 <script type="text/template" id="xosAdmin-service-listitem-template">
427   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
428   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
429   <td><%= description %></td>
430   <td><%= enabled %></td>
431   <td><%= versionNumber %></td>
432   <td><%= published %></td>
433 </script>
434
435 <script type="text/template" id="xosAdmin-service-detail-template">
436   <h3 class="xos-detail-title">Detail View: Service</h3>
437   <form>\r
438   <table>\r
439   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
440   <tr><td>description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>\r
441   <tr><td>Version Number:</td><td><input type="text" name="versionNumber" value="<%= versionNumber %>"></td></tr>\r
442   <%= xosInlineDetailButtonsTemplate() %>\r
443   </table>\r
444   </form>\r
445 </script>
446
447 <!-- Site -->
448
449 <script type="text/template" id="xosAdmin-site-list-template">
450   <h3 class="xos-list-title"><%= title %></h3>
451   <%= xosInlineListButtonsTemplate() %>
452   <table class="test-table">
453   <thead><tr>
454      <th>id</th>
455      <th>name</th>
456      <th>url</th>
457      <th>enabled</th>
458      <th>login_base</th>
459      <th>is_public</th>
460      <th>abbreviated_name</th>
461   </tr></thead>
462   <tbody></tbody>
463   </table>
464 </script>
465
466 <script type="text/template" id="xosAdmin-site-listitem-template">
467   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
468   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
469   <td><%= site_url %></td>
470   <td><%= enabled %></td>
471   <td><%= login_base %></td>
472   <td><%= is_public %></td>
473   <td><%= abbreviated_name %></td>
474 </script>
475
476 <script type="text/template" id="xosAdmin-site-detail-template">
477   <h3 class="xos-detail-title">Detail View: Site</h3>
478   <form>\r
479   <table>\r
480   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
481   <tr><td>abbreviated_name:</td><td><input type="text" name="abbreviated_name" value="<%= abbreviated_name %>"></td></tr>\r
482   <tr><td>url:</td><td><input type="text" name="site_url" value="<%= site_url %>"></td></tr>\r
483   <tr><td>Enabled:</td><td><input type="checkbox" name="enabled" <% if (enabled) print("checked"); %>></td></tr>\r
484   <tr><td>Is Public:</td><td><input type="checkbox" name="is_public" <% if (is_public) print("checked"); %>></td></tr>\r
485   <tr><td>login_base:</td><td><input type="text" name="login_base" value="<%= login_base %>"></td></tr>\r
486   <%= xosInlineDetailButtonsTemplate() %>\r
487   </table>\r
488   </form>\r
489 </script>
490
491 <!-- Slice -->
492
493 <script type="text/template" id="xosAdmin-slice-list-template">
494   <h3 class="xos-list-title"><%= title %></h3>
495   <%= xosInlineListButtonsTemplate() %>
496   <table class="test-table">
497   <thead><tr>
498      <th>id</th>
499      <th>name</th>
500      <th>enabled</th>
501      <th>omf_friendly</th>
502      <th>description</th>
503      <th>slice_url</th>
504      <th>site</th>
505      <th>max_slivers</th>
506      <th>service</th>
507   </tr></thead>
508   <tbody></tbody>
509   </table>
510 </script>
511
512 <script type="text/template" id="xosAdmin-slice-listitem-template">
513   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
514   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
515   <td><%= enabled %></td>
516   <td><%= omf_friendly %></td>
517   <td><%= description %></td>
518   <td><%= slice_url %></td>
519   <td><%= idToName(site,"sites","name") %></td>
520   <td><%= max_slivers %></td>
521   <td><%= idToName(service,"services","name") %></td>
522 </script>
523
524 <script type="text/template" id="xosAdmin-slice-detail-template">
525   <h3 class="xos-detail-title">Detail View: Slice</h3>
526   <form>\r
527   <table>\r
528   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
529   <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","name") %></td></tr>\r
530   <tr><td>Enabled:</td><td><input type="checkbox" name="enabled" <% if (enabled) print("checked"); %>></td></tr>\r
531   <tr><td>Description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>\r
532   <tr><td>Url:</td><td><input type="text" name="slice_url" value="<%= slice_url %>"></td></tr>\r
533   <tr><td>Max Slivers:</td><td><input type="text" name="max_slivers" value="<%= max_slivers %>"></td></tr>\r
534   <%= xosInlineDetailButtonsTemplate() %>\r
535   </table>\r
536   </form>\r
537 </script>
538
539 <!-- SliceDeployment -->
540
541 <script type="text/template" id="xosAdmin-sliceDeployment-list-template">
542   <h3 class="xos-list-title"><%= title %></h3>
543   <%= xosInlineListButtonsTemplate() %>
544   <table class="test-table">
545   <thead><tr>
546      <th>id</th>
547      <th>slice</th>
548      <th>deployment</th>
549      <th>tenant_id</th>
550   </tr></thead>
551   <tbody></tbody>
552   </table>
553 </script>
554
555 <script type="text/template" id="xosAdmin-sliceDeployment-listitem-template">
556   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
557   <td><%= idToName(slice,"slices","name") %></td>
558   <td><%= idToName(deployment,"deployments","name") %></td>
559   <td><%= tenant_id %></td>
560 </script>
561
562 <script type="text/template" id="xosAdmin-sliceDeployment-detail-template">
563   <h3 class="xos-detail-title">Detail View: Slice Deployment</h3>
564   <form>\r
565   <table>\r
566   <tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>\r
567   <tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>\r
568   <tr><td>Tenant Id:</td><td><input type="text" name="tenant_id" value="<%= tenant_id %>"></td></tr>\r
569   <%= xosInlineDetailButtonsTemplate() %>\r
570   </table>\r
571   </form>\r
572 </script>
573
574 <!-- SlicePrivilege -->
575
576 <script type="text/template" id="xosAdmin-slicePrivilege-list-template">
577   <h3 class="xos-list-title"><%= title %></h3>
578   <%= xosInlineListButtonsTemplate() %>
579   <table class="test-table">
580   <thead><tr>
581      <th>id</th>
582      <th>user</th>
583      <th>slice</th>
584      <th>role</th>
585   </tr></thead>
586   <tbody></tbody>
587   </table>
588 </script>
589
590 <script type="text/template" id="xosAdmin-slicePrivilege-listitem-template">
591   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
592   <td><%= idToName(user,"users","username") %></td>
593   <td><%= idToName(slice,"slices","name") %></td>
594   <td><%= idToName(role,"sliceRoles","role") %></td>
595 </script>
596
597 <script type="text/template" id="xosAdmin-slicePrivilege-detail-template">
598   <h3 class="xos-detail-title">Detail View: Slice Privilege</h3>
599   <form>\r
600   <table>\r
601   <tr><td>User:</td><td><input type="text" name="user" value="<%= user %>"></td></tr>\r
602   <tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>\r
603   <tr><td>Role:</td><td><input type="text" name="role" value="<%= role %>"></td></tr>\r
604   <%= xosInlineDetailButtonsTemplate() %>\r
605   </table>\r
606   </form>\r
607 </script>
608
609 <!-- Sliver -->
610
611 <script type="text/template" id="xosAdmin-sliver-list-template">
612   <h3 class="xos-list-title"><%= title %></h3>
613   <%= xosInlineListButtonsTemplate() %>
614   <table class="test-table">
615   <thead><tr>
616      <th>id</th>
617      <th>name</th>
618      <th>instance_id</th>
619      <th>instance_name</th>
620      <th>image</th>
621      <th>creator</th>
622      <th>slice</th>
623      <th>node</th>
624      <th>deploymentNetwork</th>
625      <th>flavor</th>
626      <th>userData</th>
627   </tr></thead>
628   <tbody></tbody>
629   </table>
630 </script>
631
632
633 <script type="text/template" id="xosAdmin-sliver-listitem-template">
634   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
635   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
636   <td><%= instance_id %></td>
637   <td><%= instance_name %></td>
638   <td><%= idToName(image,"images","name") %></td>
639   <td><%= idToName(creator,"users","name") %></td>
640   <td><%= idToName(slice,"slices","name") %></td>
641   <td><%= idToName(node,"nodes","name") %></td>
642   <td><%= idToName(deploymentNetwork,"deployments","name") %></td>
643   <td><%= flavor %></td>
644   <td><%= userData %></td>
645 </script>
646
647 <script type="text/template" id="xosAdmin-sliver-detail-template">
648   <h3 class="xos-detail-title">Detail View: Sliver</h3>
649   <form>\r
650   <table>\r
651   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
652   <tr><td>instance_id:</td><td><input type="text" name="instance_id" value="<%= instance_id %>"></td></tr>\r
653   <tr><td>instance_name:</td><td><input type="text" name="instance_name" value="<%= instance_name %>"></td></tr>\r
654   <tr><td>Image:</td><td><%= idToSelect("image",image,"images","name") %></td></tr>\r
655   <tr><td>Creator:</td><td><%= idToSelect("creator",creator,"users","username") %></td></tr>\r
656   <tr><td>Slice:</td><td><%= idToSelect("slice",slice,"slices","name") %></td></tr>\r
657   <tr><td>Deployment:</td><td><%= idToSelect("deploymentNetwork",deploymentNetwork,"deployments","name") %></td></tr>\r
658   <%= xosInlineDetailButtonsTemplate() %>\r
659   </table>\r
660   </form>\r
661 </script>
662
663 <!-- User -->
664
665 <script type="text/template" id="xosAdmin-user-list-template">
666   <h3 class="xos-list-title"><%= title %></h3>
667   <%= xosInlineListButtonsTemplate() %>
668   <table class="test-table">
669   <thead><tr>
670      <th>id</th>
671      <th>username</th>
672      <th>firstname</th>
673      <th>lastname</th>
674      <th>phone</th>
675      <th>user_url</th>
676      <th>site</th>
677   </tr></thead>
678   <tbody></tbody>
679   </table>
680 </script>
681
682
683 <script type="text/template" id="xosAdmin-user-listitem-template">
684   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
685   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: username}) %></td>
686   <td><%= firstname %></td>
687   <td><%= lastname %></td>
688   <td><%= phone %></td>
689   <td><%= user_url %></td>
690   <td><%= idToName(site,"sites","name") %></td>
691 </script>
692
693 <script type="text/template" id="xosAdmin-user-detail-template">
694   <h3 class="xos-detail-title">Detail View: User</h3>
695   <form>\r
696   <table>\r
697   <tr><td>User Name:</td><td><input type="text" name="username" value="<%= username %>"></td></tr>\r
698   <tr><td>First Name:</td><td><input type="text" name="firstname" value="<%= firstname %>"></td></tr>\r
699   <tr><td>Last Name:</td><td><input type="text" name="lastname" value="<%= lastname %>"></td></tr>\r
700   <tr><td>Phone:</td><td><input type="text" name="phone" value="<%= phone %>"></td></tr>\r
701   <tr><td>Url:</td><td><input type="text" name="user_url" value="<%= user_url %>"></td></tr>\r
702   <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","name") %></td></tr>\r
703   <%= xosInlineDetailButtonsTemplate() %>\r
704   </table>\r
705   </form>\r
706 </script>
707
708 <!-- UserDeployments -->
709
710 <script type="text/template" id="xosAdmin-userDeployment-list-template">
711   <h3 class="xos-list-title"><%= title %></h3>
712   <%= xosInlineListButtonsTemplate() %>
713   <table class="test-table">
714   <thead><tr>
715      <th>id</th>
716      <th>user</th>
717      <th>deployment</th>
718      <th>kuser_id</th>
719   </tr></thead>
720   <tbody></tbody>
721   </table>
722 </script>
723
724 <script type="text/template" id="xosAdmin-userDeployment-listitem-template">
725   <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
726   <td><%= idToName(user,"users","username") %></td>
727   <td><%= idToName(deployment,"deployments","name") %></td>
728   <td><%= kuser_id %></td>
729 </script>
730
731 <script type="text/template" id="xosAdmin-userDeployment-detail-template">
732   <h3 class="xos-detail-title">Detail View: UserDeployment</h3>
733   <form>\r
734   <table>\r
735   <tr><td>User:</td><td><input type="text" name="user" value="<%= user %>"></td></tr>\r
736   <tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>\r
737   <tr><td>kuser_id:</td><td><input type="text" name="kuser_id" value="<%= kuser_id %>"></td></tr>\r
738   <%= xosInlineDetailButtonsTemplate() %>\r
739   </table>\r
740   </form>\r
741 </script>
742
743 <script>
744 xosInlineDetailButtonsTemplate = _.template($("#xos-inline-detail-buttons-template").html());
745 xosInlineListButtonsTemplate = _.template($("#xos-inline-list-buttons-template").html());
746 xosDeleteButtonTemplate = _.template($("#xos-delete-button-template").html());
747 xosDetailLinkTemplate = _.template($("#xos-detail-link-template").html());
748 </script>