@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,5 +1,4 @@
1
1
  import { UISref } from '@uirouter/react';
2
- import { UIRouterContextComponent } from '@uirouter/react-hybrid';
3
2
  import { orderBy } from 'lodash';
4
3
  import React from 'react';
5
4
 
@@ -18,28 +17,26 @@ export const InstanceSecurityGroups = ({ instance }: IInstanceSecurityGroupsProp
18
17
 
19
18
  return (
20
19
  <CollapsibleSection heading={securityGroupLabel} defaultExpanded={true}>
21
- <UIRouterContextComponent>
22
- <ul>
23
- {(sortedSecurityGroups || []).map((sg) => (
24
- <li key={sg.groupId}>
25
- <UISref
26
- to="^.firewallDetails"
27
- params={{
28
- name: sg.groupName,
29
- accountId: account,
30
- region,
31
- vpcId,
32
- provider,
33
- }}
34
- >
35
- <a>
36
- {sg.groupName} ({sg.groupId})
37
- </a>
38
- </UISref>
39
- </li>
40
- ))}
41
- </ul>
42
- </UIRouterContextComponent>
20
+ <ul>
21
+ {(sortedSecurityGroups || []).map((sg) => (
22
+ <li key={sg.groupId}>
23
+ <UISref
24
+ to="^.firewallDetails"
25
+ params={{
26
+ name: sg.groupName,
27
+ accountId: account,
28
+ region,
29
+ vpcId,
30
+ provider,
31
+ }}
32
+ >
33
+ <a>
34
+ {sg.groupName} ({sg.groupId})
35
+ </a>
36
+ </UISref>
37
+ </li>
38
+ ))}
39
+ </ul>
43
40
  </CollapsibleSection>
44
41
  );
45
42
  };
@@ -11,11 +11,13 @@ export interface IInstanceTagsProps {
11
11
  }
12
12
 
13
13
  export const InstanceTags = ({ tags }: IInstanceTagsProps) => {
14
- const sortedTags = orderBy(tags, ['key'], ['asc']);
14
+ const instanceTags = tags || [];
15
+ const sortedTags = orderBy(instanceTags, ['key'], ['asc']);
15
16
  return (
16
17
  <CollapsibleSection heading="Tags" defaultExpanded={true}>
17
- {!tags.length && <div>No tags associated with this server</div>}
18
- {tags.length && sortedTags.map((tag) => <LabeledValue key={tag.key} label={tag.key} value={tag.value} />)}
18
+ {!instanceTags.length && <div>No tags associated with this server</div>}
19
+ {Boolean(instanceTags.length) &&
20
+ sortedTags.map((tag) => <LabeledValue key={tag.key} label={tag.key} value={tag.value} />)}
19
21
  </CollapsibleSection>
20
22
  );
21
23
  };
@@ -1,4 +1,5 @@
1
1
  export * from './details/utils';
2
+ export * from './details/AmazonInstanceDetails';
2
3
  export * from './details/InstanceDns';
3
4
  export * from './details/InstanceInformation';
4
5
  export * from './details/InstanceStatus';
@@ -2,7 +2,7 @@ import { REST } from '@spinnaker/core';
2
2
  import type { IKeyPair } from '../domain';
3
3
 
4
4
  export class KeyPairsReader {
5
- public static listKeyPairs(): PromiseLike<IKeyPair[]> {
5
+ public static listKeyPairs(): Promise<IKeyPair[]> {
6
6
  return REST('/keyPairs')
7
7
  .useCache()
8
8
  .get()
@@ -0,0 +1,39 @@
1
+ import { AmazonLoadBalancersTagComponent } from './AmazonLoadBalancersTag';
2
+
3
+ describe('AmazonLoadBalancersTag', () => {
4
+ it('opens load balancer and target group details through the injected state service', () => {
5
+ const stateService = {
6
+ current: { name: 'home.applications.application.insight.clusters' },
7
+ go: jasmine.createSpy('go'),
8
+ };
9
+ const component = new AmazonLoadBalancersTagComponent({
10
+ application: {},
11
+ router: {},
12
+ serverGroup: { account: 'test', region: 'us-east-1', type: 'aws' },
13
+ stateParams: {},
14
+ stateService,
15
+ } as any);
16
+
17
+ (component as any).showLoadBalancerDetails({ name: 'app-lb' });
18
+ (component as any).showTargetGroupDetails({
19
+ account: 'test',
20
+ loadBalancerNames: ['app-lb'],
21
+ name: 'app-target',
22
+ region: 'us-east-1',
23
+ });
24
+
25
+ expect(stateService.go).toHaveBeenCalledWith('.loadBalancerDetails', {
26
+ accountId: 'test',
27
+ name: 'app-lb',
28
+ provider: 'aws',
29
+ region: 'us-east-1',
30
+ });
31
+ expect(stateService.go).toHaveBeenCalledWith('.targetGroupDetails', {
32
+ accountId: 'test',
33
+ loadBalancerName: 'app-lb',
34
+ name: 'app-target',
35
+ provider: 'aws',
36
+ region: 'us-east-1',
37
+ });
38
+ });
39
+ });
@@ -4,15 +4,15 @@
4
4
  import { sortBy } from 'lodash';
5
5
  import React from 'react';
6
6
 
7
- import type { ILoadBalancer, ILoadBalancersTagProps } from '@spinnaker/core';
7
+ import type { ILoadBalancer, ILoadBalancersTagProps, IRouterInjectedProps } from '@spinnaker/core';
8
8
  import {
9
9
  HealthCounts,
10
10
  HoverablePopover,
11
11
  LoadBalancerDataUtils,
12
12
  logger,
13
- ReactInjector,
14
13
  Spinner,
15
14
  Tooltip,
15
+ withRouter,
16
16
  } from '@spinnaker/core';
17
17
 
18
18
  import { AmazonLoadBalancerDataUtils } from './amazonLoadBalancerDataUtils';
@@ -30,7 +30,7 @@ interface ILoadBalancerSingleItemProps extends ILoadBalancerListItemProps {
30
30
  class LoadBalancerListItem extends React.Component<ILoadBalancerListItemProps> {
31
31
  private onClick = (e: React.MouseEvent<HTMLElement>): void => {
32
32
  this.props.onItemClick(this.props.loadBalancer);
33
- e.nativeEvent.preventDefault(); // yay angular JQueryEvent still listening to the click event...
33
+ e.nativeEvent.preventDefault();
34
34
  };
35
35
 
36
36
  public render(): React.ReactElement<LoadBalancerListItem> {
@@ -46,7 +46,7 @@ class LoadBalancerListItem extends React.Component<ILoadBalancerListItemProps> {
46
46
  class LoadBalancerButton extends React.Component<ILoadBalancerSingleItemProps> {
47
47
  private onClick = (e: React.MouseEvent<HTMLElement>): void => {
48
48
  this.props.onItemClick(this.props.loadBalancer);
49
- e.nativeEvent.preventDefault(); // yay angular JQueryEvent still listening to the click event...
49
+ e.nativeEvent.preventDefault();
50
50
  };
51
51
 
52
52
  public render(): React.ReactElement<LoadBalancerButton> {
@@ -70,11 +70,14 @@ export interface IAmazonLoadBalancersTagState {
70
70
  isLoading: boolean;
71
71
  }
72
72
 
73
- export class AmazonLoadBalancersTag extends React.Component<ILoadBalancersTagProps, IAmazonLoadBalancersTagState> {
73
+ export class AmazonLoadBalancersTagComponent extends React.Component<
74
+ ILoadBalancersTagProps & IRouterInjectedProps,
75
+ IAmazonLoadBalancersTagState
76
+ > {
74
77
  private loadBalancersRefreshUnsubscribe: () => void;
75
78
  private mounted = false;
76
79
 
77
- constructor(props: ILoadBalancersTagProps) {
80
+ constructor(props: ILoadBalancersTagProps & IRouterInjectedProps) {
78
81
  super(props);
79
82
  this.state = {
80
83
  loadBalancers: [],
@@ -84,11 +87,13 @@ export class AmazonLoadBalancersTag extends React.Component<ILoadBalancersTagPro
84
87
  }
85
88
 
86
89
  private showLoadBalancerDetails = (loadBalancer: ILoadBalancer): void => {
87
- const { $state } = ReactInjector;
90
+ const { stateService } = this.props;
88
91
  const serverGroup = this.props.serverGroup;
89
92
  logger.log({ category: 'Cluster Pod', action: `Load Load Balancer Details (multiple menu)` });
90
- const nextState = $state.current.name.endsWith('.clusters') ? '.loadBalancerDetails' : '^.loadBalancerDetails';
91
- $state.go(nextState, {
93
+ const nextState = stateService.current.name.endsWith('.clusters')
94
+ ? '.loadBalancerDetails'
95
+ : '^.loadBalancerDetails';
96
+ stateService.go(nextState, {
92
97
  region: serverGroup.region,
93
98
  accountId: serverGroup.account,
94
99
  name: loadBalancer.name,
@@ -97,10 +102,10 @@ export class AmazonLoadBalancersTag extends React.Component<ILoadBalancersTagPro
97
102
  };
98
103
 
99
104
  private showTargetGroupDetails = (targetGroup: ITargetGroup): void => {
100
- const { $state } = ReactInjector;
105
+ const { stateService } = this.props;
101
106
  logger.log({ category: 'Cluster Pod', action: `Load Target Group Details (multiple menu)` });
102
- const nextState = $state.current.name.endsWith('.clusters') ? '.targetGroupDetails' : '^.targetGroupDetails';
103
- $state.go(nextState, {
107
+ const nextState = stateService.current.name.endsWith('.clusters') ? '.targetGroupDetails' : '^.targetGroupDetails';
108
+ stateService.go(nextState, {
104
109
  region: targetGroup.region,
105
110
  accountId: targetGroup.account,
106
111
  name: targetGroup.name,
@@ -120,7 +125,7 @@ export class AmazonLoadBalancersTag extends React.Component<ILoadBalancersTagPro
120
125
 
121
126
  public componentDidMount(): void {
122
127
  this.mounted = true;
123
- this.loadBalancersRefreshUnsubscribe = this.props.application.getDataSource('loadBalancers').onRefresh(null, () => {
128
+ this.loadBalancersRefreshUnsubscribe = this.props.application.getDataSource('loadBalancers').onRefresh(() => {
124
129
  this.forceUpdate();
125
130
  });
126
131
 
@@ -146,7 +151,7 @@ export class AmazonLoadBalancersTag extends React.Component<ILoadBalancersTagPro
146
151
  this.loadBalancersRefreshUnsubscribe();
147
152
  }
148
153
 
149
- public render(): React.ReactElement<AmazonLoadBalancersTag> {
154
+ public render(): React.ReactElement {
150
155
  const { loadBalancers, targetGroups, isLoading } = this.state;
151
156
 
152
157
  const targetGroupCount = (targetGroups && targetGroups.length) || 0;
@@ -229,3 +234,5 @@ export class AmazonLoadBalancersTag extends React.Component<ILoadBalancersTagPro
229
234
  );
230
235
  }
231
236
  }
237
+
238
+ export const AmazonLoadBalancersTag = withRouter(AmazonLoadBalancersTagComponent);
@@ -15,7 +15,7 @@ export interface IAuthenticateOidcActionConfig {
15
15
  }
16
16
 
17
17
  export class OidcConfigReader {
18
- public static getOidcConfigsByApp(app: string): PromiseLike<IAuthenticateOidcActionConfig[]> {
18
+ public static getOidcConfigsByApp(app: string): Promise<IAuthenticateOidcActionConfig[]> {
19
19
  return REST('/oidcConfigs').query({ app }).get();
20
20
  }
21
21
  }
@@ -0,0 +1,113 @@
1
+ import { TargetGroupDetailsComponent as TargetGroupDetails } from './TargetGroupDetails';
2
+
3
+ describe('TargetGroupDetails', () => {
4
+ let stateService: any;
5
+
6
+ beforeEach(() => {
7
+ stateService = { params: {}, go: jasmine.createSpy('go') };
8
+ });
9
+
10
+ function buildComponent(loadBalancers: any[]): TargetGroupDetails {
11
+ const app = {
12
+ getDataSource: () => ({ data: loadBalancers }),
13
+ } as any;
14
+
15
+ return new TargetGroupDetails({
16
+ accountId: 'test-account',
17
+ app,
18
+ name: 'test-target-group',
19
+ provider: 'aws',
20
+ router: {},
21
+ stateParams: {},
22
+ stateService,
23
+ targetGroup: {
24
+ accountId: 'test-account',
25
+ loadBalancerName: 'test-load-balancer',
26
+ name: 'test-target-group',
27
+ provider: 'aws',
28
+ region: 'us-west-2',
29
+ },
30
+ });
31
+ }
32
+
33
+ it('auto-closes when the load balancer disappears', () => {
34
+ const component = buildComponent([]);
35
+
36
+ (component as any).extractTargetGroup();
37
+
38
+ expect(stateService.params.allowModalToStayOpen).toBe(true);
39
+ expect(stateService.go).toHaveBeenCalledWith('^', null, { location: 'replace' });
40
+ });
41
+
42
+ it('auto-closes when the target group disappears', () => {
43
+ const component = buildComponent([
44
+ {
45
+ account: 'test-account',
46
+ name: 'test-load-balancer',
47
+ region: 'us-west-2',
48
+ targetGroups: [],
49
+ },
50
+ ]);
51
+
52
+ (component as any).extractTargetGroup();
53
+
54
+ expect(stateService.params.allowModalToStayOpen).toBe(true);
55
+ expect(stateService.go).toHaveBeenCalledWith('^', null, { location: 'replace' });
56
+ });
57
+
58
+ it('does not update state after unmount when the target group still exists', () => {
59
+ const component = buildComponent([
60
+ {
61
+ account: 'test-account',
62
+ name: 'test-load-balancer',
63
+ region: 'us-west-2',
64
+ targetGroups: [{ name: 'test-target-group' }],
65
+ },
66
+ ]);
67
+ spyOn(component, 'setState');
68
+
69
+ component.componentWillUnmount();
70
+ (component as any).extractTargetGroup();
71
+
72
+ expect(component.setState).not.toHaveBeenCalled();
73
+ });
74
+
75
+ it('stops loading when load balancers fail to become ready', () => {
76
+ const readyFailure = new Error('load balancers failed');
77
+ const rejectedReadiness = {
78
+ then: () => rejectedReadiness,
79
+ catch: (onRejected: (error: Error) => void) => {
80
+ onRejected(readyFailure);
81
+ return rejectedReadiness;
82
+ },
83
+ };
84
+ const app = {
85
+ getDataSource: () => ({
86
+ data: [],
87
+ ready: jasmine.createSpy('ready').and.returnValue(rejectedReadiness),
88
+ onRefresh: jasmine.createSpy('onRefresh'),
89
+ }),
90
+ } as any;
91
+ const component = new TargetGroupDetails({
92
+ accountId: 'test-account',
93
+ app,
94
+ name: 'test-target-group',
95
+ provider: 'aws',
96
+ router: {},
97
+ stateParams: {},
98
+ stateService,
99
+ targetGroup: {
100
+ accountId: 'test-account',
101
+ loadBalancerName: 'test-load-balancer',
102
+ name: 'test-target-group',
103
+ provider: 'aws',
104
+ region: 'us-west-2',
105
+ },
106
+ });
107
+ spyOn(component, 'setState');
108
+
109
+ component.componentDidMount();
110
+
111
+ expect(component.setState).toHaveBeenCalledWith({ loading: false });
112
+ });
113
+ });
@@ -1,13 +1,293 @@
1
+ import { UISref } from '@uirouter/react';
1
2
  import React from 'react';
2
3
 
3
- import type { IOverridableProps } from '@spinnaker/core';
4
- import { Overridable } from '@spinnaker/core';
4
+ import type { Application, IRouterInjectedProps } from '@spinnaker/core';
5
+ import {
6
+ AccountTag,
7
+ CollapsibleSection,
8
+ CopyToClipboard,
9
+ HealthCounts,
10
+ ManagedResourceDetailsIndicator,
11
+ Spinner,
12
+ withRouter,
13
+ } from '@spinnaker/core';
5
14
 
6
- export interface ITargetGroupDetailsProps extends IOverridableProps {}
15
+ import type { IAmazonApplicationLoadBalancer, ITargetGroup } from '../domain';
16
+ import { VpcTag } from '../vpc/VpcTag';
7
17
 
8
- @Overridable('loadBalancer.targetGroupDetails')
9
- export class TargetGroupDetails extends React.Component<ITargetGroupDetailsProps> {
10
- public render() {
11
- return <h3>Target Group Details</h3>;
18
+ interface IAmazonTargetGroupDetailsState {
19
+ loadBalancer?: IAmazonApplicationLoadBalancer;
20
+ loading: boolean;
21
+ targetGroup?: ITargetGroup;
22
+ }
23
+
24
+ interface ITargetGroupStateParams {
25
+ accountId: string;
26
+ loadBalancerName: string;
27
+ name: string;
28
+ provider: string;
29
+ region: string;
30
+ vpcId?: string;
31
+ }
32
+
33
+ interface ITargetGroupDetailsProps {
34
+ accountId: string;
35
+ app: Application;
36
+ name: string;
37
+ provider: string;
38
+ targetGroup: ITargetGroupStateParams;
39
+ }
40
+
41
+ function elbProtocol(loadBalancer: IAmazonApplicationLoadBalancer): string {
42
+ return loadBalancer.listeners?.some((listener) => listener.protocol === 'HTTPS') ? 'https:' : 'http:';
43
+ }
44
+
45
+ export class TargetGroupDetailsComponent extends React.Component<
46
+ ITargetGroupDetailsProps & IRouterInjectedProps,
47
+ IAmazonTargetGroupDetailsState
48
+ > {
49
+ public state: IAmazonTargetGroupDetailsState = { loading: true };
50
+
51
+ private unsubscribeFromRefresh: () => void;
52
+ private isUnmounted = false;
53
+
54
+ public componentDidMount(): void {
55
+ this.props.app
56
+ .getDataSource('loadBalancers')
57
+ .ready()
58
+ .then(() => {
59
+ if (this.isUnmounted) {
60
+ return;
61
+ }
62
+ this.extractTargetGroup();
63
+ this.unsubscribeFromRefresh = this.props.app.getDataSource('loadBalancers').onRefresh(this.extractTargetGroup);
64
+ })
65
+ .catch(() => {
66
+ if (!this.isUnmounted) {
67
+ this.setState({ loading: false });
68
+ }
69
+ });
70
+ }
71
+
72
+ public componentWillUnmount(): void {
73
+ this.isUnmounted = true;
74
+ if (this.unsubscribeFromRefresh) {
75
+ this.unsubscribeFromRefresh();
76
+ }
77
+ }
78
+
79
+ private extractTargetGroup = (): void => {
80
+ const { accountId, loadBalancerName, name, region } = this.props.targetGroup;
81
+ const loadBalancer = this.props.app
82
+ .getDataSource('loadBalancers')
83
+ .data.find(
84
+ (candidate: IAmazonApplicationLoadBalancer) =>
85
+ candidate.name === loadBalancerName && candidate.region === region && candidate.account === accountId,
86
+ );
87
+
88
+ const targetGroup = loadBalancer?.targetGroups?.find((candidate: ITargetGroup) => candidate.name === name);
89
+
90
+ if (!loadBalancer || !targetGroup) {
91
+ this.autoClose();
92
+ return;
93
+ }
94
+
95
+ if (!this.isUnmounted) {
96
+ this.setState({ loadBalancer, targetGroup, loading: false });
97
+ }
98
+ };
99
+
100
+ private autoClose = (): void => {
101
+ if (this.isUnmounted) {
102
+ return;
103
+ }
104
+
105
+ this.props.stateService.params.allowModalToStayOpen = true;
106
+ this.props.stateService.go('^', null, { location: 'replace' });
107
+ };
108
+
109
+ private closeDetails = (): void => {
110
+ this.props.stateService.go('^');
111
+ };
112
+
113
+ private renderHeader(): JSX.Element {
114
+ const { name } = this.props;
115
+ const { loading } = this.state;
116
+ return (
117
+ <div className="header">
118
+ <div className="close-button">
119
+ <a className="btn btn-link" onClick={this.closeDetails}>
120
+ <span className="glyphicon glyphicon-remove" />
121
+ </a>
122
+ </div>
123
+ {loading && (
124
+ <div className="horizontal center middle">
125
+ <Spinner size="small" />
126
+ </div>
127
+ )}
128
+ {!loading && (
129
+ <div className="header-text horizontal middle">
130
+ <i className="fa fa-crosshairs icon" aria-hidden="true" />
131
+ <h3 className="horizontal middle space-between flex-1">{name}</h3>
132
+ </div>
133
+ )}
134
+ </div>
135
+ );
136
+ }
137
+
138
+ private renderNotFound(): JSX.Element {
139
+ return (
140
+ <div className="content">
141
+ <div className="content-section">
142
+ <div className="content-body text-center">
143
+ <h3>Target group not found.</h3>
144
+ </div>
145
+ </div>
146
+ </div>
147
+ );
148
+ }
149
+
150
+ private renderDetails(loadBalancer: IAmazonApplicationLoadBalancer, targetGroup: ITargetGroup) {
151
+ const dnsName = (loadBalancer as any).dnsname || loadBalancer.elb?.dnsname;
152
+ const attributes = (targetGroup.attributes || {}) as any;
153
+ return (
154
+ <div className="content">
155
+ <CollapsibleSection heading="Target Group Details" defaultExpanded={true}>
156
+ <dl className="dl-horizontal dl-narrow">
157
+ <dt>In</dt>
158
+ <dd>
159
+ <AccountTag account={targetGroup.account} /> {targetGroup.region}
160
+ </dd>
161
+ <dt>VPC</dt>
162
+ <dd>
163
+ <VpcTag vpcId={targetGroup.vpcId} />
164
+ </dd>
165
+ <dt>Protocol</dt>
166
+ <dd>{targetGroup.protocol}</dd>
167
+ <dt>Port</dt>
168
+ <dd>{targetGroup.port}</dd>
169
+ <dt>Target Type</dt>
170
+ <dd>{targetGroup.targetType}</dd>
171
+ </dl>
172
+ <dl className="horizontal-when-filters-collapsed">
173
+ <dt>Load Balancer</dt>
174
+ <dd>
175
+ <ul className="collapse-margin-on-filter-collapse">
176
+ <li>
177
+ <UISref
178
+ to="^.loadBalancerDetails"
179
+ params={{
180
+ name: loadBalancer.name,
181
+ region: loadBalancer.region,
182
+ accountId: loadBalancer.account,
183
+ vpcId: loadBalancer.vpcId,
184
+ provider: 'aws',
185
+ }}
186
+ >
187
+ <a>{loadBalancer.name}</a>
188
+ </UISref>
189
+ </li>
190
+ </ul>
191
+ </dd>
192
+ </dl>
193
+ {dnsName && (
194
+ <dl className="horizontal-when-filters-collapsed">
195
+ <dt>Load Balancer DNS Name</dt>
196
+ <dd>
197
+ <a target="_blank" href={`${elbProtocol(loadBalancer)}//${dnsName}`}>
198
+ {dnsName}
199
+ </a>{' '}
200
+ <CopyToClipboard text={dnsName} toolTip="Copy DNS Name to clipboard" />
201
+ </dd>
202
+ </dl>
203
+ )}
204
+ {!!targetGroup.serverGroups?.length && (
205
+ <dl className="horizontal-when-filters-collapsed">
206
+ <dt>Server Groups</dt>
207
+ <dd>
208
+ <ul className="collapse-margin-on-filter-collapse">
209
+ {targetGroup.serverGroups.map((serverGroup: any) => (
210
+ <li key={serverGroup.name}>
211
+ <UISref
212
+ to="^.serverGroup"
213
+ params={{
214
+ region: serverGroup.region,
215
+ accountId: serverGroup.account,
216
+ serverGroup: serverGroup.name,
217
+ provider: serverGroup.cloudProvider,
218
+ }}
219
+ >
220
+ <a>{serverGroup.name}</a>
221
+ </UISref>
222
+ </li>
223
+ ))}
224
+ </ul>
225
+ </dd>
226
+ </dl>
227
+ )}
228
+ </CollapsibleSection>
229
+ <CollapsibleSection heading="Status" defaultExpanded={true}>
230
+ <HealthCounts className="pull-left" container={targetGroup.instanceCounts} />
231
+ </CollapsibleSection>
232
+ <CollapsibleSection heading="Health Checks">
233
+ <dl className="horizontal-when-filters-collapsed">
234
+ <dt>Target</dt>
235
+ <dd>
236
+ {targetGroup.healthCheckProtocol}:{targetGroup.healthCheckPort}
237
+ {targetGroup.healthCheckPath}
238
+ </dd>
239
+ <dt>Timeout</dt>
240
+ <dd>{(targetGroup as any).healthCheckTimeoutSeconds || targetGroup.healthTimeout} seconds</dd>
241
+ <dt>Interval</dt>
242
+ <dd>{(targetGroup as any).healthCheckIntervalSeconds || targetGroup.healthInterval} seconds</dd>
243
+ <dt>Healthy Threshold</dt>
244
+ <dd>{(targetGroup as any).healthyThresholdCount || targetGroup.healthyThreshold}</dd>
245
+ <dt>Unhealthy Threshold</dt>
246
+ <dd>{(targetGroup as any).unhealthyThresholdCount || targetGroup.unhealthyThreshold}</dd>
247
+ {(targetGroup as any).matcher && <dt>Matcher</dt>}
248
+ {(targetGroup as any).matcher && <dd>HTTP Code(s): {(targetGroup as any).matcher.httpCode}</dd>}
249
+ </dl>
250
+ </CollapsibleSection>
251
+ <CollapsibleSection heading="Attributes" defaultExpanded={true}>
252
+ <dl className="horizontal-when-filters-collapsed">
253
+ <dt>Deregistration Delay Timeout</dt>
254
+ <dd>{attributes['deregistration_delay.timeout_seconds'] || attributes.deregistrationDelay} seconds</dd>
255
+ <dt>Stickiness Enabled</dt>
256
+ <dd>{String(attributes['stickiness.enabled'] ?? attributes.stickinessEnabled ?? false)}</dd>
257
+ {(attributes['stickiness.enabled'] === 'true' || attributes.stickinessEnabled) && (
258
+ <>
259
+ <dt>Stickiness Load Balancer Cookie Duration</dt>
260
+ <dd>{attributes['stickiness.lb_cookie.duration_seconds'] || attributes.stickinessDuration} seconds</dd>
261
+ <dt>Stickiness Type</dt>
262
+ <dd>{attributes['stickiness.type'] || attributes.stickinessType}</dd>
263
+ </>
264
+ )}
265
+ {loadBalancer.loadBalancerType === 'network' && (
266
+ <>
267
+ <dt>Preserve Client IP</dt>
268
+ <dd>{String(attributes['preserve_client_ip.enabled'] ?? attributes.preserveClientIp ?? false)}</dd>
269
+ </>
270
+ )}
271
+ </dl>
272
+ </CollapsibleSection>
273
+ </div>
274
+ );
275
+ }
276
+
277
+ public render(): JSX.Element {
278
+ const { app } = this.props;
279
+ const { loadBalancer, loading, targetGroup } = this.state;
280
+ return (
281
+ <div className="details-panel">
282
+ {this.renderHeader()}
283
+ {!loading && loadBalancer?.isManaged && (
284
+ <ManagedResourceDetailsIndicator resourceSummary={loadBalancer.managedResourceSummary} application={app} />
285
+ )}
286
+ {!loading && !targetGroup && this.renderNotFound()}
287
+ {!loading && targetGroup && loadBalancer && this.renderDetails(loadBalancer, targetGroup)}
288
+ </div>
289
+ );
12
290
  }
13
291
  }
292
+
293
+ export const TargetGroupDetails = withRouter(TargetGroupDetailsComponent);