latest xoslib test changes
authorScott Baker <smbaker@gmail.com>
Fri, 31 Oct 2014 06:50:20 +0000 (23:50 -0700)
committerScott Baker <smbaker@gmail.com>
Fri, 31 Oct 2014 06:50:20 +0000 (23:50 -0700)
planetstack/core/xoslib/static/js/test.js
planetstack/core/xoslib/static/js/xoslib/xos-backbone.js

index 86de742..76d131c 100644 (file)
@@ -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();\r
+    TestApp.start();
 });
 
index 7533078..87660df 100644 (file)
@@ -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();