cord user administration in xoslib
diff --git a/xos/core/xoslib/static/js/xosCord.js b/xos/core/xoslib/static/js/xosCord.js
index 99c6e94..f666b77 100644
--- a/xos/core/xoslib/static/js/xosCord.js
+++ b/xos/core/xoslib/static/js/xosCord.js
@@ -1,4 +1,4 @@
-OBJS = ['cordSubscriber', ]
+OBJS = ['cordSubscriber', 'cordUser']
CordAdminApp = new XOSApplication({
logTableId: "#logTable",
diff --git a/xos/core/xoslib/static/js/xoslib/xos-backbone.js b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
index e7ee9cc..e8fe33b 100644
--- a/xos/core/xoslib/static/js/xoslib/xos-backbone.js
+++ b/xos/core/xoslib/static/js/xoslib/xos-backbone.js
@@ -37,6 +37,7 @@
HPCVIEW_API = XOSLIB_BASE + "/hpcview/";
CORDSUBSCRIBER_API = XOSLIB_BASE + "/cordsubscriber/";
+ CORDUSER_API = XOSLIB_BASE + "/corduser/";
XOSModel = Backbone.Model.extend({
relatedCollections: [],
@@ -729,6 +730,7 @@
define_model(this, {urlRoot: CORDSUBSCRIBER_API,
modelName: "cordSubscriber",
+ relatedCollections: {"cordUsers": "subscriber"},
listFields: ["id", "vlan_id", "routeable_subnet"],
detailFields: ["id", "service_specific_id", "vcpe_id", "image_name", "sliver_name",
"firewall_enable", "firewall_rules", "url_filter_enable", "url_filter_rules", "cdn_enable",
@@ -740,6 +742,13 @@
disableAdd: true,
});
+ define_model(this, {urlRoot: CORDUSER_API,
+ modelName: "cordUser",
+ listFields: ["id", "subscriber", "name", "level", "mac"],
+ detailFields: ["subscriber", "name", "level", "mac"],
+ disableAdd: true,
+ });
+
/* by default, have slicePlus only fetch the slices the user can see */
this.slicesPlus.currentUserCanSee = true;