You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sj...@apache.org on 2014/07/28 12:29:29 UTC
[4/7] git commit: Tidies getUser functionality in jsgui and quietens
jsgui build
Tidies getUser functionality in jsgui and quietens jsgui build
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/b95a10fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/b95a10fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/b95a10fd
Branch: refs/heads/master
Commit: b95a10fd28101392f93453d96915314819fc01ad
Parents: dfcb099
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Fri Jul 25 18:42:28 2014 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Fri Jul 25 19:31:20 2014 +0100
----------------------------------------------------------------------
usage/jsgui/pom.xml | 3 +-
usage/jsgui/src/main/webapp/assets/js/router.js | 33 ++++++++------------
usage/jsgui/src/main/webapp/index.html | 2 +-
3 files changed, 16 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/b95a10fd/usage/jsgui/pom.xml
----------------------------------------------------------------------
diff --git a/usage/jsgui/pom.xml b/usage/jsgui/pom.xml
index 57be5a8..6bac888 100644
--- a/usage/jsgui/pom.xml
+++ b/usage/jsgui/pom.xml
@@ -137,7 +137,8 @@
<customRunnerConfiguration>
${project.basedir}/src/test/javascript/config.txt
</customRunnerConfiguration>
-
+ <!-- Makes output terser -->
+ <format>progress</format>
<additionalContexts>
<!-- If context roots start with a / the resource will be available on the server at //root. -->
<!-- It is an error for context roots to end with a /. -->
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/b95a10fd/usage/jsgui/src/main/webapp/assets/js/router.js
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/js/router.js b/usage/jsgui/src/main/webapp/assets/js/router.js
index 8e6481c..f72baf8 100644
--- a/usage/jsgui/src/main/webapp/assets/js/router.js
+++ b/usage/jsgui/src/main/webapp/assets/js/router.js
@@ -88,25 +88,7 @@ define([
return view
}
};
-
- getUser = function() {
- $.ajax({
- type : "GET",
- url : "/v1/server/user",
- dataType : "text",
- success : function(data) {
- console.log("Successfully fetched user details");
- if (data != null) {
- $("#user").html(data);
- }
- },
- error: function(data) {
- console.error("ERROR fetching user details");
- console.debug(data);
- }
- });
- };
-
+
var Router = Backbone.Router.extend({
routes:{
'v1/home/*trail':'homePage',
@@ -234,6 +216,17 @@ define([
}
});
new HaStandbyOverlay({ el: $("#ha-standby-overlay") }).render();
- getUser();
+
+
+ $.ajax({
+ type: "GET",
+ url: "/v1/server/user",
+ dataType: "text"
+ }).done(function (data) {
+ if (data != null) {
+ $("#user").html(data);
+ }
+ });
+
return Router
})
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/b95a10fd/usage/jsgui/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/index.html b/usage/jsgui/src/main/webapp/index.html
index 65beb11..0bdead6 100644
--- a/usage/jsgui/src/main/webapp/index.html
+++ b/usage/jsgui/src/main/webapp/index.html
@@ -45,7 +45,7 @@ under the License.
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
- <div class="userName-top" id="user"></div>
+ <div class="userName-top" id="user"></div>
<div class="container">
<a class="logo" href="#" title="Brooklyn, Version 0.7.0-SNAPSHOT"><!-- Logo added via CSS --></a> <!-- BROOKLYN_VERSION -->
<div class="menubar-top">