add raw error dialog support, only add model to collection once it has been saved
[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 <!-- Deployment -->
94
95 <script type="text/template" id="xosAdmin-deployment-list-template">
96   <h3 class="xos-list-title"><%= title %></h3>
97   <%= xosInlineListButtonsTemplate() %>
98   <table class="test-table">
99   <thead><tr>
100      <th>id</th>
101      <th>name</th>
102      <th>backend</th>
103      <th>admin_tenant</th>
104      <th># sites</th>
105   </tr></thead>
106   <tbody></tbody>
107   </table>
108 </script>
109
110
111 <script type="text/template" id="xosAdmin-deployment-listitem-template">
112   <td class="objectLink"><%= id %></td>
113   <td class="objectLink"><%= name %></td>
114   <td><%= backend_type %></td>
115   <td><%= admin_tenant %></td>
116   <td><%= typeof sites != 'undefined' && sites.length || 0 %></td>
117 </script>
118
119 <script type="text/template" id="xosAdmin-deployment-detail-template">
120   <h3 class="xos-detail-title">Detail View: Deployment</h3>
121   <form>
122   <table>\r
123   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
124   <tr><td>Backend:</td><td><input type="text" name="backend_type" value="<%= backend_type %>"></td></tr>\r
125   <tr><td>Admin Tenant:</td><td><input type="text" name="admin_tenant" value="<%= admin_tenant %>"></td></tr>\r
126   <%= xosInlineDetailButtonsTemplate() %>\r
127   </table>\r
128   </form>\r
129 </script>\r
130
131 <!-- Image -->
132
133 <script type="text/template" id="xosAdmin-image-list-template">
134   <h3 class="xos-list-title"><%= title %></h3>
135   <%= xosInlineListButtonsTemplate() %>
136   <table class="test-table">
137   <thead><tr>
138      <th>id</th>
139      <th>name</th>
140      <th>disk_format</th>
141      <th>container_format</th>
142      <th>path</th>
143   </tr></thead>
144   <tbody></tbody>
145   </table>
146 </script>
147
148 <script type="text/template" id="xosAdmin-image-listitem-template">
149   <td class="objectLink"><%= id %></td>
150   <td class="objectLink"><%= name %></td>
151   <td><%= disk_format %></td>
152   <td><%= container_format %></td>
153   <td><%= path %></td>
154 </script>
155
156 <script type="text/template" id="xosAdmin-image-detail-template">
157   <h3 class="xos-detail-title">Detail View: Image</h3>
158   <form>\r
159   <table>\r
160   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
161   <tr><td>Disk Format:</td><td><input type="text" name="backend_type" value="<%= disk_format %>"></td></tr>\r
162   <tr><td>Container Format:</td><td><input type="text" name="admin_tenant" value="<%= container_format %>"></td></tr>\r
163   <%= xosInlineDetailButtonsTemplate() %>\r
164   </table>\r
165   </form>\r
166 </script>
167
168 <!-- NetworkTemplate -->
169
170 <script type="text/template" id="xosAdmin-networkTemplate-list-template">
171   <h3 class="xos-list-title"><%= title %></h3>
172   <%= xosInlineListButtonsTemplate() %>
173   <table class="test-table">
174   <thead><tr>
175      <th>id</th>
176      <th>name</th>
177      <th>description</th>
178      <th>visibility</th>
179      <th>translation</th>
180      <th>sharedNetworkName</th>
181      <th>sharedNetworkId</th>
182   </tr></thead>
183   <tbody></tbody>
184   </table>
185 </script>
186
187
188 <script type="text/template" id="xosAdmin-networkTemplate-listitem-template">
189   <td class="objectLink"><%= id %></td>
190   <td class="objectLink"><%= name %></td>
191   <td><%= description %></td>
192   <td><%= visibility %></td>
193   <td><%= translation %></td>
194   <td><%= sharedNetworkName %></td>
195   <td><%= sharedNetworkId %></td>
196 </script>
197
198 <script type="text/template" id="xosAdmin-networkTemplate-detail-template">
199   <h3 class="xos-detail-title">Detail View: NetworkTemplate</h3>
200   <form>\r
201   <table>\r
202   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
203   <tr><td>description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>\r
204   <tr><td>Visibility:</td><td><input type="text" name="visibility" value="<%= visibility %>"></td></tr>\r
205   <tr><td>Translation:</td><td><input type="text" name="translation" value="<%= translation %>"></td></tr>\r
206   <tr><td>Shared Network Name:</td><td><input type="text" name="sharedNetworkName" value="<%= sharedNetworkName %>"></td></tr>\r
207   <tr><td>Shared Network Id:</td><td><input type="text" name="sharedNetworkId" value="<%= sharedNetworkId %>"></td></tr>\r
208   <%= xosInlineDetailButtonsTemplate() %>\r
209   </table>\r
210   </form>\r
211 </script>
212
213 <!-- Network -->
214
215 <script type="text/template" id="xosAdmin-network-list-template">
216   <h3 class="xos-list-title"><%= title %></h3>
217   <%= xosInlineListButtonsTemplate() %>
218   <table class="test-table">
219   <thead><tr>
220      <th>id</th>
221      <th>name</th>
222      <th>template</th>
223      <th>ports</th>
224      <th>labels</th>
225      <th>owner</th>
226   </tr></thead>
227   <tbody></tbody>
228   </table>
229 </script>
230
231 <script type="text/template" id="xosAdmin-network-listitem-template">
232   <td class="objectLink"><%= id %></td>
233   <td class="objectLink"><%= name %></td>
234   <td><%= idToName(template,"networkTemplates","name") %></td>
235   <td><%= ports %></td>
236   <td><%= labels %></td>
237   <td><%= idToName(owner,"slices","name") %></td>
238 </script>
239
240 <script type="text/template" id="xosAdmin-network-detail-template">
241   <h3 class="xos-detail-title">Detail View: Network</h3>
242   <form>\r
243   <table>\r
244   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
245   <tr><td>Template:</td><td><%= idToSelect("template",template,"networkTemplates","name") %></td></tr>\r
246   <tr><td>Ports:</td><td><input type="text" name="ports" value="<%= ports %>"></td></tr>\r
247   <tr><td>Labels:</td><td><input type="text" name="labels" value="<%= labels %>"></td></tr>\r
248   <tr><td>Owner:</td><td><%= idToSelect("owner",owner,"slices","name") %></td></tr>\r
249   <%= xosInlineDetailButtonsTemplate() %>\r
250   </table>\r
251   </form>\r
252 </script>
253
254 <!-- NetworkSliver -->
255
256 <script type="text/template" id="xosAdmin-networkSliver-list-template">
257   <h3 class="xos-list-title"><%= title %></h3>
258   <%= xosInlineListButtonsTemplate() %>
259   <table class="test-table">
260   <thead><tr>
261      <th>id</th>
262      <th>network</th>
263      <th>sliver</th>
264      <th>ip</th>
265      <th>port_id</th>
266   </tr></thead>
267   <tbody></tbody>
268   </table>
269 </script>
270
271 <script type="text/template" id="xosAdmin-networkSliver-listitem-template">
272   <td class="objectLink"><%= id %></td>
273   <td><%= idToName(network,"networks","name") %></td>
274   <td><%= idToName(sliver,"slivers","name") %></td>
275   <td><%= ip %></td>
276   <td><%= port_id %></td>
277 </script>
278
279 <script type="text/template" id="xosAdmin-networkSliver-detail-template">
280   <h3 class="xos-detail-title">Detail View: Network</h3>
281   <form>\r
282   <table>\r
283   <tr><td>Network:</td><td><input type="text" name="network" value="<%= network %>"></td></tr>\r
284   <tr><td>Sliver:</td><td><input type="text" name="sliver" value="<%= sliver %>"></td></tr>\r
285   <tr><td>Ip:</td><td><input type="text" name="ip" value="<%= ip %>"></td></tr>\r
286   <tr><td>Port_id:</td><td><input type="text" name="port_id" value="<%= port_id %>"></td></tr>\r
287   <%= xosInlineDetailButtonsTemplate() %>\r
288   </table>\r
289   </form>\r
290 </script>
291
292 <!-- NetworkDeployment -->
293
294 <script type="text/template" id="xosAdmin-networkDeployment-list-template">
295   <h3 class="xos-list-title"><%= title %></h3>
296   <%= xosInlineListButtonsTemplate() %>
297   <table class="test-table">
298   <thead><tr>
299      <th>id</th>
300      <th>network</th>
301      <th>deployment</th>
302      <th>net_id</th>
303   </tr></thead>
304   <tbody></tbody>
305   </table>
306 </script>
307
308 <script type="text/template" id="xosAdmin-networkDeployment-listitem-template">
309   <td class="objectLink"><%= id %></td>
310   <td><%= idToName(network,"networks","name") %></td>
311   <td><%= idToName(deployment,"deployments","name") %></td>
312   <td><%= net_id %></td>
313 </script>
314
315 <script type="text/template" id="xosAdmin-networkDeployment-detail-template">
316   <h3 class="xos-detail-title">Detail View: Network</h3>
317   <form>\r
318   <table>\r
319   <tr><td>Network:</td><td><input type="text" name="network" value="<%= network %>"></td></tr>\r
320   <tr><td>Sliver:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>\r
321   <tr><td>Ip:</td><td><input type="text" name="net_id" value="<%= net_id %>"></td></tr>\r
322   <%= xosInlineDetailButtonsTemplate() %>\r
323   </table>\r
324   </form>\r
325 </script>
326
327 <!-- Node -->
328
329 <script type="text/template" id="xosAdmin-node-list-template">
330   <h3 class="xos-list-title"><%= title %></h3>
331   <%= xosInlineListButtonsTemplate() %>
332   <table class="test-table">
333   <thead><tr>
334      <th>id</th>
335      <th>name</th>
336      <th>site</th>
337      <th>deployment</th>
338   </tr></thead>
339   <tbody></tbody>
340   </table>
341 </script>
342
343
344 <script type="text/template" id="xosAdmin-node-listitem-template">
345   <td class="objectLink"><%= id %></td>
346   <td class="objectLink"><%= name %></td>
347   <td><%= idToName(site,"sites","name") %></td>
348   <td><%= idToName(deployment,"deployments","name") %></td>
349 </script>
350
351 <script type="text/template" id="xosAdmin-node-detail-template">
352   <h3 class="xos-detail-title">Detail View: Node</h3>
353   <form>\r
354   <table>\r
355   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
356   <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","name") %></td></tr>\r
357   <tr><td>Deployment:</td><td><%= idToSelect("deployment",deployment,"deployments","name") %></td></tr>\r
358   <%= xosInlineDetailButtonsTemplate() %>\r
359   </table>\r
360   </form>\r
361 </script>
362
363 <!-- SliceRole -->
364
365 <script type="text/template" id="xosAdmin-sliceRole-list-template">
366   <h3 class="xos-list-title"><%= title %></h3>
367   <%= xosInlineListButtonsTemplate() %>
368   <table class="test-table">
369   <thead><tr>
370      <th>id</th>
371      <th>role</th>
372   </tr></thead>
373   <tbody></tbody>
374   </table>
375 </script>
376
377
378 <script type="text/template" id="xosAdmin-sliceRole-listitem-template">
379   <td class="objectLink"><%= id %></td>
380   <td><%= role %></td>
381 </script>
382
383 <script type="text/template" id="xosAdmin-sliceRole-detail-template">
384   <h3 class="xos-detail-title">Detail View: Service</h3>
385   <form>\r
386   <table>\r
387   <tr><td>Role:</td><td><input type="text" name="role" value="<%= role %>"></td></tr>\r
388   <%= xosInlineDetailButtonsTemplate() %>\r
389   </table>\r
390   </form>\r
391 </script>
392
393 <!-- Service -->
394
395 <script type="text/template" id="xosAdmin-service-list-template">
396   <h3 class="xos-list-title"><%= title %></h3>
397   <%= xosInlineListButtonsTemplate() %>
398   <table class="test-table">
399   <thead><tr>
400      <th>id</th>
401      <th>name</th>
402      <th>description</th>
403      <th>enabled</th>
404      <th>versionNumber</th>
405      <th>published</th>
406   </tr></thead>
407   <tbody></tbody>
408   </table>
409 </script>
410
411
412 <script type="text/template" id="xosAdmin-service-listitem-template">
413   <td class="objectLink"><%= id %></td>
414   <td class="objectLink"><%= name %></td>
415   <td><%= description %></td>
416   <td><%= enabled %></td>
417   <td><%= versionNumber %></td>
418   <td><%= published %></td>
419 </script>
420
421 <script type="text/template" id="xosAdmin-service-detail-template">
422   <h3 class="xos-detail-title">Detail View: Service</h3>
423   <form>\r
424   <table>\r
425   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
426   <tr><td>description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>\r
427   <tr><td>Version Number:</td><td><input type="text" name="versionNumber" value="<%= versionNumber %>"></td></tr>\r
428   <%= xosInlineDetailButtonsTemplate() %>\r
429   </table>\r
430   </form>\r
431 </script>
432
433 <!-- Site -->
434
435 <script type="text/template" id="xosAdmin-site-list-template">
436   <h3 class="xos-list-title"><%= title %></h3>
437   <%= xosInlineListButtonsTemplate() %>
438   <table class="test-table">
439   <thead><tr>
440      <th>id</th>
441      <th>name</th>
442      <th>url</th>
443      <th>enabled</th>
444      <th>login_base</th>
445      <th>is_public</th>
446      <th>abbreviated_name</th>
447   </tr></thead>
448   <tbody></tbody>
449   </table>
450 </script>
451
452 <script type="text/template" id="xosAdmin-site-listitem-template">
453   <td class="objectLink"><%= id %></td>
454   <td class="objectLink"><%= name %></td>
455   <td><%= site_url %></td>
456   <td><%= enabled %></td>
457   <td><%= login_base %></td>
458   <td><%= is_public %></td>
459   <td><%= abbreviated_name %></td>
460 </script>
461
462 <script type="text/template" id="xosAdmin-site-detail-template">
463   <h3 class="xos-detail-title">Detail View: Site</h3>
464   <form>\r
465   <table>\r
466   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
467   <tr><td>abbreviated_name:</td><td><input type="text" name="abbreviated_name" value="<%= abbreviated_name %>"></td></tr>\r
468   <tr><td>url:</td><td><input type="text" name="site_url" value="<%= site_url %>"></td></tr>\r
469   <tr><td>Enabled:</td><td><input type="checkbox" name="enabled" <% if (enabled) print("checked"); %>></td></tr>\r
470   <tr><td>Is Public:</td><td><input type="checkbox" name="is_public" <% if (is_public) print("checked"); %>></td></tr>\r
471   <tr><td>login_base:</td><td><input type="text" name="login_base" value="<%= login_base %>"></td></tr>\r
472   <%= xosInlineDetailButtonsTemplate() %>\r
473   </table>\r
474   </form>\r
475 </script>
476
477 <!-- Slice -->
478
479 <script type="text/template" id="xosAdmin-slice-list-template">
480   <h3 class="xos-list-title"><%= title %></h3>
481   <%= xosInlineListButtonsTemplate() %>
482   <table class="test-table">
483   <thead><tr>
484      <th>id</th>
485      <th>name</th>
486      <th>enabled</th>
487      <th>omf_friendly</th>
488      <th>description</th>
489      <th>slice_url</th>
490      <th>site</th>
491      <th>max_slivers</th>
492      <th>service</th>
493   </tr></thead>
494   <tbody></tbody>
495   </table>
496 </script>
497
498 <script type="text/template" id="xosAdmin-slice-listitem-template">
499   <td class="objectLink"><%= id %></td>
500   <td class="objectLink"><%= name %></td>
501   <td><%= enabled %></td>
502   <td><%= omf_friendly %></td>
503   <td><%= description %></td>
504   <td><%= slice_url %></td>
505   <td><%= idToName(site,"sites","name") %></td>
506   <td><%= max_slivers %></td>
507   <td><%= idToName(service,"services","name") %></td>
508 </script>
509
510 <script type="text/template" id="xosAdmin-slice-detail-template">
511   <h3 class="xos-detail-title">Detail View: Slice</h3>
512   <form>\r
513   <table>\r
514   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
515   <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","name") %></td></tr>\r
516   <tr><td>Enabled:</td><td><input type="checkbox" name="enabled" <% if (enabled) print("checked"); %>></td></tr>\r
517   <tr><td>Description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>\r
518   <tr><td>Url:</td><td><input type="text" name="slice_url" value="<%= slice_url %>"></td></tr>\r
519   <tr><td>Max Slivers:</td><td><input type="text" name="max_slivers" value="<%= max_slivers %>"></td></tr>\r
520   <%= xosInlineDetailButtonsTemplate() %>\r
521   </table>\r
522   </form>\r
523 </script>
524
525 <!-- SliceDeployment -->
526
527 <script type="text/template" id="xosAdmin-sliceDeployment-list-template">
528   <h3 class="xos-list-title"><%= title %></h3>
529   <%= xosInlineListButtonsTemplate() %>
530   <table class="test-table">
531   <thead><tr>
532      <th>id</th>
533      <th>slice</th>
534      <th>deployment</th>
535      <th>tenant_id</th>
536   </tr></thead>
537   <tbody></tbody>
538   </table>
539 </script>
540
541 <script type="text/template" id="xosAdmin-sliceDeployment-listitem-template">
542   <td class="objectLink"><%= id %></td>
543   <td><%= idToName(slice,"slices","name") %></td>
544   <td><%= idToName(deployment,"deployments","name") %></td>
545   <td><%= tenant_id %></td>
546 </script>
547
548 <script type="text/template" id="xosAdmin-sliceDeployment-detail-template">
549   <h3 class="xos-detail-title">Detail View: Slice Deployment</h3>
550   <form>\r
551   <table>\r
552   <tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>\r
553   <tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>\r
554   <tr><td>Tenant Id:</td><td><input type="text" name="tenant_id" value="<%= tenant_id %>"></td></tr>\r
555   <%= xosInlineDetailButtonsTemplate() %>\r
556   </table>\r
557   </form>\r
558 </script>
559
560 <!-- SlicePrivilege -->
561
562 <script type="text/template" id="xosAdmin-slicePrivilege-list-template">
563   <h3 class="xos-list-title"><%= title %></h3>
564   <%= xosInlineListButtonsTemplate() %>
565   <table class="test-table">
566   <thead><tr>
567      <th>id</th>
568      <th>user</th>
569      <th>slice</th>
570      <th>role</th>
571   </tr></thead>
572   <tbody></tbody>
573   </table>
574 </script>
575
576 <script type="text/template" id="xosAdmin-slicePrivilege-listitem-template">
577   <td class="objectLink"><%= id %></td>
578   <td><%= idToName(user,"users","username") %></td>
579   <td><%= idToName(slice,"slices","name") %></td>
580   <td><%= idToName(role,"sliceRoles","role") %></td>
581 </script>
582
583 <script type="text/template" id="xosAdmin-slicePrivilege-detail-template">
584   <h3 class="xos-detail-title">Detail View: Slice Privilege</h3>
585   <form>\r
586   <table>\r
587   <tr><td>User:</td><td><input type="text" name="user" value="<%= user %>"></td></tr>\r
588   <tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>\r
589   <tr><td>Role:</td><td><input type="text" name="role" value="<%= role %>"></td></tr>\r
590   <%= xosInlineDetailButtonsTemplate() %>\r
591   </table>\r
592   </form>\r
593 </script>
594
595 <!-- Sliver -->
596
597 <script type="text/template" id="xosAdmin-sliver-list-template">
598   <h3 class="xos-list-title"><%= title %></h3>
599   <%= xosInlineListButtonsTemplate() %>
600   <table class="test-table">
601   <thead><tr>
602      <th>id</th>
603      <th>name</th>
604      <th>instance_id</th>
605      <th>instance_name</th>
606      <th>image</th>
607      <th>creator</th>
608      <th>slice</th>
609      <th>node</th>
610      <th>deploymentNetwork</th>
611      <th>flavor</th>
612      <th>userData</th>
613   </tr></thead>
614   <tbody></tbody>
615   </table>
616 </script>
617
618
619 <script type="text/template" id="xosAdmin-sliver-listitem-template">
620   <td class="objectLink"><%= id %></td>
621   <td class="objectLink"><%= name %></td>
622   <td><%= instance_id %></td>
623   <td><%= instance_name %></td>
624   <td><%= idToName(image,"images","name") %></td>
625   <td><%= idToName(creator,"users","name") %></td>
626   <td><%= idToName(slice,"slices","name") %></td>
627   <td><%= idToName(node,"nodes","name") %></td>
628   <td><%= idToName(deploymentNetwork,"deployments","name") %></td>
629   <td><%= flavor %></td>
630   <td><%= userData %></td>
631 </script>
632
633 <script type="text/template" id="xosAdmin-sliver-detail-template">
634   <h3 class="xos-detail-title">Detail View: Sliver</h3>
635   <form>\r
636   <table>\r
637   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>\r
638   <tr><td>instance_id:</td><td><input type="text" name="instance_id" value="<%= instance_id %>"></td></tr>\r
639   <tr><td>instance_name:</td><td><input type="text" name="instance_name" value="<%= instance_name %>"></td></tr>\r
640   <tr><td>Image:</td><td><%= idToSelect("image",image,"images","name") %></td></tr>\r
641   <tr><td>Creator:</td><td><%= idToSelect("creator",creator,"users","username") %></td></tr>\r
642   <tr><td>Slice:</td><td><%= idToSelect("slice",slice,"slices","name") %></td></tr>\r
643   <tr><td>Deployment:</td><td><%= idToSelect("deploymentNetwork",deploymentNetwork,"deployments","name") %></td></tr>\r
644   <%= xosInlineDetailButtonsTemplate() %>\r
645   </table>\r
646   </form>\r
647 </script>
648
649 <!-- User -->
650
651 <script type="text/template" id="xosAdmin-user-list-template">
652   <h3 class="xos-list-title"><%= title %></h3>
653   <%= xosInlineListButtonsTemplate() %>
654   <table class="test-table">
655   <thead><tr>
656      <th>id</th>
657      <th>username</th>
658      <th>firstname</th>
659      <th>lastname</th>
660      <th>phone</th>
661      <th>user_url</th>
662      <th>site</th>
663   </tr></thead>
664   <tbody></tbody>
665   </table>
666 </script>
667
668
669 <script type="text/template" id="xosAdmin-user-listitem-template">
670   <td class="objectLink"><%= id %></td>
671   <td class="objectLink"><%= username %></td>
672   <td><%= firstname %></td>
673   <td><%= lastname %></td>
674   <td><%= phone %></td>
675   <td><%= user_url %></td>
676   <td><%= idToName(site,"sites","name") %></td>
677 </script>
678
679 <script type="text/template" id="xosAdmin-user-detail-template">
680   <h3 class="xos-detail-title">Detail View: User</h3>
681   <form>\r
682   <table>\r
683   <tr><td>User Name:</td><td><input type="text" name="username" value="<%= username %>"></td></tr>\r
684   <tr><td>First Name:</td><td><input type="text" name="firstname" value="<%= firstname %>"></td></tr>\r
685   <tr><td>Last Name:</td><td><input type="text" name="lastname" value="<%= lastname %>"></td></tr>\r
686   <tr><td>Phone:</td><td><input type="text" name="phone" value="<%= phone %>"></td></tr>\r
687   <tr><td>Url:</td><td><input type="text" name="user_url" value="<%= user_url %>"></td></tr>\r
688   <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","name") %></td></tr>\r
689   <%= xosInlineDetailButtonsTemplate() %>\r
690   </table>\r
691   </form>\r
692 </script>
693
694 <!-- UserDeployments -->
695
696 <script type="text/template" id="xosAdmin-userDeployment-list-template">
697   <h3 class="xos-list-title"><%= title %></h3>
698   <%= xosInlineListButtonsTemplate() %>
699   <table class="test-table">
700   <thead><tr>
701      <th>id</th>
702      <th>user</th>
703      <th>deployment</th>
704      <th>kuser_id</th>
705   </tr></thead>
706   <tbody></tbody>
707   </table>
708 </script>
709
710 <script type="text/template" id="xosAdmin-userDeployment-listitem-template">
711   <td class="objectLink"><%= id %></td>
712   <td><%= idToName(user,"users","username") %></td>
713   <td><%= idToName(deployment,"deployments","name") %></td>
714   <td><%= kuser_id %></td>
715 </script>
716
717 <script type="text/template" id="xosAdmin-userDeployment-detail-template">
718   <h3 class="xos-detail-title">Detail View: UserDeployment</h3>
719   <form>\r
720   <table>\r
721   <tr><td>User:</td><td><input type="text" name="user" value="<%= user %>"></td></tr>\r
722   <tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>\r
723   <tr><td>kuser_id:</td><td><input type="text" name="kuser_id" value="<%= kuser_id %>"></td></tr>\r
724   <%= xosInlineDetailButtonsTemplate() %>\r
725   </table>\r
726   </form>\r
727 </script>
728
729 <script>
730 xosInlineDetailButtonsTemplate = _.template($("#xos-inline-detail-buttons-template").html());
731 xosInlineListButtonsTemplate = _.template($("#xos-inline-list-buttons-template").html());
732 </script>