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 <% if (addChildHash) { %>
93 <a href="<%= addChildHash %>">Add...</a>
97 <script type="text/template" id="xos-delete-button-template">
98 <a href="#delete<%= firstCharUpper(modelName) %>/<%= id %>">delete</a>
101 <script type="text/template" id="xos-detail-link-template">
102 <a href="#<%= collectionName %>/<%= id %>"><%= text %></a>
105 <script type="text/template" id="xos-add-template">
106 <h3 class="xos-detail-title">Add Object: <%= modelName %></h3>
109 <% _.each(addFields, function(fieldName) { %>
\r
110 <tr><td><%= fieldNameToHumanReadable(fieldName) %>:</td>
\r
111 <% readOnly = $.inArray(fieldName, model.readOnlyFields)>=0 ? " readonly" : ""; console.log(fieldName + " " + readOnly); console.log(model.readOnlyFields); %>
\r
112 <% if (fieldName in foreignFields) { %>
\r
113 <td><%= idToSelect(fieldName, model.attributes[fieldName], foreignFields[fieldName], "humanReadableName", readOnly) %></td>
\r
114 <% } else if (inputType[fieldName] == "checkbox") { %>
\r
115 <td><input type="checkbox" name="<%= fieldName %>" <% if (model.attributes[fieldName]) print("checked"); %><%= readOnly %>></td>
\r
117 <td><input type="text" name="<%= fieldName %>" value="<%= model.attributes[fieldName] %>"<%= readOnly %>></td>
\r
121 <%= xosInlineDetailButtonsTemplate() %>
\r
126 <script type="text/template" id="xos-detail-template">
127 <h3 class="xos-detail-title">Edit Object: <%= modelName %></h3>
130 <% console.log(model); _.each(detailFields, function(fieldName) { %>
\r
131 <tr><td><%= fieldNameToHumanReadable(fieldName) %>:</td>
\r
132 <% if (fieldName in foreignFields) { %>
\r
133 <td><%= idToSelect(fieldName, model.attributes[fieldName], foreignFields[fieldName], "humanReadableName") %></td>
\r
134 <% } else if (inputType[fieldName] == "checkbox") { %>
\r
135 <td><input type="checkbox" name="<%= fieldName %>" <% if (model.attributes[fieldName]) print("checked"); %>></td>
\r
137 <td><input type="text" name="<%= fieldName %>" value="<%= model.attributes[fieldName] %>"></td>
\r
141 <%= xosInlineDetailButtonsTemplate() %>
\r
148 <script type="text/template" id="xosAdmin-deployment-list-template">
149 <h3 class="xos-list-title"><%= title %></h3>
150 <%= xosListHeaderTemplate() %>
151 <table class="test-table">
156 <th>admin_tenant</th>
162 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
166 <script type="text/template" id="xosAdmin-deployment-listitem-template">
167 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
168 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
169 <td><%= backend_type %></td>
170 <td><%= admin_tenant %></td>
171 <td><%= typeof sites != 'undefined' && sites.length || 0 %></td>
172 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
177 <script type="text/template" id="xosAdmin-image-list-template">
178 <h3 class="xos-list-title"><%= title %></h3>
179 <%= xosListHeaderTemplate() %>
180 <table class="test-table">
185 <th>container_format</th>
191 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
194 <script type="text/template" id="xosAdmin-image-listitem-template">
195 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
196 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
197 <td><%= disk_format %></td>
198 <td><%= container_format %></td>
200 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
203 <!-- NetworkTemplate -->
205 <script type="text/template" id="xosAdmin-networkTemplate-list-template">
206 <h3 class="xos-list-title"><%= title %></h3>
207 <%= xosListHeaderTemplate() %>
208 <table class="test-table">
215 <th>sharedNetworkName</th>
216 <th>sharedNetworkId</th>
221 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
225 <script type="text/template" id="xosAdmin-networkTemplate-listitem-template">
226 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
227 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
228 <td><%= description %></td>
229 <td><%= visibility %></td>
230 <td><%= translation %></td>
231 <td><%= sharedNetworkName %></td>
232 <td><%= sharedNetworkId %></td>
233 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
238 <script type="text/template" id="xosAdmin-network-list-template">
239 <h3 class="xos-list-title"><%= title %></h3>
240 <%= xosListHeaderTemplate() %>
241 <table class="test-table">
253 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
256 <script type="text/template" id="xosAdmin-network-listitem-template">
257 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
258 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
259 <td><%= idToName(template,"networkTemplates","name") %></td>
260 <td><%= ports %></td>
261 <td><%= labels %></td>
262 <td><%= idToName(owner,"slices","name") %></td>
263 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
266 <!-- NetworkSliver -->
268 <script type="text/template" id="xosAdmin-networkSliver-list-template">
269 <h3 class="xos-list-title"><%= title %></h3>
270 <%= xosListHeaderTemplate() %>
271 <table class="test-table">
282 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
285 <script type="text/template" id="xosAdmin-networkSliver-listitem-template">
286 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
287 <td><%= idToName(network,"networks","name") %></td>
288 <td><%= idToName(sliver,"slivers","name") %></td>
290 <td><%= port_id %></td>
291 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
294 <!-- NetworkDeployment -->
296 <script type="text/template" id="xosAdmin-networkDeployment-list-template">
297 <h3 class="xos-list-title"><%= title %></h3>
298 <%= xosListHeaderTemplate() %>
299 <table class="test-table">
309 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
312 <script type="text/template" id="xosAdmin-networkDeployment-listitem-template">
313 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
314 <td><%= idToName(network,"networks","name") %></td>
315 <td><%= idToName(deployment,"deployments","name") %></td>
316 <td><%= net_id %></td>
317 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
322 <script type="text/template" id="xosAdmin-node-list-template">
323 <h3 class="xos-list-title"><%= title %></h3>
324 <%= xosListHeaderTemplate() %>
325 <table class="test-table">
335 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
339 <script type="text/template" id="xosAdmin-node-listitem-template">
340 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
341 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
342 <td><%= idToName(site,"sites","name") %></td>
343 <td><%= idToName(deployment,"deployments","name") %></td>
344 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
349 <script type="text/template" id="xosAdmin-sliceRole-list-template">
350 <h3 class="xos-list-title"><%= title %></h3>
351 <%= xosListHeaderTemplate() %>
352 <table class="test-table">
360 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
363 <script type="text/template" id="xosAdmin-sliceRole-listitem-template">
364 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
366 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
371 <script type="text/template" id="xosAdmin-service-list-template">
372 <h3 class="xos-list-title"><%= title %></h3>
373 <%= xosListHeaderTemplate() %>
374 <table class="test-table">
380 <th>versionNumber</th>
386 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
390 <script type="text/template" id="xosAdmin-service-listitem-template">
391 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
392 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
393 <td><%= description %></td>
394 <td><%= enabled %></td>
395 <td><%= versionNumber %></td>
396 <td><%= published %></td>
397 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
402 <script type="text/template" id="xosAdmin-site-list-template">
403 <h3 class="xos-list-title"><%= title %></h3>
404 <%= xosListHeaderTemplate() %>
405 <table class="test-table">
413 <th>abbreviated_name</th>
418 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
421 <script type="text/template" id="xosAdmin-site-listitem-template">
422 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
423 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
424 <td><%= site_url %></td>
425 <td><%= enabled %></td>
426 <td><%= login_base %></td>
427 <td><%= is_public %></td>
428 <td><%= abbreviated_name %></td>
429 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
434 <script type="text/template" id="xosAdmin-slice-list-template">
435 <h3 class="xos-list-title"><%= title %></h3>
436 <%= xosListHeaderTemplate() %>
437 <table class="test-table">
442 <th>omf_friendly</th>
452 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
455 <script type="text/template" id="xosAdmin-slice-listitem-template">
456 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
457 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
458 <td><%= enabled %></td>
459 <td><%= omf_friendly %></td>
460 <td><%= description %></td>
461 <td><%= slice_url %></td>
462 <td><%= idToName(site,"sites","name") %></td>
463 <td><%= max_slivers %></td>
464 <td><%= idToName(service,"services","name") %></td>
465 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
468 <!-- SliceDeployment -->
470 <script type="text/template" id="xosAdmin-sliceDeployment-list-template">
471 <h3 class="xos-list-title"><%= title %></h3>
472 <%= xosListHeaderTemplate() %>
473 <table class="test-table">
483 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
486 <script type="text/template" id="xosAdmin-sliceDeployment-listitem-template">
487 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
488 <td><%= idToName(slice,"slices","name") %></td>
489 <td><%= idToName(deployment,"deployments","name") %></td>
490 <td><%= tenant_id %></td>
491 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
494 <!-- SlicePrivilege -->
496 <script type="text/template" id="xosAdmin-slicePrivilege-list-template">
497 <h3 class="xos-list-title"><%= title %></h3>
498 <%= xosListHeaderTemplate() %>
499 <table class="test-table">
509 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
512 <script type="text/template" id="xosAdmin-slicePrivilege-listitem-template">
513 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
514 <td><%= idToName(user,"users","username") %></td>
515 <td><%= idToName(slice,"slices","name") %></td>
516 <td><%= idToName(role,"sliceRoles","role") %></td>
517 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
523 <script type="text/template" id="xosAdmin-sliver-list-template">
524 <h3 class="xos-list-title"><%= title %></h3>
525 <%= xosListHeaderTemplate() %>
526 <table class="test-table">
531 <th>instance_name</th>
536 <th>deploymentNetwork</th>
543 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
547 <script type="text/template" id="xosAdmin-sliver-listitem-template">
548 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
549 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
550 <td><%= instance_id %></td>
551 <td><%= instance_name %></td>
552 <td><%= idToName(image,"images","name") %></td>
553 <td><%= idToName(creator,"users","name") %></td>
554 <td><%= idToName(slice,"slices","name") %></td>
555 <td><%= idToName(node,"nodes","name") %></td>
556 <td><%= idToName(deploymentNetwork,"deployments","name") %></td>
557 <td><%= flavor %></td>
558 <td><%= userData %></td>
559 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
564 <script type="text/template" id="xosAdmin-user-list-template">
565 <h3 class="xos-list-title"><%= title %></h3>
566 <%= xosListHeaderTemplate() %>
567 <table class="test-table">
580 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
584 <script type="text/template" id="xosAdmin-user-listitem-template">
585 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
586 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: username}) %></td>
587 <td><%= firstname %></td>
588 <td><%= lastname %></td>
589 <td><%= phone %></td>
590 <td><%= user_url %></td>
591 <td><%= idToName(site,"sites","name") %></td>
592 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
595 <!-- UserDeployments -->
597 <script type="text/template" id="xosAdmin-userDeployment-list-template">
598 <h3 class="xos-list-title"><%= title %></h3>
599 <%= xosListHeaderTemplate() %>
600 <table class="test-table">
610 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
613 <script type="text/template" id="xosAdmin-userDeployment-listitem-template">
614 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
615 <td><%= idToName(user,"users","username") %></td>
616 <td><%= idToName(deployment,"deployments","name") %></td>
617 <td><%= kuser_id %></td>
618 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
622 xosInlineDetailButtonsTemplate = _.template($("#xos-inline-detail-buttons-template").html());
623 xosListHeaderTemplate = _.template($("#xos-list-header-template").html());
624 xosListFooterTemplate = _.template($("#xos-list-footer-template").html());
625 xosDeleteButtonTemplate = _.template($("#xos-delete-button-template").html());
626 xosDetailLinkTemplate = _.template($("#xos-detail-link-template").html());