brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [03/10] incubator-brooklyn git commit: SSH streams presented alphabetically
Date Mon, 12 Jan 2015 17:21:42 GMT
SSH streams presented alphabetically


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/63d7e4bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/63d7e4bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/63d7e4bf

Branch: refs/heads/master
Commit: 63d7e4bf7289cf8b4dee252ea66ab6e9a5cbcaf8
Parents: aa31755
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Authored: Thu Dec 11 16:59:54 2014 +0000
Committer: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Committed: Fri Jan 9 13:56:39 2015 +0000

----------------------------------------------------------------------
 .../webapp/assets/js/view/activity-details.js   | 26 +++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/63d7e4bf/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js b/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js
index e1c6259..fa8b552 100644
--- a/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js
+++ b/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js
@@ -178,20 +178,24 @@ define([
                 this.task.get('detailedStatus'), false, false, 30, 250)
 
             this.updateFieldWith('streams',
-                function(v) {
+                function(streams) {
+                    // Stream names presented alphabetically
+                    var keys = _.keys(streams);
+                    keys.sort();
                     var result = "";
-                    for (var si in v) {
-                        var sv = v[si];
-                        result += "<div class='activity-stream-div'>"+
-                                  "<span class='activity-label'>"+
-                                    _.escape(si)+
-                                  "</span><span>"+
-                                      "<a href='"+sv.link+"'>download</a>"+
-                                      (sv.metadata["sizeText"] ? " ("+_.escape(sv.metadata["sizeText"])+")"
: "")+
-                                  "</span></div>";
+                    for (var i = 0; i < keys.length; i++) {
+                        var name = keys[i];
+                        var stream = streams[name];
+                        result += "<div class='activity-stream-div'>" +
+                                "<span class='activity-label'>" +
+                                _.escape(name) +
+                                "</span><span>" +
+                                "<a href='" + stream.link + "'>download</a>"
+
+                                (stream.metadata["sizeText"] ? " (" + _.escape(stream.metadata["sizeText"])
+ ")" : "") +
+                                "</span></div>";
                     }
                     return result; 
-                })
+                });
 
             this.updateFieldWith('submittedByTask',
                 function(v) { return "<a class='showDrillDownSubmittedByAnchor handy'
link='"+_.escape(v.link)+"' id='"+v.metadata.id+"'>"+


Mime
View raw message