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