ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [15/16] git commit: AMBARI-7532. Slider view: Change additional ganglia clusters format to host:port - UI fixes (srimanth)
Date Mon, 29 Sep 2014 12:14:27 GMT
AMBARI-7532. Slider view: Change additional ganglia clusters format to host:port - UI fixes
(srimanth)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f1557e8f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f1557e8f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f1557e8f

Branch: refs/heads/branch-alerts-dev
Commit: f1557e8f7f79153808f42d3b83251ef383484db2
Parents: 4b7bed2
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Sat Sep 27 16:02:18 2014 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Sat Sep 27 16:02:18 2014 -0700

----------------------------------------------------------------------
 .../resources/ui/app/controllers/slider_controller.js    | 11 +++++------
 contrib/views/slider/src/main/resources/view.xml         |  2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f1557e8f/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 40fd0ce..e59f707 100644
--- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -88,15 +88,14 @@ App.SliderController = Ember.Controller.extend({
     var gangliaCustomClusters = [];
     //parse CSV string with cluster names and ports
     if (!Em.isNone(prop)) {
-      prop.replace(/\'/g, "").split(',').forEach(function(item, index){
-        if (index % 2 === 0) {
+      prop.replace(/\'/g, "").split(',').forEach(function(item){
+        var splits = item.split(':');
+        if (splits.length > 1) {
           gangliaCustomClusters.push({
-            name: item
+            name: splits[0],
+            port: splits[1]
           })
         }
-        else {
-          gangliaCustomClusters[gangliaCustomClusters.length - 1].port = parseInt(item);
-        }
       });
     }
     return gangliaCustomClusters;

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1557e8f/contrib/views/slider/src/main/resources/view.xml
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/view.xml b/contrib/views/slider/src/main/resources/view.xml
index 8325529..e66112f 100644
--- a/contrib/views/slider/src/main/resources/view.xml
+++ b/contrib/views/slider/src/main/resources/view.xml
@@ -50,7 +50,7 @@ limitations under the License. Kerberos, LDAP, Custom. Binary/Htt
   </parameter>
   <parameter>
     <name>ganglia.custom.clusters</name>
-    <description>Custom Ganglia clusters which can be used by applications created
in Slider Apps view. Value is comma separated list of cluster-name and port pairs. Typically
this is the ganglia_custom_clusters in the ganglia-env configuration. For example: Application1,8881,Application2,8882</description>
+    <description>Custom Ganglia clusters which can be used by applications created
in Slider Apps view. Value is comma separated list of cluster-name and port pairs. Typically
this is the additional_clusters in the ganglia-env configuration. For example: Application1:8881,Application2:8882</description>
     <required>false</required>
   </parameter>
   <parameter>


Mime
View raw message