@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.
Files changed (404) hide show
  1. package/dist/aws.module.d.ts +2 -1
  2. package/dist/aws.services.d.ts +8 -0
  3. package/dist/certificates/AmazonCertificateReader.d.ts +1 -1
  4. package/dist/domain/IAmazonServerGroup.d.ts +10 -0
  5. package/dist/function/CreateLambdaFunction.d.ts +10 -5
  6. package/dist/function/configure/Network.d.ts +3 -0
  7. package/dist/function/details/FunctionActions.d.ts +3 -0
  8. package/dist/function/function.transformer.d.ts +1 -0
  9. package/dist/image/image.reader.d.ts +2 -2
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/instance/amazon.instance.write.service.d.ts +5 -5
  14. package/dist/instance/awsInstanceType.service.d.ts +13 -2
  15. package/dist/instance/details/AmazonInstanceDetails.d.ts +67 -0
  16. package/dist/instance/index.d.ts +1 -0
  17. package/dist/keyPairs/KeyPairsReader.d.ts +1 -1
  18. package/dist/loadBalancer/AmazonLoadBalancersTag.d.ts +7 -4
  19. package/dist/loadBalancer/OidcConfigReader.d.ts +1 -1
  20. package/dist/loadBalancer/TargetGroupDetails.d.ts +37 -3
  21. package/dist/loadBalancer/amazonLoadBalancerDataUtils.d.ts +1 -1
  22. package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +6 -2
  23. package/dist/loadBalancer/configure/LoadBalancerTypes.d.ts +4 -4
  24. package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +10 -5
  25. package/dist/loadBalancer/configure/classic/CreateClassicLoadBalancer.d.ts +12 -7
  26. package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +4 -0
  27. package/dist/loadBalancer/configure/network/CreateNetworkLoadBalancer.d.ts +10 -5
  28. package/dist/loadBalancer/details/LoadBalancerActions.d.ts +9 -2
  29. package/dist/loadBalancer/details/amazonLoadBalancerDetails.d.ts +22 -0
  30. package/dist/loadBalancer/index.d.ts +1 -0
  31. package/dist/loadBalancer/loadBalancer.transformer.d.ts +1 -1
  32. package/dist/pipeline/stages/AmazonStageConfig.d.ts +11 -0
  33. package/dist/pipeline/stages/bake/AwsBakeStageConfig.d.ts +66 -0
  34. package/dist/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.d.ts +20 -0
  35. package/dist/pipeline/stages/deleteLambda/index.d.ts +1 -1
  36. package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +5 -4
  37. package/dist/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.d.ts +3 -0
  38. package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.d.ts +1 -1
  39. package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.d.ts +1 -3
  40. package/dist/pipeline/stages/deployLambda/index.d.ts +1 -1
  41. package/dist/pipeline/stages/destroyAsg/awsDestroyAsgStage.d.ts +26 -2
  42. package/dist/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.d.ts +27 -0
  43. package/dist/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.d.ts +19 -0
  44. package/dist/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.d.ts +20 -0
  45. package/dist/pipeline/stages/findAmi/awsFindAmiStage.d.ts +17 -2
  46. package/dist/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.d.ts +3 -0
  47. package/dist/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.d.ts +12 -2
  48. package/dist/pipeline/stages/invokeLambda/index.d.ts +1 -1
  49. package/dist/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.d.ts +3 -0
  50. package/dist/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.d.ts +20 -2
  51. package/dist/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.d.ts +3 -0
  52. package/dist/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.d.ts +20 -0
  53. package/dist/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.d.ts +17 -0
  54. package/dist/pipeline/stages/resizeAsg/awsResizeAsgStage.d.ts +40 -2
  55. package/dist/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.d.ts +19 -0
  56. package/dist/pipeline/stages/routeLambda/index.d.ts +1 -1
  57. package/dist/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.d.ts +22 -0
  58. package/dist/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.d.ts +21 -0
  59. package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +5 -2
  60. package/dist/pipeline/stages/updateCodeLambda/index.d.ts +1 -1
  61. package/dist/search/searchResultFormatter.d.ts +4 -2
  62. package/dist/securityGroup/configure/AmazonSecurityGroupModal.d.ts +43 -0
  63. package/dist/securityGroup/details/AmazonSecurityGroupDetails.d.ts +62 -0
  64. package/dist/securityGroup/details/index.d.ts +1 -0
  65. package/dist/securityGroup/index.d.ts +1 -0
  66. package/dist/securityGroup/securityGroup.reader.d.ts +0 -1
  67. package/dist/securityGroup/securityGroup.transformer.d.ts +11 -2
  68. package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +23 -7
  69. package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +17 -13
  70. package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +16 -6
  71. package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +6 -3
  72. package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +3 -0
  73. package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +4 -0
  74. package/dist/serverGroup/details/AmazonServerGroupActions.d.ts +10 -2
  75. package/dist/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.d.ts +17 -0
  76. package/dist/serverGroup/details/advancedSettings/index.d.ts +1 -0
  77. package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +5 -3
  78. package/dist/serverGroup/details/rollback/AmazonRollbackServerGroupModal.d.ts +67 -0
  79. package/dist/serverGroup/details/rollback/index.d.ts +2 -0
  80. package/dist/serverGroup/details/rollback/rollbackServerGroupSelection.d.ts +9 -0
  81. package/dist/serverGroup/details/scalingPolicy/ScalingPolicyWriter.d.ts +2 -2
  82. package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +0 -1
  83. package/dist/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.d.ts +24 -0
  84. package/dist/serverGroup/details/scalingProcesses/index.d.ts +2 -0
  85. package/dist/serverGroup/details/scheduledActions/EditScheduledActionsModal.d.ts +31 -0
  86. package/dist/serverGroup/details/scheduledActions/index.d.ts +1 -0
  87. package/dist/serverGroup/details/sections/AdvancedSettingsDetailsSection.d.ts +3 -0
  88. package/dist/serverGroup/details/sections/AmazonCapacityDetailsSection.d.ts +3 -0
  89. package/dist/serverGroup/details/sections/ScalingProcessesDetailsSection.d.ts +1 -1
  90. package/dist/serverGroup/details/sections/ScheduledActionsDetailsSection.d.ts +1 -1
  91. package/dist/serverGroup/details/sections/SecurityGroupsDetailsSection.d.ts +4 -1
  92. package/dist/serverGroup/details/sections/WarmPoolDetailsSection.d.ts +6 -0
  93. package/dist/serverGroup/details/sections/index.d.ts +1 -0
  94. package/dist/serverGroup/details/securityGroups/EditSecurityGroupsModal.d.ts +32 -0
  95. package/dist/serverGroup/details/securityGroups/index.d.ts +1 -0
  96. package/dist/serverGroup/details/warmPool/ModifyWarmPoolModal.d.ts +26 -0
  97. package/dist/serverGroup/details/warmPool/WarmPoolService.d.ts +6 -0
  98. package/dist/serverGroup/details/warmPool/index.d.ts +2 -0
  99. package/dist/serverGroup/serverGroup.transformer.d.ts +1 -2
  100. package/dist/vpc/VpcReader.d.ts +2 -2
  101. package/dist/vpc/index.d.ts +1 -0
  102. package/package.json +3 -12
  103. package/src/aws.module.spec.ts +296 -0
  104. package/src/aws.module.ts +107 -112
  105. package/src/aws.services.ts +21 -0
  106. package/src/certificates/AmazonCertificateReader.ts +1 -1
  107. package/src/domain/IAmazonServerGroup.ts +9 -0
  108. package/src/function/CreateLambdaFunction.tsx +29 -16
  109. package/src/function/configure/Network.tsx +8 -4
  110. package/src/function/details/AmazonFunctionDetails.tsx +4 -5
  111. package/src/function/details/FunctionActions.tsx +5 -1
  112. package/src/function/function.transformer.ts +4 -0
  113. package/src/image/image.reader.ts +3 -5
  114. package/src/index.ts +2 -2
  115. package/src/instance/amazon.instance.write.service.ts +15 -4
  116. package/src/instance/awsInstanceType.service.spec.js +172 -136
  117. package/src/instance/awsInstanceType.service.ts +142 -154
  118. package/src/instance/details/AmazonInstanceDetails.spec.tsx +79 -0
  119. package/src/instance/details/AmazonInstanceDetails.tsx +644 -0
  120. package/src/instance/details/InstanceInformation.tsx +11 -14
  121. package/src/instance/details/InstanceSecurityGroups.tsx +20 -23
  122. package/src/instance/details/InstanceTags.tsx +5 -3
  123. package/src/instance/index.ts +1 -0
  124. package/src/keyPairs/KeyPairsReader.ts +1 -1
  125. package/src/loadBalancer/AmazonLoadBalancersTag.spec.tsx +39 -0
  126. package/src/loadBalancer/AmazonLoadBalancersTag.tsx +21 -14
  127. package/src/loadBalancer/OidcConfigReader.ts +1 -1
  128. package/src/loadBalancer/TargetGroupDetails.spec.tsx +113 -0
  129. package/src/loadBalancer/TargetGroupDetails.tsx +287 -7
  130. package/src/loadBalancer/amazonLoadBalancerDataUtils.ts +21 -21
  131. package/src/loadBalancer/configure/AmazonLoadBalancerChoiceModal.tsx +17 -4
  132. package/src/loadBalancer/configure/LoadBalancerTypes.ts +7 -4
  133. package/src/loadBalancer/configure/application/ALBListeners.tsx +1 -2
  134. package/src/loadBalancer/configure/application/CreateApplicationLoadBalancer.tsx +28 -18
  135. package/src/loadBalancer/configure/classic/CreateClassicLoadBalancer.tsx +29 -19
  136. package/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +1 -1
  137. package/src/loadBalancer/configure/common/SecurityGroups.spec.tsx +27 -0
  138. package/src/loadBalancer/configure/common/SecurityGroups.tsx +11 -5
  139. package/src/loadBalancer/configure/network/CreateNetworkLoadBalancer.tsx +28 -18
  140. package/src/loadBalancer/details/LoadBalancerActions.tsx +19 -5
  141. package/src/loadBalancer/details/amazonLoadBalancerDetails.spec.tsx +141 -0
  142. package/src/loadBalancer/details/amazonLoadBalancerDetails.tsx +599 -0
  143. package/src/loadBalancer/index.ts +1 -0
  144. package/src/loadBalancer/loadBalancer.transformer.ts +3 -4
  145. package/src/pipeline/stages/AmazonStageConfig.spec.tsx +103 -0
  146. package/src/pipeline/stages/AmazonStageConfig.tsx +259 -0
  147. package/src/pipeline/stages/bake/AwsBakeStageConfig.tsx +708 -0
  148. package/src/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.tsx +275 -0
  149. package/src/pipeline/stages/deleteLambda/index.ts +2 -6
  150. package/src/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.tsx +14 -33
  151. package/src/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.tsx +264 -0
  152. package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.spec.tsx +403 -0
  153. package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.ts +21 -29
  154. package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecution.service.ts +1 -11
  155. package/src/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.tsx +4 -3
  156. package/src/pipeline/stages/deployLambda/components/NetworkForm.tsx +3 -6
  157. package/src/pipeline/stages/deployLambda/index.ts +2 -6
  158. package/src/pipeline/stages/destroyAsg/awsDestroyAsgStage.js +28 -65
  159. package/src/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.tsx +103 -0
  160. package/src/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.tsx +119 -0
  161. package/src/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.tsx +98 -0
  162. package/src/pipeline/stages/findAmi/awsFindAmiStage.js +22 -79
  163. package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.spec.tsx +122 -0
  164. package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.tsx +71 -0
  165. package/src/pipeline/stages/findImageFromTags/awsFindImageFromTagsStage.js +17 -32
  166. package/src/pipeline/stages/invokeLambda/index.ts +2 -6
  167. package/src/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.tsx +146 -0
  168. package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.js +27 -98
  169. package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.spec.tsx +167 -0
  170. package/src/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.tsx +157 -0
  171. package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.js +26 -0
  172. package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.spec.tsx +89 -0
  173. package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.spec.tsx +617 -0
  174. package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.tsx +340 -0
  175. package/src/pipeline/stages/resizeAsg/awsResizeAsgStage.js +34 -125
  176. package/src/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.tsx +129 -0
  177. package/src/pipeline/stages/routeLambda/index.ts +2 -6
  178. package/src/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.tsx +121 -0
  179. package/src/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.tsx +136 -0
  180. package/src/pipeline/stages/tagImage/awsTagImageStage.spec.tsx +167 -0
  181. package/src/pipeline/stages/tagImage/awsTagImageStage.tsx +94 -0
  182. package/src/pipeline/stages/updateCodeLambda/index.ts +2 -6
  183. package/src/routerConsumers.spec.tsx +207 -0
  184. package/src/search/searchResultFormatter.ts +9 -16
  185. package/src/securityGroup/configure/AmazonSecurityGroupModal.spec.tsx +170 -0
  186. package/src/securityGroup/configure/AmazonSecurityGroupModal.tsx +440 -0
  187. package/src/securityGroup/details/AmazonSecurityGroupDetails.spec.tsx +62 -0
  188. package/src/securityGroup/details/AmazonSecurityGroupDetails.tsx +444 -0
  189. package/src/securityGroup/details/IPRangeRules.tsx +1 -1
  190. package/src/securityGroup/details/index.ts +1 -0
  191. package/src/securityGroup/index.ts +1 -0
  192. package/src/securityGroup/securityGroup.reader.ts +0 -5
  193. package/src/securityGroup/securityGroup.transformer.ts +35 -0
  194. package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +104 -80
  195. package/src/serverGroup/configure/AmazonImageSelectInput.tsx +37 -18
  196. package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +28 -66
  197. package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +476 -465
  198. package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +76 -124
  199. package/src/serverGroup/configure/serverGroupConfiguration.service.ts +106 -103
  200. package/src/serverGroup/configure/wizard/AmazonCloneServerGroupModal.tsx +65 -25
  201. package/src/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.tsx +3 -3
  202. package/src/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.tsx +2 -2
  203. package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.spec.tsx +105 -0
  204. package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.tsx +20 -6
  205. package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.spec.tsx +39 -0
  206. package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +10 -9
  207. package/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +2 -2
  208. package/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +5 -2
  209. package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.spec.tsx +53 -0
  210. package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +35 -33
  211. package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.spec.tsx +20 -0
  212. package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.tsx +9 -4
  213. package/src/serverGroup/details/AmazonServerGroupActions.spec.tsx +186 -0
  214. package/src/serverGroup/details/AmazonServerGroupActions.tsx +37 -87
  215. package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.spec.tsx +110 -0
  216. package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.tsx +117 -0
  217. package/src/serverGroup/details/advancedSettings/index.ts +1 -0
  218. package/src/serverGroup/details/amazonServerGroupDetailsGetter.ts +4 -4
  219. package/src/serverGroup/details/resize/AmazonResizeServerGroupModal.tsx +16 -6
  220. package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.spec.tsx +285 -0
  221. package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.tsx +449 -0
  222. package/src/serverGroup/details/rollback/index.ts +2 -0
  223. package/src/serverGroup/details/rollback/rollbackServerGroupSelection.spec.ts +101 -0
  224. package/src/serverGroup/details/rollback/rollbackServerGroupSelection.ts +81 -0
  225. package/src/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.tsx +4 -4
  226. package/src/serverGroup/details/scalingPolicy/ScalingPolicyWriter.ts +2 -5
  227. package/src/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.tsx +0 -2
  228. package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.spec.tsx +74 -0
  229. package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.tsx +140 -0
  230. package/src/serverGroup/details/scalingProcesses/index.ts +2 -0
  231. package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.spec.tsx +115 -0
  232. package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.tsx +205 -0
  233. package/src/serverGroup/details/scheduledActions/index.ts +1 -0
  234. package/src/serverGroup/details/sections/AdvancedSettingsDetailsSection.tsx +7 -14
  235. package/src/serverGroup/details/sections/AmazonCapacityDetailsSection.tsx +14 -2
  236. package/src/serverGroup/details/sections/AmazonServerGroupMaintenanceActions.spec.tsx +148 -0
  237. package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +1 -5
  238. package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +1 -5
  239. package/src/serverGroup/details/sections/ScalingProcessesDetailsSection.tsx +8 -20
  240. package/src/serverGroup/details/sections/ScheduledActionsDetailsSection.tsx +7 -12
  241. package/src/serverGroup/details/sections/SecurityGroupsDetailsSection.tsx +14 -19
  242. package/src/serverGroup/details/sections/WarmPoolDetailsSection.tsx +44 -0
  243. package/src/serverGroup/details/sections/index.ts +1 -0
  244. package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.spec.tsx +161 -0
  245. package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.tsx +177 -0
  246. package/src/serverGroup/details/securityGroups/index.ts +1 -0
  247. package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.spec.tsx +69 -0
  248. package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.tsx +191 -0
  249. package/src/serverGroup/details/warmPool/WarmPoolService.spec.ts +30 -0
  250. package/src/serverGroup/details/warmPool/WarmPoolService.ts +15 -0
  251. package/src/serverGroup/details/warmPool/index.ts +2 -0
  252. package/src/serverGroup/serverGroup.transformer.ts +1 -6
  253. package/src/vpc/VpcReader.ts +2 -2
  254. package/src/vpc/index.ts +1 -0
  255. package/dist/common/common.module.d.ts +0 -1
  256. package/dist/common/footer.component.d.ts +0 -1
  257. package/dist/function/function.module.d.ts +0 -1
  258. package/dist/instance/details/amazonInstanceInformation.component.d.ts +0 -1
  259. package/dist/instance/details/instance.details.controller.d.ts +0 -2
  260. package/dist/instance/details/instanceDns.component.d.ts +0 -1
  261. package/dist/instance/details/instanceSecurityGroups.component.d.ts +0 -1
  262. package/dist/instance/details/instanceStatus.component.d.ts +0 -1
  263. package/dist/instance/details/instanceTags.component.d.ts +0 -1
  264. package/dist/loadBalancer/details/loadBalancerActions.component.d.ts +0 -1
  265. package/dist/loadBalancer/details/loadBalancerDetails.controller.d.ts +0 -41
  266. package/dist/loadBalancer/details/targetGroupDetails.controller.d.ts +0 -30
  267. package/dist/loadBalancer/loadBalancer.module.d.ts +0 -1
  268. package/dist/loadBalancer/targetGroup.states.d.ts +0 -1
  269. package/dist/pipeline/stages/bake/awsBakeStage.d.ts +0 -2
  270. package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +0 -2
  271. package/dist/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.d.ts +0 -2
  272. package/dist/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.d.ts +0 -1
  273. package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.d.ts +0 -25
  274. package/dist/pipeline/stages/disableAsg/awsDisableAsgStage.d.ts +0 -2
  275. package/dist/pipeline/stages/disableCluster/awsDisableClusterStage.d.ts +0 -2
  276. package/dist/pipeline/stages/enableAsg/awsEnableAsgStage.d.ts +0 -2
  277. package/dist/pipeline/stages/rollbackCluster/awsRollbackClusterStage.d.ts +0 -2
  278. package/dist/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.d.ts +0 -2
  279. package/dist/pipeline/stages/shrinkCluster/awsShrinkClusterStage.d.ts +0 -2
  280. package/dist/reactShims/aws.react.injector.d.ts +0 -18
  281. package/dist/reactShims/aws.react.module.d.ts +0 -1
  282. package/dist/reactShims/index.d.ts +0 -1
  283. package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +0 -2
  284. package/dist/securityGroup/configure/CreateSecurityGroupCtrl.d.ts +0 -2
  285. package/dist/securityGroup/configure/EditSecurityGroupCtrl.d.ts +0 -2
  286. package/dist/securityGroup/configure/configSecurityGroup.mixin.controller.d.ts +0 -2
  287. package/dist/securityGroup/configure/ingressRuleGroupSelector.component.d.ts +0 -1
  288. package/dist/securityGroup/configure/securityGroupDetailsCustom.component.d.ts +0 -1
  289. package/dist/securityGroup/configure/securityGroupDetailsCustom.d.ts +0 -10
  290. package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +0 -2
  291. package/dist/securityGroup/details/securityGroupIpRangeRules.component.d.ts +0 -1
  292. package/dist/securityGroup/securityGroup.module.d.ts +0 -1
  293. package/dist/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.d.ts +0 -2
  294. package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +0 -2
  295. package/dist/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.d.ts +0 -1
  296. package/dist/serverGroup/details/scalingPolicy/scalingPolicy.module.d.ts +0 -1
  297. package/dist/serverGroup/details/scalingPolicy/scalingPolicySummary.component.d.ts +0 -1
  298. package/dist/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.d.ts +0 -2
  299. package/dist/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.d.ts +0 -2
  300. package/dist/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.d.ts +0 -2
  301. package/dist/serverGroup/details/serverGroupDetails.module.d.ts +0 -1
  302. package/dist/subnet/subnet.renderer.d.ts +0 -5
  303. package/dist/vpc/vpc.module.d.ts +0 -1
  304. package/src/applicationProviderFields/awsFields.html +0 -13
  305. package/src/common/common.module.ts +0 -6
  306. package/src/common/footer.component.ts +0 -29
  307. package/src/function/function.module.ts +0 -5
  308. package/src/image/image.reader.spec.ts +0 -75
  309. package/src/instance/details/amazonInstanceInformation.component.ts +0 -13
  310. package/src/instance/details/instance.details.controller.js +0 -586
  311. package/src/instance/details/instance.details.controller.spec.js +0 -133
  312. package/src/instance/details/instanceDetails.html +0 -65
  313. package/src/instance/details/instanceDns.component.ts +0 -21
  314. package/src/instance/details/instanceSecurityGroups.component.ts +0 -13
  315. package/src/instance/details/instanceStatus.component.ts +0 -19
  316. package/src/instance/details/instanceTags.component.ts +0 -13
  317. package/src/loadBalancer/details/loadBalancerActions.component.ts +0 -16
  318. package/src/loadBalancer/details/loadBalancerDetails.controller.spec.ts +0 -76
  319. package/src/loadBalancer/details/loadBalancerDetails.controller.ts +0 -240
  320. package/src/loadBalancer/details/loadBalancerDetails.html +0 -266
  321. package/src/loadBalancer/details/targetGroupDetails.controller.ts +0 -95
  322. package/src/loadBalancer/details/targetGroupDetails.html +0 -138
  323. package/src/loadBalancer/loadBalancer.module.ts +0 -15
  324. package/src/loadBalancer/targetGroup.states.ts +0 -55
  325. package/src/pipeline/stages/bake/awsBakeStage.js +0 -219
  326. package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +0 -43
  327. package/src/pipeline/stages/bake/bakeExecutionDetails.html +0 -65
  328. package/src/pipeline/stages/bake/bakeStage.html +0 -205
  329. package/src/pipeline/stages/cloneServerGroup/awsCloneServerGroupStage.js +0 -143
  330. package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +0 -143
  331. package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +0 -1
  332. package/src/pipeline/stages/deployCloudFormation/cloudFormationTemplateEntry.component.ts +0 -46
  333. package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.controller.ts +0 -84
  334. package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackConfig.html +0 -84
  335. package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +0 -9
  336. package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +0 -1
  337. package/src/pipeline/stages/disableAsg/awsDisableAsgStage.js +0 -69
  338. package/src/pipeline/stages/disableAsg/disableAsgStage.html +0 -11
  339. package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +0 -1
  340. package/src/pipeline/stages/disableCluster/awsDisableClusterStage.js +0 -84
  341. package/src/pipeline/stages/disableCluster/disableClusterStage.html +0 -26
  342. package/src/pipeline/stages/enableAsg/awsEnableAsgStage.js +0 -73
  343. package/src/pipeline/stages/enableAsg/enableAsgStage.html +0 -11
  344. package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +0 -1
  345. package/src/pipeline/stages/findAmi/findAmiStage.html +0 -24
  346. package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +0 -44
  347. package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +0 -11
  348. package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessExecutionDetails.html +0 -36
  349. package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.html +0 -24
  350. package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +0 -90
  351. package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +0 -4
  352. package/src/pipeline/stages/rollbackCluster/awsRollbackClusterStage.js +0 -66
  353. package/src/pipeline/stages/rollbackCluster/rollbackClusterStage.html +0 -43
  354. package/src/pipeline/stages/scaleDownCluster/awsScaleDownClusterStage.js +0 -78
  355. package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +0 -35
  356. package/src/pipeline/stages/shrinkCluster/awsShrinkClusterStage.js +0 -73
  357. package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +0 -34
  358. package/src/pipeline/stages/tagImage/awsTagImageStage.js +0 -34
  359. package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +0 -38
  360. package/src/pipeline/stages/tagImage/tagImageStage.html +0 -10
  361. package/src/reactShims/aws.react.injector.ts +0 -25
  362. package/src/reactShims/aws.react.module.ts +0 -12
  363. package/src/reactShims/index.ts +0 -1
  364. package/src/securityGroup/clone/cloneSecurityGroup.controller.js +0 -106
  365. package/src/securityGroup/clone/cloneSecurityGroup.html +0 -19
  366. package/src/securityGroup/configure/CreateSecurityGroup.controller.spec.js +0 -307
  367. package/src/securityGroup/configure/CreateSecurityGroupCtrl.js +0 -47
  368. package/src/securityGroup/configure/EditSecurityGroupCtrl.js +0 -115
  369. package/src/securityGroup/configure/configSecurityGroup.mixin.controller.js +0 -366
  370. package/src/securityGroup/configure/createSecurityGroup.html +0 -19
  371. package/src/securityGroup/configure/createSecurityGroupIngress.html +0 -100
  372. package/src/securityGroup/configure/createSecurityGroupProperties.html +0 -123
  373. package/src/securityGroup/configure/editSecurityGroup.html +0 -20
  374. package/src/securityGroup/configure/ingressRuleGroupSelector.component.html +0 -77
  375. package/src/securityGroup/configure/ingressRuleGroupSelector.component.less +0 -6
  376. package/src/securityGroup/configure/ingressRuleGroupSelector.component.ts +0 -190
  377. package/src/securityGroup/configure/securityGroupDetailsCustom.component.ts +0 -16
  378. package/src/securityGroup/configure/securityGroupDetailsCustom.tsx +0 -16
  379. package/src/securityGroup/details/securityGroupDetail.controller.js +0 -249
  380. package/src/securityGroup/details/securityGroupDetail.html +0 -114
  381. package/src/securityGroup/details/securityGroupIpRangeRules.component.ts +0 -12
  382. package/src/securityGroup/securityGroup.module.ts +0 -26
  383. package/src/securityGroup/securityGroup.transformer.js +0 -48
  384. package/src/serverGroup/configure/serverGroupConfiguration.service.spec.ts +0 -478
  385. package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.controller.js +0 -47
  386. package/src/serverGroup/details/advancedSettings/editAsgAdvancedSettings.modal.html +0 -79
  387. package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +0 -146
  388. package/src/serverGroup/details/rollback/rollbackServerGroup.html +0 -139
  389. package/src/serverGroup/details/scalingPolicy/createScalingPolicyButton.component.ts +0 -15
  390. package/src/serverGroup/details/scalingPolicy/scalingPolicy.module.ts +0 -6
  391. package/src/serverGroup/details/scalingPolicy/scalingPolicySummary.component.ts +0 -14
  392. package/src/serverGroup/details/scalingPolicy/upsert/alarm/dimensionsEditor.less +0 -18
  393. package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.js +0 -95
  394. package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.controller.spec.js +0 -106
  395. package/src/serverGroup/details/scalingProcesses/modifyScalingProcesses.html +0 -30
  396. package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.controller.js +0 -70
  397. package/src/serverGroup/details/scheduledAction/editScheduledActions.modal.html +0 -89
  398. package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.controller.js +0 -95
  399. package/src/serverGroup/details/securityGroup/editSecurityGroups.modal.html +0 -40
  400. package/src/serverGroup/details/serverGroupDetails.module.ts +0 -18
  401. package/src/serverGroup/serverGroup.transformer.spec.ts +0 -185
  402. package/src/subnet/SubnetSelectInput.spec.tsx +0 -91
  403. package/src/subnet/subnet.renderer.ts +0 -12
  404. package/src/vpc/vpc.module.ts +0 -9
@@ -1,26 +0,0 @@
1
- import { module } from 'angular';
2
-
3
- import { AMAZON_SECURITYGROUP_CLONE_CLONESECURITYGROUP_CONTROLLER } from './clone/cloneSecurityGroup.controller';
4
- import { AMAZON_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUPCTRL } from './configure/CreateSecurityGroupCtrl';
5
- import { AMAZON_SECURITYGROUP_CONFIGURE_EDITSECURITYGROUPCTRL } from './configure/EditSecurityGroupCtrl';
6
- import { AMAZON_SECURITYGROUP_CONFIGURE_CONFIGSECURITYGROUP_MIXIN_CONTROLLER } from './configure/configSecurityGroup.mixin.controller';
7
- import { INGRESS_RULE_GROUP_SELECTOR_COMPONENT } from './configure/ingressRuleGroupSelector.component';
8
- import { AWS_SECURITY_GROUP_DETAILS_CUSTOM } from './configure/securityGroupDetailsCustom.component';
9
- import { AMAZON_SECURITYGROUP_DETAILS_SECURITYGROUPDETAIL_CONTROLLER } from './details/securityGroupDetail.controller';
10
- import { AWS_SECURITY_GROUP_IP_RANGE_RULES } from './details/securityGroupIpRangeRules.component';
11
- import { AWS_SECURITY_GROUP_READER } from './securityGroup.reader';
12
- import { AMAZON_SECURITYGROUP_SECURITYGROUP_TRANSFORMER } from './securityGroup.transformer';
13
-
14
- export const AWS_SECURITY_GROUP_MODULE = 'spinnaker.amazon.securityGroup';
15
- module(AWS_SECURITY_GROUP_MODULE, [
16
- AWS_SECURITY_GROUP_READER,
17
- AMAZON_SECURITYGROUP_CLONE_CLONESECURITYGROUP_CONTROLLER,
18
- INGRESS_RULE_GROUP_SELECTOR_COMPONENT,
19
- AMAZON_SECURITYGROUP_CONFIGURE_CONFIGSECURITYGROUP_MIXIN_CONTROLLER,
20
- AMAZON_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUPCTRL,
21
- AMAZON_SECURITYGROUP_CONFIGURE_EDITSECURITYGROUPCTRL,
22
- AMAZON_SECURITYGROUP_DETAILS_SECURITYGROUPDETAIL_CONTROLLER,
23
- AMAZON_SECURITYGROUP_SECURITYGROUP_TRANSFORMER,
24
- AWS_SECURITY_GROUP_IP_RANGE_RULES,
25
- AWS_SECURITY_GROUP_DETAILS_CUSTOM,
26
- ]);
@@ -1,48 +0,0 @@
1
- 'use strict';
2
-
3
- import { module } from 'angular';
4
- import { groupBy } from 'lodash';
5
-
6
- import { VpcReader } from '../vpc/VpcReader';
7
-
8
- export const AMAZON_SECURITYGROUP_SECURITYGROUP_TRANSFORMER = 'spinnaker.amazon.securityGroup.transformer';
9
- export const name = AMAZON_SECURITYGROUP_SECURITYGROUP_TRANSFORMER; // for backwards compatibility
10
- module(AMAZON_SECURITYGROUP_SECURITYGROUP_TRANSFORMER, []).factory('awsSecurityGroupTransformer', function () {
11
- function normalizeSecurityGroup(securityGroup) {
12
- return VpcReader.listVpcs().then(addVpcNameToSecurityGroup(securityGroup));
13
- }
14
-
15
- function addVpcNameToSecurityGroup(securityGroup) {
16
- return function (vpcs) {
17
- const matches = vpcs.filter(function (test) {
18
- return test.id === securityGroup.vpcId;
19
- });
20
- securityGroup.vpcName = matches.length ? matches[0].name : '';
21
- };
22
- }
23
-
24
- function compress(securityGroups) {
25
- const grouped = groupBy(securityGroups, 'vpcId');
26
- Object.keys(grouped).forEach((vpcId) => {
27
- grouped[vpcId] = grouped[vpcId].map((g) => [g.name, g.id]);
28
- });
29
- return grouped;
30
- }
31
-
32
- function decompress(groupedGroups) {
33
- const flattened = [];
34
- Object.keys(groupedGroups).forEach((vpcId) => {
35
- groupedGroups[vpcId].forEach((g) => {
36
- flattened.push({ name: g[0], id: g[1], vpcId });
37
- });
38
- });
39
- return flattened;
40
- }
41
-
42
- return {
43
- normalizeSecurityGroup,
44
- compress,
45
- decompress,
46
- supportsCompression: true,
47
- };
48
- });
@@ -1,478 +0,0 @@
1
- import type { IQService, IRootScopeService, IScope } from 'angular';
2
- import { mock } from 'angular';
3
-
4
- import type { CacheInitializerService, LoadBalancerReader, SecurityGroupReader } from '@spinnaker/core';
5
- import { AccountService, ApplicationModelBuilder, SubnetReader } from '@spinnaker/core';
6
-
7
- import { KeyPairsReader } from '../../keyPairs';
8
- import type { AwsServerGroupConfigurationService } from './serverGroupConfiguration.service';
9
- import { AWS_SERVER_GROUP_CONFIGURATION_SERVICE } from './serverGroupConfiguration.service';
10
-
11
- describe('Service: awsServerGroupConfiguration', function () {
12
- let service: AwsServerGroupConfigurationService,
13
- $q: IQService,
14
- securityGroupReader: SecurityGroupReader,
15
- awsInstanceTypeService: any,
16
- cacheInitializer: CacheInitializerService,
17
- loadBalancerReader: LoadBalancerReader,
18
- $scope: IScope;
19
-
20
- beforeEach(mock.module(AWS_SERVER_GROUP_CONFIGURATION_SERVICE));
21
-
22
- beforeEach(
23
- mock.inject(function (
24
- _awsServerGroupConfigurationService_: AwsServerGroupConfigurationService,
25
- _$q_: IQService,
26
- _securityGroupReader_: SecurityGroupReader,
27
- _awsInstanceTypeService_: any,
28
- _cacheInitializer_: CacheInitializerService,
29
- _loadBalancerReader_: LoadBalancerReader,
30
- $rootScope: IRootScopeService,
31
- ) {
32
- service = _awsServerGroupConfigurationService_;
33
- $q = _$q_;
34
- securityGroupReader = _securityGroupReader_;
35
- awsInstanceTypeService = _awsInstanceTypeService_;
36
- cacheInitializer = _cacheInitializer_;
37
- loadBalancerReader = _loadBalancerReader_;
38
- $scope = $rootScope.$new();
39
-
40
- this.allLoadBalancers = [
41
- {
42
- name: 'elb-1',
43
- accounts: [
44
- {
45
- name: 'test',
46
- regions: [
47
- {
48
- name: 'us-east-1',
49
- loadBalancers: [{ region: 'us-east-1', vpcId: 'vpc-1', name: 'elb-1', targetGroups: [] }],
50
- },
51
- ],
52
- },
53
- ],
54
- },
55
- {
56
- name: 'elb-2',
57
- accounts: [
58
- {
59
- name: 'test',
60
- regions: [
61
- {
62
- name: 'us-east-1',
63
- loadBalancers: [{ region: 'us-east-1', vpcId: 'vpc-2', name: 'elb-2', targetGroups: [] }],
64
- },
65
- {
66
- name: 'us-west-1',
67
- loadBalancers: [{ region: 'us-west-1', vpcId: null, name: 'elb-2', targetGroups: [] }],
68
- },
69
- ],
70
- },
71
- ],
72
- },
73
- ];
74
- }),
75
- );
76
-
77
- describe('configureCommand', function () {
78
- it('attempts to reload firewalls if some are not found on initialization, but does not set dirty flag', function () {
79
- spyOn(AccountService, 'getCredentialsKeyedByAccount').and.returnValue($q.when([] as any));
80
- const getAllSecurityGroupsSpy = spyOn(securityGroupReader, 'getAllSecurityGroups').and.returnValue(
81
- $q.when([] as any),
82
- );
83
- spyOn(loadBalancerReader, 'listLoadBalancers').and.returnValue($q.when(this.allLoadBalancers));
84
- spyOn(SubnetReader, 'listSubnets').and.returnValue($q.when([]));
85
- spyOn(AccountService, 'getPreferredZonesByAccount').and.returnValue($q.when([] as any));
86
- spyOn(KeyPairsReader, 'listKeyPairs').and.returnValue($q.when([]));
87
- spyOn(awsInstanceTypeService, 'getAllTypesByRegion').and.returnValue($q.when([]));
88
- const refreshCacheSpy = spyOn(cacheInitializer, 'refreshCache').and.returnValue($q.when(null));
89
-
90
- const command = {
91
- credentials: 'test',
92
- region: 'us-east-1',
93
- securityGroups: ['sg-1'],
94
- vpcId: null,
95
- viewState: {
96
- disableImageSelection: true,
97
- dirty: {},
98
- },
99
- } as any;
100
-
101
- service.configureCommand(
102
- ApplicationModelBuilder.createApplicationForTests('name', {
103
- key: 'loadBalancers',
104
- lazy: true,
105
- defaultData: [],
106
- }),
107
- command,
108
- );
109
- $scope.$digest();
110
- $scope.$digest();
111
-
112
- expect(cacheInitializer.refreshCache).toHaveBeenCalledWith('securityGroups');
113
- expect(refreshCacheSpy.calls.count()).toBe(1);
114
- expect(getAllSecurityGroupsSpy.calls.count()).toBe(2);
115
- });
116
- });
117
-
118
- describe('configureLoadBalancerOptions', function () {
119
- beforeEach(function () {
120
- this.command = {
121
- viewState: {},
122
- backingData: {
123
- loadBalancers: this.allLoadBalancers,
124
- filtered: {
125
- loadBalancers: ['elb-1', 'elb-2'],
126
- },
127
- },
128
- loadBalancers: ['elb-1'],
129
- credentials: 'test',
130
- region: 'us-east-1',
131
- vpcId: null,
132
- } as any;
133
- });
134
-
135
- it('matches existing load balancers based on name - no VPC', function () {
136
- const result = service.configureLoadBalancerOptions(this.command);
137
-
138
- expect(this.command.loadBalancers).toEqual([]);
139
- expect(this.command.vpcLoadBalancers).toEqual(['elb-1']);
140
- expect(result).toEqual({ dirty: {} });
141
- });
142
-
143
- it('matches existing load balancers based on name - VPC', function () {
144
- this.command.vpcId = 'vpc-1';
145
- const result = service.configureLoadBalancerOptions(this.command);
146
-
147
- expect(this.command.loadBalancers).toEqual(['elb-1']);
148
- expect(result).toEqual({ dirty: {} });
149
- });
150
-
151
- it('sets dirty all unmatched load balancers - no VPC', function () {
152
- this.command.region = 'us-west-1';
153
- this.command.loadBalancers = ['elb-1', 'elb-2'];
154
- const result = service.configureLoadBalancerOptions(this.command);
155
-
156
- expect(this.command.loadBalancers).toEqual(['elb-2']);
157
- expect(result).toEqual({ dirty: { loadBalancers: ['elb-1'] } });
158
- });
159
-
160
- it('moves load balancers to vpcLoadBalancers when vpc is de-selected', function () {
161
- this.command.loadBalancers = ['elb-1'];
162
- this.command.vpcId = 'vpc-1';
163
- let result = service.configureLoadBalancerOptions(this.command);
164
-
165
- expect(this.command.loadBalancers).toEqual(['elb-1']);
166
- expect(result).toEqual({ dirty: {} });
167
-
168
- this.command.vpcId = null;
169
- result = service.configureLoadBalancerOptions(this.command);
170
- expect(result).toEqual({ dirty: {} });
171
- expect(this.command.vpcLoadBalancers).toEqual(['elb-1']);
172
- expect(this.command.loadBalancers).toEqual([]);
173
- });
174
-
175
- it('sets dirty all unmatched load balancers - VPC', function () {
176
- this.command.loadBalancers = ['elb-1', 'elb-2'];
177
- this.command.vpcId = 'vpc-1';
178
- let result = service.configureLoadBalancerOptions(this.command);
179
-
180
- expect(this.command.loadBalancers).toEqual(['elb-1']);
181
- expect(result).toEqual({ dirty: { loadBalancers: ['elb-2'] } });
182
-
183
- this.command.vpcId = 'vpc-2';
184
- result = service.configureLoadBalancerOptions(this.command);
185
-
186
- expect(this.command.loadBalancers).toEqual([]);
187
- expect(result).toEqual({ dirty: { loadBalancers: ['elb-1'] } });
188
- });
189
-
190
- it('updates filteredData to new region - no VPC', function () {
191
- this.command.region = 'us-west-1';
192
- service.configureLoadBalancerOptions(this.command);
193
- expect(this.command.backingData.filtered.loadBalancers).toEqual(['elb-2']);
194
- });
195
-
196
- it('updates filteredData to new VPC', function () {
197
- this.command.vpcId = 'vpc-1';
198
- service.configureLoadBalancerOptions(this.command);
199
- expect(this.command.backingData.filtered.loadBalancers).toEqual(['elb-1']);
200
- });
201
- });
202
-
203
- describe('configureSecurityGroupOptions', function () {
204
- beforeEach(function () {
205
- this.allSecurityGroups = {
206
- test: {
207
- aws: {
208
- 'us-west-1': [
209
- { name: 'sg1', id: 'sg-1a', vpcId: null },
210
- { name: 'sg2', id: 'sg-2a', vpcId: null },
211
- { name: 'sg3', id: 'sg-3a', vpcId: null },
212
- { name: 'sg1', id: 'sg-1va', vpcId: 'vpc-1' },
213
- { name: 'sg2', id: 'sg-2va', vpcId: 'vpc-1' },
214
- { name: 'sg3', id: 'sg-3va', vpcId: 'vpc-2' },
215
- ],
216
- 'us-east-1': [
217
- { name: 'sg1', id: 'sg-1c', vpcId: null },
218
- { name: 'sg2', id: 'sg-2c', vpcId: null },
219
- { name: 'sg1', id: 'sg-1vc', vpcId: 'vpc-3' },
220
- { name: 'sg2', id: 'sg-2vc', vpcId: 'vpc-4' },
221
- ],
222
- },
223
- },
224
- };
225
-
226
- this.command = {
227
- backingData: {
228
- securityGroups: this.allSecurityGroups,
229
- filtered: {
230
- securityGroups: this.allSecurityGroups.test.aws['us-west-1'],
231
- },
232
- },
233
- securityGroups: ['sg-1a', 'sg-2a'],
234
- credentials: 'test',
235
- region: 'us-west-1',
236
- };
237
- });
238
-
239
- it('matches existing firewalls based on name - no VPC', function () {
240
- this.command.region = 'us-east-1';
241
- const result = service.configureSecurityGroupOptions(this.command);
242
- expect(this.command.securityGroups).toEqual(['sg-1c', 'sg-2c']);
243
- expect(result).toEqual({ dirty: {} });
244
- });
245
-
246
- it('matches existing firewalls based on name - VPC', function () {
247
- this.command.vpcId = 'vpc-1';
248
- const result = service.configureSecurityGroupOptions(this.command);
249
- expect(this.command.securityGroups).toEqual(['sg-1va', 'sg-2va']);
250
- expect(result).toEqual({ dirty: {} });
251
- });
252
-
253
- it('matches on name or id, converting to id when name encountered', function () {
254
- this.command.securityGroups = ['sg1', 'sg-2a'];
255
- this.command.region = 'us-east-1';
256
- const result = service.configureSecurityGroupOptions(this.command);
257
- expect(this.command.securityGroups).toEqual(['sg-1c', 'sg-2c']);
258
- expect(result).toEqual({ dirty: {} });
259
- });
260
-
261
- it('sets dirty all unmatched firewalls - no VPC', function () {
262
- this.command.securityGroups.push('sg-3a');
263
- this.command.region = 'us-east-1';
264
- const result = service.configureSecurityGroupOptions(this.command);
265
- expect(this.command.securityGroups).toEqual(['sg-1c', 'sg-2c']);
266
- expect(result).toEqual({ dirty: { securityGroups: ['sg3'] } });
267
- });
268
-
269
- it('sets dirty all unmatched firewalls - VPC', function () {
270
- this.command.securityGroups.push('sg-3a');
271
- this.command.vpcId = 'vpc-2';
272
- const result = service.configureSecurityGroupOptions(this.command);
273
- expect(this.command.securityGroups).toEqual(['sg-3va']);
274
- expect(result).toEqual({ dirty: { securityGroups: ['sg1', 'sg2'] } });
275
- });
276
-
277
- it('updates filteredData to new region - no VPC', function () {
278
- const expected = this.allSecurityGroups.test.aws['us-east-1'].slice(0, 2);
279
- this.command.region = 'us-east-1';
280
- service.configureSecurityGroupOptions(this.command);
281
- expect(this.command.backingData.filtered.securityGroups).toEqual(expected);
282
- });
283
-
284
- it('updates filteredData to new VPC', function () {
285
- const expected = this.allSecurityGroups.test.aws['us-west-1'].slice(3, 5);
286
- this.command.vpcId = 'vpc-1';
287
- service.configureSecurityGroupOptions(this.command);
288
- expect(this.command.backingData.filtered.securityGroups).toEqual(expected);
289
- });
290
- });
291
-
292
- describe('configureKeyPairs', function () {
293
- beforeEach(function () {
294
- this.command = {
295
- backingData: {
296
- filtered: {},
297
- credentialsKeyedByAccount: {
298
- test: {
299
- defaultKeyPair: 'test-pair-{{region}}',
300
- },
301
- prod: {
302
- defaultKeyPair: 'prod-pair',
303
- },
304
- nothing: {},
305
- },
306
- keyPairs: [
307
- { account: 'test', region: 'us-west-1', keyName: 'test-pair-us-west-1' },
308
- { account: 'test', region: 'us-east-1', keyName: 'test-pair-us-east-1' },
309
- { account: 'test', region: 'us-west-1', keyName: 'shared' },
310
- { account: 'test', region: 'eu-west-1', keyName: 'odd-pair' },
311
- { account: 'test', region: 'eu-west-1', keyName: 'other-pair' },
312
- { account: 'prod', region: 'us-west-1', keyName: 'prod-pair' },
313
- { account: 'prod', region: 'us-west-1', keyName: 'shared' },
314
- ],
315
- },
316
- credentials: 'test',
317
- region: 'us-west-1',
318
- keyPair: 'shared',
319
- };
320
- });
321
-
322
- it('retains keyPair when found in new account', function () {
323
- this.command.credentials = 'prod';
324
- service.configureKeyPairs(this.command);
325
- expect(this.command.keyPair).toBe('shared');
326
- });
327
-
328
- it('retains keyPair when found in new region', function () {
329
- this.command.region = 'us-east-1';
330
- this.command.keyPair = 'test-pair-us-west-1';
331
- service.configureKeyPairs(this.command);
332
- expect(this.command.keyPair).toBe('test-pair-us-east-1');
333
- });
334
-
335
- it('sets to new default value when changing account and using default key pair without marking dirty', function () {
336
- this.command.credentials = 'prod';
337
- this.command.keyPair = 'test-pair-us-west-1';
338
- const result = service.configureKeyPairs(this.command);
339
- expect(result.dirty.keyPair).toBeFalsy();
340
- expect(this.command.keyPair).toBe('prod-pair');
341
- });
342
-
343
- it('sets to new default value when changing region and using default key pair without marking dirty', function () {
344
- this.command.region = 'us-east-1';
345
- this.command.keyPair = 'test-pair-us-west-1';
346
- const result = service.configureKeyPairs(this.command);
347
- expect(result.dirty.keyPair).toBeFalsy();
348
- expect(this.command.keyPair).toBe('test-pair-us-east-1');
349
- });
350
-
351
- it('marks dirty, sets to first value found when default not present in new region', function () {
352
- this.command.region = 'eu-west-1';
353
- const result = service.configureKeyPairs(this.command);
354
- expect(result.dirty.keyPair).toBe(true);
355
- expect(this.command.keyPair).toBe(null);
356
- });
357
- });
358
-
359
- describe('configureImages', function () {
360
- beforeEach(function () {
361
- this.command = {
362
- viewState: {},
363
- backingData: {
364
- filtered: {},
365
- credentialsKeyedByAccount: {
366
- test: {
367
- defaultKeyPair: 'test-pair',
368
- },
369
- prod: {
370
- defaultKeyPair: 'prod-pair',
371
- },
372
- },
373
- packageImages: [
374
- { amis: { 'us-east-1': [{}] }, attributes: { virtualizationType: 'hvm' }, imageName: 'ami-1234' },
375
- {
376
- amis: { 'us-east-1': [{}], 'eu-west-1': [{}] },
377
- attributes: { virtualizationType: 'pv' },
378
- imageName: 'ami-1235',
379
- },
380
- { amis: { 'us-west-1': [{}] }, attributes: { virtualizationType: 'hvm' }, imageName: 'ami-1236' },
381
- ],
382
- },
383
- credentials: 'test',
384
- region: 'us-west-1',
385
- amiName: 'ami-1236',
386
- };
387
- });
388
-
389
- it('clears virtualization type if no ami present', function () {
390
- this.command.virtualizationType = 'pv';
391
- this.command.amiName = null;
392
- service.configureImages(this.command);
393
- expect(this.command.virtualizationType).toBe(null);
394
- });
395
-
396
- it('clears amiName if region is absent and sets dirty flag', function () {
397
- this.command.region = null;
398
- const result = service.configureImages(this.command);
399
- expect(this.command.amiName).toBe(null);
400
- expect(result.dirty.amiName).toBe(true);
401
- });
402
- });
403
-
404
- describe('managedResources', () => {
405
- beforeEach(() => {
406
- this.command = {
407
- viewState: {},
408
- backingData: {
409
- filtered: {},
410
- credentialsKeyedByAccount: {
411
- prod: {
412
- regions: [
413
- { name: 'us-east-1', availabilityZones: [] },
414
- { name: 'us-west-1', availabilityZones: [] },
415
- ],
416
- },
417
- test: {
418
- regions: [
419
- { name: 'us-east-1', availabilityZones: [] },
420
- { name: 'us-west-1', availabilityZones: [] },
421
- ],
422
- },
423
- },
424
- managedResources: [
425
- {
426
- kind: 'ec2/cluster@v1',
427
- locations: {
428
- account: 'prod',
429
- regions: [{ name: 'us-east-1' }],
430
- },
431
- moniker: {
432
- stack: 'foo',
433
- detail: 'bar',
434
- },
435
- },
436
- ],
437
- securityGroups: {},
438
- preferredZones: {},
439
- },
440
- credentials: 'test',
441
- region: 'us-west-1',
442
- stack: '',
443
- freeFormDetails: '',
444
- };
445
- service.attachEventHandlers(this.command);
446
- });
447
-
448
- it('does not add managedResource on initial load if not matched', () => {
449
- expect(this.command.viewState.resourceSummary).toBeFalsy();
450
- });
451
-
452
- it('adds managedResource when all fields match a non-paused resource', () => {
453
- const { command } = this;
454
- const managedResource = command.backingData.managedResources[0];
455
- expect(command.resourceSummary).toBeFalsy();
456
-
457
- command.credentials = managedResource.locations.account;
458
- command.credentialsChanged(command);
459
- expect(command.resourceSummary).toBeFalsy();
460
-
461
- command.region = managedResource.locations.regions[0].name;
462
- command.regionChanged(command);
463
- expect(command.resourceSummary).toBeFalsy();
464
-
465
- command.stack = managedResource.moniker.stack;
466
- command.clusterChanged(command);
467
- expect(command.resourceSummary).toBeFalsy();
468
-
469
- command.freeFormDetails = managedResource.moniker.detail;
470
- command.clusterChanged(command);
471
- expect(command.resourceSummary).toBe(managedResource);
472
-
473
- managedResource.isPaused = true;
474
- command.clusterChanged(command);
475
- expect(command.resourceSummary).toBeFalsy();
476
- });
477
- });
478
- });
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- import { module } from 'angular';
4
-
5
- import { TaskExecutor, TaskMonitor } from '@spinnaker/core';
6
- import { AMAZON_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER_SERVICE } from '../../configure/serverGroupCommandBuilder.service';
7
-
8
- export const AMAZON_SERVERGROUP_DETAILS_ADVANCEDSETTINGS_EDITASGADVANCEDSETTINGS_MODAL_CONTROLLER =
9
- 'spinnaker.amazon.serverGroup.editAsgAdvancedSettings.modal.controller';
10
- export const name = AMAZON_SERVERGROUP_DETAILS_ADVANCEDSETTINGS_EDITASGADVANCEDSETTINGS_MODAL_CONTROLLER; // for backwards compatibility
11
- module(AMAZON_SERVERGROUP_DETAILS_ADVANCEDSETTINGS_EDITASGADVANCEDSETTINGS_MODAL_CONTROLLER, [
12
- AMAZON_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER_SERVICE,
13
- ]).controller('EditAsgAdvancedSettingsCtrl', [
14
- '$scope',
15
- '$uibModalInstance',
16
- 'application',
17
- 'serverGroup',
18
- 'awsServerGroupCommandBuilder',
19
- function ($scope, $uibModalInstance, application, serverGroup, awsServerGroupCommandBuilder) {
20
- $scope.command = awsServerGroupCommandBuilder.buildUpdateServerGroupCommand(serverGroup);
21
-
22
- $scope.serverGroup = serverGroup;
23
-
24
- $scope.taskMonitor = new TaskMonitor({
25
- application: application,
26
- title: 'Update Advanced Settings for ' + serverGroup.name,
27
- modalInstance: $uibModalInstance,
28
- onTaskComplete: () => application.serverGroups.refresh(),
29
- });
30
-
31
- this.submit = () => {
32
- const job = [$scope.command];
33
-
34
- const submitMethod = function () {
35
- return TaskExecutor.executeTask({
36
- job: job,
37
- application: application,
38
- description: 'Update Advanced Settings for ' + serverGroup.name,
39
- });
40
- };
41
-
42
- $scope.taskMonitor.submit(submitMethod);
43
- };
44
-
45
- this.cancel = $uibModalInstance.dismiss;
46
- },
47
- ]);
@@ -1,79 +0,0 @@
1
- <div modal-page>
2
- <task-monitor monitor="taskMonitor"></task-monitor>
3
- <form role="form" name="form">
4
- <modal-close dismiss="$dismiss()"></modal-close>
5
- <div class="modal-header">
6
- <h4 class="modal-title">Edit Advanced Settings for {{serverGroup.name}}</h4>
7
- </div>
8
- <div class="modal-body container-fluid form-horizontal">
9
- <div class="form-group">
10
- <div class="col-md-5 sm-label-right"><b>Cooldown</b></div>
11
- <div class="col-md-2">
12
- <input type="number" required class="form-control input-sm" ng-model="command.cooldown" />
13
- </div>
14
- &nbsp;seconds
15
- </div>
16
- <div class="form-group">
17
- <div class="col-md-5 sm-label-right">
18
- <b>Enabled Metrics</b>
19
- <help-field key="aws.serverGroup.enabledMetrics"></help-field>
20
- </div>
21
- <div class="col-md-6">
22
- <ui-select multiple ng-model="command.enabledMetrics" class="form-control input-sm">
23
- <ui-select-match>{{$item}}</ui-select-match>
24
- <ui-select-choices
25
- repeat="enabledMetric in command.backingData.enabledMetrics | filter: $select.search | orderBy: 'toString()'"
26
- >
27
- <span ng-bind-html="enabledMetric | highlight: $select.search"></span>
28
- </ui-select-choices>
29
- </ui-select>
30
- </div>
31
- </div>
32
- <div class="form-group">
33
- <div class="col-md-5 sm-label-right"><b>Health Check Type</b></div>
34
- <div class="col-md-6">
35
- <ui-select ng-model="command.healthCheckType" class="form-control input-sm">
36
- <ui-select-match placeholder="Select...">{{$select.selected}}</ui-select-match>
37
- <ui-select-choices
38
- repeat="healthCheckType in command.backingData.healthCheckTypes | filter: $select.search"
39
- >
40
- <span ng-bind-html="healthCheckType | highlight: $select.search"></span>
41
- </ui-select-choices>
42
- </ui-select>
43
- </div>
44
- </div>
45
- <div class="form-group">
46
- <div class="col-md-5 sm-label-right"><b>Health Check Grace Period</b></div>
47
- <div class="col-md-2">
48
- <input type="text" required class="form-control input-sm" ng-model="command.healthCheckGracePeriod" />
49
- </div>
50
- &nbsp;seconds
51
- </div>
52
- <div class="form-group">
53
- <div class="col-md-5 sm-label-right"><b>Termination Policies</b></div>
54
- <div class="col-md-6">
55
- <ui-select multiple ng-model="command.terminationPolicies" class="form-control input-sm">
56
- <ui-select-match>{{$item}}</ui-select-match>
57
- <ui-select-choices
58
- repeat="terminationPolicy in command.backingData.terminationPolicies | filter: $select.search | orderBy: 'toString()'"
59
- >
60
- <span ng-bind-html="terminationPolicy | highlight: $select.search"></span>
61
- </ui-select-choices>
62
- </ui-select>
63
- </div>
64
- </div>
65
- <div class="form-group">
66
- <div class="col-md-5 sm-label-right">
67
- <b>Capacity Rebalance</b><help-field key="aws.serverGroup.capacityRebalance" />
68
- </div>
69
- <div class="col-md-6">
70
- <input type="checkbox" ng-model="command.capacityRebalance" /> Enable capacity rebalance
71
- </div>
72
- </div>
73
- </div>
74
- <div class="modal-footer">
75
- <button class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>
76
- <button type="submit" class="btn btn-primary" ng-disabled="form.$invalid" ng-click="ctrl.submit()">Submit</button>
77
- </div>
78
- </form>
79
- </div>