blob: cc539cec1ba41019412be704fbb50fef87cf7b81 [file] [log] [blame]
<script src="{{ STATIC_URL }}/js/vendor/underscore-min.js"></script>
<script src="{{ STATIC_URL }}/js/vendor/backbone.js"></script>
<script src="{{ STATIC_URL }}/js/vendor/backbone.syphon.js"></script>
<script src="{{ STATIC_URL }}/js/vendor/backbone.wreqr.js"></script>
<script src="{{ STATIC_URL }}/js/vendor/backbone.babysitter.js"></script>
<script src="{{ STATIC_URL }}/js/vendor/backbone.marionette.js"></script>
<link rel="stylesheet" type="text/css" href="{% static 'css/test.css' %}" media="all" >
<script src="{{ STATIC_URL }}/js/xoslib/xos-backbone.js"></script>
<script src="{{ STATIC_URL }}/js/test.js"></script>
<p>This shows all of the things you can see using xosLib</p>
<div id="deploymentList">
</div>
<div id="imageList">
</div>
<div id="networkTemplateList">
</div>
<div id="networkList">
</div>
<div id="nodeList">
</div>
<div id="serviceList">
</div>
<div id="siteList">
</div>
<div id="sliceList">
</div>
<div id="sliverList">
</div>
<div id="userList">
</div>
<div id="rightSide">
<div id="successBox">
</div>
<div id="errorBox">
</div>
<div id="detailBox">
<button id="close-detail-view">Close Detail View</button>
<div id="detail"></div>
<div id="linkedObjs1"></div>
<div id="linkedObjs2"></div>
<div id="linkedObjs3"></div>
<div id="linkedObjs4"></div>
</div>
</div>
<script type="text/template" id="test-error-template">
<button id="close-error-box">Close Error Message</button>
<h3>An error has occurred.</h3>
<table class="test-error-table">
<tr><td>Code:</td><td><%= status %></td></tr>
<tr><td>Message:</td><td><%= statusText %></td></tr>
</table>
</script>
<script type="text/template" id="test-success-template">
<button id="close-success-box">Close Success Message</button>
<h3>Success!</h3>
<table class="test-success-table">
<tr><td>Code:</td><td><%= status %></td></tr>
<tr><td>Message:</td><td><%= statusText %></td></tr>
</table>
</script>
<!-- Deployment -->
<script type="text/template" id="test-deployment-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>name</th>
<th>backend</th>
<th>admin_tenant</th>
<th># sites</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-deployment-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= name %></td>
<td><%= backend_type %></td>
<td><%= admin_tenant %></td>
<td><%= sites.length %></td>
</script>
<script type="text/template" id="test-deployment-detail-template">
<h3>Detail View: Deployment</h3>
<form>
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
<tr><td>Backend:</td><td><input type="text" name="backend_type" value="<%= backend_type %>"></td></tr>
<tr><td>Admin Tenant:</td><td><input type="text" name="admin_tenant" value="<%= admin_tenant %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- Image -->
<script type="text/template" id="test-image-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>name</th>
<th>disk_format</th>
<th>container_format</th>
<th>path</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-image-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= name %></td>
<td><%= disk_format %></td>
<td><%= container_format %></td>
<td><%= path %></td>
</script>
<script type="text/template" id="test-image-detail-template">
<h3>Detail View: Image</h3>
<form>
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
<tr><td>Disk Format:</td><td><input type="text" name="backend_type" value="<%= disk_format %>"></td></tr>
<tr><td>Container Format:</td><td><input type="text" name="admin_tenant" value="<%= container_format %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- NetworkTemplate -->
<script type="text/template" id="test-networkTemplate-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>name</th>
<th>description</th>
<th>visibility</th>
<th>translation</th>
<th>sharedNetworkName</th>
<th>sharedNetworkId</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-networkTemplate-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= name %></td>
<td><%= description %></td>
<td><%= visibility %></td>
<td><%= translation %></td>
<td><%= sharedNetworkName %></td>
<td><%= sharedNetworkId %></td>
</script>
<script type="text/template" id="test-networkTemplate-detail-template">
<h3>Detail View: NetworkTemplate</h3>
<form>
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
<tr><td>description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>
<tr><td>Visibility:</td><td><input type="text" name="visibility" value="<%= visibility %>"></td></tr>
<tr><td>Translation:</td><td><input type="text" name="translation" value="<%= translation %>"></td></tr>
<tr><td>Shared Network Name:</td><td><input type="text" name="sharedNetworkName" value="<%= sharedNetworkName %>"></td></tr>
<tr><td>Shared Network Id:</td><td><input type="text" name="sharedNetworkId" value="<%= sharedNetworkId %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- Network -->
<script type="text/template" id="test-network-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>name</th>
<th>template</th>
<th>ports</th>
<th>labels</th>
<th>owner</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-network-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= name %></td>
<td><%= template %></td>
<td><%= ports %></td>
<td><%= labels %></td>
<td><%= idToName(owner,"slivers","name") %></td>
</script>
<script type="text/template" id="test-network-detail-template">
<h3>Detail View: Network</h3>
<form>
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
<tr><td>Template:</td><td><input type="text" name="template" value="<%= template %>"></td></tr>
<tr><td>Ports:</td><td><input type="text" name="ports" value="<%= ports %>"></td></tr>
<tr><td>Labels:</td><td><input type="text" name="labels" value="<%= labels %>"></td></tr>
<tr><td>Owner:</td><td><input type="text" name="owner" value="<%= owner %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- NetworkSliver -->
<script type="text/template" id="test-networkSliver-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>network</th>
<th>sliver</th>
<th>ip</th>
<th>port_id</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-networkSliver-listitem-template">
<td class="objectLink"><%= id %></td>
<td><%= idToName(network,"networks","name") %></td>
<td><%= idToName(sliver,"slivers","name") %></td>
<td><%= ip %></td>
<td><%= port_id %></td>
</script>
<script type="text/template" id="test-networkSliver-detail-template">
<h3>Detail View: Network</h3>
<form>
<table>
<tr><td>Network:</td><td><input type="text" name="network" value="<%= network %>"></td></tr>
<tr><td>Sliver:</td><td><input type="text" name="sliver" value="<%= sliver %>"></td></tr>
<tr><td>Ip:</td><td><input type="text" name="ip" value="<%= ip %>"></td></tr>
<tr><td>Port_id:</td><td><input type="text" name="port_id" value="<%= port_id %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- Node -->
<script type="text/template" id="test-node-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>name</th>
<th>site</th>
<th>deployment</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-node-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= name %></td>
<td><%= idToName(site,"sites","name") %></td>
<td><%= idToName(deployment,"deployments","name") %></td>
</script>
<script type="text/template" id="test-node-detail-template">
<h3>Detail View: Node</h3>
<form>
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
<tr><td>Site:</td><td><input type="text" name="site" value="<%= site %>"></td></tr>
<tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- SliceRole -->
<script type="text/template" id="test-sliceRole-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>role</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-sliceRole-listitem-template">
<td class="objectLink"><%= id %></td>
<td><%= role %></td>
</script>
<script type="text/template" id="test-sliceRole-detail-template">
<h3>Detail View: Service</h3>
<form>
<table>
<tr><td>Role:</td><td><input type="text" name="role" value="<%= role %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- Service -->
<script type="text/template" id="test-service-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>name</th>
<th>description</th>
<th>enabled</th>
<th>versionNumber</th>
<th>published</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-service-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= name %></td>
<td><%= description %></td>
<td><%= enabled %></td>
<td><%= versionNumber %></td>
<td><%= published %></td>
</script>
<script type="text/template" id="test-service-detail-template">
<h3>Detail View: Service</h3>
<form>
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
<tr><td>description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>
<tr><td>Version Number:</td><td><input type="text" name="versionNumber" value="<%= versionNumber %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- Site -->
<script type="text/template" id="test-site-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>name</th>
<th>url</th>
<th>enabled</th>
<th>login_base</th>
<th>is_public</th>
<th>abbreviated_name</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-site-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= name %></td>
<td><%= site_url %></td>
<td><%= enabled %></td>
<td><%= login_base %></td>
<td><%= is_public %></td>
<td><%= abbreviated_name %></td>
</script>
<script type="text/template" id="test-site-detail-template">
<h3>Detail View: Site</h3>
<form>
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
<tr><td>url:</td><td><input type="text" name="site_url" value="<%= site_url %>"></td></tr>
<tr><td>login_base:</td><td><input type="text" name="login_base" value="<%= login_base %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- Slice -->
<script type="text/template" id="test-slice-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>name</th>
<th>enabled</th>
<th>omf_friendly</th>
<th>description</th>
<th>slice_url</th>
<th>site</th>
<th>max_slivers</th>
<th>service</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-slice-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= name %></td>
<td><%= enabled %></td>
<td><%= omf_friendly %></td>
<td><%= description %></td>
<td><%= slice_url %></td>
<td><%= idToName(site,"sites","name") %></td>
<td><%= max_slivers %></td>
<td><%= idToName(service,"services","name") %></td>
</script>
<script type="text/template" id="test-slice-detail-template">
<h3>Detail View: Slice</h3>
<form>
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
<tr><td>Enabled:</td><td><input type="checkbox" name="enabled" <% if (enabled) print("checked"); %>></td></tr>
<tr><td>Description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>
<tr><td>Url:</td><td><input type="text" name="slice_url" value="<%= slice_url %>"></td></tr>
<tr><td>Max Slivers:</td><td><input type="text" name="max_slivers" value="<%= max_slivers %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- SlicDeployment -->
<script type="text/template" id="test-sliceDeployment-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>slice</th>
<th>deployment</th>
<th>tenant_id</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-sliceDeployment-listitem-template">
<td class="objectLink"><%= id %></td>
<td><%= idToName(slice,"slices","name") %></td>
<td><%= idToName(deployment,"deployments","name") %></td>
<td><%= tenant_id %></td>
</script>
<script type="text/template" id="test-sliceDeployment-detail-template">
<h3>Detail View: Slice Deployment</h3>
<form>
<table>
<tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>
<tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>
<tr><td>Tenant Id:</td><td><input type="text" name="tenant_id" value="<%= tenant_id %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- SlicePrivilege -->
<script type="text/template" id="test-slicePrivilege-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>user</th>
<th>slice</th>
<th>role</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-slicePrivilege-listitem-template">
<td class="objectLink"><%= id %></td>
<td><%= idToName(user,"users","username") %></td>
<td><%= idToName(slice,"slices","name") %></td>
<td><%= idToName(role,"sliceRoles","role") %></td>
</script>
<script type="text/template" id="test-slicePrivilege-detail-template">
<h3>Detail View: Slice Privilege</h3>
<form>
<table>
<tr><td>User:</td><td><input type="text" name="user" value="<%= user %>"></td></tr>
<tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>
<tr><td>Role:</td><td><input type="text" name="role" value="<%= role %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- Sliver -->
<script type="text/template" id="test-sliver-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>name</th>
<th>instance_id</th>
<th>instance_name</th>
<th>image</th>
<th>creator</th>
<th>slice</th>
<th>node</th>
<th>deploymentNetwork</th>
<th>flavor</th>
<th>userData</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-sliver-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= name %></td>
<td><%= instance_id %></td>
<td><%= instance_name %></td>
<td><%= idToName(image,"images","name") %></td>
<td><%= idToName(creator,"users","name") %></td>
<td><%= idToName(slice,"slices","name") %></td>
<td><%= idToName(node,"nodes","name") %></td>
<td><%= idToName(deploymentNetwork,"deployments","name") %></td>
<td><%= flavor %></td>
<td><%= userData %></td>
</script>
<script type="text/template" id="test-sliver-detail-template">
<h3>Detail View: Sliver</h3>
<form>
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
<tr><td>instance_id:</td><td><input type="text" name="instance_id" value="<%= instance_id %>"></td></tr>
<tr><td>instance_name:</td><td><input type="text" name="instance_name" value="<%= instance_name %>"></td></tr>
<tr><td>Image:</td><td><input type="text" name="image" value="<%= image %>"></td></tr>
<tr><td>Creator:</td><td><input type="text" name="creator" value="<%= creator %>"></td></tr>
<tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
<!-- User -->
<script type="text/template" id="test-user-list-template">
<h3><%= title %></h3>
<table class="test-table">
<thead><tr>
<th>id</th>
<th>username</th>
<th>firstname</th>
<th>lastname</th>
<th>phone</th>
<th>user_url</th>
<th>site</th>
</tr></thead>
<tbody></tbody>
</table>
</script>
<script type="text/template" id="test-user-listitem-template">
<td class="objectLink"><%= id %></td>
<td class="objectLink"><%= username %></td>
<td><%= firstname %></td>
<td><%= lastname %></td>
<td><%= phone %></td>
<td><%= user_url %></td>
<td><%= site %></td>
</script>
<script type="text/template" id="test-user-detail-template">
<h3>Detail View: User</h3>
<form>
<table>
<tr><td>User Name:</td><td><input type="text" name="username" value="<%= username %>"></td></tr>
<tr><td>First Name:</td><td><input type="text" name="firstname" value="<%= firstname %>"></td></tr>
<tr><td>Last Name:</td><td><input type="text" name="lastname" value="<%= lastname %>"></td></tr>
<tr><td>Phone:</td><td><input type="text" name="phone" value="<%= phone %>"></td></tr>
<tr><td>Url:</td><td><input type="text" name="user_url" value="<%= user_url %>"></td></tr>
<tr><td>Site:</td><td><input type="text" name="site" value="<%= site %>"></td></tr>
<tr><td colspan=2><button class="btn js-submit">Save</button></td></tr>
</table>
</form>
</script>
</script>