demo index view, loading msg for datatables, hide views with no role
[plstackapi.git] / planetstack / core / xoslib / static / js / xosDeveloper_datatables.js
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]);
     }