From f05079fb111cd6c66089f4dc0213d3bd01fce394 Mon Sep 17 00:00:00 2001 From: denz Date: Wed, 15 Mar 2017 14:28:47 +0900 Subject: [PATCH] bug fix. - send wrong application name to thread-dump window when select different application with application of url --- .../components/server-map2/jquery.ServerMap2.js | 2 +- .../realtimeChart/realtime-chart.controller.js | 14 ++++++++++---- .../features/serverMap/server-map.directive.js | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/web/src/main/webapp/components/server-map2/jquery.ServerMap2.js b/web/src/main/webapp/components/server-map2/jquery.ServerMap2.js index 195f028c0..8a00a78bc 100644 --- a/web/src/main/webapp/components/server-map2/jquery.ServerMap2.js +++ b/web/src/main/webapp/components/server-map2/jquery.ServerMap2.js @@ -1291,7 +1291,7 @@ htData = node.data, fOnNodeClicked = this.option('fOnNodeClicked'); if (angular.isFunction(fOnNodeClicked)) { - if ( e.clickCount && e.clickCount > 0 ) { + if ( e && e.clickCount && e.clickCount > 0 ) { this.analyticsService.send(this.analyticsService.CONST.MAIN, this.analyticsService.CONST.CLK_NODE); } fOnNodeClicked.call(this, e, htData, unknownKey, query); diff --git a/web/src/main/webapp/features/realtimeChart/realtime-chart.controller.js b/web/src/main/webapp/features/realtimeChart/realtime-chart.controller.js index 52642a1f8..b38fded38 100644 --- a/web/src/main/webapp/features/realtimeChart/realtime-chart.controller.js +++ b/web/src/main/webapp/features/realtimeChart/realtime-chart.controller.js @@ -62,6 +62,7 @@ var $elSumChartWrapper, $elTitle, $elSumChartCount, $elAgentChartListWrapper, $elWarningMessage, $elPin; var preUrlParam = ""; var currentApplicationName = ""; + var currentServiceType = ""; var aAgentChartElementList = []; var aChildScopeList = []; var oNamespaceToIndexMap = {}; @@ -365,12 +366,13 @@ bShowRealtimeChart = prevShowRealtimeChart; setPinColor(); }); - $scope.$on( "realtimeChartController.initialize", function (event, was, applicationName, urlParam ) { + $scope.$on( "realtimeChartController.initialize", function (event, was, applicationName, serviceType, urlParam ) { hideSub(); if ( bIsPinned === true && preUrlParam === urlParam ) return; if ( UrlVoService.isRealtime() === false ) return; bIsWas = angular.isUndefined( was ) ? false : was; applicationName = angular.isUndefined( applicationName ) ? "" : applicationName; + serviceType = angular.isUndefined( serviceType ) ? "" : serviceType; preUrlParam = urlParam; @@ -390,7 +392,9 @@ $scope.bInitialized = true; // resetStatus(); - $elTitle.html( currentApplicationName = applicationName ); + currentApplicationName = applicationName; + currentServiceType = serviceType; + $elTitle.html( currentApplicationName ); showPopup(); showWaitingConnectionPopup(); @@ -417,7 +421,7 @@ if (openType === null || openType === "window") { $window.open( getOpenUrl() + - "/threadDump/" + preUrlParam.split("/")[0] + "/" + agentId, + "/threadDump/" + currentApplicationName + "@" + currentServiceType + "/" + agentId, "Thread Dump Info", "width=1280px,height=800px,menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=no,status=no" ); @@ -439,7 +443,9 @@ stopReceive(); stopChart(); $elWarningMessage.hide(); - $elTitle.html( currentApplicationName = "" ); + currentApplicationName = ""; + currentServiceType = ""; + $elTitle.html( currentApplicationName ); $elSumChartCount.html("0"); } $($window).on("resize", function() { diff --git a/web/src/main/webapp/features/serverMap/server-map.directive.js b/web/src/main/webapp/features/serverMap/server-map.directive.js index f2c39c928..2ba38a5d6 100644 --- a/web/src/main/webapp/features/serverMap/server-map.directive.js +++ b/web/src/main/webapp/features/serverMap/server-map.directive.js @@ -353,7 +353,7 @@ htLastNode = node; scope.$emit("serverMapDirective.nodeClicked", e, htLastQuery, node, htLastMergedMapData, searchQuery); if ( scope.oNavbarVoService && scope.oNavbarVoService.isRealtime() ) { - $rootScope.$broadcast("realtimeChartController.initialize", node.isWas, node.applicationName, scope.oNavbarVoService.getApplication() + "/" + scope.oNavbarVoService.getReadablePeriod() + "/" + scope.oNavbarVoService.getQueryEndDateTime() + "/" + scope.oNavbarVoService.getCallerRange()); + $rootScope.$broadcast("realtimeChartController.initialize", node.isWas, node.applicationName, node.serviceType, scope.oNavbarVoService.getApplication() + "/" + scope.oNavbarVoService.getReadablePeriod() + "/" + scope.oNavbarVoService.getQueryEndDateTime() + "/" + scope.oNavbarVoService.getCallerRange()); } reset(); };