blob: 6e9fb5df880bcfacc370fa088cf6e5eccd51c43a [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>
<h3>Deployments</h3>
<div id="deploymentList">
</div>
<h3>Images</h3>
<div id="imageList">
</div>
<h3>Network Templates</h3>
<div id="networkTemplateList">
</div>
<h3>Networks</h3>
<div id="networkList">
</div>
<h3>Nodes</h3>
<div id="nodeList">
</div>
<h3>Services</h3>
<div id="serviceList">
</div>
<h3>Sites</h3>
<div id="siteList">
</div>
<h3>Slices</h3>
<div id="sliceList">
</div>
<h3>Slivers</h3>
<div id="sliverList">
</div>
<h3>Users</h3>
<div id="userList">
</div>
<div id="rightSide">
<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>
</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>
<!-- Deployment -->
<script type="text/template" id="test-deployment-list-template">
<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><%= id %></td>
<td><%= 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">
<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><%= id %></td>
<td><%= 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">
<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><%= id %></td>
<td><%= 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">
<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><%= id %></td>
<td><%= name %></td>
<td><%= template %></td>
<td><%= ports %></td>
<td><%= labels %></td>
<td><%= owner %></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>
<!-- Node -->
<script type="text/template" id="test-node-list-template">
<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><%= id %></td>
<td><%= name %></td>
<td><%= site %></td>
<td><%= deployment %></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>
<!-- Service -->
<script type="text/template" id="test-service-list-template">
<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><%= id %></td>
<td><%= 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">
<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><%= id %></td>
<td><%= 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">
<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><%= id %></td>
<td><%= name %></td>
<td><%= enabled %></td>
<td><%= omf_friendly %></td>
<td><%= description %></td>
<td><%= slice_url %></td>
<td><%= site %></td>
<td><%= max_slivers %></td>
<td><%= service %></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>
<!-- Sliver -->
<script type="text/template" id="test-sliver-list-template">
<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><%= id %></td>
<td><%= name %></td>
<td><%= instance_id %></td>
<td><%= instance_name %></td>
<td><%= image %></td>
<td><%= creator %></td>
<td><%= slice %></td>
<td><%= node %></td>
<td><%= deploymentNetwork %></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">
<table class="test-table">
<thead><tr>
<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><%= id %></td>
<td><%= 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: Sliver</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>