From 256dc03448b804122824530a77b16a41b51c95df Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Thu, 30 Oct 2014 23:50:20 -0700 Subject: [PATCH] latest xoslib test changes --- planetstack/core/xoslib/static/js/test.js | 11 +++++++---- .../core/xoslib/static/js/xoslib/xos-backbone.js | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/planetstack/core/xoslib/static/js/test.js b/planetstack/core/xoslib/static/js/test.js index 86de742..76d131c 100644 --- a/planetstack/core/xoslib/static/js/test.js +++ b/planetstack/core/xoslib/static/js/test.js @@ -53,9 +53,9 @@ TestApp.on("start", function() { for (var index in objs) { name = objs[index]; - tr_template = '#test-' + name + '-listitem-template'; - table_template = '#test-' + name + '-list-template'; - detail_template = '#test-' + name + '-detail-template'; + tr_template = '#xosAdmin-' + name + '-listitem-template'; + table_template = '#xosAdmin-' + name + '-list-template'; + detail_template = '#xosAdmin-' + name + '-detail-template'; collection_name = name + "s"; region_name = name + "List"; @@ -144,6 +144,9 @@ TestApp.on("start", function() { // that we want to display. for (i in this.collection.foreignCollections) { foreignName = this.collection.foreignCollections[i]; + if (xos[foreignName] == undefined) { + console.log("Failed to find xos class " + foreignName); + } this.listenTo(xos[foreignName], 'change', this._renderChildren); this.listenTo(xos[foreignName], 'sort', this._renderChildren); } @@ -169,6 +172,6 @@ TestApp.on("start", function() { }); $(document).ready(function(){ - TestApp.start(); + TestApp.start(); }); diff --git a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js index 7533078..87660df 100644 --- a/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js +++ b/planetstack/core/xoslib/static/js/xoslib/xos-backbone.js @@ -244,7 +244,7 @@ if (! window.XOSLIB_LOADED ) { this.network = XOSModel.extend({ urlRoot: NETWORK_API }); this.networkCollection = XOSCollection.extend({ urlRoot: NETWORK_API, - foreignCollections: ["slivers", "networkTemplates"], + foreignCollections: ["slices", "networkTemplates"], model: this.network}); this.networks = new this.networkCollection(); -- 2.43.0