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