import type { IController , IScope } from 'angular' ; import { defaults } from 'lodash' ; import type { Application } from '@spinnaker/core' ; import type { IManifestSelector } from '../../../manifest/selector/IManifestSelector' ; export class KubernetesV2ScaleManifestConfigCtrl implements IController { public application : Application ; public static $inject = [ '$scope' ] ; constructor ( private $scope ) { if ( this . $scope . stage . isNew ) { this . application = this . $scope . $parent . application ; const defaultSelection = { location : '' , account : '' , } ; defaults ( this . $scope . stage , defaultSelection ) ; const defaultOptions = { replicas : null , app : this . application . name , } ; defaults ( this . $scope . stage , defaultOptions ) ; this . $scope . stage . cloudProvider = 'kubernetes' ; } } public handleManifestSelectorChange = ( ) : void => { this . $scope . $applyAsync ( ) ; } ; }