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 <% console.log(model); %>
93 <a href="<%= addChildHash %>">Add...</a>
96 <script type="text/template" id="xos-delete-button-template">
97 <a href="#delete<%= firstCharUpper(modelName) %>/<%= id %>">delete</a>
100 <script type="text/template" id="xos-detail-link-template">
101 <a href="#<%= collectionName %>/<%= id %>"><%= text %></a>
104 <script type="text/template" id="xos-add-template">
105 <h3 class="xos-detail-title">Add Object: <%= modelName %></h3>
108 <% _.each(addFields, function(fieldName) { %>
\r
109 <tr><td><%= fieldNameToHumanReadable(fieldName) %>:</td>
\r
110 <% if (fieldName in foreignFields) { %>
\r
111 <td><%= idToSelect(fieldName, window[fieldName], foreignFields[fieldName], "humanReadableName") %></td>
\r
112 <% } else if (inputType[fieldName] == "checkbox") { %>
\r
113 <td><input type="checkbox" name="<%= fieldName %>" <% if (model.attributes[fieldName]) print("checked"); %>></td>
\r
115 <td><input type="text" name="<%= fieldName %>" value="<%= model.attributes[fieldName] %>"></td>
\r
119 <%= xosInlineDetailButtonsTemplate() %>
\r
124 <script type="text/template" id="xos-detail-template">
125 <h3 class="xos-detail-title">Add Object: <%= modelName %></h3>
128 <% console.log(model); _.each(detailFields, function(fieldName) { %>
\r
129 <tr><td><%= fieldNameToHumanReadable(fieldName) %>:</td>
\r
130 <% if (fieldName in foreignFields) { %>
\r
131 <td><%= idToSelect(fieldName, window[fieldName], foreignFields[fieldName], "humanReadableName") %></td>
\r
132 <% } else if (inputType[fieldName] == "checkbox") { %>
\r
133 <td><input type="checkbox" name="<%= fieldName %>" <% if (model.attributes[fieldName]) print("checked"); %>></td>
\r
135 <td><input type="text" name="<%= fieldName %>" value="<%= model.attributes[fieldName] %>"></td>
\r
139 <%= xosInlineDetailButtonsTemplate() %>
\r
146 <script type="text/template" id="xosAdmin-deployment-list-template">
147 <h3 class="xos-list-title"><%= title %></h3>
148 <%= xosListHeaderTemplate() %>
149 <table class="test-table">
154 <th>admin_tenant</th>
160 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
164 <script type="text/template" id="xosAdmin-deployment-listitem-template">
165 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
166 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
167 <td><%= backend_type %></td>
168 <td><%= admin_tenant %></td>
169 <td><%= typeof sites != 'undefined' && sites.length || 0 %></td>
170 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
175 <script type="text/template" id="xosAdmin-image-list-template">
176 <h3 class="xos-list-title"><%= title %></h3>
177 <%= xosListHeaderTemplate() %>
178 <table class="test-table">
183 <th>container_format</th>
189 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
192 <script type="text/template" id="xosAdmin-image-listitem-template">
193 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
194 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
195 <td><%= disk_format %></td>
196 <td><%= container_format %></td>
198 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
201 <!-- NetworkTemplate -->
203 <script type="text/template" id="xosAdmin-networkTemplate-list-template">
204 <h3 class="xos-list-title"><%= title %></h3>
205 <%= xosListHeaderTemplate() %>
206 <table class="test-table">
213 <th>sharedNetworkName</th>
214 <th>sharedNetworkId</th>
219 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
223 <script type="text/template" id="xosAdmin-networkTemplate-listitem-template">
224 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
225 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
226 <td><%= description %></td>
227 <td><%= visibility %></td>
228 <td><%= translation %></td>
229 <td><%= sharedNetworkName %></td>
230 <td><%= sharedNetworkId %></td>
231 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
236 <script type="text/template" id="xosAdmin-network-list-template">
237 <h3 class="xos-list-title"><%= title %></h3>
238 <%= xosListHeaderTemplate() %>
239 <table class="test-table">
251 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
254 <script type="text/template" id="xosAdmin-network-listitem-template">
255 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
256 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
257 <td><%= idToName(template,"networkTemplates","name") %></td>
258 <td><%= ports %></td>
259 <td><%= labels %></td>
260 <td><%= idToName(owner,"slices","name") %></td>
261 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
264 <!-- NetworkSliver -->
266 <script type="text/template" id="xosAdmin-networkSliver-list-template">
267 <h3 class="xos-list-title"><%= title %></h3>
268 <%= xosListHeaderTemplate() %>
269 <table class="test-table">
280 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
283 <script type="text/template" id="xosAdmin-networkSliver-listitem-template">
284 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
285 <td><%= idToName(network,"networks","name") %></td>
286 <td><%= idToName(sliver,"slivers","name") %></td>
288 <td><%= port_id %></td>
289 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
292 <!-- NetworkDeployment -->
294 <script type="text/template" id="xosAdmin-networkDeployment-list-template">
295 <h3 class="xos-list-title"><%= title %></h3>
296 <%= xosListHeaderTemplate() %>
297 <table class="test-table">
307 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
310 <script type="text/template" id="xosAdmin-networkDeployment-listitem-template">
311 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
312 <td><%= idToName(network,"networks","name") %></td>
313 <td><%= idToName(deployment,"deployments","name") %></td>
314 <td><%= net_id %></td>
315 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
320 <script type="text/template" id="xosAdmin-node-list-template">
321 <h3 class="xos-list-title"><%= title %></h3>
322 <%= xosListHeaderTemplate() %>
323 <table class="test-table">
333 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
337 <script type="text/template" id="xosAdmin-node-listitem-template">
338 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
339 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
340 <td><%= idToName(site,"sites","name") %></td>
341 <td><%= idToName(deployment,"deployments","name") %></td>
342 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
347 <script type="text/template" id="xosAdmin-sliceRole-list-template">
348 <h3 class="xos-list-title"><%= title %></h3>
349 <%= xosListHeaderTemplate() %>
350 <table class="test-table">
358 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
361 <script type="text/template" id="xosAdmin-sliceRole-listitem-template">
362 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
364 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
369 <script type="text/template" id="xosAdmin-service-list-template">
370 <h3 class="xos-list-title"><%= title %></h3>
371 <%= xosListHeaderTemplate() %>
372 <table class="test-table">
378 <th>versionNumber</th>
384 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
388 <script type="text/template" id="xosAdmin-service-listitem-template">
389 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
390 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
391 <td><%= description %></td>
392 <td><%= enabled %></td>
393 <td><%= versionNumber %></td>
394 <td><%= published %></td>
395 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
400 <script type="text/template" id="xosAdmin-site-list-template">
401 <h3 class="xos-list-title"><%= title %></h3>
402 <%= xosListHeaderTemplate() %>
403 <table class="test-table">
411 <th>abbreviated_name</th>
416 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
419 <script type="text/template" id="xosAdmin-site-listitem-template">
420 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
421 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
422 <td><%= site_url %></td>
423 <td><%= enabled %></td>
424 <td><%= login_base %></td>
425 <td><%= is_public %></td>
426 <td><%= abbreviated_name %></td>
427 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
432 <script type="text/template" id="xosAdmin-slice-list-template">
433 <h3 class="xos-list-title"><%= title %></h3>
434 <%= xosListHeaderTemplate() %>
435 <table class="test-table">
440 <th>omf_friendly</th>
450 <%= xosListFooterTemplate() %>
453 <script type="text/template" id="xosAdmin-slice-listitem-template">
454 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
455 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
456 <td><%= enabled %></td>
457 <td><%= omf_friendly %></td>
458 <td><%= description %></td>
459 <td><%= slice_url %></td>
460 <td><%= idToName(site,"sites","name") %></td>
461 <td><%= max_slivers %></td>
462 <td><%= idToName(service,"services","name") %></td>
463 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
466 <!-- SliceDeployment -->
468 <script type="text/template" id="xosAdmin-sliceDeployment-list-template">
469 <h3 class="xos-list-title"><%= title %></h3>
470 <%= xosListHeaderTemplate() %>
471 <table class="test-table">
481 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
484 <script type="text/template" id="xosAdmin-sliceDeployment-listitem-template">
485 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
486 <td><%= idToName(slice,"slices","name") %></td>
487 <td><%= idToName(deployment,"deployments","name") %></td>
488 <td><%= tenant_id %></td>
489 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
492 <!-- SlicePrivilege -->
494 <script type="text/template" id="xosAdmin-slicePrivilege-list-template">
495 <h3 class="xos-list-title"><%= title %></h3>
496 <%= xosListHeaderTemplate() %>
497 <table class="test-table">
507 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
510 <script type="text/template" id="xosAdmin-slicePrivilege-listitem-template">
511 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
512 <td><%= idToName(user,"users","username") %></td>
513 <td><%= idToName(slice,"slices","name") %></td>
514 <td><%= idToName(role,"sliceRoles","role") %></td>
515 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
521 <script type="text/template" id="xosAdmin-sliver-list-template">
522 <h3 class="xos-list-title"><%= title %></h3>
523 <%= xosListHeaderTemplate() %>
524 <table class="test-table">
529 <th>instance_name</th>
534 <th>deploymentNetwork</th>
541 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
545 <script type="text/template" id="xosAdmin-sliver-listitem-template">
546 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
547 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: name}) %></td>
548 <td><%= instance_id %></td>
549 <td><%= instance_name %></td>
550 <td><%= idToName(image,"images","name") %></td>
551 <td><%= idToName(creator,"users","name") %></td>
552 <td><%= idToName(slice,"slices","name") %></td>
553 <td><%= idToName(node,"nodes","name") %></td>
554 <td><%= idToName(deploymentNetwork,"deployments","name") %></td>
555 <td><%= flavor %></td>
556 <td><%= userData %></td>
557 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
562 <script type="text/template" id="xosAdmin-user-list-template">
563 <h3 class="xos-list-title"><%= title %></h3>
564 <%= xosListHeaderTemplate() %>
565 <table class="test-table">
578 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
582 <script type="text/template" id="xosAdmin-user-listitem-template">
583 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
584 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: username}) %></td>
585 <td><%= firstname %></td>
586 <td><%= lastname %></td>
587 <td><%= phone %></td>
588 <td><%= user_url %></td>
589 <td><%= idToName(site,"sites","name") %></td>
590 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
593 <!-- UserDeployments -->
595 <script type="text/template" id="xosAdmin-userDeployment-list-template">
596 <h3 class="xos-list-title"><%= title %></h3>
597 <%= xosListHeaderTemplate() %>
598 <table class="test-table">
608 <%= xosListFooterTemplate({addChildHash: addChildHash}) %>
611 <script type="text/template" id="xosAdmin-userDeployment-listitem-template">
612 <td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
613 <td><%= idToName(user,"users","username") %></td>
614 <td><%= idToName(deployment,"deployments","name") %></td>
615 <td><%= kuser_id %></td>
616 <td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
620 xosInlineDetailButtonsTemplate = _.template($("#xos-inline-detail-buttons-template").html());
621 xosListHeaderTemplate = _.template($("#xos-list-header-template").html());
622 xosListFooterTemplate = _.template($("#xos-list-footer-template").html());
623 xosDeleteButtonTemplate = _.template($("#xos-delete-button-template").html());
624 xosDetailLinkTemplate = _.template($("#xos-detail-link-template").html());