@spinnaker/amazon 2026.2.2 → 2026.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aws.module.d.ts +2 -1
- package/dist/aws.services.d.ts +8 -0
- package/dist/certificates/AmazonCertificateReader.d.ts +1 -1
- package/dist/domain/IAmazonServerGroup.d.ts +10 -0
- package/dist/function/CreateLambdaFunction.d.ts +10 -5
- package/dist/function/configure/Network.d.ts +3 -0
- package/dist/function/details/FunctionActions.d.ts +3 -0
- package/dist/function/function.transformer.d.ts +1 -0
- package/dist/image/image.reader.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/instance/amazon.instance.write.service.d.ts +5 -5
- package/dist/instance/awsInstanceType.service.d.ts +13 -2
- package/dist/instance/details/AmazonInstanceDetails.d.ts +67 -0
- package/dist/instance/index.d.ts +1 -0
- package/dist/keyPairs/KeyPairsReader.d.ts +1 -1
- package/dist/loadBalancer/AmazonLoadBalancersTag.d.ts +7 -4
- package/dist/loadBalancer/OidcConfigReader.d.ts +1 -1
- package/dist/loadBalancer/TargetGroupDetails.d.ts +37 -3
- package/dist/loadBalancer/amazonLoadBalancerDataUtils.d.ts +1 -1
- package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +6 -2
- package/dist/loadBalancer/configure/LoadBalancerTypes.d.ts +4 -4
- package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/configure/classic/CreateClassicLoadBalancer.d.ts +12 -7
- package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +4 -0
- package/dist/loadBalancer/configure/network/CreateNetworkLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/details/LoadBalancerActions.d.ts +9 -2
- package/dist/loadBalancer/details/amazonLoadBalancerDetails.d.ts +22 -0
- package/dist/loadBalancer/index.d.ts +1 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +1 -1
- package/dist/pipeline/stages/AmazonStageConfig.d.ts +11 -0
- package/dist/pipeline/stages/bake/AwsBakeStageConfig.d.ts +66 -0
- package/dist/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/deleteLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +5 -4
- package/dist/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.d.ts +1 -3
- package/dist/pipeline/stages/deployLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/destroyAsg/awsDestroyAsgStage.d.ts +26 -2
- package/dist/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.d.ts +27 -0
- package/dist/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/findAmi/awsFindAmiStage.d.ts +17 -2
- package/dist/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.d.ts +12 -2
- package/dist/pipeline/stages/invokeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.d.ts +20 -2
- package/dist/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.d.ts +20 -0
- package/dist/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/resizeAsg/awsResizeAsgStage.d.ts +40 -2
- package/dist/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/routeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.d.ts +22 -0
- package/dist/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.d.ts +21 -0
- package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +5 -2
- package/dist/pipeline/stages/updateCodeLambda/index.d.ts +1 -1
- package/dist/search/searchResultFormatter.d.ts +4 -2
- package/dist/securityGroup/configure/AmazonSecurityGroupModal.d.ts +43 -0
- package/dist/securityGroup/details/AmazonSecurityGroupDetails.d.ts +62 -0
- package/dist/securityGroup/details/index.d.ts +1 -0
- package/dist/securityGroup/index.d.ts +1 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +0 -1
- package/dist/securityGroup/securityGroup.transformer.d.ts +11 -2
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +23 -7
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +17 -13
- package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +16 -6
- package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +6 -3
- package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +3 -0
- package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +4 -0
- package/dist/serverGroup/details/AmazonServerGroupActions.d.ts +10 -2
- package/dist/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.d.ts +17 -0
- package/dist/serverGroup/details/advancedSettings/index.d.ts +1 -0
- package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +5 -3
- package/dist/serverGroup/details/rollback/AmazonRollbackServerGroupModal.d.ts +67 -0
- package/dist/serverGroup/details/rollback/index.d.ts +2 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroupSelection.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicyWriter.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.d.ts +24 -0
- package/dist/serverGroup/details/scalingProcesses/index.d.ts +2 -0
- package/dist/serverGroup/details/scheduledActions/EditScheduledActionsModal.d.ts +31 -0
- package/dist/serverGroup/details/scheduledActions/index.d.ts +1 -0
- package/dist/serverGroup/details/sections/AdvancedSettingsDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/AmazonCapacityDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/ScalingProcessesDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/ScheduledActionsDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/SecurityGroupsDetailsSection.d.ts +4 -1
- package/dist/serverGroup/details/sections/WarmPoolDetailsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/index.d.ts +1 -0
- package/dist/serverGroup/details/securityGroups/EditSecurityGroupsModal.d.ts +32 -0
- package/dist/serverGroup/details/securityGroups/index.d.ts +1 -0
- package/dist/serverGroup/details/warmPool/ModifyWarmPoolModal.d.ts +26 -0
- package/dist/serverGroup/details/warmPool/WarmPoolService.d.ts +6 -0
- package/dist/serverGroup/details/warmPool/index.d.ts +2 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +1 -2
- package/dist/vpc/VpcReader.d.ts +2 -2
- package/dist/vpc/index.d.ts +1 -0
- package/package.json +3 -12
- package/src/aws.module.spec.ts +296 -0
- package/src/aws.module.ts +107 -112
- package/src/aws.services.ts +21 -0
- package/src/certificates/AmazonCertificateReader.ts +1 -1
- package/src/domain/IAmazonServerGroup.ts +9 -0
- package/src/function/CreateLambdaFunction.tsx +29 -16
- package/src/function/configure/Network.tsx +8 -4
- package/src/function/details/AmazonFunctionDetails.tsx +4 -5
- package/src/function/details/FunctionActions.tsx +5 -1
- package/src/function/function.transformer.ts +4 -0
- package/src/image/image.reader.ts +3 -5
- package/src/index.ts +2 -2
- package/src/instance/amazon.instance.write.service.ts +15 -4
- package/src/instance/awsInstanceType.service.spec.js +172 -136
- package/src/instance/awsInstanceType.service.ts +142 -154
- package/src/instance/details/AmazonInstanceDetails.spec.tsx +79 -0
- package/src/instance/details/AmazonInstanceDetails.tsx +644 -0
- package/src/instance/details/InstanceInformation.tsx +11 -14
- package/src/instance/details/InstanceSecurityGroups.tsx +20 -23
- package/src/instance/details/InstanceTags.tsx +5 -3
- package/src/instance/index.ts +1 -0
- package/src/keyPairs/KeyPairsReader.ts +1 -1
- package/src/loadBalancer/AmazonLoadBalancersTag.spec.tsx +39 -0
- package/src/loadBalancer/AmazonLoadBalancersTag.tsx +21 -14
- package/src/loadBalancer/OidcConfigReader.ts +1 -1
- package/src/loadBalancer/TargetGroupDetails.spec.tsx +113 -0
- package/src/loadBalancer/TargetGroupDetails.tsx +287 -7
- package/src/loadBalancer/amazonLoadBalancerDataUtils.ts +21 -21
- package/src/loadBalancer/configure/AmazonLoadBalancerChoiceModal.tsx +17 -4
- package/src/loadBalancer/configure/LoadBalancerTypes.ts +7 -4
- package/src/loadBalancer/configure/application/ALBListeners.tsx +1 -2
- package/src/loadBalancer/configure/application/CreateApplicationLoadBalancer.tsx +28 -18
- package/src/loadBalancer/configure/classic/CreateClassicLoadBalancer.tsx +29 -19
- package/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +1 -1
- package/src/loadBalancer/configure/common/SecurityGroups.spec.tsx +27 -0
- package/src/loadBalancer/configure/common/SecurityGroups.tsx +11 -5
- package/src/loadBalancer/configure/network/CreateNetworkLoadBalancer.tsx +28 -18
- package/src/loadBalancer/details/LoadBalancerActions.tsx +19 -5
- package/src/loadBalancer/details/amazonLoadBalancerDetails.spec.tsx +141 -0
- package/src/loadBalancer/details/amazonLoadBalancerDetails.tsx +599 -0
- package/src/loadBalancer/index.ts +1 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +3 -4
- package/src/pipeline/stages/AmazonStageConfig.spec.tsx +103 -0
- package/src/pipeline/stages/AmazonStageConfig.tsx +259 -0
- package/src/pipeline/stages/bake/AwsBakeStageConfig.tsx +708 -0
- package/src/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.tsx +275 -0
- package/src/pipeline/stages/deleteLambda/index.ts +2 -6
- package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +14 -33
- package/src/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.tsx +264 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.spec.tsx +403 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.ts +21 -29
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.ts +1 -11
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.tsx +4 -3
- package/src/pipeline/stages/deployLambda/components/NetworkForm.tsx +3 -6
- package/src/pipeline/stages/deployLambda/index.ts +2 -6
- package/src/pipeline/stages/destroyAsg/awsDestroyAsgStage.js +28 -65
- package/src/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.tsx +103 -0
- package/src/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.tsx +119 -0
- package/src/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.tsx +98 -0
- package/src/pipeline/stages/findAmi/awsFindAmiStage.js +22 -79
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.spec.tsx +122 -0
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.tsx +71 -0
- package/src/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.js +17 -32
- package/src/pipeline/stages/invokeLambda/index.ts +2 -6
- package/src/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.tsx +146 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.js +27 -98
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.spec.tsx +167 -0
- package/src/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.tsx +157 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.js +26 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.spec.tsx +89 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.spec.tsx +617 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.tsx +340 -0
- package/src/pipeline/stages/resizeAsg/awsResizeAsgStage.js +34 -125
- package/src/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.tsx +129 -0
- package/src/pipeline/stages/routeLambda/index.ts +2 -6
- package/src/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.tsx +121 -0
- package/src/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.tsx +136 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.spec.tsx +167 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.tsx +94 -0
- package/src/pipeline/stages/updateCodeLambda/index.ts +2 -6
- package/src/routerConsumers.spec.tsx +207 -0
- package/src/search/searchResultFormatter.ts +9 -16
- package/src/securityGroup/configure/AmazonSecurityGroupModal.spec.tsx +170 -0
- package/src/securityGroup/configure/AmazonSecurityGroupModal.tsx +440 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.spec.tsx +62 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.tsx +444 -0
- package/src/securityGroup/details/IPRangeRules.tsx +1 -1
- package/src/securityGroup/details/index.ts +1 -0
- package/src/securityGroup/index.ts +1 -0
- package/src/securityGroup/securityGroup.reader.ts +0 -5
- package/src/securityGroup/securityGroup.transformer.ts +35 -0
- package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +104 -80
- package/src/serverGroup/configure/AmazonImageSelectInput.tsx +37 -18
- package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +28 -66
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +476 -465
- package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +76 -124
- package/src/serverGroup/configure/serverGroupConfiguration.service.ts +106 -103
- package/src/serverGroup/configure/wizard/AmazonCloneServerGroupModal.tsx +65 -25
- package/src/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.tsx +3 -3
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.tsx +2 -2
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.spec.tsx +105 -0
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.tsx +20 -6
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.spec.tsx +39 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +10 -9
- package/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +2 -2
- package/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +5 -2
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.spec.tsx +53 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +35 -33
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.spec.tsx +20 -0
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.tsx +9 -4
- package/src/serverGroup/details/AmazonServerGroupActions.spec.tsx +186 -0
- package/src/serverGroup/details/AmazonServerGroupActions.tsx +37 -87
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.spec.tsx +110 -0
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.tsx +117 -0
- package/src/serverGroup/details/advancedSettings/index.ts +1 -0
- package/src/serverGroup/details/amazonServerGroupDetailsGetter.ts +4 -4
- package/src/serverGroup/details/resize/AmazonResizeServerGroupModal.tsx +16 -6
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.spec.tsx +285 -0
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.tsx +449 -0
- package/src/serverGroup/details/rollback/index.ts +2 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.spec.ts +101 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.ts +81 -0
- package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +4 -4
- package/src/serverGroup/details/scalingPolicy/ScalingPolicyWriter.ts +2 -5
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.tsx +0 -2
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.spec.tsx +74 -0
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.tsx +140 -0
- package/src/serverGroup/details/scalingProcesses/index.ts +2 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.spec.tsx +115 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.tsx +205 -0
- package/src/serverGroup/details/scheduledActions/index.ts +1 -0
- package/src/serverGroup/details/sections/AdvancedSettingsDetailsSection.tsx +7 -14
- package/src/serverGroup/details/sections/AmazonCapacityDetailsSection.tsx +14 -2
- package/src/serverGroup/details/sections/AmazonServerGroupMaintenanceActions.spec.tsx +148 -0
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/ScalingProcessesDetailsSection.tsx +8 -20
- package/src/serverGroup/details/sections/ScheduledActionsDetailsSection.tsx +7 -12
- package/src/serverGroup/details/sections/SecurityGroupsDetailsSection.tsx +14 -19
- package/src/serverGroup/details/sections/WarmPoolDetailsSection.tsx +44 -0
- package/src/serverGroup/details/sections/index.ts +1 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.spec.tsx +161 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.tsx +177 -0
- package/src/serverGroup/details/securityGroups/index.ts +1 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.spec.tsx +69 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.tsx +191 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.spec.ts +30 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.ts +15 -0
- package/src/serverGroup/details/warmPool/index.ts +2 -0
- package/src/serverGroup/serverGroup.transformer.ts +1 -6
- package/src/vpc/VpcReader.ts +2 -2
- package/src/vpc/index.ts +1 -0
- package/dist/common/common.module.d.ts +0 -1
- package/dist/common/footer.component.d.ts +0 -1
- package/dist/function/function.module.d.ts +0 -1
- package/dist/instance/details/amazonInstanceInformation.component.d.ts +0 -1
- package/dist/instance/details/instance.details.controller.d.ts +0 -2
- package/dist/instance/details/instanceDns.component.d.ts +0 -1
- package/dist/instance/details/instanceSecurityGroups.component.d.ts +0 -1
- package/dist/instance/details/instanceStatus.component.d.ts +0 -1
- package/dist/instance/details/instanceTags.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerActions.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerDetails.controller.d.ts +0 -41
- package/dist/loadBalancer/details/targetGroupDetails.controller.d.ts +0 -30
- package/dist/loadBalancer/loadBalancer.module.d.ts +0 -1
- package/dist/loadBalancer/targetGroup.states.d.ts +0 -1
- package/dist/pipeline/stages/bake/awsBakeStage.d.ts +0 -2
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +0 -2
- package/dist/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.d.ts +0 -2
- package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts +0 -1
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.d.ts +0 -25
- package/dist/pipeline/stages/disableAsg/awsDisableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/disableCluster/awsDisableClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/enableAsg/awsEnableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/rollbackCluster/awsRollbackClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/shrinkCluster/awsShrinkClusterStage.d.ts +0 -2
- package/dist/reactShims/aws.react.injector.d.ts +0 -18
- package/dist/reactShims/aws.react.module.d.ts +0 -1
- package/dist/reactShims/index.d.ts +0 -1
- package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +0 -2
- package/dist/securityGroup/configure/CreateSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/EditSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/configSecurityGroup.mixin.controller.d.ts +0 -2
- package/dist/securityGroup/configure/ingressRuleGroupSelector.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.d.ts +0 -10
- package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +0 -2
- package/dist/securityGroup/details/securityGroupIpRangeRules.component.d.ts +0 -1
- package/dist/securityGroup/securityGroup.module.d.ts +0 -1
- package/dist/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +0 -2
- package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicySummary.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.d.ts +0 -2
- package/dist/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/serverGroupDetails.module.d.ts +0 -1
- package/dist/subnet/subnet.renderer.d.ts +0 -5
- package/dist/vpc/vpc.module.d.ts +0 -1
- package/src/applicationProviderFields/awsFields.html +0 -13
- package/src/common/common.module.ts +0 -6
- package/src/common/footer.component.ts +0 -29
- package/src/function/function.module.ts +0 -5
- package/src/image/image.reader.spec.ts +0 -75
- package/src/instance/details/amazonInstanceInformation.component.ts +0 -13
- package/src/instance/details/instance.details.controller.js +0 -586
- package/src/instance/details/instance.details.controller.spec.js +0 -133
- package/src/instance/details/instanceDetails.html +0 -65
- package/src/instance/details/instanceDns.component.ts +0 -21
- package/src/instance/details/instanceSecurityGroups.component.ts +0 -13
- package/src/instance/details/instanceStatus.component.ts +0 -19
- package/src/instance/details/instanceTags.component.ts +0 -13
- package/src/loadBalancer/details/loadBalancerActions.component.ts +0 -16
- package/src/loadBalancer/details/loadBalancerDetails.controller.spec.ts +0 -76
- package/src/loadBalancer/details/loadBalancerDetails.controller.ts +0 -240
- package/src/loadBalancer/details/loadBalancerDetails.html +0 -266
- package/src/loadBalancer/details/targetGroupDetails.controller.ts +0 -95
- package/src/loadBalancer/details/targetGroupDetails.html +0 -138
- package/src/loadBalancer/loadBalancer.module.ts +0 -15
- package/src/loadBalancer/targetGroup.states.ts +0 -55
- package/src/pipeline/stages/bake/awsBakeStage.js +0 -219
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +0 -43
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +0 -65
- package/src/pipeline/stages/bake/bakeStage.html +0 -205
- package/src/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.js +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +0 -1
- package/src/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.ts +0 -46
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.ts +0 -84
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.html +0 -84
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +0 -9
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableAsg/awsDisableAsgStage.js +0 -69
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +0 -11
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableCluster/awsDisableClusterStage.js +0 -84
- package/src/pipeline/stages/disableCluster/disableClusterStage.html +0 -26
- package/src/pipeline/stages/enableAsg/awsEnableAsgStage.js +0 -73
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +0 -11
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/findAmi/findAmiStage.html +0 -24
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +0 -44
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +0 -11
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessExecutionDetails.html +0 -36
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.html +0 -24
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +0 -90
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +0 -4
- package/src/pipeline/stages/rollbackCluster/awsRollbackClusterStage.js +0 -66
- package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html +0 -43
- package/src/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.js +0 -78
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +0 -35
- package/src/pipeline/stages/shrinkCluster/awsShrinkClusterStage.js +0 -73
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +0 -34
- package/src/pipeline/stages/tagImage/awsTagImageStage.js +0 -34
- package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +0 -38
- package/src/pipeline/stages/tagImage/tagImageStage.html +0 -10
- package/src/reactShims/aws.react.injector.ts +0 -25
- package/src/reactShims/aws.react.module.ts +0 -12
- package/src/reactShims/index.ts +0 -1
- package/src/securityGroup/clone/cloneSecurityGroup.controller.js +0 -106
- package/src/securityGroup/clone/cloneSecurityGroup.html +0 -19
- package/src/securityGroup/configure/CreateSecurityGroup.controller.spec.js +0 -307
- package/src/securityGroup/configure/CreateSecurityGroupCtrl.js +0 -47
- package/src/securityGroup/configure/EditSecurityGroupCtrl.js +0 -115
- package/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +0 -366
- package/src/securityGroup/configure/createSecurityGroup.html +0 -19
- package/src/securityGroup/configure/createSecurityGroupIngress.html +0 -100
- package/src/securityGroup/configure/createSecurityGroupProperties.html +0 -123
- package/src/securityGroup/configure/editSecurityGroup.html +0 -20
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.html +0 -77
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.less +0 -6
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.ts +0 -190
- package/src/securityGroup/configure/securityGroupDetailsCustom.component.ts +0 -16
- package/src/securityGroup/configure/securityGroupDetailsCustom.tsx +0 -16
- package/src/securityGroup/details/securityGroupDetail.controller.js +0 -249
- package/src/securityGroup/details/securityGroupDetail.html +0 -114
- package/src/securityGroup/details/securityGroupIpRangeRules.component.ts +0 -12
- package/src/securityGroup/securityGroup.module.ts +0 -26
- package/src/securityGroup/securityGroup.transformer.js +0 -48
- package/src/serverGroup/configure/serverGroupConfiguration.service.spec.ts +0 -478
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.js +0 -47
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.html +0 -79
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +0 -146
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +0 -139
- package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +0 -15
- package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +0 -6
- package/src/serverGroup/details/scalingPolicy/scalingPolicySummary.component.ts +0 -14
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/dimensionsEditor.less +0 -18
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.js +0 -95
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.spec.js +0 -106
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.html +0 -30
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.js +0 -70
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.html +0 -89
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.js +0 -95
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.html +0 -40
- package/src/serverGroup/details/serverGroupDetails.module.ts +0 -18
- package/src/serverGroup/serverGroup.transformer.spec.ts +0 -185
- package/src/subnet/SubnetSelectInput.spec.tsx +0 -91
- package/src/subnet/subnet.renderer.ts +0 -12
- package/src/vpc/vpc.module.ts +0 -9
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
import { UISref } from '@uirouter/react';
|
|
2
|
+
import { groupBy, isEmpty } from 'lodash';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Dropdown, MenuItem } from 'react-bootstrap';
|
|
5
|
+
|
|
6
|
+
import type {
|
|
7
|
+
Application,
|
|
8
|
+
IRouterInjectedProps,
|
|
9
|
+
ISecurityGroup,
|
|
10
|
+
ISecurityGroupDetail,
|
|
11
|
+
SecurityGroupReader,
|
|
12
|
+
} from '@spinnaker/core';
|
|
13
|
+
import {
|
|
14
|
+
AccountTag,
|
|
15
|
+
AddEntityTagLinks,
|
|
16
|
+
CollapsibleSection,
|
|
17
|
+
ConfirmationModalService,
|
|
18
|
+
confirmNotManaged,
|
|
19
|
+
DeckRuntimeContext,
|
|
20
|
+
FirewallLabels,
|
|
21
|
+
ManagedResourceDetailsIndicator,
|
|
22
|
+
RecentHistoryService,
|
|
23
|
+
SecurityGroupWriter,
|
|
24
|
+
SETTINGS,
|
|
25
|
+
Spinner,
|
|
26
|
+
withRouter,
|
|
27
|
+
} from '@spinnaker/core';
|
|
28
|
+
|
|
29
|
+
import { IPRangeRules } from './IPRangeRules';
|
|
30
|
+
import { AWSProviderSettings } from '../../aws.settings';
|
|
31
|
+
import { AmazonSecurityGroupModal } from '../configure/AmazonSecurityGroupModal';
|
|
32
|
+
import { VpcReader } from '../../vpc/VpcReader';
|
|
33
|
+
|
|
34
|
+
interface IAmazonResolvedSecurityGroup {
|
|
35
|
+
accountId?: string;
|
|
36
|
+
name: string;
|
|
37
|
+
provider?: string;
|
|
38
|
+
region: string;
|
|
39
|
+
vpcId?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface IAmazonSecurityGroupDetailsProps {
|
|
43
|
+
app: Application;
|
|
44
|
+
autoClose?: () => void;
|
|
45
|
+
resolvedSecurityGroup: IAmazonResolvedSecurityGroup;
|
|
46
|
+
securityGroupReader?: SecurityGroupReader;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface IAmazonSecurityGroupDetailsState {
|
|
50
|
+
loading: boolean;
|
|
51
|
+
notFound?: boolean;
|
|
52
|
+
securityGroup?: ISecurityGroupDetail & ISecurityGroup & Record<string, any>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ISecurityGroupRuleModel {
|
|
56
|
+
rules: ISecurityGroupPortRangeRule[];
|
|
57
|
+
securityGroup: ISecurityGroup;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface ISecurityGroupPortRangeRule {
|
|
61
|
+
description: string;
|
|
62
|
+
endPort: number;
|
|
63
|
+
protocol: string;
|
|
64
|
+
startPort: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function buildRuleModel(groupedRangeRules: any, address: string): ISecurityGroupPortRangeRule[] {
|
|
68
|
+
const rules: ISecurityGroupPortRangeRule[] = [];
|
|
69
|
+
groupedRangeRules[address].forEach((rule: any) => {
|
|
70
|
+
(rule.portRanges || []).forEach((range: any) => {
|
|
71
|
+
if (rule.protocol === '-1' || (range.startPort !== undefined && range.endPort !== undefined)) {
|
|
72
|
+
rules.push({
|
|
73
|
+
startPort: range.startPort,
|
|
74
|
+
endPort: range.endPort,
|
|
75
|
+
protocol: rule.protocol,
|
|
76
|
+
description: rule.description || '',
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
return rules;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function buildIpRulesModel(details: any) {
|
|
85
|
+
const groupedRangeRules = groupBy(details.ipRangeRules || [], (rule: any) => rule.range.ip + rule.range.cidr);
|
|
86
|
+
return Object.keys(groupedRangeRules)
|
|
87
|
+
.map((address) => ({ address, rules: buildRuleModel(groupedRangeRules, address) }))
|
|
88
|
+
.filter((rule) => rule.rules.length);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function buildSecurityGroupRulesModel(details: any): ISecurityGroupRuleModel[] {
|
|
92
|
+
const groupedRangeRules = groupBy(details.securityGroupRules || [], (rule: any) => rule.securityGroup.id);
|
|
93
|
+
return Object.keys(groupedRangeRules)
|
|
94
|
+
.map((address) => ({
|
|
95
|
+
securityGroup: groupedRangeRules[address][0].securityGroup,
|
|
96
|
+
rules: buildRuleModel(groupedRangeRules, address),
|
|
97
|
+
}))
|
|
98
|
+
.filter((rule) => rule.rules.length);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function accountFor(securityGroup: any, resolvedSecurityGroup?: IAmazonResolvedSecurityGroup): string {
|
|
102
|
+
return (
|
|
103
|
+
securityGroup.accountId ||
|
|
104
|
+
securityGroup.accountName ||
|
|
105
|
+
securityGroup.account ||
|
|
106
|
+
securityGroup.credentials ||
|
|
107
|
+
resolvedSecurityGroup?.accountId
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function withResolvedCoordinates(securityGroup: any, resolvedSecurityGroup?: IAmazonResolvedSecurityGroup): any {
|
|
112
|
+
if (!resolvedSecurityGroup) {
|
|
113
|
+
return securityGroup;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const accountId = accountFor(securityGroup, resolvedSecurityGroup);
|
|
117
|
+
return {
|
|
118
|
+
...securityGroup,
|
|
119
|
+
accountId,
|
|
120
|
+
accountName: securityGroup.accountName || accountId,
|
|
121
|
+
name: securityGroup.name || resolvedSecurityGroup.name,
|
|
122
|
+
region: securityGroup.region || resolvedSecurityGroup.region,
|
|
123
|
+
vpcId: securityGroup.vpcId || resolvedSecurityGroup.vpcId,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function AmazonSecurityGroupActions({
|
|
128
|
+
app,
|
|
129
|
+
resolvedSecurityGroup,
|
|
130
|
+
securityGroup,
|
|
131
|
+
}: {
|
|
132
|
+
app: Application;
|
|
133
|
+
resolvedSecurityGroup?: IAmazonResolvedSecurityGroup;
|
|
134
|
+
securityGroup: any;
|
|
135
|
+
}): JSX.Element | null {
|
|
136
|
+
if (!AWSProviderSettings.adHocInfraWritesEnabled) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const securityGroupWithCoordinates = withResolvedCoordinates(securityGroup, resolvedSecurityGroup);
|
|
141
|
+
const editInboundRules = () => {
|
|
142
|
+
confirmNotManaged(securityGroupWithCoordinates, app).then((notManaged) => {
|
|
143
|
+
if (notManaged) {
|
|
144
|
+
AmazonSecurityGroupModal.show({ app, mode: 'edit', securityGroup: securityGroupWithCoordinates });
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
const cloneSecurityGroup = () => {
|
|
149
|
+
AmazonSecurityGroupModal.show({ app, mode: 'clone', securityGroup: securityGroupWithCoordinates });
|
|
150
|
+
};
|
|
151
|
+
const deleteSecurityGroup = () => {
|
|
152
|
+
let isRetry = false;
|
|
153
|
+
confirmNotManaged(securityGroupWithCoordinates, app).then((notManaged) => {
|
|
154
|
+
if (!notManaged) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
ConfirmationModalService.confirm({
|
|
159
|
+
header: `Really delete ${securityGroupWithCoordinates.name}?`,
|
|
160
|
+
buttonText: `Delete ${securityGroupWithCoordinates.name}`,
|
|
161
|
+
account: accountFor(securityGroupWithCoordinates),
|
|
162
|
+
taskMonitorConfig: {
|
|
163
|
+
application: app,
|
|
164
|
+
title: `Deleting ${securityGroupWithCoordinates.name}`,
|
|
165
|
+
onTaskRetry: () => {
|
|
166
|
+
isRetry = true;
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
submitMethod: () => {
|
|
170
|
+
const params: any = {
|
|
171
|
+
cloudProvider: securityGroupWithCoordinates.provider || 'aws',
|
|
172
|
+
vpcId: securityGroupWithCoordinates.vpcId,
|
|
173
|
+
};
|
|
174
|
+
if (isRetry) {
|
|
175
|
+
params.removeDependencies = true;
|
|
176
|
+
}
|
|
177
|
+
return SecurityGroupWriter.deleteSecurityGroup(securityGroupWithCoordinates, app, params);
|
|
178
|
+
},
|
|
179
|
+
retryBody: `<div><p>Retry deleting the ${FirewallLabels.get(
|
|
180
|
+
'firewall',
|
|
181
|
+
)} and revoke any dependent ingress rules?</p><p>Any instance or load balancer associations will have to removed manually.</p></div>`,
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
return (
|
|
187
|
+
<Dropdown className="dropdown" id="amazon-security-group-actions-dropdown">
|
|
188
|
+
<Dropdown.Toggle className="btn btn-sm btn-primary dropdown-toggle">
|
|
189
|
+
{FirewallLabels.get('Firewall')} Actions
|
|
190
|
+
</Dropdown.Toggle>
|
|
191
|
+
<Dropdown.Menu>
|
|
192
|
+
<MenuItem onClick={editInboundRules}>Edit Inbound Rules</MenuItem>
|
|
193
|
+
<MenuItem onClick={deleteSecurityGroup}>Delete {FirewallLabels.get('Firewall')}</MenuItem>
|
|
194
|
+
<MenuItem onClick={cloneSecurityGroup}>Clone {FirewallLabels.get('Firewall')}</MenuItem>
|
|
195
|
+
{SETTINGS.feature.entityTags && (
|
|
196
|
+
<AddEntityTagLinks
|
|
197
|
+
component={securityGroupWithCoordinates}
|
|
198
|
+
application={app}
|
|
199
|
+
entityType="securityGroup"
|
|
200
|
+
onUpdate={() => app.securityGroups.refresh()}
|
|
201
|
+
/>
|
|
202
|
+
)}
|
|
203
|
+
</Dropdown.Menu>
|
|
204
|
+
</Dropdown>
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export class AmazonSecurityGroupDetailsComponent extends React.Component<
|
|
209
|
+
IAmazonSecurityGroupDetailsProps & IRouterInjectedProps,
|
|
210
|
+
IAmazonSecurityGroupDetailsState
|
|
211
|
+
> {
|
|
212
|
+
public static contextType = DeckRuntimeContext;
|
|
213
|
+
public declare context: React.ContextType<typeof DeckRuntimeContext>;
|
|
214
|
+
|
|
215
|
+
public state: IAmazonSecurityGroupDetailsState = { loading: true };
|
|
216
|
+
|
|
217
|
+
private isUnmounted = false;
|
|
218
|
+
private loadRequestId = 0;
|
|
219
|
+
private unsubscribeFromRefresh: () => void;
|
|
220
|
+
|
|
221
|
+
public componentDidMount(): void {
|
|
222
|
+
const dataSource = this.props.app.getDataSource?.('securityGroups');
|
|
223
|
+
if (!dataSource) {
|
|
224
|
+
this.loadSecurityGroup();
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
dataSource.ready().then(() => {
|
|
229
|
+
if (this.isUnmounted) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
this.loadSecurityGroup();
|
|
233
|
+
this.unsubscribeFromRefresh = dataSource.onRefresh(this.loadSecurityGroup);
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
public componentDidUpdate(prevProps: IAmazonSecurityGroupDetailsProps): void {
|
|
238
|
+
if (this.getCoordinatesKey(prevProps) !== this.getCoordinatesKey(this.props)) {
|
|
239
|
+
this.loadSecurityGroup();
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
public componentWillUnmount(): void {
|
|
244
|
+
this.isUnmounted = true;
|
|
245
|
+
if (this.unsubscribeFromRefresh) {
|
|
246
|
+
this.unsubscribeFromRefresh();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
private getCoordinatesKey(props: IAmazonSecurityGroupDetailsProps): string {
|
|
251
|
+
const { accountId, name, region, vpcId } = props.resolvedSecurityGroup;
|
|
252
|
+
return [accountId, region, vpcId || '', name].join(':');
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
private getSecurityGroupReader(): SecurityGroupReader {
|
|
256
|
+
return this.props.securityGroupReader || this.context.services.securityGroupReader;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
private autoClose = (): void => {
|
|
260
|
+
if (this.isUnmounted) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
if (this.props.autoClose) {
|
|
264
|
+
this.props.autoClose();
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
if (this.props.app.isStandalone) {
|
|
268
|
+
RecentHistoryService.removeLastItem('securityGroups');
|
|
269
|
+
this.setState({ loading: false, notFound: true });
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
this.props.stateService.go('^', { allowModalToStayOpen: true }, { location: 'replace' });
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
private loadSecurityGroup = (): void => {
|
|
276
|
+
const { app, resolvedSecurityGroup } = this.props;
|
|
277
|
+
const requestId = ++this.loadRequestId;
|
|
278
|
+
this.setState({ loading: true, notFound: false });
|
|
279
|
+
this.getSecurityGroupReader()
|
|
280
|
+
.getSecurityGroupDetails(
|
|
281
|
+
app,
|
|
282
|
+
resolvedSecurityGroup.accountId,
|
|
283
|
+
'aws',
|
|
284
|
+
resolvedSecurityGroup.region,
|
|
285
|
+
resolvedSecurityGroup.vpcId || '',
|
|
286
|
+
resolvedSecurityGroup.name,
|
|
287
|
+
)
|
|
288
|
+
.then(
|
|
289
|
+
(details: ISecurityGroupDetail & ISecurityGroup & Record<string, any>): Promise<void> => {
|
|
290
|
+
if (this.isUnmounted || requestId !== this.loadRequestId) {
|
|
291
|
+
return Promise.resolve();
|
|
292
|
+
}
|
|
293
|
+
if (!details || isEmpty(details)) {
|
|
294
|
+
this.autoClose();
|
|
295
|
+
return Promise.resolve();
|
|
296
|
+
}
|
|
297
|
+
return Promise.resolve(VpcReader.getVpcName(details.vpcId)).then((vpcName) => {
|
|
298
|
+
if (this.isUnmounted || requestId !== this.loadRequestId) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const applicationSecurityGroup = this.getSecurityGroupReader().getApplicationSecurityGroup(
|
|
303
|
+
app,
|
|
304
|
+
resolvedSecurityGroup.accountId,
|
|
305
|
+
resolvedSecurityGroup.region,
|
|
306
|
+
resolvedSecurityGroup.name,
|
|
307
|
+
);
|
|
308
|
+
this.setState({
|
|
309
|
+
loading: false,
|
|
310
|
+
securityGroup: withResolvedCoordinates(
|
|
311
|
+
{ ...applicationSecurityGroup, ...details, vpcName },
|
|
312
|
+
resolvedSecurityGroup,
|
|
313
|
+
),
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
},
|
|
317
|
+
)
|
|
318
|
+
.catch(() => {
|
|
319
|
+
if (requestId === this.loadRequestId) {
|
|
320
|
+
this.autoClose();
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
private closeDetails = (): void => {
|
|
326
|
+
this.props.stateService.go('^');
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
public render(): JSX.Element {
|
|
330
|
+
const { app, resolvedSecurityGroup } = this.props;
|
|
331
|
+
const { loading, notFound, securityGroup } = this.state;
|
|
332
|
+
|
|
333
|
+
if (notFound) {
|
|
334
|
+
return (
|
|
335
|
+
<div className="text-center">
|
|
336
|
+
<h3>
|
|
337
|
+
Could not find {FirewallLabels.get('firewall')} {resolvedSecurityGroup.name}.
|
|
338
|
+
</h3>
|
|
339
|
+
<UISref to="home.infrastructure">
|
|
340
|
+
<a>Back to search results</a>
|
|
341
|
+
</UISref>
|
|
342
|
+
</div>
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
return (
|
|
347
|
+
<div className="details-panel">
|
|
348
|
+
<div className="header">
|
|
349
|
+
{!app.isStandalone && (
|
|
350
|
+
<div className="close-button">
|
|
351
|
+
<a className="btn btn-link" onClick={this.closeDetails}>
|
|
352
|
+
<span className="glyphicon glyphicon-remove" />
|
|
353
|
+
</a>
|
|
354
|
+
</div>
|
|
355
|
+
)}
|
|
356
|
+
{loading && (
|
|
357
|
+
<div className="horizontal center middle">
|
|
358
|
+
<Spinner size="small" />
|
|
359
|
+
</div>
|
|
360
|
+
)}
|
|
361
|
+
{!loading && securityGroup && (
|
|
362
|
+
<div className="header-text horizontal middle">
|
|
363
|
+
<span className="glyphicon glyphicon-transfer" />
|
|
364
|
+
<h3 className="horizontal middle space-between flex-1">{securityGroup.name || '(not found)'}</h3>
|
|
365
|
+
</div>
|
|
366
|
+
)}
|
|
367
|
+
{!loading && securityGroup && (
|
|
368
|
+
<div className="actions">
|
|
369
|
+
<AmazonSecurityGroupActions
|
|
370
|
+
app={app}
|
|
371
|
+
resolvedSecurityGroup={resolvedSecurityGroup}
|
|
372
|
+
securityGroup={securityGroup}
|
|
373
|
+
/>
|
|
374
|
+
</div>
|
|
375
|
+
)}
|
|
376
|
+
</div>
|
|
377
|
+
{!loading && securityGroup?.isManaged && (
|
|
378
|
+
<ManagedResourceDetailsIndicator resourceSummary={securityGroup.managedResourceSummary} application={app} />
|
|
379
|
+
)}
|
|
380
|
+
{!loading && securityGroup && (
|
|
381
|
+
<div className="content">
|
|
382
|
+
<CollapsibleSection heading={`${FirewallLabels.get('Firewall')} Details`} defaultExpanded={true}>
|
|
383
|
+
<dl className="dl-horizontal dl-medium">
|
|
384
|
+
<dt>ID</dt>
|
|
385
|
+
<dd>{securityGroup.id}</dd>
|
|
386
|
+
<dt>Account</dt>
|
|
387
|
+
<dd>
|
|
388
|
+
<AccountTag account={securityGroup.accountName || securityGroup.accountId} />
|
|
389
|
+
</dd>
|
|
390
|
+
<dt>Region</dt>
|
|
391
|
+
<dd>{securityGroup.region}</dd>
|
|
392
|
+
<dt>VPC</dt>
|
|
393
|
+
<dd>{securityGroup.vpcName || securityGroup.vpcId}</dd>
|
|
394
|
+
<dt>Description</dt>
|
|
395
|
+
<dd>{securityGroup.description}</dd>
|
|
396
|
+
</dl>
|
|
397
|
+
</CollapsibleSection>
|
|
398
|
+
<IPRangeRules ipRules={buildIpRulesModel(securityGroup)} />
|
|
399
|
+
<CollapsibleSection
|
|
400
|
+
heading={`${FirewallLabels.get('Firewall')} Rules (${
|
|
401
|
+
buildSecurityGroupRulesModel(securityGroup).length || 0
|
|
402
|
+
})`}
|
|
403
|
+
defaultExpanded={buildSecurityGroupRulesModel(securityGroup).length > 0}
|
|
404
|
+
>
|
|
405
|
+
{!buildSecurityGroupRulesModel(securityGroup).length && <div>None</div>}
|
|
406
|
+
{buildSecurityGroupRulesModel(securityGroup).map((rule) => (
|
|
407
|
+
<dl className="dl-horizontal dl-medium" key={rule.securityGroup.id || rule.securityGroup.name}>
|
|
408
|
+
<dt>{FirewallLabels.get('Firewall')}</dt>
|
|
409
|
+
<dd>
|
|
410
|
+
<UISref
|
|
411
|
+
to="^.firewallDetails"
|
|
412
|
+
params={{
|
|
413
|
+
name: rule.securityGroup.name,
|
|
414
|
+
accountId: rule.securityGroup.accountName || rule.securityGroup.accountId,
|
|
415
|
+
region: rule.securityGroup.region,
|
|
416
|
+
vpcId: rule.securityGroup.vpcId,
|
|
417
|
+
provider: 'aws',
|
|
418
|
+
}}
|
|
419
|
+
>
|
|
420
|
+
<a>
|
|
421
|
+
{rule.securityGroup.accountName !== securityGroup.accountName && (
|
|
422
|
+
<AccountTag account={rule.securityGroup.accountName || rule.securityGroup.accountId} />
|
|
423
|
+
)}{' '}
|
|
424
|
+
{rule.securityGroup.name} ({rule.securityGroup.id})
|
|
425
|
+
</a>
|
|
426
|
+
</UISref>
|
|
427
|
+
</dd>
|
|
428
|
+
<dt>Port Ranges</dt>
|
|
429
|
+
{rule.rules.map((portRange) => (
|
|
430
|
+
<dd key={`${portRange.protocol}-${portRange.startPort}-${portRange.endPort}`}>
|
|
431
|
+
{portRange.protocol}: {portRange.startPort} → {portRange.endPort}
|
|
432
|
+
</dd>
|
|
433
|
+
))}
|
|
434
|
+
</dl>
|
|
435
|
+
))}
|
|
436
|
+
</CollapsibleSection>
|
|
437
|
+
</div>
|
|
438
|
+
)}
|
|
439
|
+
</div>
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export const AmazonSecurityGroupDetails = withRouter(AmazonSecurityGroupDetailsComponent);
|
|
@@ -25,7 +25,7 @@ export class IPRangeRules extends React.Component<IIPRangeRulesProps> {
|
|
|
25
25
|
return (
|
|
26
26
|
<CollapsibleSection heading={heading}>
|
|
27
27
|
{ipRules.map((rule) => (
|
|
28
|
-
<LabeledValueList className="horizontal-when-filters-collapsed">
|
|
28
|
+
<LabeledValueList key={rule.address} className="horizontal-when-filters-collapsed">
|
|
29
29
|
<LabeledValue label="IP Range" value={rule.address} />
|
|
30
30
|
<LabeledValue
|
|
31
31
|
label="Port Ranges"
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { module } from 'angular';
|
|
2
|
-
|
|
3
1
|
import type { ISecurityGroup, ISecurityGroupsByAccount } from '@spinnaker/core';
|
|
4
2
|
|
|
5
3
|
export class AwsSecurityGroupReader {
|
|
@@ -19,6 +17,3 @@ export class AwsSecurityGroupReader {
|
|
|
19
17
|
return indexedSecurityGroups[container.account][container.region][securityGroupId];
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
|
-
|
|
23
|
-
export const AWS_SECURITY_GROUP_READER = 'spinnaker.amazon.securityGroup.reader';
|
|
24
|
-
module(AWS_SECURITY_GROUP_READER, []).service('awsSecurityGroupReader', AwsSecurityGroupReader);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { groupBy } from 'lodash';
|
|
2
|
+
|
|
3
|
+
import type { ISecurityGroup } from '@spinnaker/core';
|
|
4
|
+
|
|
5
|
+
import { VpcReader } from '../vpc/VpcReader';
|
|
6
|
+
|
|
7
|
+
export class AwsSecurityGroupTransformer {
|
|
8
|
+
public supportsCompression = true;
|
|
9
|
+
|
|
10
|
+
public normalizeSecurityGroup(securityGroup: ISecurityGroup): Promise<ISecurityGroup> {
|
|
11
|
+
return VpcReader.listVpcs().then((vpcs) => {
|
|
12
|
+
const match = vpcs.find((test) => test.id === securityGroup.vpcId);
|
|
13
|
+
securityGroup.vpcName = match ? match.name : '';
|
|
14
|
+
return securityGroup;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public compress(securityGroups: ISecurityGroup[]): { [vpcId: string]: string[][] } {
|
|
19
|
+
const grouped = groupBy(securityGroups, 'vpcId') as { [vpcId: string]: ISecurityGroup[] | string[][] };
|
|
20
|
+
Object.keys(grouped).forEach((vpcId) => {
|
|
21
|
+
grouped[vpcId] = (grouped[vpcId] as ISecurityGroup[]).map((g) => [g.name, g.id]);
|
|
22
|
+
});
|
|
23
|
+
return grouped as { [vpcId: string]: string[][] };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public decompress(groupedGroups: { [vpcId: string]: string[][] }): Array<Partial<ISecurityGroup>> {
|
|
27
|
+
const flattened: Array<Partial<ISecurityGroup>> = [];
|
|
28
|
+
Object.keys(groupedGroups).forEach((vpcId) => {
|
|
29
|
+
groupedGroups[vpcId].forEach((g) => {
|
|
30
|
+
flattened.push({ name: g[0], id: g[1], vpcId });
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return flattened;
|
|
34
|
+
}
|
|
35
|
+
}
|