Skip to content

Commit 1913722

Browse files
committed
MB-68190 - detailed chart doesn't reflect the currently selected bucket
When launching the detailed chart, the currently selected bucket was not passed to the detailed chart dialog. This change includes that bucket in the parameters. Change-Id: Ia48747b3dd35c6172facebdc15f7f89cc165b82a Reviewed-on: https://review.couchbase.org/c/ns_server/+/232624 Tested-by: Eben Haber <[email protected]> Well-Formed: Build Bot <[email protected]> Reviewed-by: Raluca Lupu <[email protected]> Reviewed-on: https://review.couchbase.org/c/ns_server/+/232784
1 parent c727570 commit 1913722

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

priv/public/ui/app/mn_admin/mn_statistics_controller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ function mnStatisticsChartsController($scope, $uibModal, mnStatisticsNewService,
132132
resolve: {
133133
items: mnHelper.wrapInFunction($scope.mnStatsGroupsCtl.items),
134134
chart: mnHelper.wrapInFunction(vm.getChart()),
135-
mnStatisticsNewScope: mnHelper.wrapInFunction($scope.statisticsNewCtl.mnStatisticsNewScope)
135+
mnStatisticsNewScope: mnHelper.wrapInFunction($scope.statisticsNewCtl.mnStatisticsNewScope),
136+
bucket: mnHelper.wrapInFunction($scope.statisticsNewCtl.bucket),
136137
}
137138
})
138139
}

priv/public/ui/app/mn_admin/mn_statistics_detailed_chart_controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ licenses/APL2.txt.
1010

1111
export default mnStatisticsDetailedChartController;
1212

13-
mnStatisticsDetailedChartController.$inject = ["$scope", "$timeout", "$state", "chart", "items", "mnStatisticsNewService", "mnStatisticsNewScope"];
14-
function mnStatisticsDetailedChartController($scope, $timeout, $state, chart, items, mnStatisticsNewService, mnStatisticsNewScope) {
13+
mnStatisticsDetailedChartController.$inject = ["$scope", "$timeout", "$state", "chart", "items", "mnStatisticsNewService", "mnStatisticsNewScope", "bucket"];
14+
function mnStatisticsDetailedChartController($scope, $timeout, $state, chart, items, mnStatisticsNewService, mnStatisticsNewScope, bucket) {
1515
var vm = this;
1616
vm.chart = Object.assign({}, chart, {size: "extra"});
1717

1818
vm.items = items;
1919
vm.onSelectZoom = onSelectZoom;
20-
vm.bucket = $state.params.commonBucket;
20+
vm.bucket = bucket || $state.params.commonBucket; // Use the passed bucket, fallback to state param
2121
vm.zoom = $state.params.scenarioZoom !== "minute" ? $state.params.scenarioZoom : "hour";
2222
vm.node = $state.params.statsHostname;
2323
vm.options = {showFocus: true, showTicks: true, showLegends: true};

0 commit comments

Comments
 (0)