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