diff --git a/web/src/main/webapp/features/agentInfo/agent-info.directive.js b/web/src/main/webapp/features/agentInfo/agent-info.directive.js index b278ca4b8..5e9182e9b 100644 --- a/web/src/main/webapp/features/agentInfo/agent-info.directive.js +++ b/web/src/main/webapp/features/agentInfo/agent-info.directive.js @@ -274,18 +274,21 @@ scope.currentServiceInfo = initServiceInfo(agent); var aFromTo, period, aSelectionFromTo = []; - if ( scope.selectTime === -1 ) { - scope.selectTime = oNavbarVoService.getQueryEndTime(); + if ( timeSlider === null ) { aSelectionFromTo[0] = oNavbarVoService.getQueryStartTime(); aSelectionFromTo[1] = oNavbarVoService.getQueryEndTime(); period = oNavbarVoService.getPeriod(); + } else { + aSelectionFromTo = timeSlider.getSelectionTimeSeries(); + aFromTo = timeSlider.getSliderTimeSeries(); + period = getPeriod(aSelectionFromTo[0], aSelectionFromTo[1]); + } + if ( scope.selectTime === -1 ) { + scope.selectTime = oNavbarVoService.getQueryEndTime(); } else { if ( scope.selectTime !== oNavbarVoService.getQueryEndTime() ) { loadAgentInfo( scope.selectTime ); } - aSelectionFromTo = timeSlider.getSelectionTimeSeries(); - aFromTo = timeSlider.getSliderTimeSeries(); - period = getPeriod( aSelectionFromTo[0], aSelectionFromTo[1] ); } $timeout(function () { loadChartData(agent.agentId, aSelectionFromTo, period, 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 a051b7227..f3a17de90 100644 --- a/web/src/main/webapp/features/serverMap/server-map.directive.js +++ b/web/src/main/webapp/features/serverMap/server-map.directive.js @@ -758,7 +758,7 @@ /** * scope event on serverMapDirective.initializeWithMapData */ - scope.$on('serverMapDirective.initializeWithMapData', function (event, mapData) { + scope.$on('serverMapDirective.initializeWithMapData', function (event, mapData, navbarVoService) { reset(); scope.bShowServerMapStatus = false; bUseBackgroundContextMenu = true; @@ -767,6 +767,7 @@ applicationName: mapData.applicationId }; htLastMapData = mapData; + scope.oNavbarVoService = navbarVoService; serverMapCallback(htLastQuery, ServerMapDaoService.extractDataFromApplicationMapData(htLastMapData.applicationMapData), scope.linkRouting, scope.linkCurve); }); diff --git a/web/src/main/webapp/pages/transactionView/transaction-view.controller.js b/web/src/main/webapp/pages/transactionView/transaction-view.controller.js index 4f9f2907f..b0e703ed0 100644 --- a/web/src/main/webapp/pages/transactionView/transaction-view.controller.js +++ b/web/src/main/webapp/pages/transactionView/transaction-view.controller.js @@ -11,8 +11,8 @@ applicationUrl: '/transactionInfo.pinpoint' }); - pinpointApp.controller('TransactionViewCtrl', [ 'TransactionViewConfig', '$scope', '$rootScope', '$rootElement', 'AlertsService', 'ProgressBarService', '$timeout', '$routeParams', 'TransactionDaoService', 'AgentDaoService', 'AnalyticsService', - function (cfg, $scope, $rootScope, $rootElement, AlertsService, ProgressBarService, $timeout, $routeParams, TransactionDaoService, AgentDaoService, analyticsService) { + pinpointApp.controller('TransactionViewCtrl', [ 'TransactionViewConfig', '$scope', '$rootScope', '$rootElement', 'AlertsService', 'ProgressBarService', '$timeout', '$routeParams', 'NavbarVoService', 'TransactionDaoService', 'AgentDaoService', 'AnalyticsService', 'PreferenceService', + function (cfg, $scope, $rootScope, $rootElement, AlertsService, ProgressBarService, $timeout, $routeParams, NavbarVoService, TransactionDaoService, AgentDaoService, analyticsService, preferenceService) { analyticsService.send(analyticsService.CONST.TRANSACTION_VIEW_PAGE); // define private variables var oAlertService, oProgressBarService; @@ -28,7 +28,6 @@ }; oAlertService = new AlertsService($rootElement); oProgressBarService = new ProgressBarService($rootElement); - /** * initialize */ @@ -115,7 +114,10 @@ * show server map */ showServerMap = function () { - $scope.$broadcast('serverMapDirective.initializeWithMapData', $scope.transactionDetail); + var oNavbarVoService = new NavbarVoService(); + oNavbarVoService.setReadablePeriod(preferenceService.getPeriodTypes()[0]); + oNavbarVoService.setQueryEndDateTime(moment(parseInt($routeParams.focusTimestamp)).format('YYYY-MM-DD-HH-mm-ss')); + $scope.$broadcast('serverMapDirective.initializeWithMapData', $scope.transactionDetail, oNavbarVoService); }; /**