From 2d538960604b0b37917134d71fccbf1e292fb488 Mon Sep 17 00:00:00 2001 From: xiaolong Date: Fri, 21 Sep 2018 15:54:50 +0800 Subject: [PATCH] =?UTF-8?q?https://github.com/uavorg/uavstack/issues/404?= =?UTF-8?q?=201.fix=20=E6=97=B6=E7=A9=BA=E6=B2=99=E7=9B=98=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=8C=87=E6=A0=87=E6=9F=A5=E8=AF=A2=E6=9F=90?= =?UTF-8?q?=E4=BA=9B=E6=83=85=E5=86=B5=E4=B8=8B=E6=97=A0=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../timesandtable/js/uav.tstable.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/com.creditease.uav.console/src/main/webapp/uavapp_godeye/timesandtable/js/uav.tstable.js b/com.creditease.uav.console/src/main/webapp/uavapp_godeye/timesandtable/js/uav.tstable.js index f16a1b80..f62c16af 100644 --- a/com.creditease.uav.console/src/main/webapp/uavapp_godeye/timesandtable/js/uav.tstable.js +++ b/com.creditease.uav.console/src/main/webapp/uavapp_godeye/timesandtable/js/uav.tstable.js @@ -1045,10 +1045,7 @@ var PageClass = { var appMetrics = $("#appmetrics").find("div"); //ID format - var appmetricsInstid = appurl; - if(appmetricsInstid.indexOf(appid) >= 0){ - appmetricsInstid = appmetricsInstid.substring(0,appmetricsInstid.indexOf(appid)-1); - } + var appmetricsInstid = getJVMMetricsInstid(appurl,appid); $.each(appMetrics,function(index,obj){ if(obj.className.indexOf("userSelect") >=0){ @@ -2422,6 +2419,19 @@ function getClienttId(appurl,appid,ip,clientHtmlId){ instid = instid +"#"+ appid +"#"+clientHtmlId; return instid; } + +function getJVMMetricsInstid(appurl,appid){ + if(appurl.indexOf(appid) >= 0){ + return appurl.substring(0,appurl.indexOf(appid)-1); + } + + if(appurl.substring(appurl.length-1)=="/"){ + return appurl.substring(0,appurl.length-1); + } + + return appurl; +} + function getIpByAppurl(appUrl) { var ip; var isJse = appUrl.indexOf("http:") == -1?true:false;