all detail templates replaced by generic
diff --git a/planetstack/core/xoslib/static/js/xosAdminSite.js b/planetstack/core/xoslib/static/js/xosAdminSite.js
index d265630..b9068b5 100644
--- a/planetstack/core/xoslib/static/js/xosAdminSite.js
+++ b/planetstack/core/xoslib/static/js/xosAdminSite.js
@@ -61,21 +61,44 @@
};
XOSAdminApp.buildViews = function() {
+ genericAddChildClass = XOSDetailView.extend({template: "#xos-add-template",
+ app: XOSAdminApp});
+ XOSAdminApp["genericAddChildView"] = genericAddChildClass;
+
+ genericDetailClass = XOSDetailView.extend({template: "#xos-detail-template",
+ app: XOSAdminApp});
+ XOSAdminApp["genericDetailView"] = genericDetailClass;
+
for (var index in OBJS) {
name = OBJS[index];
tr_template = '#xosAdmin-' + name + '-listitem-template';
table_template = '#xosAdmin-' + name + '-list-template';
detail_template = '#xosAdmin-' + name + '-detail-template';
+ add_child_template = '#xosAdmin-' + name + '-add-child-template';
collection_name = name + "s";
region_name = name + "List";
detailNavLink = collection_name;
- detailClass = XOSDetailView.extend({
- template: detail_template,
- app: XOSAdminApp,
- });
+ if ($(detail_template).length) {
+ detailClass = XOSDetailView.extend({
+ template: detail_template,
+ app: XOSAdminApp,
+ });
+ } else {
+ detailClass = genericDetailClass;
+ }
XOSAdminApp[collection_name + "DetailView"] = detailClass;
-
+
+ if ($(add_child_template).length) {
+ addClass = XOSDetailView.extend({
+ template: add_child_template,
+ app: XOSAdminApp,
+ });
+ } else {
+ addClass = genericAddChildClass;
+ }
+ XOSAdminApp[collection_name + "AddChildView"] = addClass;
+
itemViewClass = XOSItemView.extend({
detailClass: detailClass,
template: tr_template,
@@ -109,6 +132,7 @@
api_command = "list" + firstCharUpper(collection_name);
listViewName = collection_name + "ListView";
detailViewName = collection_name + "DetailView";
+ addChildViewName = collection_name + "AddChildView";
api[api_command] = XOSAdminApp.createListHandler(listViewName, collection_name, "detail", collection_name);
routes[nav_url] = api_command;
@@ -126,7 +150,7 @@
nav_url = "addChild" + firstCharUpper(name) + "/:parentModel/:parentField/:parentId";
api_command = "addChild" + firstCharUpper(name);
- api[api_command] = XOSAdminApp.createAddChildHandler(detailViewName, collection_name);
+ api[api_command] = XOSAdminApp.createAddChildHandler(addChildViewName, collection_name);
routes[nav_url] = api_command;
nav_url = "delete" + firstCharUpper(name) + "/:id";
diff --git a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js
index de03ddf..1f4ca5b 100644
--- a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js
+++ b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js
@@ -301,6 +301,18 @@
modelClassName = modelName;
collectionClassName = modelName + "Collection";
+ if (!attrs.addFields) {
+ attrs.addFields = attrs.detailFields;
+ }
+
+ if (!attrs.inputType) {
+ attrs.inputType = {};
+ }
+
+ if (!attrs.foreignFields) {
+ attrs.foreignFields = {};
+ }
+
if (!attrs.collectionName) {
attrs.collectionName = modelName + "s";
}
@@ -311,12 +323,13 @@
for (key in attrs) {
value = attrs[key];
- if ($.inArray(key, ["urlRoot", "modelName", "collectionName", "validate"])>=0) {
+ if ($.inArray(key, ["urlRoot", "modelName", "collectionName", "addFields", "detailFields", "foreignFields", "inputType", "relatedCollections", "foreignCollections"])>=0) {
modelAttrs[key] = value;
- }
- if ($.inArray(key, ["urlRoot", "modelName", "collectionName", "relatedCollections", "foreignCollections"])>=0) {
collectionAttrs[key] = value;
}
+ if ($.inArray(key, ["validate"])) {
+ modelAttrs[key] = value;
+ }
}
if (xosdefaults && xosdefaults[modelName]) {
@@ -345,11 +358,18 @@
define_model(this, {urlRoot: SLIVER_API,
relatedCollections: {"networkSlivers": "sliver"},
foreignCollections: ["slices", "deployments", "images", "nodes", "users"],
- modelName: "sliver"});
+ foreignFields: {"creator": "users", "image": "images", "node": "nodes", "deploymentNetwork": "deployments", "slice": "slices"},
+ modelName: "sliver",
+ addFields: ["slice", "deploymentNetwork", "image", "node"],
+ detailFields: ["name", "instance_id", "instance_name", "slice", "deploymentNetwork", "image", "node", "creator"],
+ });
define_model(this, {urlRoot: SLICE_API,
relatedCollections: {"slivers": "slice", "sliceDeployments": "slice", "slicePrivileges": "slice", "networks": "owner"},
foreignCollections: ["services", "sites"],
+ foreignFields: {"service": "services", "site": "sites"},
+ detailFields: ["name", "site", "enabled", "description", "url", "max_slivers"],
+ inputType: {"enabled": "checkbox"},
modelName: "slice",
xosValidate: function(attrs, options) {
errors = XOSModel.prototype.xosValidate(this, attrs, options);
@@ -368,56 +388,93 @@
define_model(this, {urlRoot: SLICEDEPLOYMENT_API,
foreignCollections: ["slices", "deployments"],
- modelName: "sliceDeployment"});
+ modelName: "sliceDeployment",
+ foreignFields: {"slice": "slices", "deployment": "deployments"},
+ detailFields: ["slice", "deployment", "tenant_id"],
+ });
define_model(this, {urlRoot: SLICEPRIVILEGE_API,
foreignCollections: ["slices", "users", "sliceRoles"],
- modelName: "slicePrivilege"});
+ modelName: "slicePrivilege",
+ foreignFields: {"user": "users", "slice": "slices", "role": "sliceRoles"},
+ detailFields: ["user", "slice", "role"],
+ });
define_model(this, {urlRoot: SLICEROLE_API,
- modelName: "sliceRole"});
+ modelName: "sliceRole",
+ detailFields: ["role"],
+ });
define_model(this, {urlRoot: NODE_API,
foreignCollections: ["sites", "deployments"],
- modelName: "node"});
+ modelName: "node",
+ foreignFields: {"site": "sites", "deployment": "deployments"},
+ detailFields: ["name", "site", "deployment"],
+ });
define_model(this, {urlRoot: SITE_API,
relatedCollections: {"users": "site", "slices": "site", "nodes": "site"},
- modelName: "site"});
+ modelName: "site",
+ detailFields: ["name", "abbreviated_name", "url", "enabled", "is_public", "login_base"],
+ inputType: {"enabled": "checkbox", "is_public": "checkbox"},
+ });
define_model(this, {urlRoot: USER_API,
relatedCollections: {"slicePrivileges": "user", "slices": "owner", "userDeployments": "user"},
foreignCollections: ["sites"],
- modelName: "user"});
+ modelName: "user",
+ foreignFields: {"site": "sites"},
+ detailFields: ["username", "firstname", "lastname", "phone", "user_url", "site"],
+ });
define_model(this, {urlRoot: USERDEPLOYMENT_API,
foreignCollections: ["users","deployments"],
- modelName: "userDeployment"});
+ modelName: "userDeployment",
+ foreignFields: {"deployment": "deployments", "user": "users"},
+ detailFields: ["user", "deployment", "kuser_id"],
+ });
define_model(this, { urlRoot: DEPLOYMENT_API,
relatedCollections: {"nodes": "deployment", "slivers": "deploymentNetwork", "networkDeployments": "deployment", "userDeployments": "deployment"},
- modelName: "deployment"});
+ modelName: "deployment",
+ detailFields: ["name", "backend_type", "admin_tenant"],
+ });
define_model(this, {urlRoot: IMAGE_API,
model: this.image,
- modelName: "image"});
+ modelName: "image",
+ detailFields: ["name", "disk_format", "admin_tenant"],
+ });
define_model(this, {urlRoot: NETWORKTEMPLATE_API,
- modelName: "networkTemplate"});
+ modelName: "networkTemplate",
+ detailFields: ["name", "description", "visibility", "translation", "sharedNetworkName", "sharedNetworkId"],
+ });
define_model(this, {urlRoot: NETWORK_API,
relatedCollections: {"networkDeployments": "network", "networkSlivers": "network"},
foreignCollections: ["slices", "networkTemplates"],
- modelName: "network"});
+ modelName: "network",
+ foreignFields: {"template": "networkTemplates", "owner": "slices"},
+ detailFields: ["name", "template", "ports", "labels", "owner"],
+ });
define_model(this, {urlRoot: NETWORKSLIVER_API,
- modelName: "networkSliver"});
+ modelName: "networkSliver",
+ foreignFields: {"network": "networks", "sliver": "slivers"},
+ detailFields: ["network", "sliver", "ip", "port_id"],
+ });
define_model(this, {urlRoot: NETWORKDEPLOYMENT_API,
- modelName: "networkDeployment"});
+ modelName: "networkDeployment",
+ foreignFields: {"network": "networks", "deployment": "deployments"},
+ detailFields: ["network", "deployment", "net_id"],
+ });
define_model(this, {urlRoot: SERVICE_API,
- modelName: "service"});
+ modelName: "service",
+ detailFields: ["name", "description", "versionNumber"],
+ });
// enhanced REST
define_model(this, {urlRoot: SLICEPLUS_API,
diff --git a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
index d2af0aa..8e45267 100644
--- a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
+++ b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js
@@ -116,7 +116,7 @@
}
},
- createAddChildHandler: function(detailName, collection_name) {
+ createAddChildHandler: function(addChildName, collection_name) {
var app=this;
return function(parent_modelName, parent_fieldName, parent_id) {
app.Router.showPreviousURL();
@@ -126,7 +126,7 @@
console.log(parent_id);
model = new xos[collection_name].model();
model.attributes[parent_fieldName] = parent_id;
- detailViewClass = app[detailName];
+ detailViewClass = app[addChildName];
var detailView = new detailViewClass({model: model, collection:xos[collection_name]});
detailView.dialog = $("xos-addchild-dialog");
app["addChildDetail"].show(detailView);
@@ -136,10 +136,12 @@
width: 640,
buttons : {
"Save" : function() {
+ var addDialog = this;
+ detailView.synchronous = true;
+ detailView.afterSave = function() { $(addDialog).dialog("close"); }
detailView.save();
- $(this).dialog("close");
- // do something here
+ //$(this).dialog("close");
},
"Cancel" : function() {
$(this).dialog("close");
@@ -503,6 +505,14 @@
_.each(errors, markErrors);
},
+ templateHelpers: function() { return { modelName: this.model.modelName,
+ collectionName: this.model.collectionName,
+ addFields: this.model.addFields,
+ detailFields: this.model.detailFields,
+ foreignFields: this.model.foreignFields,
+ inputType: this.model.inputType,
+ }},
+
});
/* XOSItemView
@@ -519,6 +529,10 @@
templateHelpers: function() { return { modelName: this.model.modelName,
collectionName: this.model.collectionName,
+ addFields: this.model.addFields,
+ detailFields: this.model.detailFields,
+ foreignFields: this.model.foreignFields,
+ inputType: this.model.inputType,
}},
});
diff --git a/planetstack/core/xoslib/templates/xosAdmin.html b/planetstack/core/xoslib/templates/xosAdmin.html
index 3d5d1a6..c2bf202 100644
--- a/planetstack/core/xoslib/templates/xosAdmin.html
+++ b/planetstack/core/xoslib/templates/xosAdmin.html
@@ -100,6 +100,46 @@
<a href="#<%= collectionName %>/<%= id %>"><%= text %></a>
</script>
+<script type="text/template" id="xos-add-template">
+ <h3 class="xos-detail-title">Add Object: <%= modelName %></h3>
+ <form>
+ <table>
+ <% _.each(addFields, function(fieldName) { %>
+ <tr><td><%= fieldName %>
+ <% if (fieldName in foreignFields) { %>
+ <td><%= idToSelect(fieldName, window[fieldName], foreignFields[fieldName], "humanReadableName") %></td>
+ <% } else if (inputType[fieldName] == "checkbox") { %>
+ <td><input type="checkbox" name="<%= fieldName %>" <% if (model.attributes[fieldName]) print("checked"); %>></td>
+ <% } else { %>
+ <td><input type="text" name="<%= fieldName %>" value="<%= model.attributes[fieldName] %>"></td>
+ <% } %>
+ </tr>
+ <% }); %>
+ <%= xosInlineDetailButtonsTemplate() %>
+ </table>
+ </form>
+</script>
+
+<script type="text/template" id="xos-detail-template">
+ <h3 class="xos-detail-title">Add Object: <%= modelName %></h3>
+ <form>
+ <table>
+ <% console.log(model); _.each(detailFields, function(fieldName) { %>
+ <tr><td><%= fieldName %>
+ <% if (fieldName in foreignFields) { %>
+ <td><%= idToSelect(fieldName, window[fieldName], foreignFields[fieldName], "humanReadableName") %></td>
+ <% } else if (inputType[fieldName] == "checkbox") { %>
+ <td><input type="checkbox" name="<%= fieldName %>" <% if (model.attributes[fieldName]) print("checked"); %>></td>
+ <% } else { %>
+ <td><input type="text" name="<%= fieldName %>" value="<%= model.attributes[fieldName] %>"></td>
+ <% } %>
+ </tr>
+ <% }); %>
+ <%= xosInlineDetailButtonsTemplate() %>
+ </table>
+ </form>
+</script>
+
<!-- Deployment -->
<script type="text/template" id="xosAdmin-deployment-list-template">
@@ -129,18 +169,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-deployment-detail-template">
- <h3 class="xos-detail-title">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>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- Image -->
<script type="text/template" id="xosAdmin-image-list-template">
@@ -169,18 +197,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-image-detail-template">
- <h3 class="xos-detail-title">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>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- NetworkTemplate -->
<script type="text/template" id="xosAdmin-networkTemplate-list-template">
@@ -214,21 +230,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-networkTemplate-detail-template">
- <h3 class="xos-detail-title">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>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- Network -->
<script type="text/template" id="xosAdmin-network-list-template">
@@ -259,20 +260,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-network-detail-template">
- <h3 class="xos-detail-title">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><%= idToSelect("template",template,"networkTemplates","name") %></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><%= idToSelect("owner",owner,"slices","name") %></td></tr>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- NetworkSliver -->
<script type="text/template" id="xosAdmin-networkSliver-list-template">
@@ -301,19 +288,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-networkSliver-detail-template">
- <h3 class="xos-detail-title">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>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- NetworkDeployment -->
<script type="text/template" id="xosAdmin-networkDeployment-list-template">
@@ -340,18 +314,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-networkDeployment-detail-template">
- <h3 class="xos-detail-title">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="deployment" value="<%= deployment %>"></td></tr>
- <tr><td>Ip:</td><td><input type="text" name="net_id" value="<%= net_id %>"></td></tr>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- Node -->
<script type="text/template" id="xosAdmin-node-list-template">
@@ -379,18 +341,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-node-detail-template">
- <h3 class="xos-detail-title">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><%= idToSelect("site",site,"sites","name") %></td></tr>
- <tr><td>Deployment:</td><td><%= idToSelect("deployment",deployment,"deployments","name") %></td></tr>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- SliceRole -->
<script type="text/template" id="xosAdmin-sliceRole-list-template">
@@ -407,23 +357,12 @@
<%= xosListFooterTemplate() %>
</script>
-
<script type="text/template" id="xosAdmin-sliceRole-listitem-template">
<td> <%= xosDetailLinkTemplate({collectionName: collectionName, id: id, text: id}) %></td>
<td><%= role %></td>
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-sliceRole-detail-template">
- <h3 class="xos-detail-title">Detail View: Service</h3>
- <form>
- <table>
- <tr><td>Role:</td><td><input type="text" name="role" value="<%= role %>"></td></tr>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- Service -->
<script type="text/template" id="xosAdmin-service-list-template">
@@ -455,18 +394,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-service-detail-template">
- <h3 class="xos-detail-title">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>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- Site -->
<script type="text/template" id="xosAdmin-site-list-template">
@@ -499,21 +426,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-site-detail-template">
- <h3 class="xos-detail-title">Detail View: Site</h3>
- <form>
- <table>
- <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
- <tr><td>abbreviated_name:</td><td><input type="text" name="abbreviated_name" value="<%= abbreviated_name %>"></td></tr>
- <tr><td>url:</td><td><input type="text" name="site_url" value="<%= site_url %>"></td></tr>
- <tr><td>Enabled:</td><td><input type="checkbox" name="enabled" <% if (enabled) print("checked"); %>></td></tr>
- <tr><td>Is Public:</td><td><input type="checkbox" name="is_public" <% if (is_public) print("checked"); %>></td></tr>
- <tr><td>login_base:</td><td><input type="text" name="login_base" value="<%= login_base %>"></td></tr>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- Slice -->
<script type="text/template" id="xosAdmin-slice-list-template">
@@ -550,21 +462,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-slice-detail-template">
- <h3 class="xos-detail-title">Detail View: Slice</h3>
- <form>
- <table>
- <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>
- <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","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>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- SliceDeployment -->
<script type="text/template" id="xosAdmin-sliceDeployment-list-template">
@@ -591,18 +488,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-sliceDeployment-detail-template">
- <h3 class="xos-detail-title">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>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- SlicePrivilege -->
<script type="text/template" id="xosAdmin-slicePrivilege-list-template">
@@ -629,17 +514,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-slicePrivilege-detail-template">
- <h3 class="xos-detail-title">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>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
<!-- Sliver -->
@@ -682,22 +556,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-sliver-detail-template">
- <h3 class="xos-detail-title">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><%= idToSelect("image",image,"images","name") %></td></tr>
- <tr><td>Creator:</td><td><%= idToSelect("creator",creator,"users","username") %></td></tr>
- <tr><td>Slice:</td><td><%= idToSelect("slice",slice,"slices","name") %></td></tr>
- <tr><td>Deployment:</td><td><%= idToSelect("deploymentNetwork",deploymentNetwork,"deployments","name") %></td></tr>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- User -->
<script type="text/template" id="xosAdmin-user-list-template">
@@ -731,21 +589,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-user-detail-template">
- <h3 class="xos-detail-title">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><%= idToSelect("site",site,"sites","name") %></td></tr>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<!-- UserDeployments -->
<script type="text/template" id="xosAdmin-userDeployment-list-template">
@@ -772,18 +615,6 @@
<td><%= xosDeleteButtonTemplate({modelName: modelName, id: id}) %></td>
</script>
-<script type="text/template" id="xosAdmin-userDeployment-detail-template">
- <h3 class="xos-detail-title">Detail View: UserDeployment</h3>
- <form>
- <table>
- <tr><td>User:</td><td><input type="text" name="user" value="<%= user %>"></td></tr>
- <tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>
- <tr><td>kuser_id:</td><td><input type="text" name="kuser_id" value="<%= kuser_id %>"></td></tr>
- <%= xosInlineDetailButtonsTemplate() %>
- </table>
- </form>
-</script>
-
<script>
xosInlineDetailButtonsTemplate = _.template($("#xos-inline-detail-buttons-template").html());
xosListHeaderTemplate = _.template($("#xos-list-header-template").html());