@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,8 +1,23 @@
|
|
|
1
1
|
import { get } from 'lodash';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
5
|
-
|
|
4
|
+
import type {
|
|
5
|
+
Application,
|
|
6
|
+
DeckRuntimeServices,
|
|
7
|
+
IModalComponentProps,
|
|
8
|
+
IRouterInjectedProps,
|
|
9
|
+
IStage,
|
|
10
|
+
} from '@spinnaker/core';
|
|
11
|
+
import {
|
|
12
|
+
DeckRuntimeContext,
|
|
13
|
+
FirewallLabels,
|
|
14
|
+
noop,
|
|
15
|
+
ReactModal,
|
|
16
|
+
TaskMonitor,
|
|
17
|
+
withRouter,
|
|
18
|
+
WizardModal,
|
|
19
|
+
WizardPage,
|
|
20
|
+
} from '@spinnaker/core';
|
|
6
21
|
|
|
7
22
|
import { ServerGroupTemplateSelection } from './ServerGroupTemplateSelection';
|
|
8
23
|
import {
|
|
@@ -14,8 +29,8 @@ import {
|
|
|
14
29
|
ServerGroupSecurityGroups,
|
|
15
30
|
ServerGroupZones,
|
|
16
31
|
} from './pages';
|
|
17
|
-
import { AwsReactInjector } from '../../../reactShims';
|
|
18
32
|
import type { IAmazonServerGroupCommand } from '../serverGroupConfiguration.service';
|
|
33
|
+
import type { AwsServerGroupConfigurationService } from '../serverGroupConfiguration.service';
|
|
19
34
|
|
|
20
35
|
export interface IAmazonCloneServerGroupModalProps extends IModalComponentProps {
|
|
21
36
|
title: string;
|
|
@@ -30,31 +45,33 @@ export interface IAmazonCloneServerGroupModalState {
|
|
|
30
45
|
taskMonitor: TaskMonitor;
|
|
31
46
|
}
|
|
32
47
|
|
|
33
|
-
export class
|
|
34
|
-
IAmazonCloneServerGroupModalProps,
|
|
48
|
+
export class AmazonCloneServerGroupModalComponent extends React.Component<
|
|
49
|
+
IAmazonCloneServerGroupModalProps & IRouterInjectedProps,
|
|
35
50
|
IAmazonCloneServerGroupModalState
|
|
36
51
|
> {
|
|
52
|
+
public static contextType = DeckRuntimeContext;
|
|
53
|
+
public declare context: React.ContextType<typeof DeckRuntimeContext>;
|
|
54
|
+
|
|
37
55
|
public static defaultProps: Partial<IAmazonCloneServerGroupModalProps> = {
|
|
38
56
|
closeModal: noop,
|
|
39
57
|
dismissModal: noop,
|
|
40
58
|
};
|
|
41
59
|
|
|
42
60
|
private _isUnmounted = false;
|
|
43
|
-
private refreshUnsubscribe
|
|
61
|
+
private refreshUnsubscribe?: () => void;
|
|
44
62
|
|
|
45
|
-
public static show(
|
|
63
|
+
public static show(
|
|
64
|
+
props: IAmazonCloneServerGroupModalProps,
|
|
65
|
+
runtimeServices: DeckRuntimeServices,
|
|
66
|
+
): Promise<IAmazonServerGroupCommand> {
|
|
46
67
|
const modalProps = { dialogClassName: 'wizard-modal modal-lg' };
|
|
47
|
-
return ReactModal.show(AmazonCloneServerGroupModal, props, modalProps);
|
|
68
|
+
return ReactModal.show(AmazonCloneServerGroupModal, props, modalProps, runtimeServices);
|
|
48
69
|
}
|
|
49
70
|
|
|
50
|
-
constructor(props: IAmazonCloneServerGroupModalProps) {
|
|
71
|
+
constructor(props: IAmazonCloneServerGroupModalProps & IRouterInjectedProps) {
|
|
51
72
|
super(props);
|
|
52
73
|
|
|
53
74
|
const requiresTemplateSelection = get(props, 'command.viewState.requiresTemplateSelection', false);
|
|
54
|
-
if (!requiresTemplateSelection) {
|
|
55
|
-
this.configureCommand();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
75
|
this.state = {
|
|
59
76
|
firewallsLabel: FirewallLabels.get('Firewalls'),
|
|
60
77
|
loaded: false,
|
|
@@ -62,23 +79,38 @@ export class AmazonCloneServerGroupModal extends React.Component<
|
|
|
62
79
|
taskMonitor: new TaskMonitor({
|
|
63
80
|
application: props.application,
|
|
64
81
|
title: 'Creating your server group',
|
|
65
|
-
|
|
82
|
+
onDismiss: () => this.props.dismissModal(),
|
|
66
83
|
onTaskComplete: this.onTaskComplete,
|
|
67
84
|
}),
|
|
68
85
|
};
|
|
69
86
|
}
|
|
70
87
|
|
|
88
|
+
public componentDidMount(): void {
|
|
89
|
+
if (!this.state.requiresTemplateSelection) {
|
|
90
|
+
this.configureCommand();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private get configurationService(): AwsServerGroupConfigurationService {
|
|
95
|
+
return this.context.services.providerServiceDelegate.getDelegate(
|
|
96
|
+
this.props.command.selectedProvider,
|
|
97
|
+
'serverGroup.configurationService',
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
71
101
|
private templateSelected = () => {
|
|
72
102
|
this.setState({ requiresTemplateSelection: false });
|
|
73
103
|
this.configureCommand();
|
|
74
104
|
};
|
|
75
105
|
|
|
76
106
|
private onTaskComplete = () => {
|
|
107
|
+
this.clearRefreshSubscription();
|
|
108
|
+
this.refreshUnsubscribe = this.props.application.serverGroups.onNextRefresh(this.onApplicationRefresh);
|
|
77
109
|
this.props.application.serverGroups.refresh();
|
|
78
|
-
this.props.application.serverGroups.onNextRefresh(null, this.onApplicationRefresh);
|
|
79
110
|
};
|
|
80
111
|
|
|
81
112
|
protected onApplicationRefresh = (): void => {
|
|
113
|
+
this.clearRefreshSubscription();
|
|
82
114
|
if (this._isUnmounted) {
|
|
83
115
|
return;
|
|
84
116
|
}
|
|
@@ -96,19 +128,19 @@ export class AmazonCloneServerGroupModal extends React.Component<
|
|
|
96
128
|
provider: 'aws',
|
|
97
129
|
};
|
|
98
130
|
let transitionTo = '^.^.^.clusters.serverGroup';
|
|
99
|
-
if (
|
|
131
|
+
if (this.props.stateService.includes('**.clusters.serverGroup')) {
|
|
100
132
|
// clone via details, all view
|
|
101
133
|
transitionTo = '^.serverGroup';
|
|
102
134
|
}
|
|
103
|
-
if (
|
|
135
|
+
if (this.props.stateService.includes('**.clusters.cluster.serverGroup')) {
|
|
104
136
|
// clone or create with details open
|
|
105
137
|
transitionTo = '^.^.serverGroup';
|
|
106
138
|
}
|
|
107
|
-
if (
|
|
139
|
+
if (this.props.stateService.includes('**.clusters')) {
|
|
108
140
|
// create new, no details open
|
|
109
141
|
transitionTo = '.serverGroup';
|
|
110
142
|
}
|
|
111
|
-
|
|
143
|
+
this.props.stateService.go(transitionTo, newStateParams);
|
|
112
144
|
}
|
|
113
145
|
}
|
|
114
146
|
};
|
|
@@ -118,12 +150,12 @@ export class AmazonCloneServerGroupModal extends React.Component<
|
|
|
118
150
|
|
|
119
151
|
command.credentialsChanged(command);
|
|
120
152
|
command.regionChanged(command);
|
|
121
|
-
|
|
153
|
+
this.configurationService.configureSubnetPurposes(command);
|
|
122
154
|
};
|
|
123
155
|
|
|
124
156
|
private configureCommand = () => {
|
|
125
157
|
const { application, command } = this.props;
|
|
126
|
-
|
|
158
|
+
this.configurationService.configureCommand(application, command).then(() => {
|
|
127
159
|
this.initializeCommand();
|
|
128
160
|
this.setState({ loaded: true, requiresTemplateSelection: false });
|
|
129
161
|
});
|
|
@@ -142,11 +174,14 @@ export class AmazonCloneServerGroupModal extends React.Component<
|
|
|
142
174
|
|
|
143
175
|
public componentWillUnmount(): void {
|
|
144
176
|
this._isUnmounted = true;
|
|
145
|
-
|
|
146
|
-
this.refreshUnsubscribe();
|
|
147
|
-
}
|
|
177
|
+
this.clearRefreshSubscription();
|
|
148
178
|
}
|
|
149
179
|
|
|
180
|
+
private clearRefreshSubscription = (): void => {
|
|
181
|
+
this.refreshUnsubscribe?.();
|
|
182
|
+
this.refreshUnsubscribe = undefined;
|
|
183
|
+
};
|
|
184
|
+
|
|
150
185
|
private submit = (command: IAmazonServerGroupCommand): void => {
|
|
151
186
|
this.normalizeCommand(command);
|
|
152
187
|
const forPipelineConfig = command.viewState.mode === 'editPipeline' || command.viewState.mode === 'createPipeline';
|
|
@@ -154,7 +189,7 @@ export class AmazonCloneServerGroupModal extends React.Component<
|
|
|
154
189
|
this.props.closeModal && this.props.closeModal(command);
|
|
155
190
|
} else {
|
|
156
191
|
this.state.taskMonitor.submit(() =>
|
|
157
|
-
|
|
192
|
+
this.context.services.serverGroupWriter.cloneServerGroup(command, this.props.application),
|
|
158
193
|
);
|
|
159
194
|
}
|
|
160
195
|
};
|
|
@@ -241,3 +276,8 @@ export class AmazonCloneServerGroupModal extends React.Component<
|
|
|
241
276
|
);
|
|
242
277
|
}
|
|
243
278
|
}
|
|
279
|
+
|
|
280
|
+
export const AmazonCloneServerGroupModal = Object.assign(
|
|
281
|
+
withRouter<IAmazonCloneServerGroupModalProps & IRouterInjectedProps>(AmazonCloneServerGroupModalComponent),
|
|
282
|
+
{ show: AmazonCloneServerGroupModalComponent.show },
|
|
283
|
+
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { ToggleButtonGroup, ToggleSize } from '@spinnaker/core';
|
|
3
|
-
import {
|
|
3
|
+
import { AwsServices } from '../../../../aws.services';
|
|
4
4
|
|
|
5
5
|
export interface ICpuCreditsToggleProps {
|
|
6
6
|
unlimitedCpuCredits?: boolean;
|
|
@@ -11,10 +11,10 @@ export interface ICpuCreditsToggleProps {
|
|
|
11
11
|
|
|
12
12
|
export function CpuCreditsToggle(props: ICpuCreditsToggleProps) {
|
|
13
13
|
const { selectedInstanceTypes, currentProfile } = props;
|
|
14
|
-
const isBurstingSupportedForAllTypes =
|
|
14
|
+
const isBurstingSupportedForAllTypes = AwsServices.awsInstanceTypeService.isBurstingSupportedForAllTypes(
|
|
15
15
|
selectedInstanceTypes,
|
|
16
16
|
);
|
|
17
|
-
const isAtleastOneTypeInProfile =
|
|
17
|
+
const isAtleastOneTypeInProfile = AwsServices.awsInstanceTypeService.getInstanceTypesInCategory(
|
|
18
18
|
selectedInstanceTypes,
|
|
19
19
|
currentProfile,
|
|
20
20
|
).length
|
|
@@ -7,8 +7,8 @@ import { usePrevious } from '@spinnaker/core';
|
|
|
7
7
|
import { InstanceProfileSelector } from './InstanceProfileSelector';
|
|
8
8
|
import { InstanceTypeTable } from './InstanceTypeTable';
|
|
9
9
|
import { InstancesDistribution } from './InstancesDistribution';
|
|
10
|
+
import { AwsServices } from '../../../../../aws.services';
|
|
10
11
|
import type { IAmazonInstanceTypeCategory } from '../../../../../instance/awsInstanceType.service';
|
|
11
|
-
import { AwsReactInjector } from '../../../../../reactShims';
|
|
12
12
|
import type { IAmazonInstanceTypeOverride, IAmazonServerGroupCommand } from '../../../serverGroupConfiguration.service';
|
|
13
13
|
|
|
14
14
|
export interface IAdvancedModeSelectorProps {
|
|
@@ -57,7 +57,7 @@ export function AdvancedModeSelector(props: IAdvancedModeSelectorProps) {
|
|
|
57
57
|
const hasProfileChanged = prevInstanceProfile && newProfile && prevInstanceProfile !== newProfile;
|
|
58
58
|
const isInstanceTypesUpdateNeeded = newProfile !== 'custom' && instanceTypesInProps && instanceTypesInProps.length;
|
|
59
59
|
if (hasProfileChanged && isInstanceTypesUpdateNeeded) {
|
|
60
|
-
const instanceTypesInProfile: string[] =
|
|
60
|
+
const instanceTypesInProfile: string[] = AwsServices.awsInstanceTypeService.getInstanceTypesInCategory(
|
|
61
61
|
instanceTypesInProps.map((it) => it.instanceType),
|
|
62
62
|
newProfile,
|
|
63
63
|
);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { mount as enzymeMount } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { DeckRuntimeContext } from '@spinnaker/core';
|
|
5
|
+
|
|
6
|
+
import { SimpleModeSelector } from './SimpleModeSelector';
|
|
7
|
+
|
|
8
|
+
describe('SimpleModeSelector', () => {
|
|
9
|
+
let runtimeServices: any;
|
|
10
|
+
const RuntimeWrapper = ({ children }: React.PropsWithChildren<{}>) => (
|
|
11
|
+
<DeckRuntimeContext.Provider value={{ services: runtimeServices } as any}>{children}</DeckRuntimeContext.Provider>
|
|
12
|
+
);
|
|
13
|
+
const mount = (component: React.ReactElement) => enzymeMount(component, { wrappingComponent: RuntimeWrapper });
|
|
14
|
+
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
runtimeServices = {};
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('shows instance type rows when an instance profile tile is clicked', async () => {
|
|
20
|
+
runtimeServices.instanceTypeService = instanceTypeService();
|
|
21
|
+
const command = buildCommand();
|
|
22
|
+
const component = mount(
|
|
23
|
+
<SimpleModeSelector
|
|
24
|
+
command={command as any}
|
|
25
|
+
setUnlimitedCpuCredits={jasmine.createSpy('setUnlimitedCpuCredits')}
|
|
26
|
+
setFieldValue={jasmine.createSpy('setFieldValue')}
|
|
27
|
+
clearWarnings={jasmine.createSpy('clearWarnings')}
|
|
28
|
+
/>,
|
|
29
|
+
);
|
|
30
|
+
await settle(component);
|
|
31
|
+
|
|
32
|
+
expect(component.find('.instance-type-row').exists()).toBe(false);
|
|
33
|
+
|
|
34
|
+
component.find('button.instance-profile').simulate('click');
|
|
35
|
+
await settle(component);
|
|
36
|
+
|
|
37
|
+
expect(component.find('.instance-type-row').text()).toContain('m5.large');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('updates derived command fields from the selected instance type', async () => {
|
|
41
|
+
runtimeServices.instanceTypeService = instanceTypeService();
|
|
42
|
+
const command = buildCommand();
|
|
43
|
+
const component = mount(
|
|
44
|
+
<SimpleModeSelector
|
|
45
|
+
command={command as any}
|
|
46
|
+
setUnlimitedCpuCredits={jasmine.createSpy('setUnlimitedCpuCredits')}
|
|
47
|
+
setFieldValue={jasmine.createSpy('setFieldValue')}
|
|
48
|
+
clearWarnings={jasmine.createSpy('clearWarnings')}
|
|
49
|
+
/>,
|
|
50
|
+
);
|
|
51
|
+
await settle(component);
|
|
52
|
+
|
|
53
|
+
component.find('button.instance-profile').simulate('click');
|
|
54
|
+
await settle(component);
|
|
55
|
+
component.find('.instance-type-row').simulate('click');
|
|
56
|
+
|
|
57
|
+
expect(command.instanceTypeChanged).toHaveBeenCalledWith(jasmine.objectContaining({ instanceType: 'm5.large' }));
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
function buildCommand() {
|
|
62
|
+
return {
|
|
63
|
+
backingData: { filtered: { instanceTypes: ['m5.large'] } },
|
|
64
|
+
instanceTypeChanged: jasmine.createSpy('instanceTypeChanged'),
|
|
65
|
+
selectedProvider: 'aws',
|
|
66
|
+
viewState: { dirty: {} },
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function instanceTypeService() {
|
|
71
|
+
return {
|
|
72
|
+
getCategories: jasmine.createSpy('getCategories').and.returnValue(
|
|
73
|
+
Promise.resolve([
|
|
74
|
+
{
|
|
75
|
+
type: 'general',
|
|
76
|
+
label: 'General Purpose',
|
|
77
|
+
icon: 'cloud',
|
|
78
|
+
description: 'General purpose',
|
|
79
|
+
families: [
|
|
80
|
+
{
|
|
81
|
+
type: 'm5',
|
|
82
|
+
description: 'Balanced compute',
|
|
83
|
+
instanceTypes: [
|
|
84
|
+
{
|
|
85
|
+
name: 'm5.large',
|
|
86
|
+
label: 'm5.large',
|
|
87
|
+
cpu: 2,
|
|
88
|
+
memory: 8,
|
|
89
|
+
storage: { count: 1, size: 0, type: 'EBS' },
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
]),
|
|
96
|
+
),
|
|
97
|
+
getInstanceTypeDetails: jasmine.createSpy('getInstanceTypeDetails').and.returnValue(Promise.resolve({})),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
async function settle(component: any) {
|
|
102
|
+
await Promise.resolve();
|
|
103
|
+
await Promise.resolve();
|
|
104
|
+
component.update();
|
|
105
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { InstanceArchetypeSelector, InstanceTypeSelector } from '@spinnaker/core';
|
|
4
4
|
|
|
5
5
|
import { CpuCreditsToggle } from '../CpuCreditsToggle';
|
|
6
6
|
import { InstanceTypeWarning } from '../InstanceTypeWarning';
|
|
@@ -16,13 +16,18 @@ export interface ISimpleModeSelectorProps {
|
|
|
16
16
|
|
|
17
17
|
export function SimpleModeSelector(props: ISimpleModeSelectorProps) {
|
|
18
18
|
const { command } = props;
|
|
19
|
-
const
|
|
19
|
+
const [selectedInstanceProfile, setSelectedInstanceProfile] = React.useState(command.viewState.instanceProfile);
|
|
20
20
|
const isLaunchTemplatesEnabled = AWSProviderSettings.serverGroups?.enableLaunchTemplates;
|
|
21
21
|
const isCpuCreditsEnabled = AWSProviderSettings.serverGroups?.enableCpuCredits;
|
|
22
22
|
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
setSelectedInstanceProfile(command.viewState.instanceProfile);
|
|
25
|
+
}, [command.viewState.instanceProfile]);
|
|
26
|
+
|
|
23
27
|
const instanceProfileChanged = (newProfile: string) => {
|
|
28
|
+
setSelectedInstanceProfile(newProfile);
|
|
24
29
|
// Instance profile is already set on values.viewState, so just use that value.
|
|
25
|
-
// Once
|
|
30
|
+
// Once this component tree is fully standalone, we can move all the viewState stuff
|
|
26
31
|
// into react state
|
|
27
32
|
props.setFieldValue('viewState', {
|
|
28
33
|
...command.viewState,
|
|
@@ -31,10 +36,19 @@ export function SimpleModeSelector(props: ISimpleModeSelectorProps) {
|
|
|
31
36
|
};
|
|
32
37
|
|
|
33
38
|
const instanceTypeChanged = (type: string) => {
|
|
39
|
+
command.instanceType = type;
|
|
34
40
|
command.instanceTypeChanged(command);
|
|
35
41
|
props.setFieldValue('instanceType', type);
|
|
36
42
|
};
|
|
37
43
|
|
|
44
|
+
const commandForSelectedProfile = {
|
|
45
|
+
...command,
|
|
46
|
+
viewState: {
|
|
47
|
+
...command.viewState,
|
|
48
|
+
instanceProfile: selectedInstanceProfile,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
38
52
|
return (
|
|
39
53
|
<div className="container-fluid form-horizontal">
|
|
40
54
|
<div className="row">
|
|
@@ -45,8 +59,8 @@ export function SimpleModeSelector(props: ISimpleModeSelectorProps) {
|
|
|
45
59
|
/>
|
|
46
60
|
<InstanceTypeWarning dirty={command.viewState.dirty} clearWarnings={props.clearWarnings} />
|
|
47
61
|
<div style={{ padding: '0 15px' }}>
|
|
48
|
-
{
|
|
49
|
-
<InstanceTypeSelector command={
|
|
62
|
+
{selectedInstanceProfile && selectedInstanceProfile !== 'custom' && (
|
|
63
|
+
<InstanceTypeSelector command={commandForSelectedProfile} onTypeChanged={instanceTypeChanged} />
|
|
50
64
|
)}
|
|
51
65
|
</div>
|
|
52
66
|
</div>
|
|
@@ -55,7 +69,7 @@ export function SimpleModeSelector(props: ISimpleModeSelectorProps) {
|
|
|
55
69
|
<CpuCreditsToggle
|
|
56
70
|
unlimitedCpuCredits={command.unlimitedCpuCredits}
|
|
57
71
|
selectedInstanceTypes={[command.instanceType]}
|
|
58
|
-
currentProfile={
|
|
72
|
+
currentProfile={selectedInstanceProfile}
|
|
59
73
|
setUnlimitedCpuCredits={props.setUnlimitedCpuCredits}
|
|
60
74
|
/>
|
|
61
75
|
</div>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ServerGroupBasicSettingsComponent } from './ServerGroupBasicSettings';
|
|
2
|
+
|
|
3
|
+
describe('Amazon ServerGroupBasicSettings', () => {
|
|
4
|
+
it('opens the latest server group through the injected state service', () => {
|
|
5
|
+
const stateService = { go: jasmine.createSpy('go'), is: () => true };
|
|
6
|
+
const component = new ServerGroupBasicSettingsComponent({
|
|
7
|
+
app: {
|
|
8
|
+
clusters: [],
|
|
9
|
+
name: 'app',
|
|
10
|
+
serverGroups: {
|
|
11
|
+
data: [{ account: 'test', cluster: 'app-main', createdTime: 1, name: 'app-main-v001', region: 'us-east-1' }],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
formik: {
|
|
15
|
+
values: {
|
|
16
|
+
amiName: 'ami',
|
|
17
|
+
credentials: 'test',
|
|
18
|
+
freeFormDetails: '',
|
|
19
|
+
region: 'us-east-1',
|
|
20
|
+
selectedProvider: 'aws',
|
|
21
|
+
stack: 'main',
|
|
22
|
+
viewState: { imageId: 'ami-123' },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
router: {},
|
|
26
|
+
stateParams: {},
|
|
27
|
+
stateService,
|
|
28
|
+
} as any);
|
|
29
|
+
|
|
30
|
+
(component as any).navigateToLatestServerGroup();
|
|
31
|
+
|
|
32
|
+
expect(stateService.go).toHaveBeenCalledWith('.serverGroup', {
|
|
33
|
+
accountId: 'test',
|
|
34
|
+
provider: 'aws',
|
|
35
|
+
region: 'us-east-1',
|
|
36
|
+
serverGroup: 'app-main-v001',
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -2,7 +2,7 @@ import type { FormikErrors, FormikProps } from 'formik';
|
|
|
2
2
|
import { Field } from 'formik';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import type { Application, IServerGroup, IWizardPageComponent } from '@spinnaker/core';
|
|
5
|
+
import type { Application, IRouterInjectedProps, IServerGroup, IWizardPageComponent } from '@spinnaker/core';
|
|
6
6
|
import {
|
|
7
7
|
AccountSelectInput,
|
|
8
8
|
DeployingIntoManagedClusterWarning,
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
HelpField,
|
|
11
11
|
Markdown,
|
|
12
12
|
NameUtils,
|
|
13
|
-
ReactInjector,
|
|
14
13
|
RegionSelectField,
|
|
15
14
|
ServerGroupDetailsField,
|
|
16
15
|
ServerGroupNamePreview,
|
|
17
16
|
SETTINGS,
|
|
18
17
|
TaskReason,
|
|
18
|
+
withRouter,
|
|
19
19
|
} from '@spinnaker/core';
|
|
20
20
|
|
|
21
21
|
import { AmazonImageSelectInput } from '../../AmazonImageSelectInput';
|
|
@@ -42,10 +42,10 @@ export interface IServerGroupBasicSettingsState {
|
|
|
42
42
|
latestServerGroup: IServerGroup;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export class
|
|
46
|
-
extends React.Component<IServerGroupBasicSettingsProps, IServerGroupBasicSettingsState>
|
|
45
|
+
export class ServerGroupBasicSettingsComponent
|
|
46
|
+
extends React.Component<IServerGroupBasicSettingsProps & IRouterInjectedProps, IServerGroupBasicSettingsState>
|
|
47
47
|
implements IWizardPageComponent<IAmazonServerGroupCommand> {
|
|
48
|
-
constructor(props: IServerGroupBasicSettingsProps) {
|
|
48
|
+
constructor(props: IServerGroupBasicSettingsProps & IRouterInjectedProps) {
|
|
49
49
|
super(props);
|
|
50
50
|
const {
|
|
51
51
|
amiName,
|
|
@@ -184,11 +184,10 @@ export class ServerGroupBasicSettings
|
|
|
184
184
|
serverGroup: latestServerGroup.name,
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
$state.go('.serverGroup', params);
|
|
187
|
+
if (this.props.stateService.is('home.applications.application.insight.clusters')) {
|
|
188
|
+
this.props.stateService.go('.serverGroup', params);
|
|
190
189
|
} else {
|
|
191
|
-
|
|
190
|
+
this.props.stateService.go('^.serverGroup', params);
|
|
192
191
|
}
|
|
193
192
|
};
|
|
194
193
|
|
|
@@ -352,3 +351,5 @@ export class ServerGroupBasicSettings
|
|
|
352
351
|
);
|
|
353
352
|
}
|
|
354
353
|
}
|
|
354
|
+
|
|
355
|
+
export const ServerGroupBasicSettings = withRouter(ServerGroupBasicSettingsComponent);
|
|
@@ -6,9 +6,9 @@ import { Subject } from 'rxjs';
|
|
|
6
6
|
import type { IWizardPageComponent } from '@spinnaker/core';
|
|
7
7
|
import { parseNum } from '@spinnaker/core';
|
|
8
8
|
|
|
9
|
+
import { AwsServices } from '../../../../aws.services';
|
|
9
10
|
import type { IAmazonInstanceTypeCategory } from '../../../../instance/awsInstanceType.service';
|
|
10
11
|
import { InstanceTypeSelector } from '../instanceType/InstanceTypeSelector';
|
|
11
|
-
import { AwsReactInjector } from '../../../../reactShims';
|
|
12
12
|
import type { IAmazonServerGroupCommand } from '../../serverGroupConfiguration.service';
|
|
13
13
|
|
|
14
14
|
export interface IServerGroupInstanceTypeProps {
|
|
@@ -117,7 +117,7 @@ export class ServerGroupInstanceType
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
public componentDidMount(): void {
|
|
120
|
-
Promise.resolve(
|
|
120
|
+
Promise.resolve(AwsServices.awsInstanceTypeService.getCategories()).then(
|
|
121
121
|
(categories: IAmazonInstanceTypeCategory[]) => {
|
|
122
122
|
this.setState({ instanceTypeDetails: categories });
|
|
123
123
|
},
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import type { Option } from 'react-select';
|
|
4
4
|
|
|
5
5
|
import type { IWizardPageComponent } from '@spinnaker/core';
|
|
6
|
-
import {
|
|
6
|
+
import { DeckRuntimeContext, HelpField, TetheredSelect } from '@spinnaker/core';
|
|
7
7
|
|
|
8
8
|
import type { IAmazonServerGroupCommand } from '../../serverGroupConfiguration.service';
|
|
9
9
|
|
|
@@ -27,6 +27,9 @@ const stringToOption = (value: string): Option<string> => {
|
|
|
27
27
|
export class ServerGroupLoadBalancers
|
|
28
28
|
extends React.Component<IServerGroupLoadBalancersProps, IServerGroupLoadBalancersState>
|
|
29
29
|
implements IWizardPageComponent<IAmazonServerGroupCommand> {
|
|
30
|
+
public static contextType = DeckRuntimeContext;
|
|
31
|
+
public declare context: React.ContextType<typeof DeckRuntimeContext>;
|
|
32
|
+
|
|
30
33
|
public state = {
|
|
31
34
|
refreshing: false,
|
|
32
35
|
refreshed: false,
|
|
@@ -49,7 +52,7 @@ export class ServerGroupLoadBalancers
|
|
|
49
52
|
public refreshLoadBalancers = () => {
|
|
50
53
|
const { values } = this.props.formik;
|
|
51
54
|
this.setState({ refreshing: true });
|
|
52
|
-
const configurationService: any =
|
|
55
|
+
const configurationService: any = this.context.services.providerServiceDelegate.getDelegate(
|
|
53
56
|
values.cloudProvider || values.selectedProvider,
|
|
54
57
|
'serverGroup.configurationService',
|
|
55
58
|
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { shallow } from 'enzyme';
|
|
2
|
+
import { Field } from 'formik';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { ServerGroupAdvancedSettingsCommon } from './ServerGroupAdvancedSettingsCommon';
|
|
6
|
+
|
|
7
|
+
describe('ServerGroupAdvancedSettingsCommon', () => {
|
|
8
|
+
it('uses the standard wizard label grid instead of centering the form controls', () => {
|
|
9
|
+
const component = shallow(
|
|
10
|
+
<ServerGroupAdvancedSettingsCommon app={buildApplication() as any} formik={buildFormik() as any} />,
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
expect(component.find('.form-group').first().find('.sm-label-right').first().hasClass('col-md-3')).toBe(true);
|
|
14
|
+
expect(component.find('.form-group').first().find(Field).parent().hasClass('col-md-2')).toBe(true);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
function buildApplication() {
|
|
19
|
+
return {
|
|
20
|
+
attributes: {
|
|
21
|
+
platformHealthOnlyShowOverride: false,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function buildFormik() {
|
|
27
|
+
return {
|
|
28
|
+
setFieldValue: jasmine.createSpy('setFieldValue'),
|
|
29
|
+
values: {
|
|
30
|
+
associatePublicIpAddress: null,
|
|
31
|
+
backingData: {
|
|
32
|
+
enabledMetrics: [],
|
|
33
|
+
filtered: { keyPairs: [] },
|
|
34
|
+
healthCheckTypes: [],
|
|
35
|
+
scalingProcesses: [],
|
|
36
|
+
terminationPolicies: [],
|
|
37
|
+
},
|
|
38
|
+
ebsOptimized: false,
|
|
39
|
+
enabledMetrics: [],
|
|
40
|
+
getBlockDeviceMappingsSource: jasmine.createSpy('getBlockDeviceMappingsSource').and.returnValue('default'),
|
|
41
|
+
healthCheckType: 'EC2',
|
|
42
|
+
instanceMonitoring: false,
|
|
43
|
+
keyPair: '',
|
|
44
|
+
requireIMDSv2: false,
|
|
45
|
+
selectBlockDeviceMappingsSource: jasmine.createSpy('selectBlockDeviceMappingsSource'),
|
|
46
|
+
suspendedProcesses: [],
|
|
47
|
+
tags: {},
|
|
48
|
+
terminationPolicies: [],
|
|
49
|
+
toggleSuspendedProcess: jasmine.createSpy('toggleSuspendedProcess'),
|
|
50
|
+
viewState: { useSimpleInstanceTypeSelector: true },
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|