From: Scott Baker Date: Sat, 15 Nov 2014 00:13:43 +0000 (-0800) Subject: colored log table, save button returns to list X-Git-Url: http://git.onelab.eu/?p=plstackapi.git;a=commitdiff_plain;h=0b4ceaaf2adf462fe3644642aab79eac9599e731 colored log table, save button returns to list --- diff --git a/planetstack/core/xoslib/dashboards/xosAdminDashboard.html b/planetstack/core/xoslib/dashboards/xosAdminDashboard.html index 78eb8e2..6d60535 100644 --- a/planetstack/core/xoslib/dashboards/xosAdminDashboard.html +++ b/planetstack/core/xoslib/dashboards/xosAdminDashboard.html @@ -14,6 +14,14 @@ + +
@@ -30,6 +38,12 @@
+
+ + + +
+
@@ -42,15 +56,4 @@
-
- - - - - - -
statusoperationcodemessage
- -
- {% include 'xosAdmin.html' %} diff --git a/planetstack/core/xoslib/dashboards/xosAdminWholePage.html b/planetstack/core/xoslib/dashboards/xosAdminWholePage.html index da9f364..0bc9924 100644 --- a/planetstack/core/xoslib/dashboards/xosAdminWholePage.html +++ b/planetstack/core/xoslib/dashboards/xosAdminWholePage.html @@ -14,6 +14,14 @@ + +
{% include 'xosAdminHeader.html' %}
diff --git a/planetstack/core/xoslib/static/css/xosAdminDashboard.css b/planetstack/core/xoslib/static/css/xosAdminDashboard.css index ff54fee..f4e8191 100644 --- a/planetstack/core/xoslib/static/css/xosAdminDashboard.css +++ b/planetstack/core/xoslib/static/css/xosAdminDashboard.css @@ -10,8 +10,16 @@ display: none; } -#logPanel { - display: none; +#logTable { + width: 100%; +} + +#logTable tr { + border-bottom: 1px solid; +} + +#logTable tr:last-child { + border-bottom: none; } #contentButtonPanel { diff --git a/planetstack/core/xoslib/static/css/xosAdminSite.css b/planetstack/core/xoslib/static/css/xosAdminSite.css index 5ecaa8e..d1b4275 100644 --- a/planetstack/core/xoslib/static/css/xosAdminSite.css +++ b/planetstack/core/xoslib/static/css/xosAdminSite.css @@ -6,8 +6,17 @@ color:blue; text-decoration:underline; } -#logTable td, th { - border: 1px solid black; + +.xos-log.xos-success { + background-color: #00ff00; +} + +.xos-log.xos-inprog { + background-color: #ffff00; +} + +.xos-log.xos-failure { + background-color: #ff0000; } .btn-xosnav { @@ -82,3 +91,4 @@ display: none; } + diff --git a/planetstack/core/xoslib/static/js/xosAdminSite.js b/planetstack/core/xoslib/static/js/xosAdminSite.js index 212c1b4..b5d0f6c 100644 --- a/planetstack/core/xoslib/static/js/xosAdminSite.js +++ b/planetstack/core/xoslib/static/js/xosAdminSite.js @@ -56,10 +56,12 @@ XOSAdminApp.buildViews = function() { collection_name = name + "s"; region_name = name + "List"; detailNavLink = collection_name; + listNavLink = collection_name; detailClass = XOSDetailView.extend({ template: detail_template, app: XOSAdminApp, + listNavLink: listNavLink, }); XOSAdminApp[collection_name + "DetailView"] = detailClass; diff --git a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js index b8e0347..89d0d3b 100644 --- a/planetstack/core/xoslib/static/js/xoslib/xosHelper.js +++ b/planetstack/core/xoslib/static/js/xoslib/xosHelper.js @@ -37,7 +37,7 @@ XOSApplication = Marionette.Application.extend({ }, showSuccess: function(result) { - result["success"] = "success"; + result["statusclass"] = "success"; if (this.logTableId) { this.appendLogWindow(result); } else { @@ -51,7 +51,7 @@ XOSApplication = Marionette.Application.extend({ }, showError: function(result) { - result["success"] = "failure"; + result["statusclass"] = "failure"; if (this.logTableId) { this.appendLogWindow(result); } else { @@ -65,7 +65,7 @@ XOSApplication = Marionette.Application.extend({ }, showInformational: function(result) { - result["success"] = "information"; + result["statusclass"] = "inprog"; if (this.logTableId) { return this.appendLogWindow(result); } else { @@ -203,6 +203,8 @@ XOSDetailView = Marionette.ItemView.extend({ console.log("saveLeave"); e.preventDefault(); this.save(); + this.app.Router.navigate(this.listNavLink, {trigger: true}); + console.log("route to " + this.listNavLink); }, submitAddAnotherClicked: function(e) { diff --git a/planetstack/core/xoslib/templates/xosAdmin.html b/planetstack/core/xoslib/templates/xosAdmin.html index ee974f6..d543502 100644 --- a/planetstack/core/xoslib/templates/xosAdmin.html +++ b/planetstack/core/xoslib/templates/xosAdmin.html @@ -22,17 +22,8 @@
- -