@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,599 @@
|
|
|
1
|
+
import { UISref } from '@uirouter/react';
|
|
2
|
+
import { head, sortBy } from 'lodash';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Dropdown, MenuItem } from 'react-bootstrap';
|
|
5
|
+
|
|
6
|
+
import type {
|
|
7
|
+
Application,
|
|
8
|
+
IApplicationSecurityGroup,
|
|
9
|
+
ILoadBalancer,
|
|
10
|
+
ILoadBalancerActionsProps,
|
|
11
|
+
ILoadBalancerDetailsSectionProps,
|
|
12
|
+
IUseDetailsHookProps,
|
|
13
|
+
SecurityGroupReader,
|
|
14
|
+
UseDetailsResult,
|
|
15
|
+
} from '@spinnaker/core';
|
|
16
|
+
import {
|
|
17
|
+
AccountTag,
|
|
18
|
+
CollapsibleSection,
|
|
19
|
+
CopyToClipboard,
|
|
20
|
+
FirewallLabels,
|
|
21
|
+
HealthCounts,
|
|
22
|
+
ManagedResourceDetailsIndicator,
|
|
23
|
+
REST,
|
|
24
|
+
SubnetReader,
|
|
25
|
+
timestamp,
|
|
26
|
+
useDataSource,
|
|
27
|
+
useDeckRuntimeServices,
|
|
28
|
+
} from '@spinnaker/core';
|
|
29
|
+
|
|
30
|
+
import { LoadBalancerActions } from './LoadBalancerActions';
|
|
31
|
+
import type {
|
|
32
|
+
IAmazonApplicationLoadBalancer,
|
|
33
|
+
IAmazonLoadBalancer,
|
|
34
|
+
IAmazonLoadBalancerSourceData,
|
|
35
|
+
IApplicationLoadBalancerSourceData,
|
|
36
|
+
IClassicLoadBalancerSourceData,
|
|
37
|
+
IListenerAction,
|
|
38
|
+
ITargetGroup,
|
|
39
|
+
} from '../../domain';
|
|
40
|
+
import { VpcTag } from '../../vpc/VpcTag';
|
|
41
|
+
|
|
42
|
+
type ILoadBalancerStateParams = IUseDetailsHookProps['loadBalancerParams'];
|
|
43
|
+
|
|
44
|
+
interface ILoadAmazonLoadBalancerDetailsProps {
|
|
45
|
+
app: Application;
|
|
46
|
+
autoClose: () => void;
|
|
47
|
+
loadBalancerParams: ILoadBalancerStateParams;
|
|
48
|
+
loadBalancers?: ILoadBalancer[];
|
|
49
|
+
securityGroupReader?: SecurityGroupReader;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface IActionDetails extends IListenerAction {
|
|
53
|
+
targetGroup?: ITargetGroup;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function ipAddressTypeDescription(ipAddressType: string): string {
|
|
57
|
+
if (ipAddressType === 'dualstack') {
|
|
58
|
+
return 'IPv4 and IPv6';
|
|
59
|
+
}
|
|
60
|
+
if (ipAddressType === 'ipv4') {
|
|
61
|
+
return 'IPv4';
|
|
62
|
+
}
|
|
63
|
+
return '';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function getElbProtocol(loadBalancer: IAmazonLoadBalancer, details: IAmazonLoadBalancerSourceData): string {
|
|
67
|
+
const classic = details as IClassicLoadBalancerSourceData;
|
|
68
|
+
if (classic.listenerDescriptions?.some((listener: any) => listener.listener.protocol === 'HTTPS')) {
|
|
69
|
+
return 'https:';
|
|
70
|
+
}
|
|
71
|
+
const applicationLoadBalancer = loadBalancer as IAmazonApplicationLoadBalancer;
|
|
72
|
+
if (applicationLoadBalancer.listeners?.some((listener) => listener.protocol === 'HTTPS')) {
|
|
73
|
+
return 'https:';
|
|
74
|
+
}
|
|
75
|
+
return 'http:';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function buildListenerRows(
|
|
79
|
+
loadBalancer: IAmazonApplicationLoadBalancer,
|
|
80
|
+
): Array<{ in: string; actions: IActionDetails[] }> {
|
|
81
|
+
const listeners = loadBalancer.listeners || [];
|
|
82
|
+
const rows: Array<{ in: string; actions: IActionDetails[] }> = [];
|
|
83
|
+
|
|
84
|
+
listeners.forEach((listener) => {
|
|
85
|
+
(listener.rules || []).forEach((rule) => {
|
|
86
|
+
let inMatch = [
|
|
87
|
+
listener.protocol,
|
|
88
|
+
(rule.conditions.find((condition) => condition.field === 'host-header') || { values: [''] }).values[0],
|
|
89
|
+
listener.port,
|
|
90
|
+
]
|
|
91
|
+
.filter((value) => value)
|
|
92
|
+
.join(':');
|
|
93
|
+
const path = (rule.conditions.find((condition) => condition.field === 'path-pattern') || { values: [] })
|
|
94
|
+
.values[0];
|
|
95
|
+
if (path) {
|
|
96
|
+
inMatch = `${inMatch}${path}`;
|
|
97
|
+
}
|
|
98
|
+
const actions = (rule.actions || []).map((action) => {
|
|
99
|
+
const actionDetails = { ...action } as IActionDetails;
|
|
100
|
+
if (actionDetails.type === 'forward') {
|
|
101
|
+
actionDetails.targetGroup = (loadBalancer.targetGroups || []).find(
|
|
102
|
+
(targetGroup) => targetGroup.name === actionDetails.targetGroupName,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
return actionDetails;
|
|
106
|
+
});
|
|
107
|
+
rows.push({ in: inMatch, actions });
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
return rows;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function resolveSecurityGroups(
|
|
115
|
+
app: Application,
|
|
116
|
+
loadBalancer: IAmazonLoadBalancer,
|
|
117
|
+
params: ILoadBalancerStateParams,
|
|
118
|
+
securityGroupReader?: SecurityGroupReader,
|
|
119
|
+
): IApplicationSecurityGroup[] {
|
|
120
|
+
const securityGroupIds = loadBalancer.elb?.securityGroups || loadBalancer.securityGroups || [];
|
|
121
|
+
return securityGroupIds
|
|
122
|
+
.map((securityGroupId: string) => {
|
|
123
|
+
if (securityGroupReader) {
|
|
124
|
+
return securityGroupReader.getApplicationSecurityGroup(app, params.accountId, params.region, securityGroupId);
|
|
125
|
+
}
|
|
126
|
+
return app['securityGroupsIndex']?.[params.accountId]?.[params.region]?.[securityGroupId];
|
|
127
|
+
})
|
|
128
|
+
.filter(Boolean)
|
|
129
|
+
.sort((a: any, b: any) => a.name.localeCompare(b.name));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async function loadSubnetDetails(loadBalancer: IAmazonLoadBalancer): Promise<void> {
|
|
133
|
+
if (!loadBalancer.subnets?.length) {
|
|
134
|
+
loadBalancer.subnetDetails = loadBalancer.subnetDetails || [];
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
loadBalancer.subnetDetails = await Promise.all(
|
|
139
|
+
loadBalancer.subnets.map((subnetId) => SubnetReader.getSubnetByIdAndProvider(subnetId, loadBalancer.provider)),
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export async function loadAmazonLoadBalancerDetails({
|
|
144
|
+
app,
|
|
145
|
+
autoClose,
|
|
146
|
+
loadBalancerParams,
|
|
147
|
+
loadBalancers,
|
|
148
|
+
securityGroupReader,
|
|
149
|
+
}: ILoadAmazonLoadBalancerDetailsProps): Promise<IAmazonLoadBalancer | undefined> {
|
|
150
|
+
const { accountId, name, region } = loadBalancerParams;
|
|
151
|
+
const loadBalancer =
|
|
152
|
+
((loadBalancers || app.loadBalancers.data).find(
|
|
153
|
+
(candidate: ILoadBalancer) =>
|
|
154
|
+
candidate.name === name && candidate.region === region && candidate.account === accountId,
|
|
155
|
+
) as IAmazonLoadBalancer) || undefined;
|
|
156
|
+
|
|
157
|
+
if (!loadBalancer) {
|
|
158
|
+
autoClose();
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const details = (await REST('/loadBalancers')
|
|
163
|
+
.path(accountId, region, name)
|
|
164
|
+
.query({ provider: 'aws' })
|
|
165
|
+
.get()) as IAmazonLoadBalancerSourceData[];
|
|
166
|
+
if (details.length) {
|
|
167
|
+
loadBalancer.elb = details[0];
|
|
168
|
+
loadBalancer.elb.vpcId = loadBalancer.elb.vpcId || loadBalancer.elb.vpcid;
|
|
169
|
+
loadBalancer.account = accountId;
|
|
170
|
+
loadBalancer.securityGroups = resolveSecurityGroups(
|
|
171
|
+
app,
|
|
172
|
+
loadBalancer,
|
|
173
|
+
loadBalancerParams,
|
|
174
|
+
securityGroupReader,
|
|
175
|
+
) as any;
|
|
176
|
+
loadBalancer.elbProtocol = getElbProtocol(loadBalancer, details[0]);
|
|
177
|
+
loadBalancer.ipAddressTypeDescription = ipAddressTypeDescription(
|
|
178
|
+
(details[0] as IApplicationLoadBalancerSourceData).ipAddressType,
|
|
179
|
+
);
|
|
180
|
+
loadBalancer.listenerRows =
|
|
181
|
+
loadBalancer.loadBalancerType === 'classic'
|
|
182
|
+
? []
|
|
183
|
+
: buildListenerRows(loadBalancer as IAmazonApplicationLoadBalancer);
|
|
184
|
+
await loadSubnetDetails(loadBalancer);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return loadBalancer;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function useAmazonLoadBalancerDetails({
|
|
191
|
+
app,
|
|
192
|
+
loadBalancerParams,
|
|
193
|
+
autoClose,
|
|
194
|
+
}: IUseDetailsHookProps): UseDetailsResult<ILoadBalancer> {
|
|
195
|
+
const { securityGroupReader } = useDeckRuntimeServices();
|
|
196
|
+
const dataSource = app.getDataSource('loadBalancers');
|
|
197
|
+
const { data: loadBalancers, loaded, refresh, error } = useDataSource<ILoadBalancer[]>(dataSource);
|
|
198
|
+
const [data, setData] = React.useState<IAmazonLoadBalancer>();
|
|
199
|
+
const [loadingDetails, setLoadingDetails] = React.useState(false);
|
|
200
|
+
const [detailsError, setDetailsError] = React.useState<string | null>(null);
|
|
201
|
+
const autoCloseRef = React.useRef(autoClose);
|
|
202
|
+
const isMountedRef = React.useRef(true);
|
|
203
|
+
const { accountId, name, provider, region, vpcId } = loadBalancerParams;
|
|
204
|
+
|
|
205
|
+
React.useEffect(() => {
|
|
206
|
+
return () => {
|
|
207
|
+
isMountedRef.current = false;
|
|
208
|
+
};
|
|
209
|
+
}, []);
|
|
210
|
+
|
|
211
|
+
React.useEffect(() => {
|
|
212
|
+
autoCloseRef.current = autoClose;
|
|
213
|
+
}, [autoClose]);
|
|
214
|
+
|
|
215
|
+
const loadDetails = React.useCallback(async () => {
|
|
216
|
+
if (!loaded || error) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
setLoadingDetails(true);
|
|
221
|
+
setDetailsError(null);
|
|
222
|
+
try {
|
|
223
|
+
const loadBalancer = await loadAmazonLoadBalancerDetails({
|
|
224
|
+
app,
|
|
225
|
+
autoClose: () => autoCloseRef.current(),
|
|
226
|
+
loadBalancerParams: { accountId, name, provider, region, vpcId },
|
|
227
|
+
loadBalancers,
|
|
228
|
+
securityGroupReader,
|
|
229
|
+
});
|
|
230
|
+
if (isMountedRef.current) {
|
|
231
|
+
setData(loadBalancer);
|
|
232
|
+
}
|
|
233
|
+
} catch (e) {
|
|
234
|
+
if (isMountedRef.current) {
|
|
235
|
+
setDetailsError(e?.message || String(e));
|
|
236
|
+
}
|
|
237
|
+
} finally {
|
|
238
|
+
if (isMountedRef.current) {
|
|
239
|
+
setLoadingDetails(false);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}, [accountId, app, error, loadBalancers, loaded, name, provider, region, securityGroupReader, vpcId]);
|
|
243
|
+
|
|
244
|
+
React.useEffect(() => {
|
|
245
|
+
loadDetails();
|
|
246
|
+
}, [loadDetails]);
|
|
247
|
+
|
|
248
|
+
return {
|
|
249
|
+
data,
|
|
250
|
+
loading: !loaded || loadingDetails,
|
|
251
|
+
error: error || detailsError,
|
|
252
|
+
refetch: async () => refresh(),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function sortServerGroups(a: any, b: any): number {
|
|
257
|
+
if (a.isDisabled !== b.isDisabled) {
|
|
258
|
+
return a.isDisabled ? 1 : -1;
|
|
259
|
+
}
|
|
260
|
+
return b.name.localeCompare(a.name);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function sortTargetGroups(a: any, b: any): number {
|
|
264
|
+
if (a.isDisabled !== b.isDisabled) {
|
|
265
|
+
return a.isDisabled ? 1 : -1;
|
|
266
|
+
}
|
|
267
|
+
return b.name.localeCompare(a.name);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function AmazonLoadBalancerActions({ app, loadBalancer }: ILoadBalancerActionsProps): JSX.Element {
|
|
271
|
+
const amazonLoadBalancer = loadBalancer as IAmazonLoadBalancer;
|
|
272
|
+
const insightActions = (amazonLoadBalancer.elb as any)?.insightActions || [];
|
|
273
|
+
return (
|
|
274
|
+
<>
|
|
275
|
+
<LoadBalancerActions app={app} loadBalancer={amazonLoadBalancer} />
|
|
276
|
+
{insightActions.length > 0 && (
|
|
277
|
+
<Dropdown className="dropdown" id="amazon-load-balancer-insights-dropdown">
|
|
278
|
+
<Dropdown.Toggle className="btn btn-sm btn-default dropdown-toggle">Insight</Dropdown.Toggle>
|
|
279
|
+
<Dropdown.Menu>
|
|
280
|
+
{insightActions.map((action: any) => (
|
|
281
|
+
<MenuItem key={action.url || action.label} href={action.url} target="_blank">
|
|
282
|
+
{action.label}
|
|
283
|
+
</MenuItem>
|
|
284
|
+
))}
|
|
285
|
+
</Dropdown.Menu>
|
|
286
|
+
</Dropdown>
|
|
287
|
+
)}
|
|
288
|
+
</>
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export function AmazonLoadBalancerDetailsSection({ app, loadBalancer }: ILoadBalancerDetailsSectionProps): JSX.Element {
|
|
293
|
+
const amazonLoadBalancer = loadBalancer as IAmazonLoadBalancer;
|
|
294
|
+
const elb = amazonLoadBalancer.elb || ({} as IAmazonLoadBalancerSourceData);
|
|
295
|
+
const dnsName = elb.dnsname || (elb as any).dnsName;
|
|
296
|
+
const subnetPurpose = head((amazonLoadBalancer.subnetDetails || []).map((subnet) => subnet.purpose)) || '';
|
|
297
|
+
|
|
298
|
+
return (
|
|
299
|
+
<>
|
|
300
|
+
{amazonLoadBalancer.isManaged && (
|
|
301
|
+
<ManagedResourceDetailsIndicator
|
|
302
|
+
resourceSummary={amazonLoadBalancer.managedResourceSummary}
|
|
303
|
+
application={app}
|
|
304
|
+
/>
|
|
305
|
+
)}
|
|
306
|
+
<CollapsibleSection heading="Load Balancer Details" defaultExpanded={true}>
|
|
307
|
+
<dl className="dl-horizontal dl-narrow">
|
|
308
|
+
<dt>Created</dt>
|
|
309
|
+
<dd>{elb.createdTime ? timestamp(elb.createdTime) : '-'}</dd>
|
|
310
|
+
<dt>In</dt>
|
|
311
|
+
<dd>
|
|
312
|
+
<AccountTag account={amazonLoadBalancer.account} /> {amazonLoadBalancer.region}
|
|
313
|
+
</dd>
|
|
314
|
+
<dt>VPC</dt>
|
|
315
|
+
<dd>
|
|
316
|
+
<VpcTag vpcId={elb.vpcId || amazonLoadBalancer.vpcId} />
|
|
317
|
+
</dd>
|
|
318
|
+
<dt>Subnet</dt>
|
|
319
|
+
<dd>{subnetPurpose}</dd>
|
|
320
|
+
<dt>Scheme</dt>
|
|
321
|
+
<dd>{amazonLoadBalancer.scheme || '-'}</dd>
|
|
322
|
+
{amazonLoadBalancer.loadBalancerType && <dt>Type</dt>}
|
|
323
|
+
{amazonLoadBalancer.loadBalancerType && <dd>{amazonLoadBalancer.loadBalancerType}</dd>}
|
|
324
|
+
{amazonLoadBalancer.ipAddressTypeDescription && <dt>IP Type</dt>}
|
|
325
|
+
{amazonLoadBalancer.ipAddressTypeDescription && <dd>{amazonLoadBalancer.ipAddressTypeDescription}</dd>}
|
|
326
|
+
</dl>
|
|
327
|
+
{!!elb.availabilityZones?.length && (
|
|
328
|
+
<dl className="horizontal-when-filters-collapsed">
|
|
329
|
+
<dt>Availability Zones</dt>
|
|
330
|
+
<dd>
|
|
331
|
+
<ul className="collapse-margin-on-filter-collapse">
|
|
332
|
+
{elb.availabilityZones.map((availabilityZone) => (
|
|
333
|
+
<li key={availabilityZone}>{availabilityZone}</li>
|
|
334
|
+
))}
|
|
335
|
+
</ul>
|
|
336
|
+
</dd>
|
|
337
|
+
</dl>
|
|
338
|
+
)}
|
|
339
|
+
{!!amazonLoadBalancer.serverGroups?.length && (
|
|
340
|
+
<dl className="horizontal-when-filters-collapsed">
|
|
341
|
+
<dt>Server Groups</dt>
|
|
342
|
+
<dd>
|
|
343
|
+
<ul className="collapse-margin-on-filter-collapse">
|
|
344
|
+
{amazonLoadBalancer.serverGroups
|
|
345
|
+
.slice()
|
|
346
|
+
.sort(sortServerGroups)
|
|
347
|
+
.map((serverGroup: any) => (
|
|
348
|
+
<li key={serverGroup.name}>
|
|
349
|
+
<UISref
|
|
350
|
+
to="^.serverGroup"
|
|
351
|
+
params={{
|
|
352
|
+
region: serverGroup.region,
|
|
353
|
+
accountId: serverGroup.account,
|
|
354
|
+
serverGroup: serverGroup.name,
|
|
355
|
+
provider: 'aws',
|
|
356
|
+
}}
|
|
357
|
+
>
|
|
358
|
+
<a>{serverGroup.name}</a>
|
|
359
|
+
</UISref>
|
|
360
|
+
</li>
|
|
361
|
+
))}
|
|
362
|
+
</ul>
|
|
363
|
+
</dd>
|
|
364
|
+
</dl>
|
|
365
|
+
)}
|
|
366
|
+
{!!(amazonLoadBalancer as IAmazonApplicationLoadBalancer).targetGroups?.length && (
|
|
367
|
+
<dl className="horizontal-when-filters-collapsed">
|
|
368
|
+
<dt>Target Groups</dt>
|
|
369
|
+
<dd>
|
|
370
|
+
<ul className="collapse-margin-on-filter-collapse">
|
|
371
|
+
{(amazonLoadBalancer as IAmazonApplicationLoadBalancer).targetGroups
|
|
372
|
+
.slice()
|
|
373
|
+
.sort(sortTargetGroups)
|
|
374
|
+
.map((targetGroup) => (
|
|
375
|
+
<li key={targetGroup.name}>
|
|
376
|
+
<UISref
|
|
377
|
+
to="^.targetGroupDetails"
|
|
378
|
+
params={{
|
|
379
|
+
region: targetGroup.region,
|
|
380
|
+
loadBalancerName: amazonLoadBalancer.name,
|
|
381
|
+
accountId: targetGroup.account,
|
|
382
|
+
name: targetGroup.name,
|
|
383
|
+
vpcId: targetGroup.vpcId,
|
|
384
|
+
provider: 'aws',
|
|
385
|
+
}}
|
|
386
|
+
>
|
|
387
|
+
<a>{targetGroup.name}</a>
|
|
388
|
+
</UISref>
|
|
389
|
+
</li>
|
|
390
|
+
))}
|
|
391
|
+
</ul>
|
|
392
|
+
</dd>
|
|
393
|
+
</dl>
|
|
394
|
+
)}
|
|
395
|
+
{dnsName && (
|
|
396
|
+
<dl className="horizontal-when-filters-collapsed">
|
|
397
|
+
<dt>DNS Name</dt>
|
|
398
|
+
<dd>
|
|
399
|
+
<a target="_blank" href={`${amazonLoadBalancer.elbProtocol || 'http:'}//${dnsName}`}>
|
|
400
|
+
{dnsName}
|
|
401
|
+
</a>{' '}
|
|
402
|
+
<CopyToClipboard text={dnsName} toolTip="Copy DNS Name to clipboard" />
|
|
403
|
+
</dd>
|
|
404
|
+
</dl>
|
|
405
|
+
)}
|
|
406
|
+
</CollapsibleSection>
|
|
407
|
+
</>
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export function AmazonLoadBalancerStatusSection({ loadBalancer }: ILoadBalancerDetailsSectionProps): JSX.Element {
|
|
412
|
+
return (
|
|
413
|
+
<CollapsibleSection heading="Status" defaultExpanded={loadBalancer.loadBalancerType === 'classic'}>
|
|
414
|
+
{loadBalancer.loadBalancerType === 'classic' ? (
|
|
415
|
+
<HealthCounts className="pull-left" container={loadBalancer.instanceCounts} />
|
|
416
|
+
) : (
|
|
417
|
+
<span>Select a target group to check the instance health status from the view of the target group.</span>
|
|
418
|
+
)}
|
|
419
|
+
</CollapsibleSection>
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
function renderListenerAction(action: IActionDetails, loadBalancer: IAmazonLoadBalancer): JSX.Element {
|
|
424
|
+
if (action.type === 'redirect') {
|
|
425
|
+
const redirectConfig = action.redirectConfig;
|
|
426
|
+
return (
|
|
427
|
+
<span>
|
|
428
|
+
{redirectConfig.protocol !== '#{protocol}' && `${redirectConfig.protocol}:`}
|
|
429
|
+
{redirectConfig.host !== '#{host}' && ` ${redirectConfig.host} `}
|
|
430
|
+
{redirectConfig.port !== '#{port}' && ` ${redirectConfig.port} `}
|
|
431
|
+
{redirectConfig.path !== '/#{path}' && ` ${redirectConfig.path} `}
|
|
432
|
+
{redirectConfig.query !== '#{query}' && ` ?${redirectConfig.query} `}({redirectConfig.statusCode})
|
|
433
|
+
</span>
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (action.type === 'authenticate-oidc') {
|
|
438
|
+
const clientId = action.authenticateOidcConfig?.clientId;
|
|
439
|
+
return (
|
|
440
|
+
<span>
|
|
441
|
+
<i className="fas fa-fw fa-user-lock" /> {clientId}
|
|
442
|
+
</span>
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
if (action.targetGroupName && action.targetGroup) {
|
|
447
|
+
return (
|
|
448
|
+
<span>
|
|
449
|
+
<i className="fa fa-fw fa-crosshairs icon" aria-hidden="true" />
|
|
450
|
+
<UISref
|
|
451
|
+
to="^.targetGroupDetails"
|
|
452
|
+
params={{
|
|
453
|
+
region: action.targetGroup.region,
|
|
454
|
+
loadBalancerName: loadBalancer.name,
|
|
455
|
+
accountId: action.targetGroup.account,
|
|
456
|
+
name: action.targetGroup.name,
|
|
457
|
+
vpcId: action.targetGroup.vpcId,
|
|
458
|
+
provider: 'aws',
|
|
459
|
+
}}
|
|
460
|
+
>
|
|
461
|
+
<a>{action.targetGroupName}</a>
|
|
462
|
+
</UISref>
|
|
463
|
+
</span>
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
return (
|
|
468
|
+
<span>
|
|
469
|
+
<i className="fa fa-fw fa-crosshairs icon" aria-hidden="true" /> {action.targetGroupName || action.type}
|
|
470
|
+
</span>
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export function AmazonLoadBalancerListenersSection({ loadBalancer }: ILoadBalancerDetailsSectionProps): JSX.Element {
|
|
475
|
+
const amazonLoadBalancer = loadBalancer as IAmazonLoadBalancer;
|
|
476
|
+
const elb = amazonLoadBalancer.elb as IClassicLoadBalancerSourceData;
|
|
477
|
+
|
|
478
|
+
if (amazonLoadBalancer.loadBalancerType === 'classic') {
|
|
479
|
+
return (
|
|
480
|
+
<CollapsibleSection heading="Listeners">
|
|
481
|
+
<dl>
|
|
482
|
+
<dt>Load Balancer -> Instance</dt>
|
|
483
|
+
{(elb.listenerDescriptions || []).map((description: any, index: number) => (
|
|
484
|
+
<dd key={index}>
|
|
485
|
+
{description.listener.protocol}:{description.listener.loadBalancerPort} ->{' '}
|
|
486
|
+
{description.listener.instanceProtocol}:{description.listener.instancePort}
|
|
487
|
+
</dd>
|
|
488
|
+
))}
|
|
489
|
+
</dl>
|
|
490
|
+
</CollapsibleSection>
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
return (
|
|
495
|
+
<CollapsibleSection heading="Listeners">
|
|
496
|
+
{(amazonLoadBalancer.listenerRows || []).map((listener: any) => (
|
|
497
|
+
<div key={listener.in}>
|
|
498
|
+
<div className="listener-targets">{listener.in} -></div>
|
|
499
|
+
<div className="listener-targets">
|
|
500
|
+
{listener.actions.map((action: IActionDetails, index: number) => (
|
|
501
|
+
<div key={`${listener.in}-${index}`}>{renderListenerAction(action, amazonLoadBalancer)}</div>
|
|
502
|
+
))}
|
|
503
|
+
</div>
|
|
504
|
+
</div>
|
|
505
|
+
))}
|
|
506
|
+
</CollapsibleSection>
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export function AmazonLoadBalancerFirewallsSection({ loadBalancer }: ILoadBalancerDetailsSectionProps): JSX.Element {
|
|
511
|
+
const amazonLoadBalancer = loadBalancer as IAmazonLoadBalancer;
|
|
512
|
+
const securityGroups = sortBy((amazonLoadBalancer.securityGroups || []) as any[], 'name');
|
|
513
|
+
if (amazonLoadBalancer.loadBalancerType === 'network' && !securityGroups.length) {
|
|
514
|
+
return null;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
return (
|
|
518
|
+
<CollapsibleSection heading={FirewallLabels.get('Firewalls')}>
|
|
519
|
+
<ul>
|
|
520
|
+
{securityGroups.map((securityGroup) => (
|
|
521
|
+
<li key={securityGroup.id || securityGroup.name}>
|
|
522
|
+
<UISref
|
|
523
|
+
to="^.firewallDetails"
|
|
524
|
+
params={{
|
|
525
|
+
name: securityGroup.name,
|
|
526
|
+
accountId: amazonLoadBalancer.account,
|
|
527
|
+
region: amazonLoadBalancer.region,
|
|
528
|
+
vpcId: amazonLoadBalancer.vpcId,
|
|
529
|
+
provider: amazonLoadBalancer.provider,
|
|
530
|
+
}}
|
|
531
|
+
>
|
|
532
|
+
<a>
|
|
533
|
+
{securityGroup.name} ({securityGroup.id})
|
|
534
|
+
</a>
|
|
535
|
+
</UISref>
|
|
536
|
+
</li>
|
|
537
|
+
))}
|
|
538
|
+
</ul>
|
|
539
|
+
</CollapsibleSection>
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export function AmazonLoadBalancerSubnetsSection({ loadBalancer }: ILoadBalancerDetailsSectionProps): JSX.Element {
|
|
544
|
+
const subnetDetails = ((loadBalancer as IAmazonLoadBalancer).subnetDetails || []).filter(Boolean);
|
|
545
|
+
return (
|
|
546
|
+
<CollapsibleSection heading="Subnets">
|
|
547
|
+
{!subnetDetails.length && <h5>No subnets</h5>}
|
|
548
|
+
{subnetDetails.map((subnet: any) => (
|
|
549
|
+
<div key={subnet.id} className="bottom-border">
|
|
550
|
+
<h5>
|
|
551
|
+
<strong>{subnet.id}</strong>
|
|
552
|
+
</h5>
|
|
553
|
+
<dl className="dl-horizontal dl-narrow">
|
|
554
|
+
<dt>Purpose</dt>
|
|
555
|
+
<dd>{subnet.purpose}</dd>
|
|
556
|
+
<dt>State</dt>
|
|
557
|
+
<dd>{subnet.state}</dd>
|
|
558
|
+
<dt>Cidr Block</dt>
|
|
559
|
+
<dd>{subnet.cidrBlock}</dd>
|
|
560
|
+
</dl>
|
|
561
|
+
</div>
|
|
562
|
+
))}
|
|
563
|
+
</CollapsibleSection>
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export function AmazonLoadBalancerHealthChecksSection({
|
|
568
|
+
loadBalancer,
|
|
569
|
+
}: ILoadBalancerDetailsSectionProps): JSX.Element | null {
|
|
570
|
+
if (loadBalancer.loadBalancerType !== 'classic') {
|
|
571
|
+
return null;
|
|
572
|
+
}
|
|
573
|
+
const healthCheck = ((loadBalancer as IAmazonLoadBalancer).elb as IClassicLoadBalancerSourceData)?.healthCheck;
|
|
574
|
+
return (
|
|
575
|
+
<CollapsibleSection heading="Health Checks">
|
|
576
|
+
<dl className="horizontal-when-filters-collapsed">
|
|
577
|
+
<dt>Target</dt>
|
|
578
|
+
<dd>{healthCheck?.target || '-'}</dd>
|
|
579
|
+
<dt>Timeout</dt>
|
|
580
|
+
<dd>{healthCheck?.timeout} seconds</dd>
|
|
581
|
+
<dt>Interval</dt>
|
|
582
|
+
<dd>{healthCheck?.interval} seconds</dd>
|
|
583
|
+
<dt>Healthy Threshold</dt>
|
|
584
|
+
<dd>{healthCheck?.healthyThreshold}</dd>
|
|
585
|
+
<dt>Unhealthy Threshold</dt>
|
|
586
|
+
<dd>{healthCheck?.unhealthyThreshold}</dd>
|
|
587
|
+
</dl>
|
|
588
|
+
</CollapsibleSection>
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export const amazonLoadBalancerDetailsSections = [
|
|
593
|
+
AmazonLoadBalancerDetailsSection,
|
|
594
|
+
AmazonLoadBalancerStatusSection,
|
|
595
|
+
AmazonLoadBalancerListenersSection,
|
|
596
|
+
AmazonLoadBalancerFirewallsSection,
|
|
597
|
+
AmazonLoadBalancerSubnetsSection,
|
|
598
|
+
AmazonLoadBalancerHealthChecksSection,
|
|
599
|
+
];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { chain, filter, flatten, map } from 'lodash';
|
|
2
|
-
import { $q } from 'ngimport';
|
|
3
2
|
|
|
4
3
|
import type { Application, IHealth, IInstance, IServerGroup, IVpc } from '@spinnaker/core';
|
|
5
4
|
import { AccountService, NameUtils, SETTINGS } from '@spinnaker/core';
|
|
@@ -103,7 +102,7 @@ export class AwsLoadBalancerTransformer {
|
|
|
103
102
|
});
|
|
104
103
|
}
|
|
105
104
|
|
|
106
|
-
private normalizeTargetGroup(targetGroup: ITargetGroup):
|
|
105
|
+
private normalizeTargetGroup(targetGroup: ITargetGroup): Promise<ITargetGroup> {
|
|
107
106
|
this.normalizeServerGroups(targetGroup.serverGroups, targetGroup, 'targetGroups', 'TargetGroup');
|
|
108
107
|
|
|
109
108
|
const activeServerGroups = filter(targetGroup.serverGroups, { isDisabled: false });
|
|
@@ -112,7 +111,7 @@ export class AwsLoadBalancerTransformer {
|
|
|
112
111
|
targetGroup.detachedInstances = chain(activeServerGroups).map('detachedInstances').flatten<IInstance>().value();
|
|
113
112
|
this.updateHealthCounts(targetGroup);
|
|
114
113
|
|
|
115
|
-
return
|
|
114
|
+
return Promise.all([VpcReader.listVpcs(), AccountService.listAllAccounts()]).then(([vpcs, accounts]) => {
|
|
116
115
|
const tg = this.addVpcNameToContainer(targetGroup)(vpcs) as ITargetGroup;
|
|
117
116
|
|
|
118
117
|
tg.serverGroups = tg.serverGroups.map((serverGroup) => {
|
|
@@ -144,7 +143,7 @@ export class AwsLoadBalancerTransformer {
|
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
145
|
|
|
147
|
-
public normalizeLoadBalancer(loadBalancer: IAmazonLoadBalancer):
|
|
146
|
+
public normalizeLoadBalancer(loadBalancer: IAmazonLoadBalancer): Promise<IAmazonLoadBalancer> {
|
|
148
147
|
this.normalizeServerGroups(loadBalancer.serverGroups, loadBalancer, 'loadBalancers', 'LoadBalancer');
|
|
149
148
|
|
|
150
149
|
let serverGroups = loadBalancer.serverGroups;
|