@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
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { shallow } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { Application, ISecurityGroup } from '@spinnaker/core';
|
|
5
|
+
import { FirewallLabels } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
import type { IAmazonServerGroupView } from '../../../domain';
|
|
8
|
+
import { AWSProviderSettings } from '../../../aws.settings';
|
|
9
|
+
import { EditAsgAdvancedSettingsModal } from '../advancedSettings';
|
|
10
|
+
import { ModifyScalingProcessesModal } from '../scalingProcesses';
|
|
11
|
+
import { EditScheduledActionsModal } from '../scheduledActions';
|
|
12
|
+
import { EditSecurityGroupsModal } from '../securityGroups';
|
|
13
|
+
import { AdvancedSettingsDetailsSection } from './AdvancedSettingsDetailsSection';
|
|
14
|
+
import { ScalingProcessesDetailsSection } from './ScalingProcessesDetailsSection';
|
|
15
|
+
import { ScheduledActionsDetailsSection } from './ScheduledActionsDetailsSection';
|
|
16
|
+
import { SecurityGroupsDetailsSection } from './SecurityGroupsDetailsSection';
|
|
17
|
+
|
|
18
|
+
describe('Amazon server group maintenance action integration', () => {
|
|
19
|
+
const originalAdHocInfraWritesEnabled = AWSProviderSettings.adHocInfraWritesEnabled;
|
|
20
|
+
const runtimeServices = {} as any;
|
|
21
|
+
const editSecurityGroupsLabel = `Edit ${FirewallLabels.get('Firewalls')}`;
|
|
22
|
+
const resolvedSecurityGroup = {
|
|
23
|
+
accountName: 'test-account',
|
|
24
|
+
id: 'sg-123',
|
|
25
|
+
name: 'application-security-group',
|
|
26
|
+
region: 'us-east-1',
|
|
27
|
+
vpcId: 'vpc-123',
|
|
28
|
+
} as ISecurityGroup;
|
|
29
|
+
const application = ({
|
|
30
|
+
name: 'test-app',
|
|
31
|
+
securityGroups: { data: [resolvedSecurityGroup] },
|
|
32
|
+
serverGroups: { refresh: jasmine.createSpy('refresh') },
|
|
33
|
+
} as any) as Application;
|
|
34
|
+
const serverGroup = {
|
|
35
|
+
account: 'test-account',
|
|
36
|
+
asg: {
|
|
37
|
+
defaultCooldown: 300,
|
|
38
|
+
enabledMetrics: [],
|
|
39
|
+
healthCheckGracePeriod: 0,
|
|
40
|
+
healthCheckType: 'EC2',
|
|
41
|
+
suspendedProcesses: [],
|
|
42
|
+
terminationPolicies: ['Default'],
|
|
43
|
+
},
|
|
44
|
+
name: 'test-app-main-v001',
|
|
45
|
+
region: 'us-east-1',
|
|
46
|
+
scalingPolicies: [],
|
|
47
|
+
scheduledActions: [],
|
|
48
|
+
securityGroups: ['sg-123'],
|
|
49
|
+
type: 'aws',
|
|
50
|
+
vpcId: 'vpc-123',
|
|
51
|
+
} as IAmazonServerGroupView;
|
|
52
|
+
|
|
53
|
+
const editLink = (wrapper: ReturnType<typeof shallow>, label: string) =>
|
|
54
|
+
wrapper.find('a.clickable').filterWhere((link) => link.text() === label);
|
|
55
|
+
|
|
56
|
+
const withRuntimeServices = <T extends React.Component>(wrapper: ReturnType<typeof shallow>) => {
|
|
57
|
+
(wrapper.instance() as T).context = { services: runtimeServices };
|
|
58
|
+
return wrapper;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
beforeEach(() => {
|
|
62
|
+
AWSProviderSettings.adHocInfraWritesEnabled = true;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
afterEach(() => {
|
|
66
|
+
AWSProviderSettings.adHocInfraWritesEnabled = originalAdHocInfraWritesEnabled;
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('opens Advanced Settings with the exact application and enriched server group', () => {
|
|
70
|
+
const show = spyOn(EditAsgAdvancedSettingsModal, 'show');
|
|
71
|
+
const wrapper = withRuntimeServices(
|
|
72
|
+
shallow(<AdvancedSettingsDetailsSection app={application} serverGroup={serverGroup} />),
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
editLink(wrapper, 'Edit Advanced Settings').simulate('click');
|
|
76
|
+
|
|
77
|
+
expect(show).toHaveBeenCalledOnceWith({ application, serverGroup }, runtimeServices);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('opens Scaling Processes with the exact application and enriched server group', () => {
|
|
81
|
+
const show = spyOn(ModifyScalingProcessesModal, 'show');
|
|
82
|
+
const wrapper = shallow(<ScalingProcessesDetailsSection app={application} serverGroup={serverGroup} />);
|
|
83
|
+
|
|
84
|
+
editLink(wrapper, 'Edit Scaling Processes').simulate('click');
|
|
85
|
+
|
|
86
|
+
expect(show).toHaveBeenCalledOnceWith({ application, serverGroup });
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('opens Scheduled Actions with the exact application and enriched server group', () => {
|
|
90
|
+
const show = spyOn(EditScheduledActionsModal, 'show');
|
|
91
|
+
const wrapper = shallow(<ScheduledActionsDetailsSection app={application} serverGroup={serverGroup} />);
|
|
92
|
+
|
|
93
|
+
editLink(wrapper, 'Edit Scheduled Actions').simulate('click');
|
|
94
|
+
|
|
95
|
+
expect(show).toHaveBeenCalledOnceWith({ application, serverGroup });
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it('opens Security Groups with resolved groups and exact application and enriched server group', () => {
|
|
99
|
+
const show = spyOn(EditSecurityGroupsModal, 'show');
|
|
100
|
+
const wrapper = withRuntimeServices(
|
|
101
|
+
shallow(<SecurityGroupsDetailsSection app={application} serverGroup={serverGroup} />),
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
editLink(wrapper, editSecurityGroupsLabel).simulate('click');
|
|
105
|
+
|
|
106
|
+
expect(show).toHaveBeenCalledOnceWith(
|
|
107
|
+
{ application, securityGroups: [resolvedSecurityGroup], serverGroup },
|
|
108
|
+
runtimeServices,
|
|
109
|
+
);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('hides all maintenance links when ad-hoc infrastructure writes are disabled', () => {
|
|
113
|
+
AWSProviderSettings.adHocInfraWritesEnabled = false;
|
|
114
|
+
|
|
115
|
+
expect(
|
|
116
|
+
editLink(
|
|
117
|
+
shallow(<AdvancedSettingsDetailsSection app={application} serverGroup={serverGroup} />),
|
|
118
|
+
'Edit Advanced Settings',
|
|
119
|
+
).length,
|
|
120
|
+
).toBe(0);
|
|
121
|
+
expect(
|
|
122
|
+
editLink(
|
|
123
|
+
shallow(<ScalingProcessesDetailsSection app={application} serverGroup={serverGroup} />),
|
|
124
|
+
'Edit Scaling Processes',
|
|
125
|
+
).length,
|
|
126
|
+
).toBe(0);
|
|
127
|
+
expect(
|
|
128
|
+
editLink(
|
|
129
|
+
shallow(<ScheduledActionsDetailsSection app={application} serverGroup={serverGroup} />),
|
|
130
|
+
'Edit Scheduled Actions',
|
|
131
|
+
).length,
|
|
132
|
+
).toBe(0);
|
|
133
|
+
expect(
|
|
134
|
+
editLink(
|
|
135
|
+
shallow(<SecurityGroupsDetailsSection app={application} serverGroup={serverGroup} />),
|
|
136
|
+
editSecurityGroupsLabel,
|
|
137
|
+
).length,
|
|
138
|
+
).toBe(0);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('hides Security Groups editing when the server group has no VPC', () => {
|
|
142
|
+
const wrapper = shallow(
|
|
143
|
+
<SecurityGroupsDetailsSection app={application} serverGroup={{ ...serverGroup, vpcId: undefined }} />,
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
expect(editLink(wrapper, editSecurityGroupsLabel).length).toBe(0);
|
|
147
|
+
});
|
|
148
|
+
});
|
|
@@ -2,17 +2,13 @@ import { shallow } from 'enzyme';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import type { Application } from '@spinnaker/core';
|
|
5
|
-
import { ApplicationModelBuilder } from '@spinnaker/core';
|
|
6
5
|
import { mockLaunchTemplate, mockServerGroup } from '@spinnaker/mocks';
|
|
7
6
|
|
|
8
7
|
import type { IAmazonMixedInstancesPolicy, IAmazonServerGroupView, IScalingPolicy } from '../../../domain';
|
|
9
8
|
import { InstancesDistributionDetailsSection } from '../../../index';
|
|
10
9
|
|
|
11
10
|
describe('InstancesDistribution', () => {
|
|
12
|
-
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
app = ApplicationModelBuilder.createApplicationForTests('testapp');
|
|
15
|
-
});
|
|
11
|
+
const app = {} as Application;
|
|
16
12
|
|
|
17
13
|
const serverGroupWithMip = {
|
|
18
14
|
...mockServerGroup,
|
|
@@ -2,7 +2,6 @@ import { shallow } from 'enzyme';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import type { Application } from '@spinnaker/core';
|
|
5
|
-
import { ApplicationModelBuilder } from '@spinnaker/core';
|
|
6
5
|
import {
|
|
7
6
|
createCustomMockLaunchTemplate,
|
|
8
7
|
mockLaunchTemplate,
|
|
@@ -15,10 +14,7 @@ import { MultipleInstanceTypesSubSection } from './MultipleInstanceTypesSubSecti
|
|
|
15
14
|
import type { IAmazonMixedInstancesPolicy, IAmazonServerGroupView, IScalingPolicy } from '../../../domain';
|
|
16
15
|
|
|
17
16
|
describe('Launch template details', () => {
|
|
18
|
-
|
|
19
|
-
beforeEach(() => {
|
|
20
|
-
app = ApplicationModelBuilder.createApplicationForTests('testapp');
|
|
21
|
-
});
|
|
17
|
+
const app = {} as Application;
|
|
22
18
|
|
|
23
19
|
const baseServerGroupWithLt = {
|
|
24
20
|
...mockServerGroup,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { CollapsibleSection,
|
|
3
|
+
import { CollapsibleSection, HelpField, timestamp, Tooltip } from '@spinnaker/core';
|
|
4
4
|
|
|
5
5
|
import type { IAmazonServerGroupDetailsSectionProps } from './IAmazonServerGroupDetailsSectionProps';
|
|
6
6
|
import { AWSProviderSettings } from '../../../aws.settings';
|
|
7
7
|
import type { IScalingProcess } from '../../../domain';
|
|
8
|
-
import { AutoScalingProcessService } from '../scalingProcesses
|
|
8
|
+
import { AutoScalingProcessService, ModifyScalingProcessesModal } from '../scalingProcesses';
|
|
9
9
|
|
|
10
10
|
export interface IScalingProcessesDetailsSectionState {
|
|
11
11
|
autoScalingProcesses: IScalingProcess[];
|
|
@@ -23,23 +23,6 @@ export class ScalingProcessesDetailsSection extends React.Component<
|
|
|
23
23
|
this.state = this.getState(props);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
private toggleScalingProcesses = (): void => {
|
|
27
|
-
const { app, serverGroup } = this.props;
|
|
28
|
-
confirmNotManaged(serverGroup, app).then(
|
|
29
|
-
(isNotManaged) =>
|
|
30
|
-
isNotManaged &&
|
|
31
|
-
ModalInjector.modalService.open({
|
|
32
|
-
templateUrl: require('../scalingProcesses/modifyScalingProcesses.html'),
|
|
33
|
-
controller: 'ModifyScalingProcessesCtrl as ctrl',
|
|
34
|
-
resolve: {
|
|
35
|
-
serverGroup: () => serverGroup,
|
|
36
|
-
application: () => app,
|
|
37
|
-
processes: () => this.state.autoScalingProcesses,
|
|
38
|
-
},
|
|
39
|
-
}),
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
26
|
private getState(props: IAmazonServerGroupDetailsSectionProps): IScalingProcessesDetailsSectionState {
|
|
44
27
|
const { serverGroup } = props;
|
|
45
28
|
|
|
@@ -63,6 +46,11 @@ export class ScalingProcessesDetailsSection extends React.Component<
|
|
|
63
46
|
this.setState(this.getState(nextProps));
|
|
64
47
|
}
|
|
65
48
|
|
|
49
|
+
private editScalingProcesses = (): void => {
|
|
50
|
+
const { app: application, serverGroup } = this.props;
|
|
51
|
+
ModifyScalingProcessesModal.show({ application, serverGroup });
|
|
52
|
+
};
|
|
53
|
+
|
|
66
54
|
public render(): JSX.Element {
|
|
67
55
|
const { autoScalingProcesses, scalingPoliciesDisabled, scheduledActionsDisabled } = this.state;
|
|
68
56
|
|
|
@@ -103,7 +91,7 @@ export class ScalingProcessesDetailsSection extends React.Component<
|
|
|
103
91
|
))}
|
|
104
92
|
</ul>
|
|
105
93
|
{AWSProviderSettings.adHocInfraWritesEnabled && (
|
|
106
|
-
<a className="clickable" onClick={this.
|
|
94
|
+
<a className="clickable" onClick={this.editScalingProcesses}>
|
|
107
95
|
Edit Scaling Processes
|
|
108
96
|
</a>
|
|
109
97
|
)}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { CollapsibleSection,
|
|
3
|
+
import { CollapsibleSection, Tooltip } from '@spinnaker/core';
|
|
4
4
|
|
|
5
5
|
import type { IAmazonServerGroupDetailsSectionProps } from './IAmazonServerGroupDetailsSectionProps';
|
|
6
6
|
import { AWSProviderSettings } from '../../../aws.settings';
|
|
7
7
|
import type { IScalingProcess } from '../../../domain';
|
|
8
8
|
import { AutoScalingProcessService } from '../scalingProcesses/AutoScalingProcessService';
|
|
9
9
|
import { ScheduledAction } from '../scheduledAction/ScheduledAction';
|
|
10
|
+
import { EditScheduledActionsModal } from '../scheduledActions';
|
|
10
11
|
|
|
11
12
|
export interface IScheduledActionsDetailsSectionState {
|
|
12
13
|
scheduledActionsDisabled: boolean;
|
|
@@ -35,21 +36,15 @@ export class ScheduledActionsDetailsSection extends React.Component<
|
|
|
35
36
|
return { scheduledActionsDisabled };
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
private editScheduledActions = (): void => {
|
|
39
|
-
ModalInjector.modalService.open({
|
|
40
|
-
templateUrl: require('../scheduledAction/editScheduledActions.modal.html'),
|
|
41
|
-
controller: 'EditScheduledActionsCtrl as ctrl',
|
|
42
|
-
resolve: {
|
|
43
|
-
application: () => this.props.app,
|
|
44
|
-
serverGroup: () => this.props.serverGroup,
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
|
|
49
39
|
public componentWillReceiveProps(nextProps: IAmazonServerGroupDetailsSectionProps): void {
|
|
50
40
|
this.setState(this.getState(nextProps));
|
|
51
41
|
}
|
|
52
42
|
|
|
43
|
+
private editScheduledActions = (): void => {
|
|
44
|
+
const { app: application, serverGroup } = this.props;
|
|
45
|
+
EditScheduledActionsModal.show({ application, serverGroup });
|
|
46
|
+
};
|
|
47
|
+
|
|
53
48
|
public render(): JSX.Element {
|
|
54
49
|
const { serverGroup } = this.props;
|
|
55
50
|
const { scheduledActionsDisabled } = this.state;
|
|
@@ -3,11 +3,12 @@ import { chain, find, sortBy } from 'lodash';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
5
|
import type { ISecurityGroup, ISecurityGroupsByAccount } from '@spinnaker/core';
|
|
6
|
-
import { CollapsibleSection,
|
|
6
|
+
import { CollapsibleSection, DeckRuntimeContext, FirewallLabels } from '@spinnaker/core';
|
|
7
7
|
|
|
8
8
|
import type { IAmazonServerGroupDetailsSectionProps } from './IAmazonServerGroupDetailsSectionProps';
|
|
9
9
|
import { AWSProviderSettings } from '../../../aws.settings';
|
|
10
10
|
import { AwsSecurityGroupReader } from '../../../securityGroup/securityGroup.reader';
|
|
11
|
+
import { EditSecurityGroupsModal } from '../securityGroups';
|
|
11
12
|
|
|
12
13
|
export interface ISecurityGroupsDetailsSectionState {
|
|
13
14
|
securityGroups: ISecurityGroup[];
|
|
@@ -17,6 +18,9 @@ export class SecurityGroupsDetailsSection extends React.Component<
|
|
|
17
18
|
IAmazonServerGroupDetailsSectionProps,
|
|
18
19
|
ISecurityGroupsDetailsSectionState
|
|
19
20
|
> {
|
|
21
|
+
public static contextType = DeckRuntimeContext;
|
|
22
|
+
public declare context: React.ContextType<typeof DeckRuntimeContext>;
|
|
23
|
+
|
|
20
24
|
constructor(props: IAmazonServerGroupDetailsSectionProps) {
|
|
21
25
|
super(props);
|
|
22
26
|
|
|
@@ -61,27 +65,18 @@ export class SecurityGroupsDetailsSection extends React.Component<
|
|
|
61
65
|
return securityGroups;
|
|
62
66
|
}
|
|
63
67
|
|
|
64
|
-
private updateSecurityGroups = (): void => {
|
|
65
|
-
const { app, serverGroup } = this.props;
|
|
66
|
-
confirmNotManaged(serverGroup, app).then(
|
|
67
|
-
(notManaged) =>
|
|
68
|
-
notManaged &&
|
|
69
|
-
ModalInjector.modalService.open({
|
|
70
|
-
templateUrl: require('../securityGroup/editSecurityGroups.modal.html'),
|
|
71
|
-
controller: 'EditSecurityGroupsCtrl as $ctrl',
|
|
72
|
-
resolve: {
|
|
73
|
-
application: () => app,
|
|
74
|
-
serverGroup: () => serverGroup,
|
|
75
|
-
securityGroups: () => this.state.securityGroups,
|
|
76
|
-
},
|
|
77
|
-
}),
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
68
|
public componentWillReceiveProps(nextProps: IAmazonServerGroupDetailsSectionProps): void {
|
|
82
69
|
this.setState({ securityGroups: this.getSecurityGroups(nextProps) });
|
|
83
70
|
}
|
|
84
71
|
|
|
72
|
+
private editSecurityGroups = (): void => {
|
|
73
|
+
const { app: application, serverGroup } = this.props;
|
|
74
|
+
EditSecurityGroupsModal.show(
|
|
75
|
+
{ application, securityGroups: this.state.securityGroups, serverGroup },
|
|
76
|
+
this.context.services,
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
85
80
|
public render(): JSX.Element {
|
|
86
81
|
const { serverGroup } = this.props;
|
|
87
82
|
const { securityGroups } = this.state;
|
|
@@ -109,7 +104,7 @@ export class SecurityGroupsDetailsSection extends React.Component<
|
|
|
109
104
|
))}
|
|
110
105
|
</ul>
|
|
111
106
|
{AWSProviderSettings.adHocInfraWritesEnabled && serverGroup.vpcId && (
|
|
112
|
-
<a className="clickable" onClick={this.
|
|
107
|
+
<a className="clickable" onClick={this.editSecurityGroups}>
|
|
113
108
|
Edit {FirewallLabels.get('Firewalls')}
|
|
114
109
|
</a>
|
|
115
110
|
)}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { CollapsibleSection } from '@spinnaker/core';
|
|
4
|
+
|
|
5
|
+
import type { IAmazonServerGroupDetailsSectionProps } from './IAmazonServerGroupDetailsSectionProps';
|
|
6
|
+
import { AWSProviderSettings } from '../../../aws.settings';
|
|
7
|
+
import { ModifyWarmPoolModal, WarmPoolService } from '../warmPool';
|
|
8
|
+
|
|
9
|
+
export class WarmPoolDetailsSection extends React.Component<IAmazonServerGroupDetailsSectionProps> {
|
|
10
|
+
private editWarmPool = (): void => {
|
|
11
|
+
const { app: application, serverGroup } = this.props;
|
|
12
|
+
ModifyWarmPoolModal.show({ application, serverGroup });
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
public render(): JSX.Element {
|
|
16
|
+
const { serverGroup } = this.props;
|
|
17
|
+
const configuration = WarmPoolService.getWarmPoolConfiguration(serverGroup);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<CollapsibleSection cacheKey="Warm Pool" heading="Warm Pool">
|
|
21
|
+
{configuration ? (
|
|
22
|
+
<ul className="warm-pool">
|
|
23
|
+
<li>Min Size: {configuration.minSize ?? 0}</li>
|
|
24
|
+
<li>
|
|
25
|
+
Max Group Prepared Capacity:{' '}
|
|
26
|
+
{configuration.maxGroupPreparedCapacity != null && configuration.maxGroupPreparedCapacity >= 0
|
|
27
|
+
? configuration.maxGroupPreparedCapacity
|
|
28
|
+
: 'No limit'}
|
|
29
|
+
</li>
|
|
30
|
+
<li>Instance State: {configuration.poolState ?? 'Stopped'}</li>
|
|
31
|
+
<li>Reuse on Scale In: {configuration.instanceReusePolicy?.reuseOnScaleIn ? 'Yes' : 'No'}</li>
|
|
32
|
+
</ul>
|
|
33
|
+
) : (
|
|
34
|
+
<div className="text-disabled">No warm pool configured</div>
|
|
35
|
+
)}
|
|
36
|
+
{AWSProviderSettings.adHocInfraWritesEnabled && (
|
|
37
|
+
<a className="clickable" onClick={this.editWarmPool}>
|
|
38
|
+
Edit Warm Pool
|
|
39
|
+
</a>
|
|
40
|
+
)}
|
|
41
|
+
</CollapsibleSection>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { mount as enzymeMount } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Select from 'react-select';
|
|
4
|
+
import { of } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
import { AccountService, DeckRuntimeContext } from '@spinnaker/core';
|
|
7
|
+
|
|
8
|
+
import { AwsModalFooter } from '../../../common/AwsModalFooter';
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
EditSecurityGroupsModal,
|
|
12
|
+
filterSecurityGroupsForServerGroup,
|
|
13
|
+
isLaunchTemplateBacked,
|
|
14
|
+
} from './EditSecurityGroupsModal';
|
|
15
|
+
|
|
16
|
+
describe('EditSecurityGroupsModal', () => {
|
|
17
|
+
let originalAccounts: typeof AccountService.accounts$;
|
|
18
|
+
let runtimeServices: any;
|
|
19
|
+
const RuntimeWrapper = ({ children }: React.PropsWithChildren<{}>) => (
|
|
20
|
+
<DeckRuntimeContext.Provider value={{ services: runtimeServices } as any}>{children}</DeckRuntimeContext.Provider>
|
|
21
|
+
);
|
|
22
|
+
const shallowModal = (props: any) =>
|
|
23
|
+
enzymeMount(<EditSecurityGroupsModal {...props} />, { wrappingComponent: RuntimeWrapper });
|
|
24
|
+
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
originalAccounts = AccountService.accounts$;
|
|
27
|
+
AccountService.accounts$ = of([]);
|
|
28
|
+
runtimeServices = {};
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
afterEach(() => {
|
|
32
|
+
AccountService.accounts$ = originalAccounts;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const serverGroup = {
|
|
36
|
+
name: 'deck-main-v001',
|
|
37
|
+
account: 'test',
|
|
38
|
+
region: 'us-east-1',
|
|
39
|
+
vpcId: 'vpc-1',
|
|
40
|
+
} as any;
|
|
41
|
+
|
|
42
|
+
const application = { name: 'deck', serverGroups: { refresh: jasmine.createSpy('refresh') } } as any;
|
|
43
|
+
const modalProps = {
|
|
44
|
+
application,
|
|
45
|
+
serverGroup,
|
|
46
|
+
closeModal: jasmine.createSpy('closeModal'),
|
|
47
|
+
dismissModal: jasmine.createSpy('dismissModal'),
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
async function flush(): Promise<void> {
|
|
51
|
+
await Promise.resolve();
|
|
52
|
+
await Promise.resolve();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
it('filters by account, region, and VPC while preserving unresolved attached groups', () => {
|
|
56
|
+
const attached = [
|
|
57
|
+
{ id: 'sg-attached', name: 'attached' },
|
|
58
|
+
{ id: 'sg-unresolved', name: 'sg-unresolved' },
|
|
59
|
+
] as any;
|
|
60
|
+
const allGroups = {
|
|
61
|
+
test: {
|
|
62
|
+
aws: {
|
|
63
|
+
'us-east-1': [
|
|
64
|
+
{ id: 'sg-attached', name: 'attached', vpcId: 'vpc-1' },
|
|
65
|
+
{ id: 'sg-available', name: 'available', vpcId: 'vpc-1' },
|
|
66
|
+
{ id: 'sg-wrong-vpc', name: 'wrong-vpc', vpcId: 'vpc-2' },
|
|
67
|
+
],
|
|
68
|
+
'eu-west-1': [{ id: 'sg-wrong-region', name: 'wrong-region', vpcId: 'vpc-1' }],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
other: { aws: { 'us-east-1': [{ id: 'sg-wrong-account', name: 'wrong-account', vpcId: 'vpc-1' }] } },
|
|
72
|
+
} as any;
|
|
73
|
+
|
|
74
|
+
expect(filterSecurityGroupsForServerGroup(allGroups, serverGroup, attached).map((group) => group.id)).toEqual([
|
|
75
|
+
'sg-attached',
|
|
76
|
+
'sg-unresolved',
|
|
77
|
+
'sg-available',
|
|
78
|
+
]);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('treats direct and mixed-instance launch templates as launch-template-backed', () => {
|
|
82
|
+
expect(isLaunchTemplateBacked({ launchTemplate: {} } as any)).toBe(true);
|
|
83
|
+
expect(isLaunchTemplateBacked({ mixedInstancesPolicy: {} } as any)).toBe(true);
|
|
84
|
+
expect(isLaunchTemplateBacked({ launchConfig: {} } as any)).toBe(false);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('shows a retryable error without losing selections and recovers after retry', async () => {
|
|
88
|
+
const selected = [{ id: 'sg-attached', name: 'attached' }] as any;
|
|
89
|
+
const allGroups = {
|
|
90
|
+
test: { aws: { 'us-east-1': [{ id: 'sg-available', name: 'available', vpcId: 'vpc-1' }] } },
|
|
91
|
+
};
|
|
92
|
+
const getAllSecurityGroups = jasmine
|
|
93
|
+
.createSpy('getAllSecurityGroups')
|
|
94
|
+
.and.returnValues(Promise.reject(new Error('inventory unavailable')), Promise.resolve(allGroups));
|
|
95
|
+
runtimeServices.securityGroupReader = { getAllSecurityGroups };
|
|
96
|
+
const wrapper = shallowModal({ ...modalProps, securityGroups: selected });
|
|
97
|
+
await flush();
|
|
98
|
+
wrapper.update();
|
|
99
|
+
|
|
100
|
+
expect(wrapper.find(Select).prop('isLoading')).toBe(false);
|
|
101
|
+
expect(wrapper.find('.security-groups-load-error').text()).toContain('Unable to load');
|
|
102
|
+
expect(wrapper.find(AwsModalFooter).prop('isValid')).toBe(false);
|
|
103
|
+
expect(wrapper.state('securityGroups')).toEqual(selected);
|
|
104
|
+
|
|
105
|
+
wrapper.find('.security-groups-load-error button').simulate('click');
|
|
106
|
+
expect(wrapper.find(Select).prop('isLoading')).toBe(true);
|
|
107
|
+
await flush();
|
|
108
|
+
wrapper.update();
|
|
109
|
+
|
|
110
|
+
expect(getAllSecurityGroups).toHaveBeenCalledTimes(2);
|
|
111
|
+
expect(wrapper.find('.security-groups-load-error').length).toBe(0);
|
|
112
|
+
expect(wrapper.find(AwsModalFooter).prop('isValid')).toBe(true);
|
|
113
|
+
expect(wrapper.state('securityGroups')).toEqual(selected);
|
|
114
|
+
expect((wrapper.state('availableSecurityGroups') as any[]).map((group) => group.id)).toEqual([
|
|
115
|
+
'sg-attached',
|
|
116
|
+
'sg-available',
|
|
117
|
+
]);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it('does not update state when security-group loading completes after unmount', async () => {
|
|
121
|
+
let finishLoading: (groups: any) => void;
|
|
122
|
+
const getAllSecurityGroups = jasmine.createSpy('getAllSecurityGroups').and.returnValue(
|
|
123
|
+
new Promise((resolve) => {
|
|
124
|
+
finishLoading = resolve;
|
|
125
|
+
}),
|
|
126
|
+
);
|
|
127
|
+
runtimeServices.securityGroupReader = { getAllSecurityGroups };
|
|
128
|
+
const wrapper = shallowModal(modalProps);
|
|
129
|
+
const modal = wrapper.instance() as EditSecurityGroupsModal;
|
|
130
|
+
const setState = spyOn(modal, 'setState').and.callThrough();
|
|
131
|
+
|
|
132
|
+
wrapper.unmount();
|
|
133
|
+
finishLoading({});
|
|
134
|
+
await flush();
|
|
135
|
+
|
|
136
|
+
expect(setState).not.toHaveBeenCalled();
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('submits selected groups through the writer with mixed-instance launch-template state', () => {
|
|
140
|
+
const update = jasmine.createSpy('updateSecurityGroups').and.returnValue(Promise.resolve({} as any));
|
|
141
|
+
const selected = [{ id: 'sg-attached', name: 'attached' }] as any;
|
|
142
|
+
const modal = new EditSecurityGroupsModal({
|
|
143
|
+
application,
|
|
144
|
+
securityGroups: selected,
|
|
145
|
+
serverGroup: { ...serverGroup, mixedInstancesPolicy: {} },
|
|
146
|
+
closeModal: jasmine.createSpy('closeModal'),
|
|
147
|
+
dismissModal: jasmine.createSpy('dismissModal'),
|
|
148
|
+
} as any) as any;
|
|
149
|
+
modal.context = { services: { serverGroupWriter: { updateSecurityGroups: update } } };
|
|
150
|
+
modal.state.taskMonitor = { submit: (method: () => any) => method() };
|
|
151
|
+
|
|
152
|
+
modal.submit();
|
|
153
|
+
|
|
154
|
+
expect(update).toHaveBeenCalledWith(
|
|
155
|
+
jasmine.objectContaining({ name: 'deck-main-v001' }),
|
|
156
|
+
selected,
|
|
157
|
+
application,
|
|
158
|
+
true,
|
|
159
|
+
);
|
|
160
|
+
});
|
|
161
|
+
});
|