From 2c18e3727a2fbbe0d262bb229974f957500acb0d Mon Sep 17 00:00:00 2001 From: Chisu Yu Date: Mon, 10 Jun 2013 06:31:01 +0000 Subject: [PATCH] =?UTF-8?q?[=EC=9C=A0=EC=B9=98=EC=88=98]=20[NOBTS]=20merge?= =?UTF-8?q?d=20node=EC=9D=98=20=EB=9D=BC=EB=B2=A8=EC=9D=84=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=EC=88=98=EA=B0=80=20=EB=A7=8E=EC=9D=80=20=EC=88=9C?= =?UTF-8?q?=EC=84=9C=EB=A1=9C=EC=A0=95=EB=A0=AC=ED=95=B4=EC=84=9C=20?= =?UTF-8?q?=EB=B3=B4=EC=97=AC=EC=A4=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@1829 84d0f5b1-2673-498c-a247-62c4ff18d310 --- .../webapp/common/js/pinpoint/chart-servermap.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/common/js/pinpoint/chart-servermap.js b/src/main/webapp/common/js/pinpoint/chart-servermap.js index 0e6cb1197..7fbb64022 100644 --- a/src/main/webapp/common/js/pinpoint/chart-servermap.js +++ b/src/main/webapp/common/js/pinpoint/chart-servermap.js @@ -561,6 +561,7 @@ var mergeUnknown = function(data) { newNode = { "id" : newNodeKey, "key" : newNodeKey, + "textArr" : [], "text" : "", "hosts" : [], "category" : "UNKNOWN_GROUP", @@ -585,7 +586,7 @@ var mergeUnknown = function(data) { } // fill the new node/link informations. - newNode.text += link.targetinfo.applicationName + " (" + link.text + ")\n"; + newNode.textArr.push({ 'count' : link.text, 'applicationName' : link.targetinfo.applicationName}); newLink.text += link.text; newLink.error += link.error; @@ -608,6 +609,14 @@ var mergeUnknown = function(data) { }); if (newNode) { + newNode.textArr.sort(function(e1, e2) { + return e2.count - e1.count; + }); + + $.each(newNode.textArr, function(i, e) { + newNode.text += e.applicationName + " (" + e.count + ")\n"; + }); + newNodeList.push(newNode); } @@ -617,7 +626,6 @@ var mergeUnknown = function(data) { } else { newLink.category = "default"; } - console.log(newLink); newLinkList.push(newLink); } });