@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,5 +1,4 @@
|
|
|
1
1
|
import { flatten } from 'lodash';
|
|
2
|
-
import { $q } from 'ngimport';
|
|
3
2
|
|
|
4
3
|
import type { Application, ILoadBalancer } from '@spinnaker/core';
|
|
5
4
|
import { AccountService } from '@spinnaker/core';
|
|
@@ -40,25 +39,26 @@ export class AmazonLoadBalancerDataUtils {
|
|
|
40
39
|
public static populateTargetGroups(
|
|
41
40
|
application: Application,
|
|
42
41
|
serverGroup: IAmazonServerGroup,
|
|
43
|
-
):
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
42
|
+
): Promise<ITargetGroup[]> {
|
|
43
|
+
return Promise.all([
|
|
44
|
+
AccountService.getAccountDetails(serverGroup.account),
|
|
45
|
+
application.getDataSource('loadBalancers').ready(),
|
|
46
|
+
]).then((data) => {
|
|
47
|
+
const awsAccount = (data[0] && data[0].awsAccount) || serverGroup.account;
|
|
48
|
+
const loadBalancers: IAmazonApplicationLoadBalancer[] = (application.loadBalancers
|
|
49
|
+
.data as ILoadBalancer[]).filter(
|
|
50
|
+
(lb) => lb.loadBalancerType === 'application' || lb.loadBalancerType === 'network',
|
|
51
|
+
) as IAmazonApplicationLoadBalancer[];
|
|
52
|
+
const targetGroups = serverGroup.targetGroups
|
|
53
|
+
.map((targetGroupName: string) => {
|
|
54
|
+
const allTargetGroups = flatten(loadBalancers.map((lb) => lb.targetGroups || []));
|
|
55
|
+
const targetGroup = allTargetGroups.find(
|
|
56
|
+
(tg) => tg.name === targetGroupName && tg.region === serverGroup.region && tg.account === awsAccount,
|
|
57
|
+
);
|
|
58
|
+
return this.buildTargetGroup(targetGroup, serverGroup);
|
|
59
|
+
})
|
|
60
|
+
.filter((tg) => tg);
|
|
61
|
+
return targetGroups;
|
|
62
|
+
});
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button, Modal } from 'react-bootstrap';
|
|
3
3
|
|
|
4
|
-
import type { ILoadBalancerIncompatibility, ILoadBalancerModalProps } from '@spinnaker/core';
|
|
5
|
-
import { CloudProviderRegistry, Markdown, ModalClose, noop, ReactModal } from '@spinnaker/core';
|
|
4
|
+
import type { DeckRuntimeServices, ILoadBalancerIncompatibility, ILoadBalancerModalProps } from '@spinnaker/core';
|
|
5
|
+
import { CloudProviderRegistry, DeckRuntimeContext, Markdown, ModalClose, noop, ReactModal } from '@spinnaker/core';
|
|
6
6
|
|
|
7
7
|
import type { IAmazonLoadBalancerConfig } from './LoadBalancerTypes';
|
|
8
8
|
import { LoadBalancerTypes } from './LoadBalancerTypes';
|
|
@@ -17,12 +17,24 @@ export class AmazonLoadBalancerChoiceModal extends React.Component<
|
|
|
17
17
|
ILoadBalancerModalProps,
|
|
18
18
|
IAmazonLoadBalancerChoiceModalState
|
|
19
19
|
> {
|
|
20
|
+
public static contextType = DeckRuntimeContext;
|
|
21
|
+
public declare context: React.ContextType<typeof DeckRuntimeContext>;
|
|
22
|
+
|
|
23
|
+
public static supportsPipelineConfig = true;
|
|
24
|
+
|
|
20
25
|
public static defaultProps: Partial<ILoadBalancerModalProps> = {
|
|
21
26
|
closeModal: noop,
|
|
22
27
|
dismissModal: noop,
|
|
23
28
|
};
|
|
24
29
|
|
|
25
|
-
public static show(props: ILoadBalancerModalProps): Promise<
|
|
30
|
+
public static show(props: ILoadBalancerModalProps, runtimeServices: DeckRuntimeServices): Promise<any> {
|
|
31
|
+
if ((props as any).isNew === false && props.loadBalancer?.loadBalancerType) {
|
|
32
|
+
const loadBalancerType = LoadBalancerTypes.find((type) => type.type === props.loadBalancer.loadBalancerType);
|
|
33
|
+
if (loadBalancerType) {
|
|
34
|
+
return loadBalancerType.component.show(props, runtimeServices);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
26
38
|
return ReactModal.show(
|
|
27
39
|
AmazonLoadBalancerChoiceModal,
|
|
28
40
|
{
|
|
@@ -30,6 +42,7 @@ export class AmazonLoadBalancerChoiceModal extends React.Component<
|
|
|
30
42
|
className: 'create-pipeline-modal-overflow-visible modal-lg',
|
|
31
43
|
},
|
|
32
44
|
{ bsSize: 'lg' },
|
|
45
|
+
runtimeServices,
|
|
33
46
|
);
|
|
34
47
|
}
|
|
35
48
|
|
|
@@ -49,7 +62,7 @@ export class AmazonLoadBalancerChoiceModal extends React.Component<
|
|
|
49
62
|
const { children, ...loadBalancerProps } = this.props;
|
|
50
63
|
this.close();
|
|
51
64
|
this.state.selectedChoice.component
|
|
52
|
-
.show(loadBalancerProps)
|
|
65
|
+
.show(loadBalancerProps, this.context.services)
|
|
53
66
|
.then((loadBalancer) => {
|
|
54
67
|
this.props.closeModal(loadBalancer);
|
|
55
68
|
})
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import type { ILoadBalancerModalProps } from '@spinnaker/core';
|
|
1
|
+
import type { DeckRuntimeServices, ILoadBalancerModalProps } from '@spinnaker/core';
|
|
2
2
|
|
|
3
3
|
import { CreateApplicationLoadBalancer } from './application/CreateApplicationLoadBalancer';
|
|
4
4
|
import { CreateClassicLoadBalancer } from './classic/CreateClassicLoadBalancer';
|
|
5
5
|
import type { IAmazonLoadBalancerUpsertCommand } from '../../domain';
|
|
6
6
|
import { CreateNetworkLoadBalancer } from './network/CreateNetworkLoadBalancer';
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
show: (
|
|
10
|
-
|
|
8
|
+
export type ICloseableLoadBalancerModal = React.ComponentType<ILoadBalancerModalProps> & {
|
|
9
|
+
show: (
|
|
10
|
+
props: ILoadBalancerModalProps,
|
|
11
|
+
runtimeServices: DeckRuntimeServices,
|
|
12
|
+
) => Promise<IAmazonLoadBalancerUpsertCommand>;
|
|
13
|
+
};
|
|
11
14
|
|
|
12
15
|
export interface IAmazonLoadBalancerConfig {
|
|
13
16
|
type: 'network' | 'application' | 'classic';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { FormikErrors, FormikProps } from 'formik';
|
|
2
2
|
import { difference, flatten, get, some, uniq, uniqBy } from 'lodash';
|
|
3
|
-
import { $q } from 'ngimport';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import type { SortEnd } from 'react-sortable-hoc';
|
|
6
5
|
import { arrayMove, SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
|
|
@@ -452,7 +451,7 @@ export class ALBListeners
|
|
|
452
451
|
if (confirmRemove) {
|
|
453
452
|
this.initialActionsWithAuth.delete(actions);
|
|
454
453
|
}
|
|
455
|
-
return
|
|
454
|
+
return Promise.resolve();
|
|
456
455
|
},
|
|
457
456
|
});
|
|
458
457
|
} else {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { cloneDeep, get } from 'lodash';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import type { ILoadBalancerModalProps } from '@spinnaker/core';
|
|
4
|
+
import type { DeckRuntimeServices, ILoadBalancerModalProps, IRouterInjectedProps } from '@spinnaker/core';
|
|
5
5
|
import {
|
|
6
6
|
AccountService,
|
|
7
7
|
FirewallLabels,
|
|
8
8
|
LoadBalancerWriter,
|
|
9
9
|
noop,
|
|
10
|
-
ReactInjector,
|
|
11
10
|
ReactModal,
|
|
12
11
|
TaskMonitor,
|
|
12
|
+
withRouter,
|
|
13
13
|
WizardModal,
|
|
14
14
|
WizardPage,
|
|
15
15
|
} from '@spinnaker/core';
|
|
@@ -36,8 +36,8 @@ export interface ICreateApplicationLoadBalancerState {
|
|
|
36
36
|
taskMonitor: TaskMonitor;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export class
|
|
40
|
-
ICreateApplicationLoadBalancerProps,
|
|
39
|
+
export class CreateApplicationLoadBalancerComponent extends React.Component<
|
|
40
|
+
ICreateApplicationLoadBalancerProps & IRouterInjectedProps,
|
|
41
41
|
ICreateApplicationLoadBalancerState
|
|
42
42
|
> {
|
|
43
43
|
public static defaultProps: Partial<ICreateApplicationLoadBalancerProps> = {
|
|
@@ -46,15 +46,18 @@ export class CreateApplicationLoadBalancer extends React.Component<
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
private _isUnmounted = false;
|
|
49
|
-
private refreshUnsubscribe
|
|
49
|
+
private refreshUnsubscribe?: () => void;
|
|
50
50
|
private certificateTypes = get(AWSProviderSettings, 'loadBalancers.certificateTypes', ['iam', 'acm']);
|
|
51
51
|
|
|
52
|
-
public static show(
|
|
52
|
+
public static show(
|
|
53
|
+
props: ICreateApplicationLoadBalancerProps,
|
|
54
|
+
runtimeServices: DeckRuntimeServices,
|
|
55
|
+
): Promise<IAmazonApplicationLoadBalancerUpsertCommand> {
|
|
53
56
|
const modalProps = { dialogClassName: 'wizard-modal modal-lg' };
|
|
54
|
-
return ReactModal.show(CreateApplicationLoadBalancer, props, modalProps);
|
|
57
|
+
return ReactModal.show(CreateApplicationLoadBalancer, props, modalProps, runtimeServices);
|
|
55
58
|
}
|
|
56
59
|
|
|
57
|
-
constructor(props: ICreateApplicationLoadBalancerProps) {
|
|
60
|
+
constructor(props: ICreateApplicationLoadBalancerProps & IRouterInjectedProps) {
|
|
58
61
|
super(props);
|
|
59
62
|
|
|
60
63
|
const loadBalancerCommand = props.command
|
|
@@ -92,7 +95,7 @@ export class CreateApplicationLoadBalancer extends React.Component<
|
|
|
92
95
|
return certificateId;
|
|
93
96
|
}
|
|
94
97
|
|
|
95
|
-
private formatListeners(command: IAmazonApplicationLoadBalancerUpsertCommand):
|
|
98
|
+
private formatListeners(command: IAmazonApplicationLoadBalancerUpsertCommand): Promise<void> {
|
|
96
99
|
return AccountService.getAccountDetails(command.credentials).then((account) => {
|
|
97
100
|
command.listeners.forEach((listener) => {
|
|
98
101
|
if (listener.protocol === 'HTTP') {
|
|
@@ -171,11 +174,12 @@ export class CreateApplicationLoadBalancer extends React.Component<
|
|
|
171
174
|
}
|
|
172
175
|
|
|
173
176
|
protected onApplicationRefresh(values: IAmazonApplicationLoadBalancerUpsertCommand): void {
|
|
177
|
+
this.refreshUnsubscribe?.();
|
|
178
|
+
this.refreshUnsubscribe = undefined;
|
|
174
179
|
if (this._isUnmounted) {
|
|
175
180
|
return;
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
this.refreshUnsubscribe = undefined;
|
|
179
183
|
this.props.dismissModal();
|
|
180
184
|
this.setState({ taskMonitor: undefined });
|
|
181
185
|
const newStateParams = {
|
|
@@ -186,23 +190,24 @@ export class CreateApplicationLoadBalancer extends React.Component<
|
|
|
186
190
|
provider: 'aws',
|
|
187
191
|
};
|
|
188
192
|
|
|
189
|
-
if (!
|
|
190
|
-
|
|
193
|
+
if (!this.props.stateService.includes('**.loadBalancerDetails')) {
|
|
194
|
+
this.props.stateService.go('.loadBalancerDetails', newStateParams);
|
|
191
195
|
} else {
|
|
192
|
-
|
|
196
|
+
this.props.stateService.go('^.loadBalancerDetails', newStateParams);
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
public componentWillUnmount(): void {
|
|
197
201
|
this._isUnmounted = true;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
202
|
+
this.refreshUnsubscribe?.();
|
|
203
|
+
this.refreshUnsubscribe = undefined;
|
|
201
204
|
}
|
|
202
205
|
|
|
203
206
|
private onTaskComplete(values: IAmazonApplicationLoadBalancerUpsertCommand): void {
|
|
207
|
+
this.refreshUnsubscribe?.();
|
|
208
|
+
this.refreshUnsubscribe = undefined;
|
|
209
|
+
this.refreshUnsubscribe = this.props.app.loadBalancers.onNextRefresh(() => this.onApplicationRefresh(values));
|
|
204
210
|
this.props.app.loadBalancers.refresh();
|
|
205
|
-
this.refreshUnsubscribe = this.props.app.loadBalancers.onNextRefresh(null, () => this.onApplicationRefresh(values));
|
|
206
211
|
}
|
|
207
212
|
|
|
208
213
|
private submit = (values: IAmazonApplicationLoadBalancerUpsertCommand): void => {
|
|
@@ -240,7 +245,7 @@ export class CreateApplicationLoadBalancer extends React.Component<
|
|
|
240
245
|
const taskMonitor = new TaskMonitor({
|
|
241
246
|
application: app,
|
|
242
247
|
title: `${isNew ? 'Creating' : 'Updating'} your load balancer`,
|
|
243
|
-
|
|
248
|
+
onDismiss: () => this.props.dismissModal(),
|
|
244
249
|
onTaskComplete: () => this.onTaskComplete(loadBalancerCommandFormatted),
|
|
245
250
|
});
|
|
246
251
|
|
|
@@ -335,3 +340,8 @@ export class CreateApplicationLoadBalancer extends React.Component<
|
|
|
335
340
|
);
|
|
336
341
|
}
|
|
337
342
|
}
|
|
343
|
+
|
|
344
|
+
export const CreateApplicationLoadBalancer = Object.assign(
|
|
345
|
+
withRouter<ICreateApplicationLoadBalancerProps & IRouterInjectedProps>(CreateApplicationLoadBalancerComponent),
|
|
346
|
+
{ show: CreateApplicationLoadBalancerComponent.show },
|
|
347
|
+
);
|
|
@@ -2,15 +2,15 @@ import type { FormikErrors, FormikValues } from 'formik';
|
|
|
2
2
|
import { cloneDeep, get } from 'lodash';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import type { ILoadBalancerModalProps } from '@spinnaker/core';
|
|
5
|
+
import type { DeckRuntimeServices, ILoadBalancerModalProps, IRouterInjectedProps } from '@spinnaker/core';
|
|
6
6
|
import {
|
|
7
7
|
AccountService,
|
|
8
8
|
FirewallLabels,
|
|
9
9
|
LoadBalancerWriter,
|
|
10
10
|
noop,
|
|
11
|
-
ReactInjector,
|
|
12
11
|
ReactModal,
|
|
13
12
|
TaskMonitor,
|
|
13
|
+
withRouter,
|
|
14
14
|
WizardModal,
|
|
15
15
|
WizardPage,
|
|
16
16
|
} from '@spinnaker/core';
|
|
@@ -36,8 +36,8 @@ export interface ICreateClassicLoadBalancerState {
|
|
|
36
36
|
taskMonitor: TaskMonitor;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export class
|
|
40
|
-
ICreateClassicLoadBalancerProps,
|
|
39
|
+
export class CreateClassicLoadBalancerComponent extends React.Component<
|
|
40
|
+
ICreateClassicLoadBalancerProps & IRouterInjectedProps,
|
|
41
41
|
ICreateClassicLoadBalancerState
|
|
42
42
|
> {
|
|
43
43
|
public static defaultProps: Partial<ICreateClassicLoadBalancerProps> = {
|
|
@@ -46,15 +46,18 @@ export class CreateClassicLoadBalancer extends React.Component<
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
private _isUnmounted = false;
|
|
49
|
-
private refreshUnsubscribe
|
|
49
|
+
private refreshUnsubscribe?: () => void;
|
|
50
50
|
private certificateTypes = get(AWSProviderSettings, 'loadBalancers.certificateTypes', ['iam', 'acm']);
|
|
51
51
|
|
|
52
|
-
public static show(
|
|
52
|
+
public static show(
|
|
53
|
+
props: ICreateClassicLoadBalancerProps,
|
|
54
|
+
runtimeServices: DeckRuntimeServices,
|
|
55
|
+
): Promise<IAmazonClassicLoadBalancerUpsertCommand> {
|
|
53
56
|
const modalProps = { dialogClassName: 'wizard-modal modal-lg' };
|
|
54
|
-
return ReactModal.show(CreateClassicLoadBalancer, props, modalProps);
|
|
57
|
+
return ReactModal.show(CreateClassicLoadBalancer, props, modalProps, runtimeServices);
|
|
55
58
|
}
|
|
56
59
|
|
|
57
|
-
constructor(props: ICreateClassicLoadBalancerProps) {
|
|
60
|
+
constructor(props: ICreateClassicLoadBalancerProps & IRouterInjectedProps) {
|
|
58
61
|
super(props);
|
|
59
62
|
|
|
60
63
|
const loadBalancerCommand = props.command
|
|
@@ -91,7 +94,7 @@ export class CreateClassicLoadBalancer extends React.Component<
|
|
|
91
94
|
return certificateId;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
|
-
protected formatListeners(command: IAmazonClassicLoadBalancerUpsertCommand):
|
|
97
|
+
protected formatListeners(command: IAmazonClassicLoadBalancerUpsertCommand): Promise<void> {
|
|
95
98
|
return AccountService.getAccountDetails(command.credentials).then((account) => {
|
|
96
99
|
command.listeners.forEach((listener) => {
|
|
97
100
|
listener.sslCertificateId = this.certificateIdAsARN(
|
|
@@ -134,11 +137,12 @@ export class CreateClassicLoadBalancer extends React.Component<
|
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
protected onApplicationRefresh(values: IAmazonClassicLoadBalancerUpsertCommand): void {
|
|
140
|
+
this.refreshUnsubscribe?.();
|
|
141
|
+
this.refreshUnsubscribe = undefined;
|
|
137
142
|
if (this._isUnmounted) {
|
|
138
143
|
return;
|
|
139
144
|
}
|
|
140
145
|
|
|
141
|
-
this.refreshUnsubscribe = undefined;
|
|
142
146
|
this.props.dismissModal();
|
|
143
147
|
this.setState({ taskMonitor: undefined });
|
|
144
148
|
const newStateParams = {
|
|
@@ -149,23 +153,24 @@ export class CreateClassicLoadBalancer extends React.Component<
|
|
|
149
153
|
provider: 'aws',
|
|
150
154
|
};
|
|
151
155
|
|
|
152
|
-
if (!
|
|
153
|
-
|
|
156
|
+
if (!this.props.stateService.includes('**.loadBalancerDetails')) {
|
|
157
|
+
this.props.stateService.go('.loadBalancerDetails', newStateParams);
|
|
154
158
|
} else {
|
|
155
|
-
|
|
159
|
+
this.props.stateService.go('^.loadBalancerDetails', newStateParams);
|
|
156
160
|
}
|
|
157
161
|
}
|
|
158
162
|
|
|
159
163
|
public componentWillUnmount(): void {
|
|
160
164
|
this._isUnmounted = true;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
165
|
+
this.refreshUnsubscribe?.();
|
|
166
|
+
this.refreshUnsubscribe = undefined;
|
|
164
167
|
}
|
|
165
168
|
|
|
166
169
|
private onTaskComplete(values: IAmazonClassicLoadBalancerUpsertCommand): void {
|
|
170
|
+
this.refreshUnsubscribe?.();
|
|
171
|
+
this.refreshUnsubscribe = undefined;
|
|
172
|
+
this.refreshUnsubscribe = this.props.app.loadBalancers.onNextRefresh(() => this.onApplicationRefresh(values));
|
|
167
173
|
this.props.app.loadBalancers.refresh();
|
|
168
|
-
this.refreshUnsubscribe = this.props.app.loadBalancers.onNextRefresh(null, () => this.onApplicationRefresh(values));
|
|
169
174
|
}
|
|
170
175
|
|
|
171
176
|
private submit = (values: IAmazonClassicLoadBalancerUpsertCommand): void => {
|
|
@@ -183,7 +188,7 @@ export class CreateClassicLoadBalancer extends React.Component<
|
|
|
183
188
|
const taskMonitor = new TaskMonitor({
|
|
184
189
|
application: app,
|
|
185
190
|
title: `${isNew ? 'Creating' : 'Updating'} your load balancer`,
|
|
186
|
-
|
|
191
|
+
onDismiss: () => this.props.dismissModal(),
|
|
187
192
|
onTaskComplete: () => this.onTaskComplete(loadBalancerCommandFormatted),
|
|
188
193
|
});
|
|
189
194
|
|
|
@@ -203,7 +208,7 @@ export class CreateClassicLoadBalancer extends React.Component<
|
|
|
203
208
|
return errors;
|
|
204
209
|
};
|
|
205
210
|
|
|
206
|
-
public render(): React.ReactElement<
|
|
211
|
+
public render(): React.ReactElement<CreateClassicLoadBalancerComponent> {
|
|
207
212
|
const { app, dismissModal, forPipelineConfig, loadBalancer } = this.props;
|
|
208
213
|
const { isNew, loadBalancerCommand, taskMonitor } = this.state;
|
|
209
214
|
|
|
@@ -280,3 +285,8 @@ export class CreateClassicLoadBalancer extends React.Component<
|
|
|
280
285
|
);
|
|
281
286
|
}
|
|
282
287
|
}
|
|
288
|
+
|
|
289
|
+
export const CreateClassicLoadBalancer = Object.assign(
|
|
290
|
+
withRouter<ICreateClassicLoadBalancerProps & IRouterInjectedProps>(CreateClassicLoadBalancerComponent),
|
|
291
|
+
{ show: CreateClassicLoadBalancerComponent.show },
|
|
292
|
+
);
|
|
@@ -237,7 +237,7 @@ export class LoadBalancerLocation
|
|
|
237
237
|
this.props.formik.handleChange(event);
|
|
238
238
|
};
|
|
239
239
|
|
|
240
|
-
private getAvailableSubnets(credentials: string, region: string):
|
|
240
|
+
private getAvailableSubnets(credentials: string, region: string): Promise<ISubnet[]> {
|
|
241
241
|
return SubnetReader.listSubnets().then((subnets) => {
|
|
242
242
|
return chain(subnets)
|
|
243
243
|
.filter({ account: credentials, region })
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InfrastructureCaches } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
import { SecurityGroups } from './SecurityGroups';
|
|
4
|
+
|
|
5
|
+
describe('SecurityGroups', () => {
|
|
6
|
+
it('renders when the security group cache has not been registered', () => {
|
|
7
|
+
spyOn(InfrastructureCaches, 'get').and.returnValue(undefined);
|
|
8
|
+
|
|
9
|
+
expect(() => new SecurityGroups(buildProps() as any)).not.toThrow();
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
function buildProps() {
|
|
14
|
+
return {
|
|
15
|
+
formik: {
|
|
16
|
+
values: {
|
|
17
|
+
credentials: 'test',
|
|
18
|
+
region: 'us-east-1',
|
|
19
|
+
securityGroups: [],
|
|
20
|
+
vpcId: 'vpc-1',
|
|
21
|
+
},
|
|
22
|
+
setFieldValue: jasmine.createSpy('setFieldValue'),
|
|
23
|
+
validateForm: jasmine.createSpy('validateForm'),
|
|
24
|
+
},
|
|
25
|
+
onLoadingChanged: jasmine.createSpy('onLoadingChanged'),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -6,7 +6,8 @@ import { combineLatest as observableCombineLatest, Subject } from 'rxjs';
|
|
|
6
6
|
import { distinctUntilChanged, map, mergeMap, switchMap, takeUntil, tap, withLatestFrom } from 'rxjs/operators';
|
|
7
7
|
|
|
8
8
|
import type { ISecurityGroup, IWizardPageComponent } from '@spinnaker/core';
|
|
9
|
-
import { FirewallLabels, InfrastructureCaches,
|
|
9
|
+
import { DeckRuntimeContext, FirewallLabels, InfrastructureCaches, Spinner, timestamp } from '@spinnaker/core';
|
|
10
|
+
|
|
10
11
|
import { AWSProviderSettings } from '../../../aws.settings';
|
|
11
12
|
import type { IAmazonLoadBalancerUpsertCommand } from '../../../domain';
|
|
12
13
|
|
|
@@ -28,6 +29,9 @@ export interface ISecurityGroupsState {
|
|
|
28
29
|
export class SecurityGroups
|
|
29
30
|
extends React.Component<ISecurityGroupsProps, ISecurityGroupsState>
|
|
30
31
|
implements IWizardPageComponent<IAmazonLoadBalancerUpsertCommand> {
|
|
32
|
+
public static contextType = DeckRuntimeContext;
|
|
33
|
+
public declare context: React.ContextType<typeof DeckRuntimeContext>;
|
|
34
|
+
|
|
31
35
|
private destroy$ = new Subject<void>();
|
|
32
36
|
private props$ = new Subject<ISecurityGroupsProps>();
|
|
33
37
|
private refresh$ = new Subject<void>();
|
|
@@ -42,10 +46,12 @@ export class SecurityGroups
|
|
|
42
46
|
loaded: false,
|
|
43
47
|
refreshing: false,
|
|
44
48
|
removed: [],
|
|
45
|
-
refreshTime:
|
|
49
|
+
refreshTime: this.getRefreshTime(),
|
|
46
50
|
};
|
|
47
51
|
}
|
|
48
52
|
|
|
53
|
+
private getRefreshTime = () => InfrastructureCaches.get('securityGroups')?.getStats().ageMax || 0;
|
|
54
|
+
|
|
49
55
|
public validate(): FormikErrors<IAmazonLoadBalancerUpsertCommand> {
|
|
50
56
|
const { removed } = this.state;
|
|
51
57
|
if (removed && removed.length) {
|
|
@@ -97,15 +103,15 @@ export class SecurityGroups
|
|
|
97
103
|
|
|
98
104
|
private onRefreshComplete() {
|
|
99
105
|
this.props.onLoadingChanged(false);
|
|
100
|
-
const refreshTime =
|
|
106
|
+
const refreshTime = this.getRefreshTime();
|
|
101
107
|
this.setState({ refreshing: false, loaded: true, refreshTime });
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
public componentDidMount(): void {
|
|
105
111
|
const allSecurityGroups$ = this.refresh$.pipe(
|
|
106
112
|
tap(() => this.onRefreshStart()),
|
|
107
|
-
switchMap(() =>
|
|
108
|
-
mergeMap(() =>
|
|
113
|
+
switchMap(() => this.context.services.cacheInitializer.refreshCache('securityGroups')),
|
|
114
|
+
mergeMap(() => this.context.services.securityGroupReader.getAllSecurityGroups()),
|
|
109
115
|
tap(() => this.onRefreshComplete()),
|
|
110
116
|
);
|
|
111
117
|
|
|
@@ -2,14 +2,14 @@ import type { FormikErrors } from 'formik';
|
|
|
2
2
|
import { cloneDeep, every, get } from 'lodash';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import type { ILoadBalancerModalProps } from '@spinnaker/core';
|
|
5
|
+
import type { DeckRuntimeServices, ILoadBalancerModalProps, IRouterInjectedProps } from '@spinnaker/core';
|
|
6
6
|
import {
|
|
7
7
|
AccountService,
|
|
8
8
|
LoadBalancerWriter,
|
|
9
9
|
noop,
|
|
10
|
-
ReactInjector,
|
|
11
10
|
ReactModal,
|
|
12
11
|
TaskMonitor,
|
|
12
|
+
withRouter,
|
|
13
13
|
WizardModal,
|
|
14
14
|
WizardPage,
|
|
15
15
|
} from '@spinnaker/core';
|
|
@@ -34,8 +34,8 @@ export interface ICreateApplicationLoadBalancerState {
|
|
|
34
34
|
taskMonitor: TaskMonitor;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export class
|
|
38
|
-
ICreateNetworkLoadBalancerProps,
|
|
37
|
+
export class CreateNetworkLoadBalancerComponent extends React.Component<
|
|
38
|
+
ICreateNetworkLoadBalancerProps & IRouterInjectedProps,
|
|
39
39
|
ICreateApplicationLoadBalancerState
|
|
40
40
|
> {
|
|
41
41
|
public static defaultProps: Partial<ICreateNetworkLoadBalancerProps> = {
|
|
@@ -44,15 +44,18 @@ export class CreateNetworkLoadBalancer extends React.Component<
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
private _isUnmounted = false;
|
|
47
|
-
private refreshUnsubscribe
|
|
47
|
+
private refreshUnsubscribe?: () => void;
|
|
48
48
|
private certificateTypes = get(AWSProviderSettings, 'loadBalancers.certificateTypes', ['iam', 'acm']);
|
|
49
49
|
|
|
50
|
-
public static show(
|
|
50
|
+
public static show(
|
|
51
|
+
props: ICreateNetworkLoadBalancerProps,
|
|
52
|
+
runtimeServices: DeckRuntimeServices,
|
|
53
|
+
): Promise<IAmazonNetworkLoadBalancerUpsertCommand> {
|
|
51
54
|
const modalProps = { dialogClassName: 'wizard-modal modal-lg' };
|
|
52
|
-
return ReactModal.show(CreateNetworkLoadBalancer, props, modalProps);
|
|
55
|
+
return ReactModal.show(CreateNetworkLoadBalancer, props, modalProps, runtimeServices);
|
|
53
56
|
}
|
|
54
57
|
|
|
55
|
-
constructor(props: ICreateNetworkLoadBalancerProps) {
|
|
58
|
+
constructor(props: ICreateNetworkLoadBalancerProps & IRouterInjectedProps) {
|
|
56
59
|
super(props);
|
|
57
60
|
|
|
58
61
|
const loadBalancerCommand = props.loadBalancer
|
|
@@ -87,7 +90,7 @@ export class CreateNetworkLoadBalancer extends React.Component<
|
|
|
87
90
|
return certificateId;
|
|
88
91
|
}
|
|
89
92
|
|
|
90
|
-
private formatListeners(command: IAmazonNetworkLoadBalancerUpsertCommand):
|
|
93
|
+
private formatListeners(command: IAmazonNetworkLoadBalancerUpsertCommand): Promise<void> {
|
|
91
94
|
return AccountService.getAccountDetails(command.credentials).then((account) => {
|
|
92
95
|
command.listeners.forEach((listener) => {
|
|
93
96
|
if (listener.protocol === 'TCP') {
|
|
@@ -154,11 +157,12 @@ export class CreateNetworkLoadBalancer extends React.Component<
|
|
|
154
157
|
}
|
|
155
158
|
|
|
156
159
|
protected onApplicationRefresh(values: IAmazonNetworkLoadBalancerUpsertCommand): void {
|
|
160
|
+
this.refreshUnsubscribe?.();
|
|
161
|
+
this.refreshUnsubscribe = undefined;
|
|
157
162
|
if (this._isUnmounted) {
|
|
158
163
|
return;
|
|
159
164
|
}
|
|
160
165
|
|
|
161
|
-
this.refreshUnsubscribe = undefined;
|
|
162
166
|
this.props.dismissModal();
|
|
163
167
|
this.setState({ taskMonitor: undefined });
|
|
164
168
|
const newStateParams = {
|
|
@@ -169,23 +173,24 @@ export class CreateNetworkLoadBalancer extends React.Component<
|
|
|
169
173
|
provider: 'aws',
|
|
170
174
|
};
|
|
171
175
|
|
|
172
|
-
if (!
|
|
173
|
-
|
|
176
|
+
if (!this.props.stateService.includes('**.loadBalancerDetails')) {
|
|
177
|
+
this.props.stateService.go('.loadBalancerDetails', newStateParams);
|
|
174
178
|
} else {
|
|
175
|
-
|
|
179
|
+
this.props.stateService.go('^.loadBalancerDetails', newStateParams);
|
|
176
180
|
}
|
|
177
181
|
}
|
|
178
182
|
|
|
179
183
|
public componentWillUnmount(): void {
|
|
180
184
|
this._isUnmounted = true;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
185
|
+
this.refreshUnsubscribe?.();
|
|
186
|
+
this.refreshUnsubscribe = undefined;
|
|
184
187
|
}
|
|
185
188
|
|
|
186
189
|
private onTaskComplete(values: IAmazonNetworkLoadBalancerUpsertCommand): void {
|
|
190
|
+
this.refreshUnsubscribe?.();
|
|
191
|
+
this.refreshUnsubscribe = undefined;
|
|
192
|
+
this.refreshUnsubscribe = this.props.app.loadBalancers.onNextRefresh(() => this.onApplicationRefresh(values));
|
|
187
193
|
this.props.app.loadBalancers.refresh();
|
|
188
|
-
this.refreshUnsubscribe = this.props.app.loadBalancers.onNextRefresh(null, () => this.onApplicationRefresh(values));
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
private submit = (values: IAmazonNetworkLoadBalancerUpsertCommand): void => {
|
|
@@ -206,7 +211,7 @@ export class CreateNetworkLoadBalancer extends React.Component<
|
|
|
206
211
|
const taskMonitor = new TaskMonitor({
|
|
207
212
|
application: app,
|
|
208
213
|
title: `${isNew ? 'Creating' : 'Updating'} your load balancer`,
|
|
209
|
-
|
|
214
|
+
onDismiss: () => this.props.dismissModal(),
|
|
210
215
|
onTaskComplete: () => this.onTaskComplete(loadBalancerCommandFormatted),
|
|
211
216
|
});
|
|
212
217
|
|
|
@@ -301,3 +306,8 @@ export class CreateNetworkLoadBalancer extends React.Component<
|
|
|
301
306
|
);
|
|
302
307
|
}
|
|
303
308
|
}
|
|
309
|
+
|
|
310
|
+
export const CreateNetworkLoadBalancer = Object.assign(
|
|
311
|
+
withRouter<ICreateNetworkLoadBalancerProps & IRouterInjectedProps>(CreateNetworkLoadBalancerComponent),
|
|
312
|
+
{ show: CreateNetworkLoadBalancerComponent.show },
|
|
313
|
+
);
|