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