Skip to content

Commit

Permalink
fix(GDB-11096) Fix injection issue in secondary modal controller for …
Browse files Browse the repository at this point in the history
…multi-region cluster configuration

## What:
Updated the controller property in secondaryModalConfig to use array syntax for dependency injection, ensuring $scope, $uibModalInstance, and config are correctly injected into secondaryModeModalController.

## Why:
This change prevents minification errors that occurred due to missing dependency injection, causing the controller function to fail in production.

## How:
Wrapped the secondaryModeModalController in an array syntax to ensure AngularJS correctly injects dependencies even after minification.
  • Loading branch information
teodossidossev committed Oct 29, 2024
1 parent 780810e commit 5d26e72
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function MultiRegion($jwtAuth, $translate, $timeout, toastr, ModalService, Clust
const secondaryModalConfig = {
title: $translate.instant('cluster_management.cluster_configuration_multi_region.secondary_cluster_settings'),
templateUrl: 'js/angular/clustermanagement/templates/modal/secondary-mode-modal.html',
controller: secondaryModeModalController,
controller: ['$scope', '$uibModalInstance', 'config', secondaryModeModalController],
size: 'lg',
warning: true,
backdrop: 'static'
Expand Down

0 comments on commit 5d26e72

Please sign in to comment.