1 <!-- Error and Success templates -->
3 <script type="text/template" id="xos-error-response">
6 <tr><td>error:</td><td><%= error %></td></tr>
7 <tr><td>check:</td><td><%= specific_error %></td></tr>
12 <% _.each(reasons, function(element, index) { %>
13 <tr><td><%= index %></td><td><%= element %></td></tr>
19 <script type="text/template" id="xos-error-rawresponse">
21 <pre>The server returned:
22 "<%= responseText %>"</pre>
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>
34 <script type="text/template" id="xos-success-template">
35 <button id="close-success-box">Close Success Message</button>
37 <table class="test-success-table">
38 <tr><td>Code:</td><td><%= status %></td></tr>
39 <tr><td>Message:</td><td><%= statusText %></td></tr>
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>
47 <script type="text/template" id="xos-status-template">
48 <div class="xos-status xos-<%= statusclass %>"><%= what %>: <%= statusText %> (<%= status %>)</div>
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>
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>
63 <script type="text/template" id="xos-title-detail">
67 <script type="text/template" id="xos-navbutton">
69 <a href="<%= routeUrl %>">
70 <i class="<%= iconClass %>"></i>
76 <script type="text/template" id="xos-inline-detail-buttons-template">
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>
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>
91 <script type="text/template" id="xos-list-footer-template">
92 <a href="<%= addChildHash %>">Add...</a>
95 <script type="text/template" id="xos-delete-button-template">
96 <a href="#delete<%= firstCharUpper(modelName) %>/<%= id %>">delete</a>
99 <script type="text/template" id="xos-detail-link-template">
100 <a href="#<%= collectionName %>/<%= id %>"><%= text %></a>
103 <script type="text/template" id="xos-add-template">
104 <h3 class="xos-detail-title">Add Object: <%= modelName %></h3>
107 <% _.each(addFields, function(fieldName) { %>
\r
108 <tr><td><%= fieldNameToHumanReadable(fieldName) %>:</td>
\r
109 <% if (fieldName in foreignFields) { %>
\r
110 <td><%= idToSelect(fieldName, model.attributes[fieldName], foreignFields[fieldName], "humanReadableName") %></td>
\r
111 <% } else if (inputType[fieldName] == "checkbox") { %>
\r
112 <td><input type="checkbox" name="<%= fieldName %>" <% if (model.attributes[fieldName]) print("checked"); %>></td>
\r
114 <td><input type="text" name="<%= fieldName %>" value="<%= model.attributes[fieldName] %>"></td>
\r
118 <%= xosInlineDetailButtonsTemplate() %>
\r
123 <script type="text/template" id="xos-detail-template">
124 <h3 class="xos-detail-title">Add Object: <%= modelName %></h3>
127 <% console.log(model); _.each(detailFields, function(fieldName) { %>
\r
128 <tr><td><%= fieldNameToHumanReadable(fieldName) %>:</td>
\r
129 <% if (fieldName in foreignFields) { %>
\r
130 <td><%= idToSelect(fieldName, model.attributes[fieldName], foreignFields[fieldName], "humanReadableName") %></td>
\r
131 <% } else if (inputType[fieldName] == "checkbox") { %>
\r
132 <td><input type="checkbox" name="<%= fieldName %>" <% if (model.attributes[fieldName]) print("checked"); %>></td>
\r
134 <td><input type="text" name="<%= fieldName %>" value="<%= model.attributes[fieldName] %>"></td>
\r
138 <%= xosInlineDetailButtonsTemplate() %>
\r
145 <script type="text/template" id="xosAdmin-deployment-list-template">
146 <h3 class="xos-list-title"><%= title %></h3>
147 <%= xosListHeaderTemplate() %>
148 <table class="test-table">
153 <th>admin_tenant</th>
159 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
163 <script type="text/template" id="xosAdmin-deployment-listitem-template">
164 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
165 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
166 <td><%= backend_type %></td>
167 <td><%= admin_tenant %></td>
168 <td><%= typeof sites != 'undefined' && sites.length || 0 %></td>
169 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
174 <script type="text/template" id="xosAdmin-image-list-template">
175 <h3 class="xos-list-title"><%= title %></h3>
176 <%= xosListHeaderTemplate() %>
177 <table class="test-table">
182 <th>container_format</th>
188 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
191 <script type="text/template" id="xosAdmin-image-listitem-template">
192 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
193 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
194 <td><%= disk_format %></td>
195 <td><%= container_format %></td>
197 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
200 <!-- NetworkTemplate -->
202 <script type="text/template" id="xosAdmin-networkTemplate-list-template">
203 <h3 class="xos-list-title"><%= title %></h3>
204 <%= xosListHeaderTemplate() %>
205 <table class="test-table">
212 <th>sharedNetworkName</th>
213 <th>sharedNetworkId</th>
218 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
222 <script type="text/template" id="xosAdmin-networkTemplate-listitem-template">
223 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
224 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
225 <td><%= description %></td>
226 <td><%= visibility %></td>
227 <td><%= translation %></td>
228 <td><%= sharedNetworkName %></td>
229 <td><%= sharedNetworkId %></td>
230 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
235 <script type="text/template" id="xosAdmin-network-list-template">
236 <h3 class="xos-list-title"><%= title %></h3>
237 <%= xosListHeaderTemplate() %>
238 <table class="test-table">
250 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
253 <script type="text/template" id="xosAdmin-network-listitem-template">
254 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
255 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
256 <td><%= idToName(template,"networkTemplates","name") %></td>
257 <td><%= ports %></td>
258 <td><%= labels %></td>
259 <td><%= idToName(owner,"slices","name") %></td>
260 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
263 <!-- NetworkSliver -->
265 <script type="text/template" id="xosAdmin-networkSliver-list-template">
266 <h3 class="xos-list-title"><%= title %></h3>
267 <%= xosListHeaderTemplate() %>
268 <table class="test-table">
279 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
282 <script type="text/template" id="xosAdmin-networkSliver-listitem-template">
283 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
284 <td><%= idToName(network,"networks","name") %></td>
285 <td><%= idToName(sliver,"slivers","name") %></td>
287 <td><%= port_id %></td>
288 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
291 <!-- NetworkDeployment -->
293 <script type="text/template" id="xosAdmin-networkDeployment-list-template">
294 <h3 class="xos-list-title"><%= title %></h3>
295 <%= xosListHeaderTemplate() %>
296 <table class="test-table">
306 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
309 <script type="text/template" id="xosAdmin-networkDeployment-listitem-template">
310 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
311 <td><%= idToName(network,"networks","name") %></td>
312 <td><%= idToName(deployment,"deployments","name") %></td>
313 <td><%= net_id %></td>
314 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
319 <script type="text/template" id="xosAdmin-node-list-template">
320 <h3 class="xos-list-title"><%= title %></h3>
321 <%= xosListHeaderTemplate() %>
322 <table class="test-table">
332 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
336 <script type="text/template" id="xosAdmin-node-listitem-template">
337 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
338 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
339 <td><%= idToName(site,"sites","name") %></td>
340 <td><%= idToName(deployment,"deployments","name") %></td>
341 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
346 <script type="text/template" id="xosAdmin-sliceRole-list-template">
347 <h3 class="xos-list-title"><%= title %></h3>
348 <%= xosListHeaderTemplate() %>
349 <table class="test-table">
357 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
360 <script type="text/template" id="xosAdmin-sliceRole-listitem-template">
361 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
363 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
368 <script type="text/template" id="xosAdmin-service-list-template">
369 <h3 class="xos-list-title"><%= title %></h3>
370 <%= xosListHeaderTemplate() %>
371 <table class="test-table">
377 <th>versionNumber</th>
383 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
387 <script type="text/template" id="xosAdmin-service-listitem-template">
388 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
389 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
390 <td><%= description %></td>
391 <td><%= enabled %></td>
392 <td><%= versionNumber %></td>
393 <td><%= published %></td>
394 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
399 <script type="text/template" id="xosAdmin-site-list-template">
400 <h3 class="xos-list-title"><%= title %></h3>
401 <%= xosListHeaderTemplate() %>
402 <table class="test-table">
410 <th>abbreviated_name</th>
415 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
418 <script type="text/template" id="xosAdmin-site-listitem-template">
419 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
420 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
421 <td><%= site_url %></td>
422 <td><%= enabled %></td>
423 <td><%= login_base %></td>
424 <td><%= is_public %></td>
425 <td><%= abbreviated_name %></td>
426 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
431 <script type="text/template" id="xosAdmin-slice-list-template">
432 <h3 class="xos-list-title"><%= title %></h3>
433 <%= xosListHeaderTemplate() %>
434 <table class="test-table">
439 <th>omf_friendly</th>
449 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
452 <script type="text/template" id="xosAdmin-slice-listitem-template">
453 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
454 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
455 <td><%= enabled %></td>
456 <td><%= omf_friendly %></td>
457 <td><%= description %></td>
458 <td><%= slice_url %></td>
459 <td><%= idToName(site,"sites","name") %></td>
460 <td><%= max_slivers %></td>
461 <td><%= idToName(service,"services","name") %></td>
462 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
465 <!-- SliceDeployment -->
467 <script type="text/template" id="xosAdmin-sliceDeployment-list-template">
468 <h3 class="xos-list-title"><%= title %></h3>
469 <%= xosListHeaderTemplate() %>
470 <table class="test-table">
480 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
483 <script type="text/template" id="xosAdmin-sliceDeployment-listitem-template">
484 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
485 <td><%= idToName(slice,"slices","name") %></td>
486 <td><%= idToName(deployment,"deployments","name") %></td>
487 <td><%= tenant_id %></td>
488 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
491 <!-- SlicePrivilege -->
493 <script type="text/template" id="xosAdmin-slicePrivilege-list-template">
494 <h3 class="xos-list-title"><%= title %></h3>
495 <%= xosListHeaderTemplate() %>
496 <table class="test-table">
506 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
509 <script type="text/template" id="xosAdmin-slicePrivilege-listitem-template">
510 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
511 <td><%= idToName(user,"users","username") %></td>
512 <td><%= idToName(slice,"slices","name") %></td>
513 <td><%= idToName(role,"sliceRoles","role") %></td>
514 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
520 <script type="text/template" id="xosAdmin-sliver-list-template">
521 <h3 class="xos-list-title"><%= title %></h3>
522 <%= xosListHeaderTemplate() %>
523 <table class="test-table">
528 <th>instance_name</th>
533 <th>deploymentNetwork</th>
540 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
544 <script type="text/template" id="xosAdmin-sliver-listitem-template">
545 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
546 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
547 <td><%= instance_id %></td>
548 <td><%= instance_name %></td>
549 <td><%= idToName(image,"images","name") %></td>
550 <td><%= idToName(creator,"users","name") %></td>
551 <td><%= idToName(slice,"slices","name") %></td>
552 <td><%= idToName(node,"nodes","name") %></td>
553 <td><%= idToName(deploymentNetwork,"deployments","name") %></td>
554 <td><%= flavor %></td>
555 <td><%= userData %></td>
556 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
561 <script type="text/template" id="xosAdmin-user-list-template">
562 <h3 class="xos-list-title"><%= title %></h3>
563 <%= xosListHeaderTemplate() %>
564 <table class="test-table">
577 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
581 <script type="text/template" id="xosAdmin-user-listitem-template">
582 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
583 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: username}) %></td>
584 <td><%= firstname %></td>
585 <td><%= lastname %></td>
586 <td><%= phone %></td>
587 <td><%= user_url %></td>
588 <td><%= idToName(site,"sites","name") %></td>
589 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
592 <!-- UserDeployments -->
594 <script type="text/template" id="xosAdmin-userDeployment-list-template">
595 <h3 class="xos-list-title"><%= title %></h3>
596 <%= xosListHeaderTemplate() %>
597 <table class="test-table">
607 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
610 <script type="text/template" id="xosAdmin-userDeployment-listitem-template">
611 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
612 <td><%= idToName(user,"users","username") %></td>
613 <td><%= idToName(deployment,"deployments","name") %></td>
614 <td><%= kuser_id %></td>
615 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
619 xosInlineDetailButtonsTemplate = _.template($("#xos-inline-detail-buttons-template").html());
620 xosListHeaderTemplate = _.template($("#xos-list-header-template").html());
621 xosListFooterTemplate = _.template($("#xos-list-footer-template").html());
622 xosDeleteButtonTemplate = _.template($("#xos-delete-button-template").html());
623 xosDetailLinkTemplate = _.template($("#xos-detail-link-template").html());