diff --git a/src/ServicePulse.Host/app/modules/monitoring/js/endpoint_details.controller.js b/src/ServicePulse.Host/app/modules/monitoring/js/endpoint_details.controller.js index ef585e7678..b099aa51a3 100644 --- a/src/ServicePulse.Host/app/modules/monitoring/js/endpoint_details.controller.js +++ b/src/ServicePulse.Host/app/modules/monitoring/js/endpoint_details.controller.js @@ -18,8 +18,8 @@ $scope.endpointName = $routeParams.endpointName; $scope.sourceIndex = $routeParams.sourceIndex; + $scope.showInstancesBreakdown = $routeParams.tab === 'instancesBreakdown'; $scope.loading = true; - $scope.showInstancesBreakdown = false; $scope.largeGraphsMinimumYAxis = largeGraphsMinimumYAxis; $scope.smallGraphsMinimumYAxis = smallGraphsMinimumYAxis; @@ -42,6 +42,14 @@ } } + $scope.buildUrl = function (selectedPeriodValue, showInstancesBreakdownTab) { + return `#/endpoint_details/${$scope.endpointName}/${$scope.sourceIndex}?historyPeriod=${selectedPeriodValue}&tab=${$scope.showInstancesBreakdown ? 'instancesBreakdown' : 'messageTypeBreakdown'}`; + }; + + $scope.showInstancesBreakdownTab = function(isVisible) { + $scope.showInstancesBreakdown = isVisible; + }; + function updateUI() { if (subscription) { subscription.dispose(); @@ -142,4 +150,4 @@ angular.module('endpoint_details') .controller('endpointDetailsCtrl', controller); -}(window, window.angular)); \ No newline at end of file +}(window, window.angular)); diff --git a/src/ServicePulse.Host/app/modules/monitoring/views/endpoint_details.html b/src/ServicePulse.Host/app/modules/monitoring/views/endpoint_details.html index 2f9cd892b1..d01b260558 100644 --- a/src/ServicePulse.Host/app/modules/monitoring/views/endpoint_details.html +++ b/src/ServicePulse.Host/app/modules/monitoring/views/endpoint_details.html @@ -27,7 +27,7 @@