Skip to content

Commit

Permalink
fix(admin): fix display of usage metrics > 12 months (camunda#4778)
Browse files Browse the repository at this point in the history
related to camunda#4743
  • Loading branch information
tasso94 authored Nov 18, 2024
1 parent 4372772 commit 4d17b90
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ const Controller = [
};

const initializeMonthlyData = () => {
// prefill last 12 months for monthly table
// prefill last 24 months for monthly table
monthlyMetricUsageMap = {};
let month = $scope.activeMonth.clone();
for (let i = 0; i < 12; i++) {
for (let i = 0; i < 24; i++) {
// create label
const label = createGroupLabel(month.year(), month.month() + 1);
monthlyMetricUsageMap[label] = {
Expand Down Expand Up @@ -346,7 +346,8 @@ const Controller = [
}

$scope.monthlyMetrics = angular.copy(monthlyMetricsArray);
updateMonthlyChart(monthlyMetricsArray.reverse());
$scope.monthlyMetrics = $scope.monthlyMetrics.slice(0, 12);
updateMonthlyChart($scope.monthlyMetrics.reverse());
$scope.loadingStateMonthly = 'LOADED';
$scope.$apply();
})
Expand Down

0 comments on commit 4d17b90

Please sign in to comment.