@spinnaker/amazon 2026.2.2 → 2026.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aws.module.d.ts +2 -1
- package/dist/aws.services.d.ts +8 -0
- package/dist/certificates/AmazonCertificateReader.d.ts +1 -1
- package/dist/domain/IAmazonServerGroup.d.ts +10 -0
- package/dist/function/CreateLambdaFunction.d.ts +10 -5
- package/dist/function/configure/Network.d.ts +3 -0
- package/dist/function/details/FunctionActions.d.ts +3 -0
- package/dist/function/function.transformer.d.ts +1 -0
- package/dist/image/image.reader.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/instance/amazon.instance.write.service.d.ts +5 -5
- package/dist/instance/awsInstanceType.service.d.ts +13 -2
- package/dist/instance/details/AmazonInstanceDetails.d.ts +67 -0
- package/dist/instance/index.d.ts +1 -0
- package/dist/keyPairs/KeyPairsReader.d.ts +1 -1
- package/dist/loadBalancer/AmazonLoadBalancersTag.d.ts +7 -4
- package/dist/loadBalancer/OidcConfigReader.d.ts +1 -1
- package/dist/loadBalancer/TargetGroupDetails.d.ts +37 -3
- package/dist/loadBalancer/amazonLoadBalancerDataUtils.d.ts +1 -1
- package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +6 -2
- package/dist/loadBalancer/configure/LoadBalancerTypes.d.ts +4 -4
- package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/configure/classic/CreateClassicLoadBalancer.d.ts +12 -7
- package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +4 -0
- package/dist/loadBalancer/configure/network/CreateNetworkLoadBalancer.d.ts +10 -5
- package/dist/loadBalancer/details/LoadBalancerActions.d.ts +9 -2
- package/dist/loadBalancer/details/amazonLoadBalancerDetails.d.ts +22 -0
- package/dist/loadBalancer/index.d.ts +1 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +1 -1
- package/dist/pipeline/stages/AmazonStageConfig.d.ts +11 -0
- package/dist/pipeline/stages/bake/AwsBakeStageConfig.d.ts +66 -0
- package/dist/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/deleteLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +5 -4
- package/dist/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.d.ts +1 -3
- package/dist/pipeline/stages/deployLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/destroyAsg/awsDestroyAsgStage.d.ts +26 -2
- package/dist/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.d.ts +27 -0
- package/dist/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.d.ts +20 -0
- package/dist/pipeline/stages/findAmi/awsFindAmiStage.d.ts +17 -2
- package/dist/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.d.ts +12 -2
- package/dist/pipeline/stages/invokeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.d.ts +20 -2
- package/dist/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.d.ts +3 -0
- package/dist/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.d.ts +20 -0
- package/dist/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/resizeAsg/awsResizeAsgStage.d.ts +40 -2
- package/dist/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/routeLambda/index.d.ts +1 -1
- package/dist/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.d.ts +22 -0
- package/dist/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.d.ts +21 -0
- package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +5 -2
- package/dist/pipeline/stages/updateCodeLambda/index.d.ts +1 -1
- package/dist/search/searchResultFormatter.d.ts +4 -2
- package/dist/securityGroup/configure/AmazonSecurityGroupModal.d.ts +43 -0
- package/dist/securityGroup/details/AmazonSecurityGroupDetails.d.ts +62 -0
- package/dist/securityGroup/details/index.d.ts +1 -0
- package/dist/securityGroup/index.d.ts +1 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +0 -1
- package/dist/securityGroup/securityGroup.transformer.d.ts +11 -2
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +23 -7
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +17 -13
- package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +16 -6
- package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +6 -3
- package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +3 -0
- package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +4 -0
- package/dist/serverGroup/details/AmazonServerGroupActions.d.ts +10 -2
- package/dist/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.d.ts +17 -0
- package/dist/serverGroup/details/advancedSettings/index.d.ts +1 -0
- package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +5 -3
- package/dist/serverGroup/details/rollback/AmazonRollbackServerGroupModal.d.ts +67 -0
- package/dist/serverGroup/details/rollback/index.d.ts +2 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroupSelection.d.ts +9 -0
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicyWriter.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.d.ts +24 -0
- package/dist/serverGroup/details/scalingProcesses/index.d.ts +2 -0
- package/dist/serverGroup/details/scheduledActions/EditScheduledActionsModal.d.ts +31 -0
- package/dist/serverGroup/details/scheduledActions/index.d.ts +1 -0
- package/dist/serverGroup/details/sections/AdvancedSettingsDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/AmazonCapacityDetailsSection.d.ts +3 -0
- package/dist/serverGroup/details/sections/ScalingProcessesDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/ScheduledActionsDetailsSection.d.ts +1 -1
- package/dist/serverGroup/details/sections/SecurityGroupsDetailsSection.d.ts +4 -1
- package/dist/serverGroup/details/sections/WarmPoolDetailsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/index.d.ts +1 -0
- package/dist/serverGroup/details/securityGroups/EditSecurityGroupsModal.d.ts +32 -0
- package/dist/serverGroup/details/securityGroups/index.d.ts +1 -0
- package/dist/serverGroup/details/warmPool/ModifyWarmPoolModal.d.ts +26 -0
- package/dist/serverGroup/details/warmPool/WarmPoolService.d.ts +6 -0
- package/dist/serverGroup/details/warmPool/index.d.ts +2 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +1 -2
- package/dist/vpc/VpcReader.d.ts +2 -2
- package/dist/vpc/index.d.ts +1 -0
- package/package.json +3 -12
- package/src/aws.module.spec.ts +296 -0
- package/src/aws.module.ts +107 -112
- package/src/aws.services.ts +21 -0
- package/src/certificates/AmazonCertificateReader.ts +1 -1
- package/src/domain/IAmazonServerGroup.ts +9 -0
- package/src/function/CreateLambdaFunction.tsx +29 -16
- package/src/function/configure/Network.tsx +8 -4
- package/src/function/details/AmazonFunctionDetails.tsx +4 -5
- package/src/function/details/FunctionActions.tsx +5 -1
- package/src/function/function.transformer.ts +4 -0
- package/src/image/image.reader.ts +3 -5
- package/src/index.ts +2 -2
- package/src/instance/amazon.instance.write.service.ts +15 -4
- package/src/instance/awsInstanceType.service.spec.js +172 -136
- package/src/instance/awsInstanceType.service.ts +142 -154
- package/src/instance/details/AmazonInstanceDetails.spec.tsx +79 -0
- package/src/instance/details/AmazonInstanceDetails.tsx +644 -0
- package/src/instance/details/InstanceInformation.tsx +11 -14
- package/src/instance/details/InstanceSecurityGroups.tsx +20 -23
- package/src/instance/details/InstanceTags.tsx +5 -3
- package/src/instance/index.ts +1 -0
- package/src/keyPairs/KeyPairsReader.ts +1 -1
- package/src/loadBalancer/AmazonLoadBalancersTag.spec.tsx +39 -0
- package/src/loadBalancer/AmazonLoadBalancersTag.tsx +21 -14
- package/src/loadBalancer/OidcConfigReader.ts +1 -1
- package/src/loadBalancer/TargetGroupDetails.spec.tsx +113 -0
- package/src/loadBalancer/TargetGroupDetails.tsx +287 -7
- package/src/loadBalancer/amazonLoadBalancerDataUtils.ts +21 -21
- package/src/loadBalancer/configure/AmazonLoadBalancerChoiceModal.tsx +17 -4
- package/src/loadBalancer/configure/LoadBalancerTypes.ts +7 -4
- package/src/loadBalancer/configure/application/ALBListeners.tsx +1 -2
- package/src/loadBalancer/configure/application/CreateApplicationLoadBalancer.tsx +28 -18
- package/src/loadBalancer/configure/classic/CreateClassicLoadBalancer.tsx +29 -19
- package/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +1 -1
- package/src/loadBalancer/configure/common/SecurityGroups.spec.tsx +27 -0
- package/src/loadBalancer/configure/common/SecurityGroups.tsx +11 -5
- package/src/loadBalancer/configure/network/CreateNetworkLoadBalancer.tsx +28 -18
- package/src/loadBalancer/details/LoadBalancerActions.tsx +19 -5
- package/src/loadBalancer/details/amazonLoadBalancerDetails.spec.tsx +141 -0
- package/src/loadBalancer/details/amazonLoadBalancerDetails.tsx +599 -0
- package/src/loadBalancer/index.ts +1 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +3 -4
- package/src/pipeline/stages/AmazonStageConfig.spec.tsx +103 -0
- package/src/pipeline/stages/AmazonStageConfig.tsx +259 -0
- package/src/pipeline/stages/bake/AwsBakeStageConfig.tsx +708 -0
- package/src/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.tsx +275 -0
- package/src/pipeline/stages/deleteLambda/index.ts +2 -6
- package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +14 -33
- package/src/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.tsx +264 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.spec.tsx +403 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.ts +21 -29
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.ts +1 -11
- package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.tsx +4 -3
- package/src/pipeline/stages/deployLambda/components/NetworkForm.tsx +3 -6
- package/src/pipeline/stages/deployLambda/index.ts +2 -6
- package/src/pipeline/stages/destroyAsg/awsDestroyAsgStage.js +28 -65
- package/src/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.tsx +103 -0
- package/src/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.tsx +119 -0
- package/src/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.tsx +98 -0
- package/src/pipeline/stages/findAmi/awsFindAmiStage.js +22 -79
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.spec.tsx +122 -0
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.tsx +71 -0
- package/src/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.js +17 -32
- package/src/pipeline/stages/invokeLambda/index.ts +2 -6
- package/src/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.tsx +146 -0
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.js +27 -98
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.spec.tsx +167 -0
- package/src/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.tsx +157 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.js +26 -0
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.spec.tsx +89 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.spec.tsx +617 -0
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.tsx +340 -0
- package/src/pipeline/stages/resizeAsg/awsResizeAsgStage.js +34 -125
- package/src/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.tsx +129 -0
- package/src/pipeline/stages/routeLambda/index.ts +2 -6
- package/src/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.tsx +121 -0
- package/src/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.tsx +136 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.spec.tsx +167 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.tsx +94 -0
- package/src/pipeline/stages/updateCodeLambda/index.ts +2 -6
- package/src/routerConsumers.spec.tsx +207 -0
- package/src/search/searchResultFormatter.ts +9 -16
- package/src/securityGroup/configure/AmazonSecurityGroupModal.spec.tsx +170 -0
- package/src/securityGroup/configure/AmazonSecurityGroupModal.tsx +440 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.spec.tsx +62 -0
- package/src/securityGroup/details/AmazonSecurityGroupDetails.tsx +444 -0
- package/src/securityGroup/details/IPRangeRules.tsx +1 -1
- package/src/securityGroup/details/index.ts +1 -0
- package/src/securityGroup/index.ts +1 -0
- package/src/securityGroup/securityGroup.reader.ts +0 -5
- package/src/securityGroup/securityGroup.transformer.ts +35 -0
- package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +104 -80
- package/src/serverGroup/configure/AmazonImageSelectInput.tsx +37 -18
- package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +28 -66
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +476 -465
- package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +76 -124
- package/src/serverGroup/configure/serverGroupConfiguration.service.ts +106 -103
- package/src/serverGroup/configure/wizard/AmazonCloneServerGroupModal.tsx +65 -25
- package/src/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.tsx +3 -3
- package/src/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.tsx +2 -2
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.spec.tsx +105 -0
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.tsx +20 -6
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.spec.tsx +39 -0
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +10 -9
- package/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +2 -2
- package/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +5 -2
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.spec.tsx +53 -0
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +35 -33
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.spec.tsx +20 -0
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.tsx +9 -4
- package/src/serverGroup/details/AmazonServerGroupActions.spec.tsx +186 -0
- package/src/serverGroup/details/AmazonServerGroupActions.tsx +37 -87
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.spec.tsx +110 -0
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.tsx +117 -0
- package/src/serverGroup/details/advancedSettings/index.ts +1 -0
- package/src/serverGroup/details/amazonServerGroupDetailsGetter.ts +4 -4
- package/src/serverGroup/details/resize/AmazonResizeServerGroupModal.tsx +16 -6
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.spec.tsx +285 -0
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.tsx +449 -0
- package/src/serverGroup/details/rollback/index.ts +2 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.spec.ts +101 -0
- package/src/serverGroup/details/rollback/rollbackServerGroupSelection.ts +81 -0
- package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +4 -4
- package/src/serverGroup/details/scalingPolicy/ScalingPolicyWriter.ts +2 -5
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.tsx +0 -2
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.spec.tsx +74 -0
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.tsx +140 -0
- package/src/serverGroup/details/scalingProcesses/index.ts +2 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.spec.tsx +115 -0
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.tsx +205 -0
- package/src/serverGroup/details/scheduledActions/index.ts +1 -0
- package/src/serverGroup/details/sections/AdvancedSettingsDetailsSection.tsx +7 -14
- package/src/serverGroup/details/sections/AmazonCapacityDetailsSection.tsx +14 -2
- package/src/serverGroup/details/sections/AmazonServerGroupMaintenanceActions.spec.tsx +148 -0
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +1 -5
- package/src/serverGroup/details/sections/ScalingProcessesDetailsSection.tsx +8 -20
- package/src/serverGroup/details/sections/ScheduledActionsDetailsSection.tsx +7 -12
- package/src/serverGroup/details/sections/SecurityGroupsDetailsSection.tsx +14 -19
- package/src/serverGroup/details/sections/WarmPoolDetailsSection.tsx +44 -0
- package/src/serverGroup/details/sections/index.ts +1 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.spec.tsx +161 -0
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.tsx +177 -0
- package/src/serverGroup/details/securityGroups/index.ts +1 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.spec.tsx +69 -0
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.tsx +191 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.spec.ts +30 -0
- package/src/serverGroup/details/warmPool/WarmPoolService.ts +15 -0
- package/src/serverGroup/details/warmPool/index.ts +2 -0
- package/src/serverGroup/serverGroup.transformer.ts +1 -6
- package/src/vpc/VpcReader.ts +2 -2
- package/src/vpc/index.ts +1 -0
- package/dist/common/common.module.d.ts +0 -1
- package/dist/common/footer.component.d.ts +0 -1
- package/dist/function/function.module.d.ts +0 -1
- package/dist/instance/details/amazonInstanceInformation.component.d.ts +0 -1
- package/dist/instance/details/instance.details.controller.d.ts +0 -2
- package/dist/instance/details/instanceDns.component.d.ts +0 -1
- package/dist/instance/details/instanceSecurityGroups.component.d.ts +0 -1
- package/dist/instance/details/instanceStatus.component.d.ts +0 -1
- package/dist/instance/details/instanceTags.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerActions.component.d.ts +0 -1
- package/dist/loadBalancer/details/loadBalancerDetails.controller.d.ts +0 -41
- package/dist/loadBalancer/details/targetGroupDetails.controller.d.ts +0 -30
- package/dist/loadBalancer/loadBalancer.module.d.ts +0 -1
- package/dist/loadBalancer/targetGroup.states.d.ts +0 -1
- package/dist/pipeline/stages/bake/awsBakeStage.d.ts +0 -2
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +0 -2
- package/dist/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.d.ts +0 -2
- package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts +0 -1
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.d.ts +0 -25
- package/dist/pipeline/stages/disableAsg/awsDisableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/disableCluster/awsDisableClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/enableAsg/awsEnableAsgStage.d.ts +0 -2
- package/dist/pipeline/stages/rollbackCluster/awsRollbackClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.d.ts +0 -2
- package/dist/pipeline/stages/shrinkCluster/awsShrinkClusterStage.d.ts +0 -2
- package/dist/reactShims/aws.react.injector.d.ts +0 -18
- package/dist/reactShims/aws.react.module.d.ts +0 -1
- package/dist/reactShims/index.d.ts +0 -1
- package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +0 -2
- package/dist/securityGroup/configure/CreateSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/EditSecurityGroupCtrl.d.ts +0 -2
- package/dist/securityGroup/configure/configSecurityGroup.mixin.controller.d.ts +0 -2
- package/dist/securityGroup/configure/ingressRuleGroupSelector.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.component.d.ts +0 -1
- package/dist/securityGroup/configure/securityGroupDetailsCustom.d.ts +0 -10
- package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +0 -2
- package/dist/securityGroup/details/securityGroupIpRangeRules.component.d.ts +0 -1
- package/dist/securityGroup/securityGroup.module.d.ts +0 -1
- package/dist/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +0 -2
- package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +0 -1
- package/dist/serverGroup/details/scalingPolicy/scalingPolicySummary.component.d.ts +0 -1
- package/dist/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.d.ts +0 -2
- package/dist/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.d.ts +0 -2
- package/dist/serverGroup/details/serverGroupDetails.module.d.ts +0 -1
- package/dist/subnet/subnet.renderer.d.ts +0 -5
- package/dist/vpc/vpc.module.d.ts +0 -1
- package/src/applicationProviderFields/awsFields.html +0 -13
- package/src/common/common.module.ts +0 -6
- package/src/common/footer.component.ts +0 -29
- package/src/function/function.module.ts +0 -5
- package/src/image/image.reader.spec.ts +0 -75
- package/src/instance/details/amazonInstanceInformation.component.ts +0 -13
- package/src/instance/details/instance.details.controller.js +0 -586
- package/src/instance/details/instance.details.controller.spec.js +0 -133
- package/src/instance/details/instanceDetails.html +0 -65
- package/src/instance/details/instanceDns.component.ts +0 -21
- package/src/instance/details/instanceSecurityGroups.component.ts +0 -13
- package/src/instance/details/instanceStatus.component.ts +0 -19
- package/src/instance/details/instanceTags.component.ts +0 -13
- package/src/loadBalancer/details/loadBalancerActions.component.ts +0 -16
- package/src/loadBalancer/details/loadBalancerDetails.controller.spec.ts +0 -76
- package/src/loadBalancer/details/loadBalancerDetails.controller.ts +0 -240
- package/src/loadBalancer/details/loadBalancerDetails.html +0 -266
- package/src/loadBalancer/details/targetGroupDetails.controller.ts +0 -95
- package/src/loadBalancer/details/targetGroupDetails.html +0 -138
- package/src/loadBalancer/loadBalancer.module.ts +0 -15
- package/src/loadBalancer/targetGroup.states.ts +0 -55
- package/src/pipeline/stages/bake/awsBakeStage.js +0 -219
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +0 -43
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +0 -65
- package/src/pipeline/stages/bake/bakeStage.html +0 -205
- package/src/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.js +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +0 -143
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +0 -1
- package/src/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.ts +0 -46
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.ts +0 -84
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.html +0 -84
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +0 -9
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableAsg/awsDisableAsgStage.js +0 -69
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +0 -11
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/disableCluster/awsDisableClusterStage.js +0 -84
- package/src/pipeline/stages/disableCluster/disableClusterStage.html +0 -26
- package/src/pipeline/stages/enableAsg/awsEnableAsgStage.js +0 -73
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +0 -11
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +0 -1
- package/src/pipeline/stages/findAmi/findAmiStage.html +0 -24
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +0 -44
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +0 -11
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessExecutionDetails.html +0 -36
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.html +0 -24
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +0 -90
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +0 -4
- package/src/pipeline/stages/rollbackCluster/awsRollbackClusterStage.js +0 -66
- package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html +0 -43
- package/src/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.js +0 -78
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +0 -35
- package/src/pipeline/stages/shrinkCluster/awsShrinkClusterStage.js +0 -73
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +0 -34
- package/src/pipeline/stages/tagImage/awsTagImageStage.js +0 -34
- package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +0 -38
- package/src/pipeline/stages/tagImage/tagImageStage.html +0 -10
- package/src/reactShims/aws.react.injector.ts +0 -25
- package/src/reactShims/aws.react.module.ts +0 -12
- package/src/reactShims/index.ts +0 -1
- package/src/securityGroup/clone/cloneSecurityGroup.controller.js +0 -106
- package/src/securityGroup/clone/cloneSecurityGroup.html +0 -19
- package/src/securityGroup/configure/CreateSecurityGroup.controller.spec.js +0 -307
- package/src/securityGroup/configure/CreateSecurityGroupCtrl.js +0 -47
- package/src/securityGroup/configure/EditSecurityGroupCtrl.js +0 -115
- package/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +0 -366
- package/src/securityGroup/configure/createSecurityGroup.html +0 -19
- package/src/securityGroup/configure/createSecurityGroupIngress.html +0 -100
- package/src/securityGroup/configure/createSecurityGroupProperties.html +0 -123
- package/src/securityGroup/configure/editSecurityGroup.html +0 -20
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.html +0 -77
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.less +0 -6
- package/src/securityGroup/configure/ingressRuleGroupSelector.component.ts +0 -190
- package/src/securityGroup/configure/securityGroupDetailsCustom.component.ts +0 -16
- package/src/securityGroup/configure/securityGroupDetailsCustom.tsx +0 -16
- package/src/securityGroup/details/securityGroupDetail.controller.js +0 -249
- package/src/securityGroup/details/securityGroupDetail.html +0 -114
- package/src/securityGroup/details/securityGroupIpRangeRules.component.ts +0 -12
- package/src/securityGroup/securityGroup.module.ts +0 -26
- package/src/securityGroup/securityGroup.transformer.js +0 -48
- package/src/serverGroup/configure/serverGroupConfiguration.service.spec.ts +0 -478
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.js +0 -47
- package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.html +0 -79
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +0 -146
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +0 -139
- package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +0 -15
- package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +0 -6
- package/src/serverGroup/details/scalingPolicy/scalingPolicySummary.component.ts +0 -14
- package/src/serverGroup/details/scalingPolicy/upsert/alarm/dimensionsEditor.less +0 -18
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.js +0 -95
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.spec.js +0 -106
- package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.html +0 -30
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.js +0 -70
- package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.html +0 -89
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.js +0 -95
- package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.html +0 -40
- package/src/serverGroup/details/serverGroupDetails.module.ts +0 -18
- package/src/serverGroup/serverGroup.transformer.spec.ts +0 -185
- package/src/subnet/SubnetSelectInput.spec.tsx +0 -91
- package/src/subnet/subnet.renderer.ts +0 -12
- package/src/vpc/vpc.module.ts +0 -9
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import IInjectorService = angular.auto.IInjectorService;
|
|
2
|
-
|
|
3
|
-
import type { FunctionReader } from '@spinnaker/core';
|
|
4
|
-
import { ReactInject } from '@spinnaker/core';
|
|
5
|
-
import type { EvaluateCloudFormationChangeSetExecutionService } from '../pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service';
|
|
6
|
-
import type { AwsServerGroupCommandBuilder } from '../serverGroup/configure/serverGroupCommandBuilder.service';
|
|
7
|
-
|
|
8
|
-
import type { AwsServerGroupConfigurationService } from '../serverGroup/configure/serverGroupConfiguration.service';
|
|
9
|
-
import type { AwsServerGroupTransformer } from '../serverGroup/serverGroup.transformer';
|
|
10
|
-
|
|
11
|
-
// prettier-ignore
|
|
12
|
-
export class AwsReactInject extends ReactInject {
|
|
13
|
-
public get awsInstanceTypeService() { return this.$injector.get('awsInstanceTypeService') as any; }
|
|
14
|
-
public get awsServerGroupCommandBuilder() { return this.$injector.get('awsServerGroupCommandBuilder') as AwsServerGroupCommandBuilder; }
|
|
15
|
-
public get awsServerGroupConfigurationService() { return this.$injector.get('awsServerGroupConfigurationService') as AwsServerGroupConfigurationService; }
|
|
16
|
-
public get awsServerGroupTransformer() { return this.$injector.get('awsServerGroupTransformer') as AwsServerGroupTransformer; }
|
|
17
|
-
|
|
18
|
-
public get functionReader() { return this.$injector.get('functionReader') as FunctionReader; }
|
|
19
|
-
public get evaluateCloudFormationChangeSetExecutionService() { return this.$injector.get('evaluateCloudFormationChangeSetExecutionService') as EvaluateCloudFormationChangeSetExecutionService; }
|
|
20
|
-
public initialize($injector: IInjectorService) {
|
|
21
|
-
this.$injector = $injector;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const AwsReactInjector: AwsReactInject = new AwsReactInject();
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { module } from 'angular';
|
|
2
|
-
|
|
3
|
-
import { AwsReactInjector } from './aws.react.injector';
|
|
4
|
-
|
|
5
|
-
export const AWS_REACT_MODULE = 'spinnaker.amazon.react';
|
|
6
|
-
module(AWS_REACT_MODULE, []).run([
|
|
7
|
-
'$injector',
|
|
8
|
-
function ($injector: any) {
|
|
9
|
-
// Make angular services importable and (TODO when relevant) convert angular components to react
|
|
10
|
-
AwsReactInjector.initialize($injector);
|
|
11
|
-
},
|
|
12
|
-
]);
|
package/src/reactShims/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './aws.react.injector';
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import * as angular from 'angular';
|
|
4
|
-
import _ from 'lodash';
|
|
5
|
-
|
|
6
|
-
import { AccountService, FirewallLabels } from '@spinnaker/core';
|
|
7
|
-
import { AMAZON_SECURITYGROUP_CONFIGURE_CONFIGSECURITYGROUP_MIXIN_CONTROLLER } from '../configure/configSecurityGroup.mixin.controller';
|
|
8
|
-
|
|
9
|
-
export const AMAZON_SECURITYGROUP_CLONE_CLONESECURITYGROUP_CONTROLLER =
|
|
10
|
-
'spinnaker.amazon.securityGroup.clone.controller';
|
|
11
|
-
export const name = AMAZON_SECURITYGROUP_CLONE_CLONESECURITYGROUP_CONTROLLER; // for backwards compatibility
|
|
12
|
-
angular
|
|
13
|
-
.module(AMAZON_SECURITYGROUP_CLONE_CLONESECURITYGROUP_CONTROLLER, [
|
|
14
|
-
AMAZON_SECURITYGROUP_CONFIGURE_CONFIGSECURITYGROUP_MIXIN_CONTROLLER,
|
|
15
|
-
])
|
|
16
|
-
.controller('awsCloneSecurityGroupController', [
|
|
17
|
-
'$scope',
|
|
18
|
-
'$uibModalInstance',
|
|
19
|
-
'$controller',
|
|
20
|
-
'securityGroup',
|
|
21
|
-
'application',
|
|
22
|
-
function ($scope, $uibModalInstance, $controller, securityGroup, application) {
|
|
23
|
-
const vm = this;
|
|
24
|
-
|
|
25
|
-
vm.firewallLabel = FirewallLabels.get('Firewall');
|
|
26
|
-
|
|
27
|
-
$scope.pages = {
|
|
28
|
-
location: require('../configure/createSecurityGroupProperties.html'),
|
|
29
|
-
ingress: require('../configure/createSecurityGroupIngress.html'),
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
securityGroup.credentials = securityGroup.accountName;
|
|
33
|
-
$scope.namePreview = securityGroup.name;
|
|
34
|
-
|
|
35
|
-
angular.extend(
|
|
36
|
-
this,
|
|
37
|
-
$controller('awsConfigSecurityGroupMixin', {
|
|
38
|
-
$scope: $scope,
|
|
39
|
-
$uibModalInstance: $uibModalInstance,
|
|
40
|
-
application: application,
|
|
41
|
-
securityGroup: securityGroup,
|
|
42
|
-
}),
|
|
43
|
-
);
|
|
44
|
-
$scope.state.isNew = true;
|
|
45
|
-
// We want to let people clone as a means to copy security groups across
|
|
46
|
-
// regions so don't block them because the names already exist.
|
|
47
|
-
$scope.allowDuplicateNames = true;
|
|
48
|
-
// Used to prevent cloning into an the exiting region
|
|
49
|
-
$scope.state.isClone = true;
|
|
50
|
-
$scope.state.originRegion = securityGroup.regions && securityGroup.regions[0];
|
|
51
|
-
|
|
52
|
-
AccountService.listAccounts('aws').then(function (accounts) {
|
|
53
|
-
$scope.accounts = accounts;
|
|
54
|
-
vm.accountUpdated();
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
securityGroup.securityGroupIngress = _.chain(securityGroup.inboundRules)
|
|
58
|
-
.filter(function (rule) {
|
|
59
|
-
return rule.securityGroup;
|
|
60
|
-
})
|
|
61
|
-
.map(function (rule) {
|
|
62
|
-
return rule.portRanges.map(function (portRange) {
|
|
63
|
-
return {
|
|
64
|
-
name: rule.securityGroup.name,
|
|
65
|
-
type: rule.protocol,
|
|
66
|
-
startPort: portRange.startPort,
|
|
67
|
-
endPort: portRange.endPort,
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
})
|
|
71
|
-
.flatten()
|
|
72
|
-
.value();
|
|
73
|
-
|
|
74
|
-
securityGroup.ipIngress = _.chain(securityGroup.inboundRules)
|
|
75
|
-
.filter(function (rule) {
|
|
76
|
-
return rule.range;
|
|
77
|
-
})
|
|
78
|
-
.map(function (rule) {
|
|
79
|
-
return rule.portRanges.map(function (portRange) {
|
|
80
|
-
return {
|
|
81
|
-
cidr: rule.range.ip + rule.range.cidr,
|
|
82
|
-
type: rule.protocol,
|
|
83
|
-
startPort: portRange.startPort,
|
|
84
|
-
endPort: portRange.endPort,
|
|
85
|
-
};
|
|
86
|
-
});
|
|
87
|
-
})
|
|
88
|
-
.flatten()
|
|
89
|
-
.value();
|
|
90
|
-
|
|
91
|
-
vm.upsert = function () {
|
|
92
|
-
// <account-select-field> only updates securityGroup.credentials, but Orca looks at account* before looking at credentials
|
|
93
|
-
// Updating the rest of the attributes to send the correct (expected) account for all attributes
|
|
94
|
-
const { credentials } = $scope.securityGroup;
|
|
95
|
-
Object.assign($scope.securityGroup, {
|
|
96
|
-
account: credentials,
|
|
97
|
-
accountName: credentials,
|
|
98
|
-
accountId: credentials,
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
vm.mixinUpsert('Clone');
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
vm.initializeSecurityGroups().then(vm.initializeAccounts);
|
|
105
|
-
},
|
|
106
|
-
]);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<ng-form role="form" name="form" novalidate>
|
|
2
|
-
<v2-modal-wizard heading="Clone {{ctrl.firewallLabel}}" task-monitor="taskMonitor" dismiss="$dismiss()">
|
|
3
|
-
<v2-wizard-page key="Location" label="Location">
|
|
4
|
-
<ng-include src="pages.location"></ng-include>
|
|
5
|
-
</v2-wizard-page>
|
|
6
|
-
<v2-wizard-page key="Ingress" label="Ingress" done="true" mark-clean-on-view="false">
|
|
7
|
-
<ng-include src="pages.ingress"></ng-include>
|
|
8
|
-
</v2-wizard-page>
|
|
9
|
-
</v2-modal-wizard>
|
|
10
|
-
<div class="modal-footer">
|
|
11
|
-
<button class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>
|
|
12
|
-
<submit-button
|
|
13
|
-
is-disabled="form.$invalid || !wizard.isComplete() || state.submitting || state.removedRules.length > 0 || !customComponentIsvalid || state.regionError"
|
|
14
|
-
submitting="state.submitting"
|
|
15
|
-
on-click="ctrl.upsert()"
|
|
16
|
-
is-new="isNew"
|
|
17
|
-
></submit-button>
|
|
18
|
-
</div>
|
|
19
|
-
</ng-form>
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import { map } from 'lodash';
|
|
4
|
-
|
|
5
|
-
import { AccountService, InfrastructureCaches, ModalWizard } from '@spinnaker/core';
|
|
6
|
-
|
|
7
|
-
import { AWSProviderSettings } from '../../aws.settings';
|
|
8
|
-
import { VpcReader } from '../../vpc';
|
|
9
|
-
|
|
10
|
-
describe('Controller: CreateSecurityGroup', function () {
|
|
11
|
-
beforeEach(
|
|
12
|
-
window.module(require('./CreateSecurityGroupCtrl').name, require('./configSecurityGroup.mixin.controller').name),
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
afterEach(AWSProviderSettings.resetToOriginal);
|
|
16
|
-
|
|
17
|
-
describe('filtering', function () {
|
|
18
|
-
this.oldGet = InfrastructureCaches.get;
|
|
19
|
-
|
|
20
|
-
beforeEach(() => {
|
|
21
|
-
InfrastructureCaches.get = () => {
|
|
22
|
-
return {
|
|
23
|
-
getStats: () => {
|
|
24
|
-
return { ageMax: 0 };
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
afterEach(() => {
|
|
30
|
-
InfrastructureCaches.get = this.oldGet;
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// Initialize the controller and a mock scope
|
|
34
|
-
beforeEach(
|
|
35
|
-
window.inject(function ($controller, $rootScope, $q, securityGroupReader) {
|
|
36
|
-
this.$scope = $rootScope.$new();
|
|
37
|
-
this.$q = $q;
|
|
38
|
-
this.securityGroupReader = securityGroupReader;
|
|
39
|
-
|
|
40
|
-
spyOn(AccountService, 'listAllAccounts').and.returnValue($q.when([{ name: 'prod' }, { name: 'test' }]));
|
|
41
|
-
|
|
42
|
-
spyOn(AccountService, 'getRegionsForAccount').and.returnValue($q.when(['us-east-1', 'us-west-1']));
|
|
43
|
-
|
|
44
|
-
spyOn(VpcReader, 'listVpcs').and.returnValue(
|
|
45
|
-
$q.when([
|
|
46
|
-
{ id: 'vpc1-pe', name: 'vpc 1', account: 'prod', region: 'us-east-1', deprecated: false, label: 'vpc 1' },
|
|
47
|
-
{ id: 'vpc2-pw', name: 'vpc 2', account: 'prod', region: 'us-west-1', deprecated: false, label: 'vpc 2' },
|
|
48
|
-
{ id: 'vpc1-te', name: 'vpc 1', account: 'test', region: 'us-east-1', deprecated: false, label: 'vpc 1' },
|
|
49
|
-
{ id: 'vpc2-te', name: 'vpc 2', account: 'test', region: 'us-east-1', deprecated: false, label: 'vpc 2' },
|
|
50
|
-
{ id: 'vpc2-tw', name: 'vpc 2', account: 'test', region: 'us-west-1', deprecated: false, label: 'vpc 2' },
|
|
51
|
-
]),
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
spyOn(this.securityGroupReader, 'getAllSecurityGroups').and.returnValue(
|
|
55
|
-
$q.when({
|
|
56
|
-
prod: {
|
|
57
|
-
aws: {
|
|
58
|
-
'us-east-1': [
|
|
59
|
-
{ name: 'group1', vpcId: null, id: '1' },
|
|
60
|
-
{ name: 'group2', vpcId: null, id: '2' },
|
|
61
|
-
{ name: 'group3', vpcId: 'vpc1-pe', id: '3' },
|
|
62
|
-
],
|
|
63
|
-
'us-west-1': [
|
|
64
|
-
{ name: 'group1', vpcId: null, id: '1' },
|
|
65
|
-
{ name: 'group3', vpcId: 'vpc2-pw', id: '3' },
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
test: {
|
|
70
|
-
aws: {
|
|
71
|
-
'us-east-1': [
|
|
72
|
-
{ name: 'group1', vpcId: null, id: '1' },
|
|
73
|
-
{ name: 'group2', vpcId: 'vpc1-te', id: '2' },
|
|
74
|
-
{ name: 'group3', vpcId: 'vpc1-te', id: '3' },
|
|
75
|
-
{ name: 'group4', vpcId: 'vpc2-te', id: '4' },
|
|
76
|
-
],
|
|
77
|
-
'us-west-1': [
|
|
78
|
-
{ name: 'group1', vpcId: null, id: '1' },
|
|
79
|
-
{ name: 'group3', vpcId: 'vpc1-tw', id: '3' },
|
|
80
|
-
{ name: 'group3', vpcId: 'vpc2-tw', id: '3' },
|
|
81
|
-
{ name: 'group5', vpcId: 'vpc2-tw', id: '5' },
|
|
82
|
-
],
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
}),
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
this.initializeCtrl = function () {
|
|
89
|
-
this.ctrl = $controller('awsCreateSecurityGroupCtrl', {
|
|
90
|
-
$scope: this.$scope,
|
|
91
|
-
$uibModalInstance: { result: this.$q.when(null) },
|
|
92
|
-
securityGroupReader: this.securityGroupReader,
|
|
93
|
-
application: this.application || { attributes: {} },
|
|
94
|
-
securityGroup: { regions: [], securityGroupIngress: [] },
|
|
95
|
-
});
|
|
96
|
-
this.$scope.$digest();
|
|
97
|
-
};
|
|
98
|
-
}),
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
it('initializes with no firewalls available for ingress permissions', function () {
|
|
102
|
-
this.initializeCtrl();
|
|
103
|
-
expect(this.$scope.availableSecurityGroups.length).toBe(0);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
it('sets up available firewalls once an account and region are selected', function () {
|
|
107
|
-
this.initializeCtrl();
|
|
108
|
-
this.$scope.securityGroup.credentials = 'prod';
|
|
109
|
-
this.ctrl.accountUpdated();
|
|
110
|
-
this.$scope.$digest();
|
|
111
|
-
expect(this.$scope.availableSecurityGroups.length).toBe(0);
|
|
112
|
-
|
|
113
|
-
this.$scope.securityGroup.regions = ['us-east-1'];
|
|
114
|
-
this.ctrl.accountUpdated();
|
|
115
|
-
this.$scope.$digest();
|
|
116
|
-
expect(this.$scope.availableSecurityGroups.length).toBe(1);
|
|
117
|
-
expect(this.$scope.existingSecurityGroupNames).toEqual(['group3']);
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it('filters existing names based on join of groups from all regions', function () {
|
|
121
|
-
this.initializeCtrl();
|
|
122
|
-
this.$scope.securityGroup.credentials = 'test';
|
|
123
|
-
this.$scope.securityGroup.regions = ['us-east-1', 'us-west-1'];
|
|
124
|
-
this.$scope.securityGroup.vpcId = 'vpc2-te';
|
|
125
|
-
this.$scope.securityGroup.vpcName = 'vpc 2';
|
|
126
|
-
this.ctrl.accountUpdated();
|
|
127
|
-
this.$scope.$digest();
|
|
128
|
-
expect(this.$scope.availableSecurityGroups.length).toBe(0);
|
|
129
|
-
expect(this.$scope.existingSecurityGroupNames.sort()).toEqual(['group3', 'group4', 'group5']);
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
it('filters available names based on intersection of groups from all regions', function () {
|
|
133
|
-
this.initializeCtrl();
|
|
134
|
-
this.$scope.securityGroup.credentials = 'test';
|
|
135
|
-
this.$scope.securityGroup.regions = ['us-east-1', 'us-west-1'];
|
|
136
|
-
this.$scope.securityGroup.vpcId = 'vpc1-tw';
|
|
137
|
-
this.ctrl.accountUpdated();
|
|
138
|
-
this.$scope.$digest();
|
|
139
|
-
expect(this.$scope.availableSecurityGroups.length).toBe(0);
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
it('filters VPCs based on account + region', function () {
|
|
143
|
-
this.initializeCtrl();
|
|
144
|
-
this.$scope.securityGroup.credentials = 'test';
|
|
145
|
-
this.$scope.securityGroup.regions = ['us-east-1', 'us-west-1'];
|
|
146
|
-
this.ctrl.accountUpdated();
|
|
147
|
-
this.$scope.$digest();
|
|
148
|
-
expect(map(this.$scope.vpcs, 'label').sort()).toEqual(['vpc 2']);
|
|
149
|
-
|
|
150
|
-
this.$scope.securityGroup.regions = ['us-east-1'];
|
|
151
|
-
this.ctrl.accountUpdated();
|
|
152
|
-
this.$scope.$digest();
|
|
153
|
-
expect(map(this.$scope.vpcs, 'label').sort()).toEqual(['vpc 1', 'vpc 2']);
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
it('loves a default VPC!', function () {
|
|
157
|
-
AWSProviderSettings.defaults.vpc = 'vpc 2';
|
|
158
|
-
AWSProviderSettings.classicLaunchLockout = -1;
|
|
159
|
-
this.initializeCtrl();
|
|
160
|
-
this.$scope.securityGroup.credentials = 'test';
|
|
161
|
-
this.$scope.securityGroup.regions = ['us-east-1'];
|
|
162
|
-
this.$scope.securityGroup.vpcName = 'vpc 2';
|
|
163
|
-
this.ctrl.regionUpdated();
|
|
164
|
-
this.$scope.$digest();
|
|
165
|
-
expect(this.$scope.securityGroup.vpcId).toBe('vpc2-te');
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
describe('firewall removal', function () {
|
|
169
|
-
beforeEach(function () {
|
|
170
|
-
spyOn(ModalWizard, 'markDirty').and.returnValue(null);
|
|
171
|
-
this.initializeCtrl();
|
|
172
|
-
let securityGroup = this.$scope.securityGroup;
|
|
173
|
-
securityGroup.credentials = 'prod';
|
|
174
|
-
securityGroup.regions = ['us-east-1'];
|
|
175
|
-
this.ctrl.accountUpdated();
|
|
176
|
-
this.$scope.$digest();
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
it('removes rules that are not available when account changes', function () {
|
|
180
|
-
let securityGroup = this.$scope.securityGroup;
|
|
181
|
-
securityGroup.credentials = 'test';
|
|
182
|
-
this.ctrl.accountUpdated();
|
|
183
|
-
this.$scope.$digest();
|
|
184
|
-
this.$scope.availableSecurityGroups.forEach((group) =>
|
|
185
|
-
securityGroup.securityGroupIngress.push({ name: group }),
|
|
186
|
-
);
|
|
187
|
-
expect(securityGroup.securityGroupIngress.length).toBe(2);
|
|
188
|
-
|
|
189
|
-
securityGroup.credentials = 'prod';
|
|
190
|
-
this.ctrl.accountUpdated();
|
|
191
|
-
this.$scope.$digest();
|
|
192
|
-
expect(this.$scope.state.removedRules.length).toBe(1);
|
|
193
|
-
expect(ModalWizard.markDirty).toHaveBeenCalledWith('Ingress');
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
it('does not repeatedly add removed rule warnings when multiple rules for the same group are removed', function () {
|
|
197
|
-
let securityGroup = this.$scope.securityGroup;
|
|
198
|
-
securityGroup.credentials = 'test';
|
|
199
|
-
this.ctrl.accountUpdated();
|
|
200
|
-
this.$scope.$digest();
|
|
201
|
-
this.$scope.availableSecurityGroups.forEach((group) => {
|
|
202
|
-
securityGroup.securityGroupIngress.push({ name: group, startPort: 7001, endPort: 7001, protocol: 'HTTPS' });
|
|
203
|
-
securityGroup.securityGroupIngress.push({ name: group, startPort: 7000, endPort: 7000, protocol: 'HTTP' });
|
|
204
|
-
});
|
|
205
|
-
expect(securityGroup.securityGroupIngress.length).toBe(4);
|
|
206
|
-
|
|
207
|
-
securityGroup.credentials = 'prod';
|
|
208
|
-
this.ctrl.accountUpdated();
|
|
209
|
-
this.$scope.$digest();
|
|
210
|
-
expect(this.$scope.state.removedRules).toEqual(['group2']);
|
|
211
|
-
expect(ModalWizard.markDirty).toHaveBeenCalledWith('Ingress');
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
describe('classic locking', function () {
|
|
216
|
-
function init(self) {
|
|
217
|
-
self.initializeCtrl();
|
|
218
|
-
self.ctrl.regionUpdated();
|
|
219
|
-
self.$scope.$digest();
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
it('does not hide classic when aws provider not configured', function () {
|
|
223
|
-
init(this);
|
|
224
|
-
expect(this.$scope.hideClassic).toBe(false);
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
it('does not hide classic when classicLaunchLockout not configured', function () {
|
|
228
|
-
AWSProviderSettings.classicLaunchLockout = undefined;
|
|
229
|
-
init(this);
|
|
230
|
-
expect(this.$scope.hideClassic).toBe(false);
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
it('does not hide classic when application has no attributes', function () {
|
|
234
|
-
AWSProviderSettings.classicLaunchLockout = 10;
|
|
235
|
-
init(this);
|
|
236
|
-
expect(this.$scope.hideClassic).toBe(false);
|
|
237
|
-
|
|
238
|
-
this.application = {};
|
|
239
|
-
init(this);
|
|
240
|
-
expect(this.$scope.hideClassic).toBe(false);
|
|
241
|
-
});
|
|
242
|
-
|
|
243
|
-
it('does not hide classic when application is older than lockout date', function () {
|
|
244
|
-
this.application = { attributes: { createTs: 9 } };
|
|
245
|
-
init(this);
|
|
246
|
-
expect(this.$scope.hideClassic).toBe(false);
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
it('hides classic when application createTs is numeric and the same as lockout', function () {
|
|
250
|
-
AWSProviderSettings.classicLaunchLockout = 10;
|
|
251
|
-
this.application = { attributes: { createTs: 10 } };
|
|
252
|
-
init(this);
|
|
253
|
-
expect(this.$scope.hideClassic).toBe(true);
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
it('hides classic when application createTs is numeric and after lockout', function () {
|
|
257
|
-
AWSProviderSettings.classicLaunchLockout = 10;
|
|
258
|
-
this.application = { attributes: { createTs: 11 } };
|
|
259
|
-
init(this);
|
|
260
|
-
expect(this.$scope.hideClassic).toBe(true);
|
|
261
|
-
});
|
|
262
|
-
|
|
263
|
-
it('hides classic when application createTs is a string and the same as lockout', function () {
|
|
264
|
-
AWSProviderSettings.classicLaunchLockout = 10;
|
|
265
|
-
this.application = { attributes: { createTs: '10' } };
|
|
266
|
-
init(this);
|
|
267
|
-
expect(this.$scope.hideClassic).toBe(true);
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
it('hides classic when application createTs is a string and after lockout', function () {
|
|
271
|
-
AWSProviderSettings.classicLaunchLockout = 10;
|
|
272
|
-
this.application = { attributes: { createTs: '11' } };
|
|
273
|
-
init(this);
|
|
274
|
-
expect(this.$scope.hideClassic).toBe(true);
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
it('sets vpcId to first active if classic is locked', function () {
|
|
278
|
-
AWSProviderSettings.classicLaunchLockout = 10;
|
|
279
|
-
this.application = { attributes: { createTs: 10 } };
|
|
280
|
-
this.initializeCtrl();
|
|
281
|
-
|
|
282
|
-
this.$scope.securityGroup.credentials = 'prod';
|
|
283
|
-
this.$scope.securityGroup.regions = ['us-east-1'];
|
|
284
|
-
this.$scope.securityGroup.vpcName = 'vpc 1';
|
|
285
|
-
|
|
286
|
-
this.ctrl.regionUpdated();
|
|
287
|
-
this.$scope.$digest();
|
|
288
|
-
|
|
289
|
-
expect(this.$scope.securityGroup.vpcId).toBe('vpc1-pe');
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
it('leaves vpcId alone if already selected and classic locked', function () {
|
|
293
|
-
AWSProviderSettings.classicLaunchLockout = 10;
|
|
294
|
-
|
|
295
|
-
this.application = { attributes: { createTs: 10 } };
|
|
296
|
-
this.initializeCtrl();
|
|
297
|
-
this.$scope.securityGroup.vpcId = 'vpc2-te';
|
|
298
|
-
this.$scope.securityGroup.vpcName = 'vpc 2';
|
|
299
|
-
this.$scope.securityGroup.credentials = 'test';
|
|
300
|
-
this.$scope.securityGroup.regions = ['us-east-1'];
|
|
301
|
-
this.ctrl.regionUpdated();
|
|
302
|
-
this.$scope.$digest();
|
|
303
|
-
expect(this.$scope.securityGroup.vpcId).toBe('vpc2-te');
|
|
304
|
-
});
|
|
305
|
-
});
|
|
306
|
-
});
|
|
307
|
-
});
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import UIROUTER_ANGULARJS from '@uirouter/angularjs';
|
|
4
|
-
import * as angular from 'angular';
|
|
5
|
-
|
|
6
|
-
import { CACHE_INITIALIZER_SERVICE, FirewallLabels } from '@spinnaker/core';
|
|
7
|
-
|
|
8
|
-
export const AMAZON_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUPCTRL =
|
|
9
|
-
'spinnaker.amazon.securityGroup.create.controller';
|
|
10
|
-
export const name = AMAZON_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUPCTRL; // for backwards compatibility
|
|
11
|
-
angular
|
|
12
|
-
.module(AMAZON_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUPCTRL, [UIROUTER_ANGULARJS, CACHE_INITIALIZER_SERVICE])
|
|
13
|
-
.controller('awsCreateSecurityGroupCtrl', [
|
|
14
|
-
'$scope',
|
|
15
|
-
'$uibModalInstance',
|
|
16
|
-
'$state',
|
|
17
|
-
'$controller',
|
|
18
|
-
'cacheInitializer',
|
|
19
|
-
'application',
|
|
20
|
-
'securityGroup',
|
|
21
|
-
function ($scope, $uibModalInstance, $state, $controller, cacheInitializer, application, securityGroup) {
|
|
22
|
-
$scope.pages = {
|
|
23
|
-
location: require('./createSecurityGroupProperties.html'),
|
|
24
|
-
ingress: require('./createSecurityGroupIngress.html'),
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const ctrl = this;
|
|
28
|
-
|
|
29
|
-
ctrl.translate = (label) => FirewallLabels.get(label);
|
|
30
|
-
|
|
31
|
-
angular.extend(
|
|
32
|
-
this,
|
|
33
|
-
$controller('awsConfigSecurityGroupMixin', {
|
|
34
|
-
$scope: $scope,
|
|
35
|
-
$uibModalInstance: $uibModalInstance,
|
|
36
|
-
application: application,
|
|
37
|
-
securityGroup: securityGroup,
|
|
38
|
-
}),
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
$scope.state.isNew = true;
|
|
42
|
-
|
|
43
|
-
ctrl.upsert = () => ctrl.mixinUpsert('Create');
|
|
44
|
-
|
|
45
|
-
ctrl.initializeSecurityGroups().then(ctrl.initializeAccounts);
|
|
46
|
-
},
|
|
47
|
-
]);
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import UIROUTER_ANGULARJS from '@uirouter/angularjs';
|
|
4
|
-
import * as angular from 'angular';
|
|
5
|
-
import _ from 'lodash';
|
|
6
|
-
|
|
7
|
-
import { FirewallLabels, SecurityGroupWriter, TaskMonitor } from '@spinnaker/core';
|
|
8
|
-
|
|
9
|
-
export const AMAZON_SECURITYGROUP_CONFIGURE_EDITSECURITYGROUPCTRL = 'spinnaker.amazon.securityGroup.edit.controller';
|
|
10
|
-
export const name = AMAZON_SECURITYGROUP_CONFIGURE_EDITSECURITYGROUPCTRL; // for backwards compatibility
|
|
11
|
-
angular
|
|
12
|
-
.module(AMAZON_SECURITYGROUP_CONFIGURE_EDITSECURITYGROUPCTRL, [UIROUTER_ANGULARJS])
|
|
13
|
-
.controller('awsEditSecurityGroupCtrl', [
|
|
14
|
-
'$scope',
|
|
15
|
-
'$uibModalInstance',
|
|
16
|
-
'$state',
|
|
17
|
-
'application',
|
|
18
|
-
'securityGroup',
|
|
19
|
-
'$controller',
|
|
20
|
-
function ($scope, $uibModalInstance, $state, application, securityGroup, $controller) {
|
|
21
|
-
$scope.self = $scope;
|
|
22
|
-
$scope.pages = {
|
|
23
|
-
ingress: require('./createSecurityGroupIngress.html'),
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
$scope.securityGroup = securityGroup;
|
|
27
|
-
|
|
28
|
-
$scope.state = {
|
|
29
|
-
refreshingSecurityGroups: false,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
$scope.securityGroup.regions = [$scope.securityGroup.region];
|
|
33
|
-
$scope.securityGroup.credentials = $scope.securityGroup.accountName;
|
|
34
|
-
|
|
35
|
-
angular.extend(
|
|
36
|
-
this,
|
|
37
|
-
$controller('awsConfigSecurityGroupMixin', {
|
|
38
|
-
$scope: $scope,
|
|
39
|
-
$uibModalInstance: $uibModalInstance,
|
|
40
|
-
application: application,
|
|
41
|
-
securityGroup: securityGroup,
|
|
42
|
-
}),
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
$scope.state.isNew = false;
|
|
46
|
-
|
|
47
|
-
$scope.taskMonitor = new TaskMonitor({
|
|
48
|
-
application: application,
|
|
49
|
-
title: `Updating your ${FirewallLabels.get('firewall')}`,
|
|
50
|
-
modalInstance: $uibModalInstance,
|
|
51
|
-
onTaskComplete: () => application.securityGroups.refresh(),
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
securityGroup.securityGroupIngress = _.chain(securityGroup.inboundRules)
|
|
55
|
-
.filter((rule) => rule.securityGroup)
|
|
56
|
-
.map((rule) =>
|
|
57
|
-
rule.portRanges.map((portRange) => {
|
|
58
|
-
const vpcId = rule.securityGroup.vpcId === securityGroup.vpcId ? null : rule.securityGroup.vpcId;
|
|
59
|
-
return {
|
|
60
|
-
accountName: rule.securityGroup.accountName || rule.securityGroup.accountId,
|
|
61
|
-
accountId: rule.securityGroup.accountId,
|
|
62
|
-
vpcId: vpcId,
|
|
63
|
-
id: rule.securityGroup.id,
|
|
64
|
-
name: rule.securityGroup.inferredName ? null : rule.securityGroup.name,
|
|
65
|
-
type: rule.protocol,
|
|
66
|
-
startPort: portRange.startPort,
|
|
67
|
-
endPort: portRange.endPort,
|
|
68
|
-
existing: true,
|
|
69
|
-
};
|
|
70
|
-
}),
|
|
71
|
-
)
|
|
72
|
-
.flatten()
|
|
73
|
-
.value();
|
|
74
|
-
|
|
75
|
-
securityGroup.ipIngress = _.chain(securityGroup.inboundRules)
|
|
76
|
-
.filter(function (rule) {
|
|
77
|
-
return rule.range;
|
|
78
|
-
})
|
|
79
|
-
.map(function (rule) {
|
|
80
|
-
return rule.portRanges.map(function (portRange) {
|
|
81
|
-
return {
|
|
82
|
-
cidr: rule.range.ip + rule.range.cidr,
|
|
83
|
-
type: rule.protocol,
|
|
84
|
-
startPort: portRange.startPort,
|
|
85
|
-
endPort: portRange.endPort,
|
|
86
|
-
};
|
|
87
|
-
});
|
|
88
|
-
})
|
|
89
|
-
.flatten()
|
|
90
|
-
.value();
|
|
91
|
-
|
|
92
|
-
this.upsert = function () {
|
|
93
|
-
const group = $scope.securityGroup;
|
|
94
|
-
const command = {
|
|
95
|
-
credentials: group.accountName,
|
|
96
|
-
name: group.name,
|
|
97
|
-
description: group.description,
|
|
98
|
-
vpcId: group.vpcId,
|
|
99
|
-
region: group.region,
|
|
100
|
-
securityGroupIngress: group.securityGroupIngress,
|
|
101
|
-
ipIngress: group.ipIngress,
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
$scope.taskMonitor.submit(function () {
|
|
105
|
-
return SecurityGroupWriter.upsertSecurityGroup(command, application, 'Update');
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
this.cancel = function () {
|
|
110
|
-
$uibModalInstance.dismiss();
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
this.initializeSecurityGroups().then(this.initializeAccounts);
|
|
114
|
-
},
|
|
115
|
-
]);
|