demo index view, loading msg for datatables, hide views with no role
authorScott Baker <smbaker@gmail.com>
Tue, 15 Jul 2014 17:38:06 +0000 (10:38 -0700)
committerScott Baker <smbaker@gmail.com>
Tue, 15 Jul 2014 17:38:06 +0000 (10:38 -0700)
planetstack/core/xoslib/dashboards/index.html [new file with mode: 0644]
planetstack/core/xoslib/dashboards/xosDeveloper_datatables.html
planetstack/core/xoslib/static/js/xosDeveloper_datatables.js

diff --git a/planetstack/core/xoslib/dashboards/index.html b/planetstack/core/xoslib/dashboards/index.html
new file mode 100644 (file)
index 0000000..04ef136
--- /dev/null
@@ -0,0 +1,15 @@
+<p>xoslib demo views</p>
+
+<table>
+<tr><td><a href="/dashboard/xosDeveloper/">xosDeveloper</a></td>
+<td>Demonstrates using xoslib + marionette to render a list of slices</td>
+</tr>
+
+<tr><td><a href="/dashboard/xosDeveloper_datatables/">xosDeveloper_datatables</a></td>
+<td>Demonstrates using xoslib + datatables to render a list of slices</td>
+</tr>
+
+<tr><td><a href="/dashboard/sliceEditor/">sliceEditor</a></td>
+<td>Demonstrates how to commit data back to the data model using xoslib</td>
+</tr>
+</table>
index a058ba6..d40409a 100644 (file)
@@ -7,7 +7,7 @@
 <script src="{{ STATIC_URL }}/js/xoslib/xos-backbone.js"></script>
 <script src="{{ STATIC_URL }}/js/xosDeveloper_datatables.js"></script>
 
-<div id="developerView">
+<div id="developerView">Loading...
 </div>
 
 <script type="text/template" id="developer-slicedetail-template">
index 6da60da..aac1d49 100644 (file)
         row = data.models[rowkey];
         slicename = row.get("name");
         sliceid = row.get("id");
-        role = row.get("sliceInfo").roles[0] || "";
+        role = row.get("sliceInfo").roles[0];
         slivercount = row.get("sliceInfo").sliverCount;
         sitecount = row.get("sliceInfo").siteCount;
+
+        if (! role) {
+            continue;
+        }
+
         actualEntries.push(['<a href="/admin/core/slice/' + sliceid + '">' + slicename + '</a>',
                             role, slivercount, sitecount]);
     }