You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2014/12/23 06:45:03 UTC

stratos git commit: fix instanceId mapping issue on nodes

Repository: stratos
Updated Branches:
  refs/heads/master a9834e9ec -> 0b3680bbe


fix instanceId mapping issue on nodes


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

Branch: refs/heads/master
Commit: 0b3680bbe6cab85985a1b253dd3c208e1ee9af26
Parents: a9834e9
Author: Dakshika Jayathilaka <si...@gmail.com>
Authored: Tue Dec 23 09:38:06 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue Dec 23 11:14:53 2014 +0530

----------------------------------------------------------------------
 .../theme0/partials/applications_topology.hbs       | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/0b3680bb/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs
index 8e33914..cc3bd40 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs
+++ b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs
@@ -52,7 +52,7 @@ $(document).ready(function () {
         function clusterInstances(items, collector, parent){
             for(var prop in items){
                 if (items.hasOwnProperty(prop)) {
-                    var cur_name = items[prop].clusterId,
+                    var cur_name = items[prop].clusterId + items[prop].instanceId,
                             alias = items[prop].alias,
                             hostNames = items[prop].hostNames.toString(),
                             serviceName = items[prop].serviceName,
@@ -69,10 +69,14 @@ $(document).ready(function () {
         function groupInstances(items, collector, parent){
             for(var prop in items){
                 if (items.hasOwnProperty(prop)) {
-                    var cur_name = items[prop].groupId,
+                    var cur_name = items[prop].groupId + items[prop].instanceId,
+                            instanceId = items[prop].instanceId,
+                            groupId = items[prop].groupId,
                             status = items[prop].status;
                     var type = 'groups';
-                    rawout.push({"name": cur_name, "parent": parent, "type": type, "status": status});
+                    rawout.push({"name": cur_name, "parent": parent, "type": type, "status": status,
+                        "groupId":groupId, "instanceId":instanceId
+                        });
 
                     clusterInstances(items[prop].clusterInstances, collector, cur_name);
                     if(items[prop].hasOwnProperty('groupInstances')){
@@ -209,7 +213,7 @@ $(document).ready(function () {
                                 .style("top", (d3.event.pageY - 28) + "px");
                     } else if (d.type == 'groups') {
                         div.html(
-                                        "<strong>Group Id: </strong>" + d.name + "<br/>" +
+                                        "<strong>Group Instance Id: </strong>" + d.instanceId + "<br/>" +
                                         "<strong>Status: </strong>" + d.status
                         ).style("left", (d3.event.pageX) + "px")
                                 .style("top", (d3.event.pageY - 28) + "px");
@@ -275,8 +279,10 @@ $(document).ready(function () {
                 .text(function (d) {
                     if(d.type == 'members') {
                         return '';
-                    }else if(d.type == 'clusters'){
+                    }else if(d.type == 'clusters') {
                         return d.alias;
+                    }else if(d.type == 'groups'){
+                        return d.groupId;
                     }else{
                         return d.name;
                     }