@spinnaker/amazon 2026.2.2 → 2026.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aws.module.d.ts +2 -1
- package/dist/aws.services.d.ts +8 -0
- package/dist/certificates/AmazonCertificateReader.d.ts +1 -1
- package/dist/domain/IAmazonServerGroup.d.ts +10 -0
- package/dist/function/CreateLambdaFunction.d.ts +10 -5
- package/dist/function/configure/Network.d.ts +3 -0
- package/dist/function/details/FunctionActions.d.ts +3 -0
- package/dist/function/function.transformer.d.ts +1 -0
- package/dist/image/image.reader.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/instance/amazon.instance.write.service.d.ts +5 -5
- package/dist/instance/awsInstanceType.service.d.ts +13 -2
- package/dist/instance/details/AmazonInstanceDetails.d.ts +67 -0
- package/dist/instance/index.d.ts +1 -0
- package/dist/keyPairs/KeyPairsReader.d.ts +1 -1
- package/dist/loadBalancer/AmazonLoadBalancersTag.d.ts +7 -4
- package/dist/loadBalancer/OidcConfigReader.d.ts +1 -1
- package/dist/loadBalancer/TargetGroupDetails.d.ts +37 -3
- package/dist/loadBalancer/amazonLoadBalancerDataUtils.d.ts +1 -1
- package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +6 -2
- package/dist/loadBalancer/configure/LoadBalancerTypes.d.ts +4 -4
- package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/configure/classic/CreateClassicLoadBalancer.d.ts +12 -7
- package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +4 -0
- package/dist/loadBalancer/configure/network/CreateNetworkLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/details/LoadBalancerActions.d.ts +9 -2
- package/dist/loadBalancer/details/amazonLoadBalancerDetails.d.ts +22 -0
- package/dist/loadBalancer/index.d.ts +1 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +1 -1
- package/dist/pipeline/stages/AmazonStageConfig.d.ts +11 -0
- package/dist/pipeline/stages/bake/AwsBakeStageConfig.d.ts +66 -0
- package/dist/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/deleteLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +5 -4
- package/dist/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.d.ts +1 -3
- package/dist/pipeline/stages/deployLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/destroyAsg/awsDestroyAsgStage.d.ts +26 -2
- package/dist/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.d.ts +27 -0
- package/dist/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/findAmi/awsFindAmiStage.d.ts +17 -2
- package/dist/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.d.ts +12 -2
- package/dist/pipeline/stages/invokeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.d.ts +20 -2
- package/dist/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.d.ts +20 -0
- package/dist/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/resizeAsg/awsResizeAsgStage.d.ts +40 -2
- package/dist/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/routeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.d.ts +22 -0
- package/dist/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.d.ts +21 -0
- package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +5 -2
- package/dist/pipeline/stages/updateCodeLambda/index.d.ts +1 -1
- package/dist/search/searchResultFormatter.d.ts +4 -2
- package/dist/securityGroup/configure/AmazonSecurityGroupModal.d.ts +43 -0
- package/dist/securityGroup/details/AmazonSecurityGroupDetails.d.ts +62 -0
- package/dist/securityGroup/details/index.d.ts +1 -0
- package/dist/securityGroup/index.d.ts +1 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +0 -1
- package/dist/securityGroup/securityGroup.transformer.d.ts +11 -2
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +23 -7
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +17 -13
- package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +16 -6
- package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +6 -3
- package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +3 -0
- package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +4 -0
- package/dist/serverGroup/details/AmazonServerGroupActions.d.ts +10 -2
- package/dist/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.d.ts +17 -0
- package/dist/serverGroup/details/advancedSettings/index.d.ts +1 -0
- package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +5 -3
- package/dist/serverGroup/details/rollback/AmazonRollbackServerGroupModal.d.ts +67 -0
- package/dist/serverGroup/details/rollback/index.d.ts +2 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroupSelection.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicyWriter.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.d.ts +24 -0
- package/dist/serverGroup/details/scalingProcesses/index.d.ts +2 -0
- package/dist/serverGroup/details/scheduledActions/EditScheduledActionsModal.d.ts +31 -0
- package/dist/serverGroup/details/scheduledActions/index.d.ts +1 -0
- package/dist/serverGroup/details/sections/AdvancedSettingsDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/AmazonCapacityDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/ScalingProcessesDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/ScheduledActionsDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/SecurityGroupsDetailsSection.d.ts +4 -1
- package/dist/serverGroup/details/sections/WarmPoolDetailsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/index.d.ts +1 -0
- package/dist/serverGroup/details/securityGroups/EditSecurityGroupsModal.d.ts +32 -0
- package/dist/serverGroup/details/securityGroups/index.d.ts +1 -0
- package/dist/serverGroup/details/warmPool/ModifyWarmPoolModal.d.ts +26 -0
- package/dist/serverGroup/details/warmPool/WarmPoolService.d.ts +6 -0
- package/dist/serverGroup/details/warmPool/index.d.ts +2 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +1 -2
- package/dist/vpc/VpcReader.d.ts +2 -2
- package/dist/vpc/index.d.ts +1 -0
- package/package.json +3 -12
- package/src/aws.module.spec.ts +296 -0
- package/src/aws.module.ts +107 -112
- package/src/aws.services.ts +21 -0
- package/src/certificates/AmazonCertificateReader.ts +1 -1
- package/src/domain/IAmazonServerGroup.ts +9 -0
- package/src/function/CreateLambdaFunction.tsx +29 -16
- package/src/function/configure/Network.tsx +8 -4
- package/src/function/details/AmazonFunctionDetails.tsx +4 -5
- package/src/function/details/FunctionActions.tsx +5 -1
- package/src/function/function.transformer.ts +4 -0
- package/src/image/image.reader.ts +3 -5
- package/src/index.ts +2 -2
- package/src/instance/amazon.instance.write.service.ts +15 -4
- package/src/instance/awsInstanceType.service.spec.js +172 -136
- package/src/instance/awsInstanceType.service.ts +142 -154
- package/src/instance/details/AmazonInstanceDetails.spec.tsx +79 -0
- package/src/instance/details/AmazonInstanceDetails.tsx +644 -0
- package/src/instance/details/InstanceInformation.tsx +11 -14
- package/src/instance/details/InstanceSecurityGroups.tsx +20 -23
- package/src/instance/details/InstanceTags.tsx +5 -3
- package/src/instance/index.ts +1 -0
- package/src/keyPairs/KeyPairsReader.ts +1 -1
- package/src/loadBalancer/AmazonLoadBalancersTag.spec.tsx +39 -0
- package/src/loadBalancer/AmazonLoadBalancersTag.tsx +21 -14
- package/src/loadBalancer/OidcConfigReader.ts +1 -1
- package/src/loadBalancer/TargetGroupDetails.spec.tsx +113 -0
- package/src/loadBalancer/TargetGroupDetails.tsx +287 -7
- package/src/loadBalancer/amazonLoadBalancerDataUtils.ts +21 -21
- package/src/loadBalancer/configure/AmazonLoadBalancerChoiceModal.tsx +17 -4
- package/src/loadBalancer/configure/LoadBalancerTypes.ts +7 -4
- package/src/loadBalancer/configure/application/ALBListeners.tsx +1 -2
- package/src/loadBalancer/configure/application/CreateApplicationLoadBalancer.tsx +28 -18
- package/src/loadBalancer/configure/classic/CreateClassicLoadBalancer.tsx +29 -19
- package/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +1 -1
- package/src/loadBalancer/configure/common/SecurityGroups.spec.tsx +27 -0
- package/src/loadBalancer/configure/common/SecurityGroups.tsx +11 -5
- package/src/loadBalancer/configure/network/CreateNetworkLoadBalancer.tsx +28 -18
- package/src/loadBalancer/details/LoadBalancerActions.tsx +19 -5
- package/src/loadBalancer/details/amazonLoadBalancerDetails.spec.tsx +141 -0
- package/src/loadBalancer/details/amazonLoadBalancerDetails.tsx +599 -0
- package/src/loadBalancer/index.ts +1 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +3 -4
- package/src/pipeline/stages/AmazonStageConfig.spec.tsx +103 -0
- package/src/pipeline/stages/AmazonStageConfig.tsx +259 -0
- package/src/pipeline/stages/bake/AwsBakeStageConfig.tsx +708 -0
- package/src/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.tsx +275 -0
- package/src/pipeline/stages/deleteLambda/index.ts +2 -6
- package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +14 -33
- package/src/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.tsx +264 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.spec.tsx +403 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.ts +21 -29
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.ts +1 -11
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.tsx +4 -3
- package/src/pipeline/stages/deployLambda/components/NetworkForm.tsx +3 -6
- package/src/pipeline/stages/deployLambda/index.ts +2 -6
- package/src/pipeline/stages/destroyAsg/awsDestroyAsgStage.js +28 -65
- package/src/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.tsx +103 -0
- package/src/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.tsx +119 -0
- package/src/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.tsx +98 -0
- package/src/pipeline/stages/findAmi/awsFindAmiStage.js +22 -79
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.spec.tsx +122 -0
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.tsx +71 -0
- package/src/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.js +17 -32
- package/src/pipeline/stages/invokeLambda/index.ts +2 -6
- package/src/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.tsx +146 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.js +27 -98
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.spec.tsx +167 -0
- package/src/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.tsx +157 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.js +26 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.spec.tsx +89 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.spec.tsx +617 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.tsx +340 -0
- package/src/pipeline/stages/resizeAsg/awsResizeAsgStage.js +34 -125
- package/src/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.tsx +129 -0
- package/src/pipeline/stages/routeLambda/index.ts +2 -6
- package/src/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.tsx +121 -0
- package/src/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.tsx +136 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.spec.tsx +167 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.tsx +94 -0
- package/src/pipeline/stages/updateCodeLambda/index.ts +2 -6
- package/src/routerConsumers.spec.tsx +207 -0
- package/src/search/searchResultFormatter.ts +9 -16
- package/src/securityGroup/configure/AmazonSecurityGroupModal.spec.tsx +170 -0
- package/src/securityGroup/configure/AmazonSecurityGroupModal.tsx +440 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.spec.tsx +62 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.tsx +444 -0
- package/src/securityGroup/details/IPRangeRules.tsx +1 -1
- package/src/securityGroup/details/index.ts +1 -0
- package/src/securityGroup/index.ts +1 -0
- package/src/securityGroup/securityGroup.reader.ts +0 -5
- package/src/securityGroup/securityGroup.transformer.ts +35 -0
- package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +104 -80
- package/src/serverGroup/configure/AmazonImageSelectInput.tsx +37 -18
- package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +28 -66
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +476 -465
- package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +76 -124
- package/src/serverGroup/configure/serverGroupConfiguration.service.ts +106 -103
- package/src/serverGroup/configure/wizard/AmazonCloneServerGroupModal.tsx +65 -25
- package/src/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.tsx +3 -3
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.tsx +2 -2
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.spec.tsx +105 -0
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.tsx +20 -6
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.spec.tsx +39 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +10 -9
- package/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +2 -2
- package/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +5 -2
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.spec.tsx +53 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +35 -33
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.spec.tsx +20 -0
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.tsx +9 -4
- package/src/serverGroup/details/AmazonServerGroupActions.spec.tsx +186 -0
- package/src/serverGroup/details/AmazonServerGroupActions.tsx +37 -87
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.spec.tsx +110 -0
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.tsx +117 -0
- package/src/serverGroup/details/advancedSettings/index.ts +1 -0
- package/src/serverGroup/details/amazonServerGroupDetailsGetter.ts +4 -4
- package/src/serverGroup/details/resize/AmazonResizeServerGroupModal.tsx +16 -6
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.spec.tsx +285 -0
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.tsx +449 -0
- package/src/serverGroup/details/rollback/index.ts +2 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.spec.ts +101 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.ts +81 -0
- package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +4 -4
- package/src/serverGroup/details/scalingPolicy/ScalingPolicyWriter.ts +2 -5
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.tsx +0 -2
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.spec.tsx +74 -0
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.tsx +140 -0
- package/src/serverGroup/details/scalingProcesses/index.ts +2 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.spec.tsx +115 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.tsx +205 -0
- package/src/serverGroup/details/scheduledActions/index.ts +1 -0
- package/src/serverGroup/details/sections/AdvancedSettingsDetailsSection.tsx +7 -14
- package/src/serverGroup/details/sections/AmazonCapacityDetailsSection.tsx +14 -2
- package/src/serverGroup/details/sections/AmazonServerGroupMaintenanceActions.spec.tsx +148 -0
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/ScalingProcessesDetailsSection.tsx +8 -20
- package/src/serverGroup/details/sections/ScheduledActionsDetailsSection.tsx +7 -12
- package/src/serverGroup/details/sections/SecurityGroupsDetailsSection.tsx +14 -19
- package/src/serverGroup/details/sections/WarmPoolDetailsSection.tsx +44 -0
- package/src/serverGroup/details/sections/index.ts +1 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.spec.tsx +161 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.tsx +177 -0
- package/src/serverGroup/details/securityGroups/index.ts +1 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.spec.tsx +69 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.tsx +191 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.spec.ts +30 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.ts +15 -0
- package/src/serverGroup/details/warmPool/index.ts +2 -0
- package/src/serverGroup/serverGroup.transformer.ts +1 -6
- package/src/vpc/VpcReader.ts +2 -2
- package/src/vpc/index.ts +1 -0
- package/dist/common/common.module.d.ts +0 -1
- package/dist/common/footer.component.d.ts +0 -1
- package/dist/function/function.module.d.ts +0 -1
- package/dist/instance/details/amazonInstanceInformation.component.d.ts +0 -1
- package/dist/instance/details/instance.details.controller.d.ts +0 -2
- package/dist/instance/details/instanceDns.component.d.ts +0 -1
- package/dist/instance/details/instanceSecurityGroups.component.d.ts +0 -1
- package/dist/instance/details/instanceStatus.component.d.ts +0 -1
- package/dist/instance/details/instanceTags.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerActions.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerDetails.controller.d.ts +0 -41
- package/dist/loadBalancer/details/targetGroupDetails.controller.d.ts +0 -30
- package/dist/loadBalancer/loadBalancer.module.d.ts +0 -1
- package/dist/loadBalancer/targetGroup.states.d.ts +0 -1
- package/dist/pipeline/stages/bake/awsBakeStage.d.ts +0 -2
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +0 -2
- package/dist/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.d.ts +0 -2
- package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts +0 -1
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.d.ts +0 -25
- package/dist/pipeline/stages/disableAsg/awsDisableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/disableCluster/awsDisableClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/enableAsg/awsEnableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/rollbackCluster/awsRollbackClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/shrinkCluster/awsShrinkClusterStage.d.ts +0 -2
- package/dist/reactShims/aws.react.injector.d.ts +0 -18
- package/dist/reactShims/aws.react.module.d.ts +0 -1
- package/dist/reactShims/index.d.ts +0 -1
- package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +0 -2
- package/dist/securityGroup/configure/CreateSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/EditSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/configSecurityGroup.mixin.controller.d.ts +0 -2
- package/dist/securityGroup/configure/ingressRuleGroupSelector.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.d.ts +0 -10
- package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +0 -2
- package/dist/securityGroup/details/securityGroupIpRangeRules.component.d.ts +0 -1
- package/dist/securityGroup/securityGroup.module.d.ts +0 -1
- package/dist/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +0 -2
- package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicySummary.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.d.ts +0 -2
- package/dist/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/serverGroupDetails.module.d.ts +0 -1
- package/dist/subnet/subnet.renderer.d.ts +0 -5
- package/dist/vpc/vpc.module.d.ts +0 -1
- package/src/applicationProviderFields/awsFields.html +0 -13
- package/src/common/common.module.ts +0 -6
- package/src/common/footer.component.ts +0 -29
- package/src/function/function.module.ts +0 -5
- package/src/image/image.reader.spec.ts +0 -75
- package/src/instance/details/amazonInstanceInformation.component.ts +0 -13
- package/src/instance/details/instance.details.controller.js +0 -586
- package/src/instance/details/instance.details.controller.spec.js +0 -133
- package/src/instance/details/instanceDetails.html +0 -65
- package/src/instance/details/instanceDns.component.ts +0 -21
- package/src/instance/details/instanceSecurityGroups.component.ts +0 -13
- package/src/instance/details/instanceStatus.component.ts +0 -19
- package/src/instance/details/instanceTags.component.ts +0 -13
- package/src/loadBalancer/details/loadBalancerActions.component.ts +0 -16
- package/src/loadBalancer/details/loadBalancerDetails.controller.spec.ts +0 -76
- package/src/loadBalancer/details/loadBalancerDetails.controller.ts +0 -240
- package/src/loadBalancer/details/loadBalancerDetails.html +0 -266
- package/src/loadBalancer/details/targetGroupDetails.controller.ts +0 -95
- package/src/loadBalancer/details/targetGroupDetails.html +0 -138
- package/src/loadBalancer/loadBalancer.module.ts +0 -15
- package/src/loadBalancer/targetGroup.states.ts +0 -55
- package/src/pipeline/stages/bake/awsBakeStage.js +0 -219
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +0 -43
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +0 -65
- package/src/pipeline/stages/bake/bakeStage.html +0 -205
- package/src/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.js +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +0 -1
- package/src/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.ts +0 -46
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.ts +0 -84
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.html +0 -84
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +0 -9
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableAsg/awsDisableAsgStage.js +0 -69
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +0 -11
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableCluster/awsDisableClusterStage.js +0 -84
- package/src/pipeline/stages/disableCluster/disableClusterStage.html +0 -26
- package/src/pipeline/stages/enableAsg/awsEnableAsgStage.js +0 -73
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +0 -11
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/findAmi/findAmiStage.html +0 -24
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +0 -44
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +0 -11
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessExecutionDetails.html +0 -36
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.html +0 -24
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +0 -90
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +0 -4
- package/src/pipeline/stages/rollbackCluster/awsRollbackClusterStage.js +0 -66
- package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html +0 -43
- package/src/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.js +0 -78
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +0 -35
- package/src/pipeline/stages/shrinkCluster/awsShrinkClusterStage.js +0 -73
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +0 -34
- package/src/pipeline/stages/tagImage/awsTagImageStage.js +0 -34
- package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +0 -38
- package/src/pipeline/stages/tagImage/tagImageStage.html +0 -10
- package/src/reactShims/aws.react.injector.ts +0 -25
- package/src/reactShims/aws.react.module.ts +0 -12
- package/src/reactShims/index.ts +0 -1
- package/src/securityGroup/clone/cloneSecurityGroup.controller.js +0 -106
- package/src/securityGroup/clone/cloneSecurityGroup.html +0 -19
- package/src/securityGroup/configure/CreateSecurityGroup.controller.spec.js +0 -307
- package/src/securityGroup/configure/CreateSecurityGroupCtrl.js +0 -47
- package/src/securityGroup/configure/EditSecurityGroupCtrl.js +0 -115
- package/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +0 -366
- package/src/securityGroup/configure/createSecurityGroup.html +0 -19
- package/src/securityGroup/configure/createSecurityGroupIngress.html +0 -100
- package/src/securityGroup/configure/createSecurityGroupProperties.html +0 -123
- package/src/securityGroup/configure/editSecurityGroup.html +0 -20
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.html +0 -77
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.less +0 -6
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.ts +0 -190
- package/src/securityGroup/configure/securityGroupDetailsCustom.component.ts +0 -16
- package/src/securityGroup/configure/securityGroupDetailsCustom.tsx +0 -16
- package/src/securityGroup/details/securityGroupDetail.controller.js +0 -249
- package/src/securityGroup/details/securityGroupDetail.html +0 -114
- package/src/securityGroup/details/securityGroupIpRangeRules.component.ts +0 -12
- package/src/securityGroup/securityGroup.module.ts +0 -26
- package/src/securityGroup/securityGroup.transformer.js +0 -48
- package/src/serverGroup/configure/serverGroupConfiguration.service.spec.ts +0 -478
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.js +0 -47
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.html +0 -79
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +0 -146
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +0 -139
- package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +0 -15
- package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +0 -6
- package/src/serverGroup/details/scalingPolicy/scalingPolicySummary.component.ts +0 -14
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/dimensionsEditor.less +0 -18
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.js +0 -95
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.spec.js +0 -106
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.html +0 -30
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.js +0 -70
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.html +0 -89
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.js +0 -95
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.html +0 -40
- package/src/serverGroup/details/serverGroupDetails.module.ts +0 -18
- package/src/serverGroup/serverGroup.transformer.spec.ts +0 -185
- package/src/subnet/SubnetSelectInput.spec.tsx +0 -91
- package/src/subnet/subnet.renderer.ts +0 -12
- package/src/vpc/vpc.module.ts +0 -9
|
@@ -1,101 +1,125 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { mount, shallow } from 'enzyme';
|
|
1
|
+
import type { ReactWrapper } from 'enzyme';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
4
3
|
import React from 'react';
|
|
4
|
+
import { act } from 'react-dom/test-utils';
|
|
5
5
|
|
|
6
|
-
import { Application } from '@spinnaker/core';
|
|
7
|
-
import {
|
|
6
|
+
import type { Application, TetheredSelect as TetheredSelectType } from '@spinnaker/core';
|
|
7
|
+
import { TetheredSelect } from '@spinnaker/core';
|
|
8
8
|
|
|
9
|
-
import type { IAmazonImageSelectorProps, IAmazonImageSelectorState } from './AmazonImageSelectInput';
|
|
10
9
|
import { AmazonImageSelectInput } from './AmazonImageSelectInput';
|
|
11
|
-
// eslint-disable-next-line @spinnaker/import-from-npm-not-relative
|
|
12
|
-
import { mockHttpClient } from '../../../../core/src/api/mock/jasmine';
|
|
13
10
|
import type { IAmazonImage } from '../../image';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
11
|
+
import { AwsImageReader } from '../../image';
|
|
12
|
+
|
|
13
|
+
function makeImage(imageName: string, amiId: string, region = 'us-east-1'): IAmazonImage {
|
|
14
|
+
return {
|
|
15
|
+
imageName,
|
|
16
|
+
amis: { [region]: [amiId] },
|
|
17
|
+
attributes: { virtualizationType: 'hvm', architecture: 'x86_64', creationDate: '2024-01-01T00:00:00.000Z' },
|
|
18
|
+
} as IAmazonImage;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
describe('AmazonImageSelectInput', () => {
|
|
22
|
+
const application = ({ name: 'app' } as unknown) as Application;
|
|
23
|
+
const image1 = makeImage('app-package-1.0', 'ami-111');
|
|
24
|
+
const image2 = makeImage('app-package-2.0', 'ami-222');
|
|
25
|
+
|
|
26
|
+
beforeEach(() => {
|
|
27
|
+
spyOn(AwsImageReader.prototype, 'findImages').and.returnValue(Promise.resolve([image1, image2]));
|
|
28
|
+
spyOn(AwsImageReader.prototype, 'getImage').and.returnValue(Promise.resolve(null));
|
|
30
29
|
});
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
value: {} as IAmazonImage,
|
|
37
|
-
onChange: () => null as any,
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
describe('fetches package images when mounted', () => {
|
|
41
|
-
it('using application name when no amiId is present in the initial value', async () => {
|
|
42
|
-
const http = mockHttpClient();
|
|
43
|
-
http.expectGET(`/images/find?q=testapp*`).respond(200, []);
|
|
44
|
-
shallowComponent = shallow(<AmazonImageSelectInput {...baseProps} />);
|
|
45
|
-
await http.flush();
|
|
31
|
+
async function settle(component: ReactWrapper): Promise<void> {
|
|
32
|
+
await act(async () => {
|
|
33
|
+
await Promise.resolve();
|
|
34
|
+
await Promise.resolve();
|
|
46
35
|
});
|
|
36
|
+
component.update();
|
|
37
|
+
}
|
|
47
38
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
39
|
+
// The package-images dropdown's menu is only rendered by the underlying react-select
|
|
40
|
+
// instance once it's open, which normally happens via a real focus/mousedown DOM event.
|
|
41
|
+
// Driving the TetheredSelect instance directly is more reliable than simulating focus in a
|
|
42
|
+
// detached test DOM, and it's how a user's click on the control ultimately manifests anyway.
|
|
43
|
+
function openMenu(component: ReactWrapper): void {
|
|
44
|
+
(component.find(TetheredSelect).instance() as TetheredSelectType).setState({ isOpen: true });
|
|
45
|
+
component.update();
|
|
46
|
+
}
|
|
56
47
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
48
|
+
function mountInput(onChange: (image: IAmazonImage) => void, value: IAmazonImage = null) {
|
|
49
|
+
return mount(
|
|
50
|
+
<AmazonImageSelectInput
|
|
51
|
+
onChange={onChange}
|
|
52
|
+
value={value}
|
|
53
|
+
application={application}
|
|
54
|
+
credentials="test"
|
|
55
|
+
region="us-east-1"
|
|
56
|
+
/>,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
65
59
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
60
|
+
it('renders a single options menu wrapper, not a nested duplicate', async () => {
|
|
61
|
+
const component = mountInput(jasmine.createSpy('onChange'));
|
|
62
|
+
await settle(component);
|
|
63
|
+
openMenu(component);
|
|
64
|
+
|
|
65
|
+
// Regression test: buildImageMenu used to re-wrap its options in a second
|
|
66
|
+
// ".Select-menu-outer > .Select-menu" pair on top of react-select's own wrapper. The inner
|
|
67
|
+
// duplicate kept its default `position: absolute` styling instead of the `position: static`
|
|
68
|
+
// override TetheredSelect applies to the outermost wrapper, which broke the sizing/hit-testing
|
|
69
|
+
// of the real, Tether-positioned menu: the list was visible but clicks landed on nothing.
|
|
70
|
+
expect(component.find('.Select-menu-outer').length).toBe(1);
|
|
74
71
|
});
|
|
75
72
|
|
|
76
|
-
it('
|
|
77
|
-
const http = mockHttpClient();
|
|
78
|
-
const value = AmazonImageSelectInput.makeFakeImage(imageName, amiId, region);
|
|
79
|
-
const backendValue = AmazonImageSelectInput.makeFakeImage(imageName, amiId, region);
|
|
73
|
+
it('selects the clicked image from the package images dropdown', async () => {
|
|
80
74
|
const onChange = jasmine.createSpy('onChange');
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
await http.flush();
|
|
75
|
+
const component = mountInput(onChange);
|
|
76
|
+
await settle(component);
|
|
77
|
+
openMenu(component);
|
|
85
78
|
|
|
86
|
-
|
|
79
|
+
const options = component.find('.Select-option');
|
|
80
|
+
expect(options.length).toBe(2);
|
|
81
|
+
options.first().simulate('mousedown');
|
|
82
|
+
|
|
83
|
+
expect(onChange).toHaveBeenCalledWith(jasmine.objectContaining({ imageName: image1.imageName }));
|
|
87
84
|
});
|
|
88
85
|
|
|
89
|
-
it('
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
it('provides a way back from "Search All Images" to the package images dropdown', async () => {
|
|
87
|
+
const component = mountInput(jasmine.createSpy('onChange'));
|
|
88
|
+
await settle(component);
|
|
89
|
+
|
|
90
|
+
expect(component.text()).toContain('Pick an image');
|
|
91
|
+
|
|
92
|
+
component.find('button.link').simulate('click');
|
|
93
|
+
component.update();
|
|
94
|
+
expect(component.text()).toContain('Search for an image');
|
|
95
|
+
|
|
96
|
+
// Regression test: there used to be no control to switch back out of search-all-images mode.
|
|
97
|
+
const backButton = component.find('button.link');
|
|
98
|
+
expect(backButton.text()).toContain('Back to Package Images');
|
|
99
|
+
backButton.simulate('click');
|
|
100
|
+
component.update();
|
|
101
|
+
|
|
102
|
+
expect(component.text()).toContain('Pick an image');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('selects the clicked image while searching all images', async () => {
|
|
95
106
|
const onChange = jasmine.createSpy('onChange');
|
|
96
|
-
|
|
97
|
-
await
|
|
107
|
+
const component = mountInput(onChange);
|
|
108
|
+
await settle(component);
|
|
109
|
+
|
|
110
|
+
component.find('button.link').simulate('click');
|
|
111
|
+
component.update();
|
|
112
|
+
|
|
113
|
+
// Populate search results directly, bypassing the debounced RxJS search pipeline, which is
|
|
114
|
+
// not what this test is exercising.
|
|
115
|
+
(component.instance() as AmazonImageSelectInput).setState({ searchString: 'app', searchResults: [image2] });
|
|
116
|
+
component.update();
|
|
117
|
+
openMenu(component);
|
|
118
|
+
|
|
119
|
+
const options = component.find('.Select-option');
|
|
120
|
+
expect(options.length).toBe(1);
|
|
121
|
+
options.first().simulate('mousedown');
|
|
98
122
|
|
|
99
|
-
expect(onChange).toHaveBeenCalledWith(
|
|
123
|
+
expect(onChange).toHaveBeenCalledWith(jasmine.objectContaining({ imageName: image2.imageName }));
|
|
100
124
|
});
|
|
101
125
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { $q } from 'ngimport';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import type { HandlerRendererResult, MenuRendererProps, Option, OptionValues, ReactSelectProps } from 'react-select';
|
|
4
3
|
import {
|
|
@@ -40,7 +39,7 @@ export class AmazonImageSelectInput extends React.Component<IAmazonImageSelector
|
|
|
40
39
|
errorMessage: null,
|
|
41
40
|
selectionMode: 'packageImages',
|
|
42
41
|
searchString: '',
|
|
43
|
-
searchResults:
|
|
42
|
+
searchResults: [],
|
|
44
43
|
isSearching: false,
|
|
45
44
|
packageImages: null,
|
|
46
45
|
isLoadingPackageImages: true,
|
|
@@ -64,7 +63,7 @@ export class AmazonImageSelectInput extends React.Component<IAmazonImageSelector
|
|
|
64
63
|
return { imageName, amis, attributes } as IAmazonImage;
|
|
65
64
|
}
|
|
66
65
|
|
|
67
|
-
private loadImagesFromApplicationName(application: Application):
|
|
66
|
+
private loadImagesFromApplicationName(application: Application): Promise<IAmazonImage[]> {
|
|
68
67
|
const query = application.name.replace(/_/g, '[_\\-]') + '*';
|
|
69
68
|
return this.awsImageReader.findImages({ q: query });
|
|
70
69
|
}
|
|
@@ -82,13 +81,15 @@ export class AmazonImageSelectInput extends React.Component<IAmazonImageSelector
|
|
|
82
81
|
return tooShort ? null : packageBase + (addDashToQuery ? '-*' : '*');
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
private loadImageById(imageId: string, region: string, credentials: string):
|
|
86
|
-
return !imageId
|
|
84
|
+
private loadImageById(imageId: string, region: string, credentials: string): Promise<IAmazonImage> {
|
|
85
|
+
return !imageId
|
|
86
|
+
? Promise.resolve(null)
|
|
87
|
+
: this.awsImageReader.getImage(imageId, region, credentials).catch(() => null);
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
private searchForImages(query: string):
|
|
90
|
+
private searchForImages(query: string): Promise<IAmazonImage[]> {
|
|
90
91
|
const hasMinLength = query && query.length >= 3;
|
|
91
|
-
return hasMinLength ? this.awsImageReader.findImages({ q: query }) :
|
|
92
|
+
return hasMinLength ? this.awsImageReader.findImages({ q: query }) : Promise.resolve([]);
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
private fetchPackageImages(
|
|
@@ -96,7 +97,7 @@ export class AmazonImageSelectInput extends React.Component<IAmazonImageSelector
|
|
|
96
97
|
region: string,
|
|
97
98
|
credentials: string,
|
|
98
99
|
application: Application,
|
|
99
|
-
):
|
|
100
|
+
): Promise<IAmazonImage[]> {
|
|
100
101
|
const imageId = value && value.amis && value.amis[region] && value.amis[region][0];
|
|
101
102
|
|
|
102
103
|
return this.loadImageById(imageId, region, credentials).then((image) => {
|
|
@@ -214,15 +215,19 @@ export class AmazonImageSelectInput extends React.Component<IAmazonImageSelector
|
|
|
214
215
|
private buildImageMenu = (params: MenuRendererProps): HandlerRendererResult => {
|
|
215
216
|
const { ImageMenuHeading, ImageLabel } = this;
|
|
216
217
|
const { options } = params;
|
|
218
|
+
// Note: react-select's renderOuter() already wraps whatever this returns in its own
|
|
219
|
+
// ".Select-menu-outer > .Select-menu" pair (which is what TetheredSelect repositions
|
|
220
|
+
// via Tether). Re-wrapping here duplicates that structure with a second ".Select-menu-outer",
|
|
221
|
+
// which keeps its default `position: absolute` styling and collapses the real, tethered
|
|
222
|
+
// container's height - the list still renders, but the clickable area no longer lines up
|
|
223
|
+
// with what's painted on screen, so selecting an option silently does nothing.
|
|
217
224
|
return (
|
|
218
|
-
|
|
219
|
-
<
|
|
220
|
-
|
|
221
|
-
{
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
225
|
+
<>
|
|
226
|
+
{options.length > 0 && <ImageMenuHeading />}
|
|
227
|
+
{options.map((o) => (
|
|
228
|
+
<ImageLabel key={o.imageName} option={o} params={params} />
|
|
229
|
+
))}
|
|
230
|
+
</>
|
|
226
231
|
);
|
|
227
232
|
};
|
|
228
233
|
|
|
@@ -269,7 +274,13 @@ export class AmazonImageSelectInput extends React.Component<IAmazonImageSelector
|
|
|
269
274
|
return (
|
|
270
275
|
<div
|
|
271
276
|
key={option.imageName}
|
|
272
|
-
|
|
277
|
+
onMouseDown={(event) => {
|
|
278
|
+
// Match react-select's own Option component: select on mousedown (not click) and
|
|
279
|
+
// prevent the default browser action so the input doesn't blur/close the menu first.
|
|
280
|
+
event.preventDefault();
|
|
281
|
+
event.stopPropagation();
|
|
282
|
+
params.selectValue(option);
|
|
283
|
+
}}
|
|
273
284
|
onMouseOver={() => params.focusOption(option)}
|
|
274
285
|
className={`Select-option ${
|
|
275
286
|
params.focusedOption && params.focusedOption.imageName === option.imageName ? 'is-focused' : ''
|
|
@@ -358,7 +369,7 @@ export class AmazonImageSelectInput extends React.Component<IAmazonImageSelector
|
|
|
358
369
|
placeholder="Search for an image..."
|
|
359
370
|
filterOptions={false as any}
|
|
360
371
|
noResultsText={searchNoResultsText}
|
|
361
|
-
options={searchResults}
|
|
372
|
+
options={searchResults ?? []}
|
|
362
373
|
onInputChange={(searchInput) => {
|
|
363
374
|
this.searchInput$.next(searchInput);
|
|
364
375
|
return searchInput;
|
|
@@ -366,6 +377,14 @@ export class AmazonImageSelectInput extends React.Component<IAmazonImageSelector
|
|
|
366
377
|
onChange={onChange}
|
|
367
378
|
/>
|
|
368
379
|
{error}
|
|
380
|
+
<button
|
|
381
|
+
type="button"
|
|
382
|
+
className="link"
|
|
383
|
+
onClick={() => this.setState({ selectionMode: 'packageImages', searchString: '', searchResults: null })}
|
|
384
|
+
>
|
|
385
|
+
Back to Package Images
|
|
386
|
+
</button>{' '}
|
|
387
|
+
<HelpField id="aws.serverGroup.allImages" />
|
|
369
388
|
</div>
|
|
370
389
|
);
|
|
371
390
|
} else if (isPackageImagesLoaded) {
|
|
@@ -9,20 +9,18 @@ import {
|
|
|
9
9
|
mockLaunchTemplateData,
|
|
10
10
|
mockServerGroup,
|
|
11
11
|
} from '@spinnaker/mocks';
|
|
12
|
+
import { createAwsServerGroupCommandBuilder } from './serverGroupCommandBuilder.service';
|
|
12
13
|
|
|
13
14
|
describe('Service: awsServerGroup', function () {
|
|
14
|
-
beforeEach(window.module(require('./serverGroupCommandBuilder.service').name));
|
|
15
|
-
|
|
16
15
|
let instanceTypeService;
|
|
17
|
-
beforeEach(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
);
|
|
16
|
+
beforeEach(function () {
|
|
17
|
+
instanceTypeService = {
|
|
18
|
+
getCategoryForMultipleInstanceTypes: jasmine
|
|
19
|
+
.createSpy('getCategoryForMultipleInstanceTypes')
|
|
20
|
+
.and.returnValue(Promise.resolve('custom')),
|
|
21
|
+
};
|
|
22
|
+
this.service = createAwsServerGroupCommandBuilder(instanceTypeService);
|
|
23
|
+
});
|
|
26
24
|
|
|
27
25
|
afterEach(AWSProviderSettings.resetToOriginal);
|
|
28
26
|
|
|
@@ -46,44 +44,30 @@ describe('Service: awsServerGroup', function () {
|
|
|
46
44
|
region: 'us-east-1',
|
|
47
45
|
};
|
|
48
46
|
|
|
49
|
-
spyOn(AccountService, 'getAvailabilityZonesForAccountAndRegion').and.returnValue(
|
|
47
|
+
spyOn(AccountService, 'getAvailabilityZonesForAccountAndRegion').and.returnValue(Promise.resolve(['d', 'g']));
|
|
50
48
|
|
|
51
49
|
spyOn(AccountService, 'getCredentialsKeyedByAccount').and.returnValue(
|
|
52
|
-
|
|
50
|
+
Promise.resolve({
|
|
53
51
|
test: ['us-east-1', 'us-west-1'],
|
|
54
52
|
prod: ['us-west-1', 'eu-west-1'],
|
|
55
53
|
}),
|
|
56
54
|
);
|
|
57
55
|
});
|
|
58
56
|
|
|
59
|
-
it('applies account, region from cluster', function () {
|
|
60
|
-
|
|
61
|
-
this.service.buildServerGroupCommandFromPipeline({}, this.cluster).then(function (result) {
|
|
62
|
-
command = result;
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
this.$scope.$digest();
|
|
57
|
+
it('applies account, region from cluster', async function () {
|
|
58
|
+
const command = await this.service.buildServerGroupCommandFromPipeline({}, this.cluster);
|
|
66
59
|
|
|
67
60
|
expect(command.credentials).toBe('prod');
|
|
68
61
|
expect(command.region).toBe('us-west-1');
|
|
69
62
|
});
|
|
70
63
|
|
|
71
|
-
it('sets usePreferredZones', function () {
|
|
72
|
-
|
|
73
|
-
this.service.buildServerGroupCommandFromPipeline({}, this.cluster).then(function (result) {
|
|
74
|
-
command = result;
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
this.$scope.$digest();
|
|
64
|
+
it('sets usePreferredZones', async function () {
|
|
65
|
+
let command = await this.service.buildServerGroupCommandFromPipeline({}, this.cluster);
|
|
78
66
|
expect(command.viewState.usePreferredZones).toBe(true);
|
|
79
67
|
|
|
80
68
|
// remove an availability zone, should be false
|
|
81
69
|
this.cluster.availabilityZones['us-west-1'].pop();
|
|
82
|
-
this.service.buildServerGroupCommandFromPipeline({}, this.cluster)
|
|
83
|
-
command = result;
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
this.$scope.$digest();
|
|
70
|
+
command = await this.service.buildServerGroupCommandFromPipeline({}, this.cluster);
|
|
87
71
|
expect(command.viewState.usePreferredZones).toBe(false);
|
|
88
72
|
});
|
|
89
73
|
|
|
@@ -136,12 +120,8 @@ describe('Service: awsServerGroup', function () {
|
|
|
136
120
|
];
|
|
137
121
|
|
|
138
122
|
clusters.forEach((test) => {
|
|
139
|
-
it(`cluster with ${test.desc}`, function () {
|
|
140
|
-
|
|
141
|
-
this.service.buildServerGroupCommandFromPipeline({}, test.cluster).then(function (result) {
|
|
142
|
-
actualCommand = result;
|
|
143
|
-
});
|
|
144
|
-
this.$scope.$digest();
|
|
123
|
+
it(`cluster with ${test.desc}`, async function () {
|
|
124
|
+
const actualCommand = await this.service.buildServerGroupCommandFromPipeline({}, test.cluster);
|
|
145
125
|
|
|
146
126
|
expect(instanceTypeService.getCategoryForMultipleInstanceTypes).toHaveBeenCalledWith(
|
|
147
127
|
'aws',
|
|
@@ -157,11 +137,11 @@ describe('Service: awsServerGroup', function () {
|
|
|
157
137
|
|
|
158
138
|
describe('buildServerGroupCommandFromExisting', function () {
|
|
159
139
|
beforeEach(function () {
|
|
160
|
-
spyOn(AccountService, 'getPreferredZonesByAccount').and.returnValue(
|
|
161
|
-
spyOn(SubnetReader, 'listSubnets').and.returnValue(
|
|
140
|
+
spyOn(AccountService, 'getPreferredZonesByAccount').and.returnValue(Promise.resolve([]));
|
|
141
|
+
spyOn(SubnetReader, 'listSubnets').and.returnValue(Promise.resolve([]));
|
|
162
142
|
});
|
|
163
143
|
|
|
164
|
-
it('retains non-core suspended processes', function () {
|
|
144
|
+
it('retains non-core suspended processes', async function () {
|
|
165
145
|
var serverGroup = {
|
|
166
146
|
asg: {
|
|
167
147
|
availabilityZones: [],
|
|
@@ -175,16 +155,11 @@ describe('Service: awsServerGroup', function () {
|
|
|
175
155
|
},
|
|
176
156
|
launchTemplate: mockLaunchTemplate,
|
|
177
157
|
};
|
|
178
|
-
|
|
179
|
-
this.service.buildServerGroupCommandFromExisting({}, serverGroup).then(function (result) {
|
|
180
|
-
command = result;
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
this.$scope.$digest();
|
|
158
|
+
const command = await this.service.buildServerGroupCommandFromExisting({}, serverGroup);
|
|
184
159
|
expect(command.suspendedProcesses).toEqual(['AZRebalance']);
|
|
185
160
|
});
|
|
186
161
|
|
|
187
|
-
it('sets source capacity flags when creating for pipeline', function () {
|
|
162
|
+
it('sets source capacity flags when creating for pipeline', async function () {
|
|
188
163
|
var serverGroup = {
|
|
189
164
|
asg: {
|
|
190
165
|
availabilityZones: [],
|
|
@@ -193,12 +168,7 @@ describe('Service: awsServerGroup', function () {
|
|
|
193
168
|
},
|
|
194
169
|
launchTemplate: mockLaunchTemplate,
|
|
195
170
|
};
|
|
196
|
-
|
|
197
|
-
this.service.buildServerGroupCommandFromExisting({}, serverGroup, 'editPipeline').then(function (result) {
|
|
198
|
-
command = result;
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
this.$scope.$digest();
|
|
171
|
+
const command = await this.service.buildServerGroupCommandFromExisting({}, serverGroup, 'editPipeline');
|
|
202
172
|
|
|
203
173
|
expect(command.viewState.useSimpleCapacity).toBe(false);
|
|
204
174
|
expect(command.useSourceCapacity).toBe(true);
|
|
@@ -390,12 +360,8 @@ describe('Service: awsServerGroup', function () {
|
|
|
390
360
|
];
|
|
391
361
|
|
|
392
362
|
[...serverGroupsWithoutMip, ...serverGroupsWithMip].forEach((test) => {
|
|
393
|
-
it(`extracts instanceProfile, instanceType and useSimpleInstanceTypeSelector from server group with ${test.desc} correctly`, function () {
|
|
394
|
-
|
|
395
|
-
this.service.buildServerGroupCommandFromExisting({}, test.sg, 'clone').then(function (result) {
|
|
396
|
-
actualCommand = result;
|
|
397
|
-
});
|
|
398
|
-
this.$scope.$digest();
|
|
363
|
+
it(`extracts instanceProfile, instanceType and useSimpleInstanceTypeSelector from server group with ${test.desc} correctly`, async function () {
|
|
364
|
+
const actualCommand = await this.service.buildServerGroupCommandFromExisting({}, test.sg, 'clone');
|
|
399
365
|
|
|
400
366
|
expect(instanceTypeService.getCategoryForMultipleInstanceTypes).toHaveBeenCalledWith(
|
|
401
367
|
'aws',
|
|
@@ -410,12 +376,8 @@ describe('Service: awsServerGroup', function () {
|
|
|
410
376
|
});
|
|
411
377
|
|
|
412
378
|
serverGroupsWithMip.forEach((test) => {
|
|
413
|
-
it(`extracts launchTemplateOverridesForInstanceType and sets explicit priority correctly for server group with ${test.desc}`, function () {
|
|
414
|
-
|
|
415
|
-
this.service.buildServerGroupCommandFromExisting({}, test.sg, 'clone').then(function (result) {
|
|
416
|
-
actualCommand = result;
|
|
417
|
-
});
|
|
418
|
-
this.$scope.$digest();
|
|
379
|
+
it(`extracts launchTemplateOverridesForInstanceType and sets explicit priority correctly for server group with ${test.desc}`, async function () {
|
|
380
|
+
const actualCommand = await this.service.buildServerGroupCommandFromExisting({}, test.sg, 'clone');
|
|
419
381
|
|
|
420
382
|
expect(
|
|
421
383
|
_.isEqual(
|