OBJS = ['deployment', 'image', 'networkTemplate', 'network', 'networkSliver', 'networkDeployment', 'node', 'service', 'site', 'slice', 'sliceDeployment', 'slicePrivilege', 'sliver', 'user', 'sliceRole', 'userDeployment'];
NAV_OBJS = ['deployment', 'site', 'slice', 'user'];
-XOSAdminApp = new XOSApplication({logTableId: "#logTable", hideTabsByDefault: true});
+REWRITES = {"/admin/core/deployment/": "#deployments",
+ "/admin/core/site/" : "#sites",
+ "/admin/core/slice/" : "#slices",
+ "/admin/core/user/" : "#users"};
+
+XOSAdminApp = new XOSApplication({
+ logTableId: "#logTable",
+ statusMsgId: "#statusMsg",
+ hideTabsByDefault: true
+});
XOSAdminApp.addRegions({
navigation: "#navigationPanel",
};\r
\r
XOSAdminApp.Router = new router({ appRoutes: routes, controller: api });\r
-}\r
+};\r
+\r
+/* rewriteLinks\r
+\r
+ Rewrite the links in the suit navbar from django-links to marionette\r
+ links. This let's us intercept the navbar and make it function within\r
+ this view rather than jumping back out to a django view.\r
+*/\r
+\r
+XOSAdminApp.rewriteLinks = function () {\r
+ $("a").each(function() {\r
+ href=$(this).attr("href");\r
+ rewrite_href=REWRITES[href];\r
+ if (rewrite_href) {\r
+ $(this).attr("href", rewrite_href);\r
+ }\r
+ });\r
+};\r
\r
XOSAdminApp.on("start", function() {\r
XOSAdminApp.buildViews();
XOSAdminApp.updateNavigationPanel();
+ XOSAdminApp.rewriteLinks();
+
if (Backbone.history) {
console.log("history start");
Backbone.history.start();