@spinnaker/google 0.0.0-main-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1198 -0
- package/LICENSE.txt +203 -0
- package/dist/address/address.reader.d.ts +15 -0
- package/dist/autoscalingPolicy/GceAutoScalingFieldLayout.d.ts +4 -0
- package/dist/autoscalingPolicy/IGceAutoscalingPolicy.d.ts +19 -0
- package/dist/autoscalingPolicy/autoscalingPolicy.write.service.d.ts +2 -0
- package/dist/autoscalingPolicy/components/basicSettings/basicSettings.component.d.ts +2 -0
- package/dist/autoscalingPolicy/components/metricSettings/GcePredictiveAutoscaling.d.ts +1 -0
- package/dist/autoscalingPolicy/components/metricSettings/metricSettings.component.d.ts +2 -0
- package/dist/autoscalingPolicy/components/scalingSchedules/scalingSchedules.component.d.ts +2 -0
- package/dist/autoscalingPolicy/components/scalingSchedules/timeZoneSelect.d.ts +13 -0
- package/dist/autoscalingPolicy/index.d.ts +2 -0
- package/dist/backendService/backendService.reader.d.ts +2 -0
- package/dist/cache/cacheConfigurer.service.d.ts +2 -0
- package/dist/cache/cacheRefresh.component.d.ts +1 -0
- package/dist/certificate/certificate.reader.d.ts +10 -0
- package/dist/common/footer.directive.d.ts +2 -0
- package/dist/common/xpnNaming.gce.service.d.ts +2 -0
- package/dist/domain/autoHealingPolicy.d.ts +12 -0
- package/dist/domain/backendService.d.ts +13 -0
- package/dist/domain/disk.d.ts +10 -0
- package/dist/domain/healthCheck.d.ts +18 -0
- package/dist/domain/index.d.ts +8 -0
- package/dist/domain/loadBalancer.d.ts +42 -0
- package/dist/domain/network.d.ts +10 -0
- package/dist/domain/serverGroup.d.ts +5 -0
- package/dist/domain/subnet.d.ts +12 -0
- package/dist/gce.logo2ae85d8704b1d6b8.png +0 -0
- package/dist/gce.module.d.ts +3 -0
- package/dist/gce.settings.d.ts +14 -0
- package/dist/gceNetworkSelectField.directive.d.ts +2 -0
- package/dist/gceRegionSelectField.directive.d.ts +2 -0
- package/dist/healthCheck/healthCheck.read.service.d.ts +5 -0
- package/dist/healthCheck/healthCheckUtils.d.ts +13 -0
- package/dist/help/gce.help.d.ts +1 -0
- package/dist/image/ImageSelect.d.ts +14 -0
- package/dist/image/image.reader.d.ts +11 -0
- package/dist/image/index.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17717 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/custom/customInstance.filter.d.ts +2 -0
- package/dist/instance/custom/customInstanceBuilder.gce.service.d.ts +2 -0
- package/dist/instance/details/instance.details.controller.d.ts +2 -0
- package/dist/instance/gceInstanceType.service.d.ts +2 -0
- package/dist/instance/gceInstanceTypeDisks.d.ts +15 -0
- package/dist/instance/gceMultiInstanceTask.transformer.d.ts +2 -0
- package/dist/interceptors/iap.interceptor.d.ts +8 -0
- package/dist/loadBalancer/configure/choice/gceLoadBalancerChoice.modal.d.ts +1 -0
- package/dist/loadBalancer/configure/choice/loadBalancerTypeToWizardMap.constant.d.ts +10 -0
- package/dist/loadBalancer/configure/common/addressSelector.component.d.ts +1 -0
- package/dist/loadBalancer/configure/common/commonLoadBalancer.controller.d.ts +17 -0
- package/dist/loadBalancer/configure/common/commonLoadBalancerCommandBuilder.service.d.ts +23 -0
- package/dist/loadBalancer/configure/common/healthCheck.component.d.ts +1 -0
- package/dist/loadBalancer/configure/common/sessionAffinityNameMaps.d.ts +5 -0
- package/dist/loadBalancer/configure/http/backendService/backendService.component.d.ts +2 -0
- package/dist/loadBalancer/configure/http/basicSettings/basicSettings.component.d.ts +2 -0
- package/dist/loadBalancer/configure/http/commandBuilder.service.d.ts +2 -0
- package/dist/loadBalancer/configure/http/createHttpLoadBalancer.controller.d.ts +2 -0
- package/dist/loadBalancer/configure/http/healthCheck/healthCheck.component.d.ts +2 -0
- package/dist/loadBalancer/configure/http/hostRule/hostRule.component.d.ts +2 -0
- package/dist/loadBalancer/configure/http/httpLoadBalancer.write.service.d.ts +2 -0
- package/dist/loadBalancer/configure/http/listeners/listener.component.d.ts +2 -0
- package/dist/loadBalancer/configure/http/pathRule/pathRule.component.d.ts +2 -0
- package/dist/loadBalancer/configure/http/templates.d.ts +42 -0
- package/dist/loadBalancer/configure/http/transformer.service.d.ts +2 -0
- package/dist/loadBalancer/configure/internal/gceCreateInternalLoadBalancer.controller.d.ts +1 -0
- package/dist/loadBalancer/configure/internalhttp/createInternalHttpLoadBalancer.controller.d.ts +3 -0
- package/dist/loadBalancer/configure/network/createLoadBalancer.controller.d.ts +2 -0
- package/dist/loadBalancer/configure/ssl/gceCreateSslLoadBalancer.controller.d.ts +1 -0
- package/dist/loadBalancer/configure/tcp/gceCreateTcpLoadBalancer.controller.d.ts +1 -0
- package/dist/loadBalancer/details/backendService/backendService.component.d.ts +1 -0
- package/dist/loadBalancer/details/backendService/sessionAffinity.filter.d.ts +1 -0
- package/dist/loadBalancer/details/deleteModal/deleteModal.controller.d.ts +1 -0
- package/dist/loadBalancer/details/healthCheck/healthCheck.component.d.ts +2 -0
- package/dist/loadBalancer/details/hostAndPathRules/hostAndPathRules.controller.d.ts +2 -0
- package/dist/loadBalancer/details/hostAndPathRules/hostAndPathRules.service.d.ts +2 -0
- package/dist/loadBalancer/details/hostAndPathRules/hostAndPathRulesButton.component.d.ts +2 -0
- package/dist/loadBalancer/details/loadBalancerDetail.controller.d.ts +2 -0
- package/dist/loadBalancer/details/loadBalancerType/loadBalancerType.component.d.ts +2 -0
- package/dist/loadBalancer/httpLoadBalancerUtils.service.d.ts +7 -0
- package/dist/loadBalancer/loadBalancer.setTransformer.d.ts +11 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +2 -0
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +2 -0
- package/dist/pipeline/stages/bake/gceBakeStage.d.ts +2 -0
- package/dist/pipeline/stages/cloneServerGroup/gceCloneServerGroupStage.d.ts +2 -0
- package/dist/pipeline/stages/destroyAsg/gceDestroyAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableAsg/gceDisableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableCluster/gceDisableClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/enableAsg/gceEnableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/findAmi/gceFindAmiStage.d.ts +2 -0
- package/dist/pipeline/stages/findImageFromTags/gceFindImageFromTagsStage.d.ts +2 -0
- package/dist/pipeline/stages/resizeAsg/gceResizeAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/scaleDownCluster/gceScaleDownClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/shrinkCluster/gceShrinkClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/tagImage/gceTagImageStage.d.ts +2 -0
- package/dist/securityGroup/clone/cloneSecurityGroup.controller.d.ts +2 -0
- package/dist/securityGroup/configure/ConfigSecurityGroupMixin.controller.d.ts +2 -0
- package/dist/securityGroup/configure/createSecurityGroup.controller.d.ts +2 -0
- package/dist/securityGroup/configure/editSecurityGroup.controller.d.ts +2 -0
- package/dist/securityGroup/details/securityGroupDetail.controller.d.ts +2 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +2 -0
- package/dist/securityGroup/securityGroup.transformer.d.ts +2 -0
- package/dist/securityGroup/securityGroupHelpText.service.d.ts +13 -0
- package/dist/serverGroup/configure/serverGroup.configure.gce.module.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/advancedSettings/GceAcceleratorConfigurer.d.ts +16 -0
- package/dist/serverGroup/configure/wizard/advancedSettings/advancedSettingsSelector.directive.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/advancedSettings/diskConfigurer.component.d.ts +1 -0
- package/dist/serverGroup/configure/wizard/advancedSettings/gceAccelerator.service.d.ts +25 -0
- package/dist/serverGroup/configure/wizard/autoHealingPolicy/autoHealingPolicySelector.component.d.ts +1 -0
- package/dist/serverGroup/configure/wizard/autoScalingPolicy/autoScalingPolicySelector.component.d.ts +1 -0
- package/dist/serverGroup/configure/wizard/capacity/advancedCapacitySelector.component.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/capacity/simpleCapacitySelector.component.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/cloneServerGroup.gce.controller.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/customInstance/CustomInstanceConfigurer.d.ts +26 -0
- package/dist/serverGroup/configure/wizard/customInstance/customInstanceConfigurer.component.d.ts +1 -0
- package/dist/serverGroup/configure/wizard/hiddenMetadataKeys.value.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/loadBalancers/elSevenOptions/backendServiceSelector.component.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/loadBalancers/elSevenOptions/elSevenOptionsGenerator.component.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/loadBalancers/loadBalancerSelector.directive.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/loadBalancingPolicy/loadBalancingPolicySelector.component.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/location/basicSettings.controller.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/securityGroups/securityGroupSelector.directive.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/securityGroups/securityGroupsRemoved.directive.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/securityGroups/tagManager.service.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/securityGroups/tagSelector.component.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/securityGroups/tagSelectorGenerator.component.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/zones/regionalSelector.directive.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/zones/targetShapeSelector.directive.d.ts +1 -0
- package/dist/serverGroup/configure/wizard/zones/zoneSelector.directive.d.ts +2 -0
- package/dist/serverGroup/details/ServerGroupDiskDescriptions.d.ts +1 -0
- package/dist/serverGroup/details/autoHealingPolicy/addAutoHealingPolicyButton.component.d.ts +1 -0
- package/dist/serverGroup/details/autoHealingPolicy/autoHealingPolicy.component.d.ts +1 -0
- package/dist/serverGroup/details/autoHealingPolicy/modal/upsertAutoHealingPolicy.modal.controller.d.ts +2 -0
- package/dist/serverGroup/details/autoscalingPolicy/addAutoscalingPolicyButton.component.d.ts +2 -0
- package/dist/serverGroup/details/autoscalingPolicy/autoscalingPolicy.directive.d.ts +2 -0
- package/dist/serverGroup/details/autoscalingPolicy/modal/GceScaleInControls.d.ts +1 -0
- package/dist/serverGroup/details/autoscalingPolicy/modal/upsertAutoscalingPolicy.modal.controller.d.ts +2 -0
- package/dist/serverGroup/details/resize/resizeAutoscalingPolicy.component.d.ts +2 -0
- package/dist/serverGroup/details/resize/resizeCapacity.component.d.ts +2 -0
- package/dist/serverGroup/details/resize/resizeServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/serverGroup.details.gce.module.d.ts +2 -0
- package/dist/serverGroup/details/serverGroupDetails.gce.controller.d.ts +2 -0
- package/dist/serverGroup/details/stateful/MarkDiskStatefulButton.d.ts +10 -0
- package/dist/serverGroup/details/stateful/StatefulMIGService.d.ts +7 -0
- package/dist/serverGroup/details/stateful/UpdateBootImageButton.d.ts +10 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +2 -0
- package/dist/subnet/subnet.renderer.d.ts +2 -0
- package/dist/subnet/subnetSelectField.directive.d.ts +2 -0
- package/dist/validation/applicationName.validator.d.ts +2 -0
- package/package.json +45 -0
- package/src/address/address.reader.ts +61 -0
- package/src/applicationProviderFields/gceFields.html +13 -0
- package/src/autoscalingPolicy/GceAutoScalingFieldLayout.tsx +31 -0
- package/src/autoscalingPolicy/IGceAutoscalingPolicy.ts +22 -0
- package/src/autoscalingPolicy/autoscalingPolicy.write.service.js +83 -0
- package/src/autoscalingPolicy/components/basicSettings/basicSettings.component.html +71 -0
- package/src/autoscalingPolicy/components/basicSettings/basicSettings.component.js +20 -0
- package/src/autoscalingPolicy/components/metricSettings/GcePredictiveAutoscaling.tsx +54 -0
- package/src/autoscalingPolicy/components/metricSettings/metricSettings.component.html +208 -0
- package/src/autoscalingPolicy/components/metricSettings/metricSettings.component.js +108 -0
- package/src/autoscalingPolicy/components/scalingSchedules/scalingSchedules.component.html +84 -0
- package/src/autoscalingPolicy/components/scalingSchedules/scalingSchedules.component.js +61 -0
- package/src/autoscalingPolicy/components/scalingSchedules/standardTimezone.json +596 -0
- package/src/autoscalingPolicy/components/scalingSchedules/timeZoneSelect.tsx +63 -0
- package/src/autoscalingPolicy/gceAutoscalingFieldLayout.less +7 -0
- package/src/autoscalingPolicy/index.ts +2 -0
- package/src/backendService/backendService.reader.js +28 -0
- package/src/cache/cacheConfigurer.service.js +41 -0
- package/src/cache/cacheRefresh.component.html +17 -0
- package/src/cache/cacheRefresh.component.ts +53 -0
- package/src/cache/cacheRefreshTooltip.html +3 -0
- package/src/certificate/certificate.reader.ts +31 -0
- package/src/common/footer.directive.html +7 -0
- package/src/common/footer.directive.js +22 -0
- package/src/common/xpnNaming.gce.service.js +35 -0
- package/src/domain/autoHealingPolicy.ts +14 -0
- package/src/domain/backendService.ts +15 -0
- package/src/domain/disk.ts +10 -0
- package/src/domain/healthCheck.ts +19 -0
- package/src/domain/index.ts +8 -0
- package/src/domain/loadBalancer.ts +49 -0
- package/src/domain/network.ts +10 -0
- package/src/domain/serverGroup.ts +8 -0
- package/src/domain/subnet.ts +12 -0
- package/src/gce.module.ts +155 -0
- package/src/gce.settings.ts +23 -0
- package/src/gceNetworkSelectField.directive.js +22 -0
- package/src/gceRegionSelectField.directive.js +22 -0
- package/src/healthCheck/healthCheck.read.service.ts +55 -0
- package/src/healthCheck/healthCheckUtils.spec.ts +80 -0
- package/src/healthCheck/healthCheckUtils.ts +47 -0
- package/src/help/gce.help.ts +225 -0
- package/src/image/ImageSelect.tsx +66 -0
- package/src/image/image.reader.ts +19 -0
- package/src/image/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/instance/custom/customInstance.filter.js +26 -0
- package/src/instance/custom/customInstanceBuilder.gce.service.js +153 -0
- package/src/instance/details/instance.details.controller.js +518 -0
- package/src/instance/details/instance.details.controller.spec.js +27 -0
- package/src/instance/details/instanceDetails.html +248 -0
- package/src/instance/gceInstanceType.service.js +432 -0
- package/src/instance/gceInstanceType.service.spec.js +19 -0
- package/src/instance/gceInstanceTypeDisks.ts +261 -0
- package/src/instance/gceMultiInstanceTask.transformer.js +32 -0
- package/src/interceptors/iap.interceptor.ts +36 -0
- package/src/loadBalancer/configure/choice/gceLoadBalancerChoice.modal.html +33 -0
- package/src/loadBalancer/configure/choice/gceLoadBalancerChoice.modal.ts +49 -0
- package/src/loadBalancer/configure/choice/loadBalancerTypeToWizardMap.constant.ts +58 -0
- package/src/loadBalancer/configure/common/addressSelector.component.ts +47 -0
- package/src/loadBalancer/configure/common/commonAdvancedSettingsPage.html +32 -0
- package/src/loadBalancer/configure/common/commonCreateLoadBalancer.html +41 -0
- package/src/loadBalancer/configure/common/commonEditLoadBalancer.html +38 -0
- package/src/loadBalancer/configure/common/commonHealthCheckPage.html +16 -0
- package/src/loadBalancer/configure/common/commonLoadBalancer.controller.ts +56 -0
- package/src/loadBalancer/configure/common/commonLoadBalancerCommandBuilder.service.ts +87 -0
- package/src/loadBalancer/configure/common/healthCheck.component.html +164 -0
- package/src/loadBalancer/configure/common/healthCheck.component.ts +82 -0
- package/src/loadBalancer/configure/common/sessionAffinityNameMaps.ts +18 -0
- package/src/loadBalancer/configure/http/backendService/backendService.component.html +157 -0
- package/src/loadBalancer/configure/http/backendService/backendService.component.js +80 -0
- package/src/loadBalancer/configure/http/backendService/backendServices.html +57 -0
- package/src/loadBalancer/configure/http/basicSettings/basicSettings.component.html +105 -0
- package/src/loadBalancer/configure/http/basicSettings/basicSettings.component.js +46 -0
- package/src/loadBalancer/configure/http/basicSettings/basicSettings.html +6 -0
- package/src/loadBalancer/configure/http/commandBuilder.service.js +404 -0
- package/src/loadBalancer/configure/http/createHttpLoadBalancer.controller.js +162 -0
- package/src/loadBalancer/configure/http/createHttpLoadBalancer.html +39 -0
- package/src/loadBalancer/configure/http/defaultService/defaultService.html +24 -0
- package/src/loadBalancer/configure/http/editHttpLoadBalancer.html +36 -0
- package/src/loadBalancer/configure/http/healthCheck/healthCheck.component.html +169 -0
- package/src/loadBalancer/configure/http/healthCheck/healthCheck.component.js +69 -0
- package/src/loadBalancer/configure/http/healthCheck/healthChecks.html +55 -0
- package/src/loadBalancer/configure/http/hostRule/hostRule.component.html +60 -0
- package/src/loadBalancer/configure/http/hostRule/hostRule.component.js +35 -0
- package/src/loadBalancer/configure/http/hostRule/hostRules.html +16 -0
- package/src/loadBalancer/configure/http/httpLoadBalancer.write.service.js +56 -0
- package/src/loadBalancer/configure/http/httpLoadBalancerWizard.component.less +24 -0
- package/src/loadBalancer/configure/http/listeners/listener.component.html +190 -0
- package/src/loadBalancer/configure/http/listeners/listener.component.js +82 -0
- package/src/loadBalancer/configure/http/listeners/listeners.html +17 -0
- package/src/loadBalancer/configure/http/pathRule/pathRule.component.html +51 -0
- package/src/loadBalancer/configure/http/pathRule/pathRule.component.js +16 -0
- package/src/loadBalancer/configure/http/templates.ts +48 -0
- package/src/loadBalancer/configure/http/transformer.service.js +176 -0
- package/src/loadBalancer/configure/internal/createLoadBalancerProperties.html +98 -0
- package/src/loadBalancer/configure/internal/gceCreateInternalLoadBalancer.controller.ts +276 -0
- package/src/loadBalancer/configure/internal/listener.html +41 -0
- package/src/loadBalancer/configure/internalhttp/createInternalHttpLoadBalancer.controller.ts +173 -0
- package/src/loadBalancer/configure/network/advancedSettings.html +54 -0
- package/src/loadBalancer/configure/network/createLoadBalancer.controller.js +224 -0
- package/src/loadBalancer/configure/network/createLoadBalancer.controller.spec.js +76 -0
- package/src/loadBalancer/configure/network/createLoadBalancer.html +25 -0
- package/src/loadBalancer/configure/network/createLoadBalancerProperties.html +86 -0
- package/src/loadBalancer/configure/network/editLoadBalancer.html +29 -0
- package/src/loadBalancer/configure/network/healthCheck.html +36 -0
- package/src/loadBalancer/configure/network/listeners.html +55 -0
- package/src/loadBalancer/configure/ssl/backendService.html +31 -0
- package/src/loadBalancer/configure/ssl/createLoadBalancerProperties.html +86 -0
- package/src/loadBalancer/configure/ssl/gceCreateSslLoadBalancer.controller.ts +236 -0
- package/src/loadBalancer/configure/ssl/listener.html +43 -0
- package/src/loadBalancer/configure/tcp/backendService.html +31 -0
- package/src/loadBalancer/configure/tcp/createLoadBalancerProperties.html +86 -0
- package/src/loadBalancer/configure/tcp/gceCreateTcpLoadBalancer.controller.ts +226 -0
- package/src/loadBalancer/configure/tcp/listener.html +15 -0
- package/src/loadBalancer/details/backendService/backendService.component.ts +23 -0
- package/src/loadBalancer/details/backendService/sessionAffinity.filter.ts +11 -0
- package/src/loadBalancer/details/deleteModal/deleteModal.controller.ts +105 -0
- package/src/loadBalancer/details/deleteModal/deleteModal.html +31 -0
- package/src/loadBalancer/details/healthCheck/healthCheck.component.html +14 -0
- package/src/loadBalancer/details/healthCheck/healthCheck.component.js +13 -0
- package/src/loadBalancer/details/hostAndPathRules/hostAndPathRules.controller.js +23 -0
- package/src/loadBalancer/details/hostAndPathRules/hostAndPathRules.modal.html +40 -0
- package/src/loadBalancer/details/hostAndPathRules/hostAndPathRules.service.js +41 -0
- package/src/loadBalancer/details/hostAndPathRules/hostAndPathRulesButton.component.js +39 -0
- package/src/loadBalancer/details/loadBalancerDetail.controller.js +260 -0
- package/src/loadBalancer/details/loadBalancerDetail.controller.spec.js +41 -0
- package/src/loadBalancer/details/loadBalancerDetails.html +202 -0
- package/src/loadBalancer/details/loadBalancerType/loadBalancerType.component.js +29 -0
- package/src/loadBalancer/httpLoadBalancerUtils.service.ts +42 -0
- package/src/loadBalancer/loadBalancer.setTransformer.ts +55 -0
- package/src/loadBalancer/loadBalancer.transformer.js +168 -0
- package/src/logo/gce.logo.less +6 -0
- package/src/logo/gce.logo.png +0 -0
- package/src/logo/gce.logo.svg +30 -0
- package/src/networkSelectField.directive.html +14 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +40 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +60 -0
- package/src/pipeline/stages/bake/bakeStage.html +117 -0
- package/src/pipeline/stages/bake/gceBakeStage.js +171 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStage.html +99 -0
- package/src/pipeline/stages/cloneServerGroup/cloneServerGroupStepLabel.html +1 -0
- package/src/pipeline/stages/cloneServerGroup/gceCloneServerGroupStage.js +83 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +9 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +1 -0
- package/src/pipeline/stages/destroyAsg/gceDestroyAsgStage.js +62 -0
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +11 -0
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/disableAsg/gceDisableAsgStage.js +68 -0
- package/src/pipeline/stages/disableCluster/disableClusterStage.html +26 -0
- package/src/pipeline/stages/disableCluster/gceDisableClusterStage.js +79 -0
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +11 -0
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/enableAsg/gceEnableAsgStage.js +65 -0
- package/src/pipeline/stages/findAmi/findAmiStage.html +20 -0
- package/src/pipeline/stages/findAmi/gceFindAmiStage.js +79 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +40 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +8 -0
- package/src/pipeline/stages/findImageFromTags/gceFindImageFromTagsStage.js +35 -0
- package/src/pipeline/stages/resizeAsg/gceResizeAsgStage.js +125 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +97 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +1 -0
- package/src/pipeline/stages/scaleDownCluster/gceScaleDownClusterStage.js +78 -0
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +35 -0
- package/src/pipeline/stages/shrinkCluster/gceShrinkClusterStage.js +73 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +34 -0
- package/src/pipeline/stages/tagImage/gceTagImageStage.js +36 -0
- package/src/pipeline/stages/tagImage/tagImageExecutionDetails.html +39 -0
- package/src/pipeline/stages/tagImage/tagImageStage.html +14 -0
- package/src/regionSelectField.directive.html +18 -0
- package/src/securityGroup/clone/cloneSecurityGroup.controller.js +85 -0
- package/src/securityGroup/clone/cloneSecurityGroup.html +25 -0
- package/src/securityGroup/configure/ConfigSecurityGroupMixin.controller.js +318 -0
- package/src/securityGroup/configure/createSecurityGroup.controller.js +62 -0
- package/src/securityGroup/configure/createSecurityGroup.html +25 -0
- package/src/securityGroup/configure/createSecurityGroupIngress.html +81 -0
- package/src/securityGroup/configure/createSecurityGroupProperties.html +70 -0
- package/src/securityGroup/configure/createSecurityGroupSourceFilters.html +56 -0
- package/src/securityGroup/configure/createSecurityGroupTargets.html +43 -0
- package/src/securityGroup/configure/editSecurityGroup.controller.js +132 -0
- package/src/securityGroup/configure/editSecurityGroup.html +26 -0
- package/src/securityGroup/configure/securityGroup.configure.less +22 -0
- package/src/securityGroup/details/securityGroupDetail.controller.js +258 -0
- package/src/securityGroup/details/securityGroupDetail.html +171 -0
- package/src/securityGroup/securityGroup.reader.js +15 -0
- package/src/securityGroup/securityGroup.transformer.js +18 -0
- package/src/securityGroup/securityGroupHelpText.service.spec.ts +102 -0
- package/src/securityGroup/securityGroupHelpText.service.ts +83 -0
- package/src/serverGroup/configure/serverGroup.configure.gce.module.js +59 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.js +620 -0
- package/src/serverGroup/configure/serverGroupConfiguration.service.js +781 -0
- package/src/serverGroup/configure/wizard/advancedSettings/GceAcceleratorConfigurer.tsx +222 -0
- package/src/serverGroup/configure/wizard/advancedSettings/advancedSettings.directive.html +277 -0
- package/src/serverGroup/configure/wizard/advancedSettings/advancedSettings.html +9 -0
- package/src/serverGroup/configure/wizard/advancedSettings/advancedSettingsSelector.directive.js +71 -0
- package/src/serverGroup/configure/wizard/advancedSettings/advancedSettingsSelector.directive.spec.js +58 -0
- package/src/serverGroup/configure/wizard/advancedSettings/diskConfigurer.component.ts +199 -0
- package/src/serverGroup/configure/wizard/advancedSettings/gceAccelerator.service.spec.ts +108 -0
- package/src/serverGroup/configure/wizard/advancedSettings/gceAccelerator.service.ts +74 -0
- package/src/serverGroup/configure/wizard/autoHealingPolicy/autoHealingPolicy.html +20 -0
- package/src/serverGroup/configure/wizard/autoHealingPolicy/autoHealingPolicySelector.component.html +90 -0
- package/src/serverGroup/configure/wizard/autoHealingPolicy/autoHealingPolicySelector.component.ts +70 -0
- package/src/serverGroup/configure/wizard/autoScalingPolicy/autoScalingPolicy.html +20 -0
- package/src/serverGroup/configure/wizard/autoScalingPolicy/autoScalingPolicySelector.component.html +21 -0
- package/src/serverGroup/configure/wizard/autoScalingPolicy/autoScalingPolicySelector.component.js +47 -0
- package/src/serverGroup/configure/wizard/autoScalingPolicy/autoScalingPolicySelector.less +15 -0
- package/src/serverGroup/configure/wizard/capacity/advancedCapacitySelector.component.html +42 -0
- package/src/serverGroup/configure/wizard/capacity/advancedCapacitySelector.component.js +16 -0
- package/src/serverGroup/configure/wizard/capacity/capacity.html +16 -0
- package/src/serverGroup/configure/wizard/capacity/simpleCapacitySelector.component.html +14 -0
- package/src/serverGroup/configure/wizard/capacity/simpleCapacitySelector.component.js +22 -0
- package/src/serverGroup/configure/wizard/capacity/simpleCapacitySelector.component.spec.js +31 -0
- package/src/serverGroup/configure/wizard/capacity/zones.html +7 -0
- package/src/serverGroup/configure/wizard/cloneServerGroup.gce.controller.js +476 -0
- package/src/serverGroup/configure/wizard/customInstance/CustomInstanceConfigurer.tsx +166 -0
- package/src/serverGroup/configure/wizard/customInstance/customInstanceBuilder.html +13 -0
- package/src/serverGroup/configure/wizard/customInstance/customInstanceConfigurer.component.less +9 -0
- package/src/serverGroup/configure/wizard/customInstance/customInstanceConfigurer.component.ts +21 -0
- package/src/serverGroup/configure/wizard/hiddenMetadataKeys.value.js +15 -0
- package/src/serverGroup/configure/wizard/instanceType/instanceType.html +11 -0
- package/src/serverGroup/configure/wizard/loadBalancers/elSevenOptions/backendServiceSelector.component.html +21 -0
- package/src/serverGroup/configure/wizard/loadBalancers/elSevenOptions/backendServiceSelector.component.js +33 -0
- package/src/serverGroup/configure/wizard/loadBalancers/elSevenOptions/elSevenOptionsGenerator.component.js +42 -0
- package/src/serverGroup/configure/wizard/loadBalancers/loadBalancerSelector.directive.html +53 -0
- package/src/serverGroup/configure/wizard/loadBalancers/loadBalancerSelector.directive.js +55 -0
- package/src/serverGroup/configure/wizard/loadBalancers/loadBalancers.html +5 -0
- package/src/serverGroup/configure/wizard/loadBalancingPolicy/loadBalancingPolicySelector.component.html +182 -0
- package/src/serverGroup/configure/wizard/loadBalancingPolicy/loadBalancingPolicySelector.component.less +11 -0
- package/src/serverGroup/configure/wizard/loadBalancingPolicy/loadBalancingPolicySelector.component.ts +149 -0
- package/src/serverGroup/configure/wizard/location/basicSettings.controller.js +139 -0
- package/src/serverGroup/configure/wizard/location/basicSettings.html +167 -0
- package/src/serverGroup/configure/wizard/securityGroups/securityGroupSelector.directive.html +66 -0
- package/src/serverGroup/configure/wizard/securityGroups/securityGroupSelector.directive.js +48 -0
- package/src/serverGroup/configure/wizard/securityGroups/securityGroups.html +4 -0
- package/src/serverGroup/configure/wizard/securityGroups/securityGroupsRemoved.directive.html +14 -0
- package/src/serverGroup/configure/wizard/securityGroups/securityGroupsRemoved.directive.js +25 -0
- package/src/serverGroup/configure/wizard/securityGroups/tagManager.service.js +208 -0
- package/src/serverGroup/configure/wizard/securityGroups/tagSelector.component.html +26 -0
- package/src/serverGroup/configure/wizard/securityGroups/tagSelector.component.js +31 -0
- package/src/serverGroup/configure/wizard/securityGroups/tagSelectorGenerator.component.js +44 -0
- package/src/serverGroup/configure/wizard/serverGroupWizard.html +52 -0
- package/src/serverGroup/configure/wizard/templateSelection/templateSelection.html +9 -0
- package/src/serverGroup/configure/wizard/zones/regionalSelector.directive.html +13 -0
- package/src/serverGroup/configure/wizard/zones/regionalSelector.directive.js +21 -0
- package/src/serverGroup/configure/wizard/zones/targetShapeSelector.directive.html +13 -0
- package/src/serverGroup/configure/wizard/zones/targetShapeSelector.directive.ts +20 -0
- package/src/serverGroup/configure/wizard/zones/zoneSelector.directive.html +24 -0
- package/src/serverGroup/configure/wizard/zones/zoneSelector.directive.js +21 -0
- package/src/serverGroup/details/ServerGroupDiskDescriptions.tsx +97 -0
- package/src/serverGroup/details/autoHealingPolicy/addAutoHealingPolicyButton.component.ts +38 -0
- package/src/serverGroup/details/autoHealingPolicy/autoHealingPolicy.component.ts +73 -0
- package/src/serverGroup/details/autoHealingPolicy/modal/upsertAutoHealingPolicy.modal.controller.ts +88 -0
- package/src/serverGroup/details/autoHealingPolicy/modal/upsertAutoHealingPolicy.modal.html +29 -0
- package/src/serverGroup/details/autoHealingPolicy/modal/upsertAutoHealingPolicy.modal.less +13 -0
- package/src/serverGroup/details/autoscalingPolicy/addAutoscalingPolicyButton.component.js +38 -0
- package/src/serverGroup/details/autoscalingPolicy/autoscalingPolicy.directive.html +49 -0
- package/src/serverGroup/details/autoscalingPolicy/autoscalingPolicy.directive.js +138 -0
- package/src/serverGroup/details/autoscalingPolicy/modal/GceScaleInControls.tsx +137 -0
- package/src/serverGroup/details/autoscalingPolicy/modal/upsertAutoscalingPolicy.modal.controller.js +56 -0
- package/src/serverGroup/details/autoscalingPolicy/modal/upsertAutoscalingPolicy.modal.html +38 -0
- package/src/serverGroup/details/autoscalingPolicy/modal/upsertAutoscalingPolicy.modal.less +17 -0
- package/src/serverGroup/details/resize/resizeAutoscalingPolicy.component.html +55 -0
- package/src/serverGroup/details/resize/resizeAutoscalingPolicy.component.js +60 -0
- package/src/serverGroup/details/resize/resizeCapacity.component.html +36 -0
- package/src/serverGroup/details/resize/resizeCapacity.component.js +46 -0
- package/src/serverGroup/details/resize/resizeServerGroup.controller.js +64 -0
- package/src/serverGroup/details/resize/resizeServerGroup.controller.spec.js +119 -0
- package/src/serverGroup/details/resize/resizeServerGroup.html +41 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +73 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +43 -0
- package/src/serverGroup/details/serverGroup.details.gce.module.js +17 -0
- package/src/serverGroup/details/serverGroupDetails.gce.controller.js +511 -0
- package/src/serverGroup/details/serverGroupDetails.gce.controller.spec.js +26 -0
- package/src/serverGroup/details/serverGroupDetails.html +359 -0
- package/src/serverGroup/details/serverGroupDetails.less +3 -0
- package/src/serverGroup/details/stateful/MarkDiskStatefulButton.tsx +41 -0
- package/src/serverGroup/details/stateful/StatefulMIGService.ts +49 -0
- package/src/serverGroup/details/stateful/UpdateBootImageButton.tsx +108 -0
- package/src/serverGroup/serverGroup.transformer.js +64 -0
- package/src/serverGroup/serverGroup.transformer.spec.js +59 -0
- package/src/subnet/subnet.renderer.js +34 -0
- package/src/subnet/subnetSelectField.directive.html +21 -0
- package/src/subnet/subnetSelectField.directive.js +24 -0
- package/src/validation/applicationName.validator.js +114 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { StateService } from '@uirouter/angularjs';
|
|
2
|
+
import type { IController, IScope } from 'angular';
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
import type { IModalInstanceService } from 'angular-ui-bootstrap';
|
|
5
|
+
import _ from 'lodash';
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
Application,
|
|
9
|
+
IAccount,
|
|
10
|
+
ICredentials,
|
|
11
|
+
IInstance,
|
|
12
|
+
ILoadBalancerUpsertCommand,
|
|
13
|
+
IRegion,
|
|
14
|
+
} from '@spinnaker/core';
|
|
15
|
+
import { AccountService, LoadBalancerWriter, TaskMonitor } from '@spinnaker/core';
|
|
16
|
+
|
|
17
|
+
import { CommonGceLoadBalancerCtrl } from '../common/commonLoadBalancer.controller';
|
|
18
|
+
import type { GceCommonLoadBalancerCommandBuilder } from '../common/commonLoadBalancerCommandBuilder.service';
|
|
19
|
+
import { GCE_COMMON_LOAD_BALANCER_COMMAND_BUILDER } from '../common/commonLoadBalancerCommandBuilder.service';
|
|
20
|
+
import { GCE_HEALTH_CHECK_SELECTOR_COMPONENT } from '../common/healthCheck.component';
|
|
21
|
+
import type { IGceBackendService, IGceHealthCheck, IGceLoadBalancer } from '../../../domain/index';
|
|
22
|
+
import { GCEProviderSettings } from '../../../gce.settings';
|
|
23
|
+
|
|
24
|
+
class ViewState {
|
|
25
|
+
constructor(public sessionAffinity: string) {}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface IListKeyedByAccount {
|
|
29
|
+
[account: string]: string[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface ISslLoadBalancerUpsertDescription extends ILoadBalancerUpsertCommand {
|
|
33
|
+
backendService: IGceBackendService;
|
|
34
|
+
loadBalancerName: string;
|
|
35
|
+
instances: IInstance[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
class SslLoadBalancer implements IGceLoadBalancer {
|
|
39
|
+
public stack: string;
|
|
40
|
+
public detail: string;
|
|
41
|
+
public loadBalancerName: string;
|
|
42
|
+
public portRange = '443';
|
|
43
|
+
public ipProtocol = 'TCP';
|
|
44
|
+
public instances: IInstance[];
|
|
45
|
+
public loadBalancerType = 'SSL';
|
|
46
|
+
public credentials: string;
|
|
47
|
+
public account: string;
|
|
48
|
+
public certificate: string;
|
|
49
|
+
public backendService: IGceBackendService = { healthCheck: { healthCheckType: 'TCP' } } as IGceBackendService;
|
|
50
|
+
public cloudProvider: string;
|
|
51
|
+
public name: string;
|
|
52
|
+
constructor(public region = 'global') {}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
class SslLoadBalancerCtrl extends CommonGceLoadBalancerCtrl implements IController {
|
|
56
|
+
public pages: any = {
|
|
57
|
+
location: require('./createLoadBalancerProperties.html'),
|
|
58
|
+
listener: require('./listener.html'),
|
|
59
|
+
healthCheck: require('../common/commonHealthCheckPage.html'),
|
|
60
|
+
advancedSettings: require('../common/commonAdvancedSettingsPage.html'),
|
|
61
|
+
backendService: require('./backendService.html'),
|
|
62
|
+
};
|
|
63
|
+
public sessionAffinityViewToModelMap: any = {
|
|
64
|
+
None: 'NONE',
|
|
65
|
+
'Client IP': 'CLIENT_IP',
|
|
66
|
+
'Generated Cookie': 'GENERATED_COOKIE',
|
|
67
|
+
};
|
|
68
|
+
public accounts: ICredentials[];
|
|
69
|
+
public regions: string[];
|
|
70
|
+
public certificateWrappers: any[];
|
|
71
|
+
public healthChecksByAccountAndType: { [account: string]: { [healthCheckType: string]: IGceHealthCheck[] } };
|
|
72
|
+
public portOptions: string[] = ['25', '43', '110', '143', '195', '443', '465', '587', '700', '993', '995'];
|
|
73
|
+
|
|
74
|
+
// The 'by account' maps populate the corresponding 'existing names' lists below.
|
|
75
|
+
public existingLoadBalancerNamesByAccount: IListKeyedByAccount;
|
|
76
|
+
public existingHealthCheckNamesByAccount: IListKeyedByAccount;
|
|
77
|
+
public existingLoadBalancerNames: string[];
|
|
78
|
+
public existingHealthCheckNames: string[];
|
|
79
|
+
|
|
80
|
+
public viewState: ViewState = new ViewState('None');
|
|
81
|
+
public maxCookieTtl = 60 * 60 * 24; // One day.
|
|
82
|
+
public taskMonitor: any;
|
|
83
|
+
public hasBackendService = true;
|
|
84
|
+
|
|
85
|
+
private sessionAffinityModelToViewMap: any = _.invert(this.sessionAffinityViewToModelMap);
|
|
86
|
+
|
|
87
|
+
public static $inject = [
|
|
88
|
+
'$scope',
|
|
89
|
+
'application',
|
|
90
|
+
'$uibModalInstance',
|
|
91
|
+
'loadBalancer',
|
|
92
|
+
'gceCommonLoadBalancerCommandBuilder',
|
|
93
|
+
'isNew',
|
|
94
|
+
'wizardSubFormValidation',
|
|
95
|
+
'$state',
|
|
96
|
+
];
|
|
97
|
+
constructor(
|
|
98
|
+
public $scope: IScope,
|
|
99
|
+
public application: Application,
|
|
100
|
+
public $uibModalInstance: IModalInstanceService,
|
|
101
|
+
private loadBalancer: SslLoadBalancer,
|
|
102
|
+
private gceCommonLoadBalancerCommandBuilder: GceCommonLoadBalancerCommandBuilder,
|
|
103
|
+
private isNew: boolean,
|
|
104
|
+
private wizardSubFormValidation: any,
|
|
105
|
+
$state: StateService,
|
|
106
|
+
) {
|
|
107
|
+
super($scope, application, $uibModalInstance, $state);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
public $onInit(): void {
|
|
111
|
+
this.gceCommonLoadBalancerCommandBuilder
|
|
112
|
+
.getBackingData(['existingLoadBalancerNamesByAccount', 'accounts', 'healthChecks', 'certificates'])
|
|
113
|
+
.then((backingData) => {
|
|
114
|
+
if (!this.isNew) {
|
|
115
|
+
this.initializeEditMode();
|
|
116
|
+
} else {
|
|
117
|
+
this.loadBalancer = new SslLoadBalancer(GCEProviderSettings ? GCEProviderSettings.defaults.region : null);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
this.loadBalancer.loadBalancerName = this.getName(this.loadBalancer, this.application);
|
|
121
|
+
|
|
122
|
+
const accountNames: string[] = backingData.accounts.map((account: IAccount) => account.name);
|
|
123
|
+
if (accountNames.length && !accountNames.includes(this.loadBalancer.account)) {
|
|
124
|
+
this.loadBalancer.credentials = accountNames[0];
|
|
125
|
+
} else {
|
|
126
|
+
this.loadBalancer.credentials = this.loadBalancer.account;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
this.accounts = backingData.accounts;
|
|
130
|
+
this.certificateWrappers = backingData.certificates as any[];
|
|
131
|
+
this.existingLoadBalancerNamesByAccount = backingData.existingLoadBalancerNamesByAccount;
|
|
132
|
+
this.healthChecksByAccountAndType = this.gceCommonLoadBalancerCommandBuilder.groupHealthChecksByAccountAndType(
|
|
133
|
+
backingData.healthChecks as IGceHealthCheck[],
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
// We don't count the load balancer's health check in the existing health checks list.
|
|
137
|
+
const healthCheckNamesToOmit = this.isNew ? [] : [this.loadBalancer.backendService.healthCheck.name];
|
|
138
|
+
this.existingHealthCheckNamesByAccount = this.gceCommonLoadBalancerCommandBuilder.groupHealthCheckNamesByAccount(
|
|
139
|
+
backingData.healthChecks as IGceHealthCheck[],
|
|
140
|
+
healthCheckNamesToOmit,
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
this.accountUpdated();
|
|
144
|
+
|
|
145
|
+
this.wizardSubFormValidation
|
|
146
|
+
.config({ scope: this.$scope, form: 'form' })
|
|
147
|
+
.register({ page: 'location', subForm: 'locationForm' })
|
|
148
|
+
.register({ page: 'listener', subForm: 'listenerForm' })
|
|
149
|
+
.register({ page: 'healthCheck', subForm: 'healthCheckForm' })
|
|
150
|
+
.register({ page: 'advancedSettings', subForm: 'advancedSettingsForm' });
|
|
151
|
+
|
|
152
|
+
this.taskMonitor = new TaskMonitor({
|
|
153
|
+
application: this.application,
|
|
154
|
+
title: (this.isNew ? 'Creating ' : 'Updating ') + 'your load balancer',
|
|
155
|
+
modalInstance: this.$uibModalInstance,
|
|
156
|
+
onTaskComplete: () => this.onTaskComplete(this.loadBalancer),
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
public onHealthCheckRefresh(): void {
|
|
162
|
+
this.gceCommonLoadBalancerCommandBuilder.getBackingData(['healthChecks']).then((data) => {
|
|
163
|
+
this.healthChecksByAccountAndType = this.gceCommonLoadBalancerCommandBuilder.groupHealthChecksByAccountAndType(
|
|
164
|
+
data.healthChecks as IGceHealthCheck[],
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
const healthCheckNamesToOmit = this.isNew ? [] : [this.loadBalancer.backendService.healthCheck.name];
|
|
168
|
+
this.existingHealthCheckNamesByAccount = this.gceCommonLoadBalancerCommandBuilder.groupHealthCheckNamesByAccount(
|
|
169
|
+
data.healthChecks as IGceHealthCheck[],
|
|
170
|
+
healthCheckNamesToOmit,
|
|
171
|
+
);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
public onCertificateRefresh(): void {
|
|
176
|
+
this.gceCommonLoadBalancerCommandBuilder.getBackingData(['certificates']).then((data) => {
|
|
177
|
+
this.certificateWrappers = data.certificates as any[];
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
public accountUpdated(): void {
|
|
182
|
+
const existingHealthCheckNames = _.get<any, string[]>(this, [
|
|
183
|
+
'existingHealthCheckNamesByAccount',
|
|
184
|
+
this.loadBalancer.credentials,
|
|
185
|
+
]);
|
|
186
|
+
this.existingHealthCheckNames = existingHealthCheckNames || [];
|
|
187
|
+
|
|
188
|
+
const existingLoadBalancerNames = _.get<any, string[]>(this, [
|
|
189
|
+
'existingLoadBalancerNamesByAccount',
|
|
190
|
+
this.loadBalancer.credentials,
|
|
191
|
+
]);
|
|
192
|
+
this.existingLoadBalancerNames = existingLoadBalancerNames || [];
|
|
193
|
+
|
|
194
|
+
AccountService.getRegionsForAccount(this.loadBalancer.credentials).then((regions: IRegion[]) => {
|
|
195
|
+
this.regions = regions.map((region: IRegion) => region.name);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
public updateName(): void {
|
|
200
|
+
this.loadBalancer.loadBalancerName = this.getName(this.loadBalancer, this.application);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
public setSessionAffinity(viewState: ViewState): void {
|
|
204
|
+
this.loadBalancer.backendService.sessionAffinity = this.sessionAffinityViewToModelMap[viewState.sessionAffinity];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
public submit(): void {
|
|
208
|
+
const descriptor = this.isNew ? 'Create' : 'Update';
|
|
209
|
+
const toSubmitLoadBalancer = _.cloneDeep(this.loadBalancer) as ISslLoadBalancerUpsertDescription;
|
|
210
|
+
toSubmitLoadBalancer.name = toSubmitLoadBalancer.loadBalancerName;
|
|
211
|
+
toSubmitLoadBalancer.backendService.name = toSubmitLoadBalancer.loadBalancerName;
|
|
212
|
+
toSubmitLoadBalancer.cloudProvider = 'gce';
|
|
213
|
+
delete toSubmitLoadBalancer.instances;
|
|
214
|
+
|
|
215
|
+
this.taskMonitor.submit(() =>
|
|
216
|
+
LoadBalancerWriter.upsertLoadBalancer(toSubmitLoadBalancer, this.application, descriptor, {
|
|
217
|
+
healthCheck: {},
|
|
218
|
+
}),
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
private initializeEditMode(): void {
|
|
223
|
+
this.loadBalancer.portRange = this.loadBalancer.portRange.split('-')[0];
|
|
224
|
+
this.loadBalancer.certificate = this.loadBalancer.certificate.split('/').pop();
|
|
225
|
+
this.viewState = new ViewState(
|
|
226
|
+
this.sessionAffinityModelToViewMap[this.loadBalancer.backendService.sessionAffinity],
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export const GCE_SSL_LOAD_BALANCER_CTRL = 'spinnaker.gce.sslLoadBalancer.controller';
|
|
232
|
+
|
|
233
|
+
module(GCE_SSL_LOAD_BALANCER_CTRL, [
|
|
234
|
+
GCE_HEALTH_CHECK_SELECTOR_COMPONENT,
|
|
235
|
+
GCE_COMMON_LOAD_BALANCER_COMMAND_BUILDER,
|
|
236
|
+
]).controller('gceSslLoadBalancerCtrl', SslLoadBalancerCtrl);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<div class="container-fluid form-horizontal">
|
|
2
|
+
<ng-form name="listenerForm">
|
|
3
|
+
<div class="form-group">
|
|
4
|
+
<div class="col-md-9 col-md-offset-2">
|
|
5
|
+
<table class="table table-condensed packed" style="table-layout: fixed; width: 390px">
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>Certificate</th>
|
|
9
|
+
<th>Port</th>
|
|
10
|
+
</tr>
|
|
11
|
+
</thead>
|
|
12
|
+
<tbody>
|
|
13
|
+
<tr>
|
|
14
|
+
<td>
|
|
15
|
+
<ui-select ng-model="ctrl.loadBalancer.certificate" required class="form-control input-sm">
|
|
16
|
+
<ui-select-match allow-clear placeholder="Select...">{{$select.selected.name}}</ui-select-match>
|
|
17
|
+
<ui-select-choices
|
|
18
|
+
repeat="certificateWrapper.name as certificateWrapper in ctrl.certificateWrappers | filter: {name: $select.search, account: ctrl.loadBalancer.credentials }"
|
|
19
|
+
>
|
|
20
|
+
<span ng-bind-html="certificateWrapper.name | highlight: $select.search"></span>
|
|
21
|
+
</ui-select-choices>
|
|
22
|
+
</ui-select>
|
|
23
|
+
</td>
|
|
24
|
+
<td>
|
|
25
|
+
<select
|
|
26
|
+
class="form-control input-sm"
|
|
27
|
+
ng-options="port for port in ctrl.portOptions"
|
|
28
|
+
ng-disabled="!ctrl.isNew"
|
|
29
|
+
ng-model="ctrl.loadBalancer.portRange"
|
|
30
|
+
></select>
|
|
31
|
+
</td>
|
|
32
|
+
</tr>
|
|
33
|
+
</tbody>
|
|
34
|
+
</table>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</ng-form>
|
|
38
|
+
<div class="form-group small" style="margin-top: 20px">
|
|
39
|
+
<div class="col-md-offset-2 col-md-6">
|
|
40
|
+
<gce-cache-refresh cache-key="certificates" on-refresh="ctrl.onCertificateRefresh()"></gce-cache-refresh>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div class="container-fluid form-horizontal">
|
|
2
|
+
<ng-form name="portName">
|
|
3
|
+
<div class="form-group">
|
|
4
|
+
<div class="col-md-4 sm-label-right">
|
|
5
|
+
Port Name
|
|
6
|
+
<help-field key="gce.loadBalancer.portName"></help-field>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="col-md-4">
|
|
9
|
+
<input
|
|
10
|
+
type="text"
|
|
11
|
+
required
|
|
12
|
+
class="form-control input-sm"
|
|
13
|
+
ng-model="ctrl.loadBalancer.backendService.portName"
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="form-group">
|
|
18
|
+
<div class="col-md-4 sm-label-right">
|
|
19
|
+
Connection Draining
|
|
20
|
+
<help-field key="gce.loadBalancer.connectionDraining"></help-field>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="col-md-4">
|
|
23
|
+
<input
|
|
24
|
+
type="number"
|
|
25
|
+
class="form-control input-sm"
|
|
26
|
+
ng-model="ctrl.loadBalancer.backendService.connectionDrainingTimeoutSec"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</ng-form>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<div class="container-fluid form-horizontal">
|
|
2
|
+
<ng-form name="locationForm">
|
|
3
|
+
<div class="modal-body">
|
|
4
|
+
<div class="form-group">
|
|
5
|
+
<div
|
|
6
|
+
class="col-md-12 well"
|
|
7
|
+
ng-class="{'alert-danger': locationForm.loadBalancerName.$error.validateUnique, 'alert-info': !locationForm.loadBalancerName.$error.validateUnique}"
|
|
8
|
+
>
|
|
9
|
+
<strong>Your load balancer will be named:</strong>
|
|
10
|
+
<span>{{ctrl.getName(ctrl.loadBalancer, ctrl.application)}}</span>
|
|
11
|
+
<!-- Angular does not seem to run length validation on hidden inputs, hence the text + display:none -->
|
|
12
|
+
<input
|
|
13
|
+
type="text"
|
|
14
|
+
style="display: none"
|
|
15
|
+
ng-maxlength="63"
|
|
16
|
+
class="form-control input-sm"
|
|
17
|
+
ng-model="ctrl.loadBalancer.loadBalancerName"
|
|
18
|
+
validate-unique="ctrl.existingLoadBalancerNames"
|
|
19
|
+
validate-ignore-case="true"
|
|
20
|
+
name="loadBalancerName"
|
|
21
|
+
/>
|
|
22
|
+
<validation-error
|
|
23
|
+
ng-if="locationForm.loadBalancerName.$error.validateUnique"
|
|
24
|
+
message="There is already a load balancer in {{ctrl.loadBalancer.credentials}} with that name."
|
|
25
|
+
>
|
|
26
|
+
</validation-error>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="form-group">
|
|
30
|
+
<div class="col-md-2 sm-label-right">Account</div>
|
|
31
|
+
<div class="col-md-8">
|
|
32
|
+
<account-select-field
|
|
33
|
+
component="ctrl.loadBalancer"
|
|
34
|
+
field="credentials"
|
|
35
|
+
accounts="ctrl.accounts"
|
|
36
|
+
provider="'gce'"
|
|
37
|
+
on-change="ctrl.accountUpdated()"
|
|
38
|
+
></account-select-field>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="form-group">
|
|
43
|
+
<div class="col-md-2 sm-label-right">Region</div>
|
|
44
|
+
<div class="col-md-8">
|
|
45
|
+
<input readonly class="form-control input-sm" ng-model="ctrl.loadBalancer.region" />
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="form-group">
|
|
50
|
+
<div class="col-md-2 sm-label-right">Stack <help-field key="aws.loadBalancer.stack"></help-field></div>
|
|
51
|
+
<div class="col-md-3">
|
|
52
|
+
<input
|
|
53
|
+
type="text"
|
|
54
|
+
class="form-control input-sm"
|
|
55
|
+
ng-model="ctrl.loadBalancer.stack"
|
|
56
|
+
name="stackName"
|
|
57
|
+
ng-change="ctrl.updateName()"
|
|
58
|
+
ng-pattern="/^[a-z0-9]*$/"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="col-md-2 sm-label-right">Detail<help-field key="gce.loadBalancer.detail"></help-field></div>
|
|
62
|
+
<div class="col-md-3">
|
|
63
|
+
<input
|
|
64
|
+
type="text"
|
|
65
|
+
class="form-control input-sm"
|
|
66
|
+
ng-model="ctrl.loadBalancer.detail"
|
|
67
|
+
name="detailName"
|
|
68
|
+
ng-change="ctrl.updateName()"
|
|
69
|
+
ng-pattern="/^[a-z0-9-]*$/"
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="col-md-7 col-md-offset-3" ng-if="locationForm.stackName.$error.pattern">
|
|
73
|
+
<validation-error message="Stack can only contain letters and numbers."></validation-error>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="col-md-7 col-md-offset-3" ng-if="locationForm.detailName.$error.pattern">
|
|
76
|
+
<validation-error message="Detail can only contain letters, numbers, and dashes(-)."></validation-error>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="form-group">
|
|
80
|
+
<div class="col-md-9 col-md-offset-3" ng-if="locationForm.loadBalancerName.$error.maxlength">
|
|
81
|
+
<validation-error message="Load Balancer name can only be 63 characters."></validation-error>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</ng-form>
|
|
86
|
+
</div>
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import type { StateService } from '@uirouter/angularjs';
|
|
2
|
+
import type { IScope } from 'angular';
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
import type { IModalInstanceService } from 'angular-ui-bootstrap';
|
|
5
|
+
import _ from 'lodash';
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
Application,
|
|
9
|
+
IAccount,
|
|
10
|
+
ICredentials,
|
|
11
|
+
IInstance,
|
|
12
|
+
ILoadBalancerUpsertCommand,
|
|
13
|
+
IRegion,
|
|
14
|
+
} from '@spinnaker/core';
|
|
15
|
+
import { AccountService, LoadBalancerWriter, TaskMonitor } from '@spinnaker/core';
|
|
16
|
+
|
|
17
|
+
import { CommonGceLoadBalancerCtrl } from '../common/commonLoadBalancer.controller';
|
|
18
|
+
import type { GceCommonLoadBalancerCommandBuilder } from '../common/commonLoadBalancerCommandBuilder.service';
|
|
19
|
+
import { GCE_COMMON_LOAD_BALANCER_COMMAND_BUILDER } from '../common/commonLoadBalancerCommandBuilder.service';
|
|
20
|
+
import { GCE_HEALTH_CHECK_SELECTOR_COMPONENT } from '../common/healthCheck.component';
|
|
21
|
+
import type { IGceBackendService, IGceHealthCheck, IGceLoadBalancer } from '../../../domain/index';
|
|
22
|
+
import { GCEProviderSettings } from '../../../gce.settings';
|
|
23
|
+
|
|
24
|
+
class ViewState {
|
|
25
|
+
constructor(public sessionAffinity: string) {}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface IListKeyedByAccount {
|
|
29
|
+
[account: string]: string[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface ITcpLoadBalancerUpsertDescription extends ILoadBalancerUpsertCommand {
|
|
33
|
+
backendService: IGceBackendService;
|
|
34
|
+
loadBalancerName: string;
|
|
35
|
+
instances: IInstance[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
class TcpLoadBalancer implements IGceLoadBalancer {
|
|
39
|
+
public stack: string;
|
|
40
|
+
public detail: string;
|
|
41
|
+
public loadBalancerName: string;
|
|
42
|
+
public portRange = '443';
|
|
43
|
+
public ipProtocol = 'TCP';
|
|
44
|
+
public instances: IInstance[];
|
|
45
|
+
public loadBalancerType = 'TCP';
|
|
46
|
+
public credentials: string;
|
|
47
|
+
public account: string;
|
|
48
|
+
public backendService: IGceBackendService = { healthCheck: { healthCheckType: 'TCP' } } as IGceBackendService;
|
|
49
|
+
public cloudProvider: string;
|
|
50
|
+
public name: string;
|
|
51
|
+
constructor(public region = 'global') {}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
class TcpLoadBalancerCtrl extends CommonGceLoadBalancerCtrl implements ng.IComponentController {
|
|
55
|
+
public pages: any = {
|
|
56
|
+
location: require('./createLoadBalancerProperties.html'),
|
|
57
|
+
listener: require('./listener.html'),
|
|
58
|
+
healthCheck: require('../common/commonHealthCheckPage.html'),
|
|
59
|
+
advancedSettings: require('../common/commonAdvancedSettingsPage.html'),
|
|
60
|
+
backendService: require('./backendService.html'),
|
|
61
|
+
};
|
|
62
|
+
public sessionAffinityViewToModelMap: any = {
|
|
63
|
+
None: 'NONE',
|
|
64
|
+
'Client IP': 'CLIENT_IP',
|
|
65
|
+
'Generated Cookie': 'GENERATED_COOKIE',
|
|
66
|
+
};
|
|
67
|
+
public accounts: ICredentials[];
|
|
68
|
+
public regions: string[];
|
|
69
|
+
public healthChecksByAccountAndType: { [account: string]: { [healthCheckType: string]: IGceHealthCheck[] } };
|
|
70
|
+
public portOptions: string[] = ['25', '43', '110', '143', '195', '443', '465', '587', '700', '993', '995'];
|
|
71
|
+
|
|
72
|
+
// The 'by account' maps populate the corresponding 'existing names' lists below.
|
|
73
|
+
public existingLoadBalancerNamesByAccount: IListKeyedByAccount;
|
|
74
|
+
public existingHealthCheckNamesByAccount: IListKeyedByAccount;
|
|
75
|
+
public existingLoadBalancerNames: string[];
|
|
76
|
+
public existingHealthCheckNames: string[];
|
|
77
|
+
|
|
78
|
+
public viewState: ViewState = new ViewState('None');
|
|
79
|
+
public maxCookieTtl = 60 * 60 * 24; // One day.
|
|
80
|
+
public taskMonitor: any;
|
|
81
|
+
public hasBackendService = true;
|
|
82
|
+
|
|
83
|
+
private sessionAffinityModelToViewMap: any = _.invert(this.sessionAffinityViewToModelMap);
|
|
84
|
+
|
|
85
|
+
public static $inject = [
|
|
86
|
+
'$scope',
|
|
87
|
+
'application',
|
|
88
|
+
'$uibModalInstance',
|
|
89
|
+
'loadBalancer',
|
|
90
|
+
'gceCommonLoadBalancerCommandBuilder',
|
|
91
|
+
'isNew',
|
|
92
|
+
'wizardSubFormValidation',
|
|
93
|
+
'$state',
|
|
94
|
+
];
|
|
95
|
+
constructor(
|
|
96
|
+
public $scope: IScope,
|
|
97
|
+
public application: Application,
|
|
98
|
+
public $uibModalInstance: IModalInstanceService,
|
|
99
|
+
private loadBalancer: TcpLoadBalancer,
|
|
100
|
+
private gceCommonLoadBalancerCommandBuilder: GceCommonLoadBalancerCommandBuilder,
|
|
101
|
+
private isNew: boolean,
|
|
102
|
+
private wizardSubFormValidation: any,
|
|
103
|
+
$state: StateService,
|
|
104
|
+
) {
|
|
105
|
+
super($scope, application, $uibModalInstance, $state);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public $onInit(): void {
|
|
109
|
+
this.gceCommonLoadBalancerCommandBuilder
|
|
110
|
+
.getBackingData(['existingLoadBalancerNamesByAccount', 'accounts', 'healthChecks'])
|
|
111
|
+
.then((backingData) => {
|
|
112
|
+
if (!this.isNew) {
|
|
113
|
+
this.initializeEditMode();
|
|
114
|
+
} else {
|
|
115
|
+
this.loadBalancer = new TcpLoadBalancer(GCEProviderSettings ? GCEProviderSettings.defaults.region : null);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
this.loadBalancer.loadBalancerName = this.getName(this.loadBalancer, this.application);
|
|
119
|
+
|
|
120
|
+
const accountNames: string[] = backingData.accounts.map((account: IAccount) => account.name);
|
|
121
|
+
if (accountNames.length && !accountNames.includes(this.loadBalancer.account)) {
|
|
122
|
+
this.loadBalancer.credentials = accountNames[0];
|
|
123
|
+
} else {
|
|
124
|
+
this.loadBalancer.credentials = this.loadBalancer.account;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
this.accounts = backingData.accounts;
|
|
128
|
+
this.existingLoadBalancerNamesByAccount = backingData.existingLoadBalancerNamesByAccount;
|
|
129
|
+
this.healthChecksByAccountAndType = this.gceCommonLoadBalancerCommandBuilder.groupHealthChecksByAccountAndType(
|
|
130
|
+
backingData.healthChecks as IGceHealthCheck[],
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
// We don't count the load balancer's health check in the existing health checks list.
|
|
134
|
+
const healthCheckNamesToOmit = this.isNew ? [] : [this.loadBalancer.backendService.healthCheck.name];
|
|
135
|
+
this.existingHealthCheckNamesByAccount = this.gceCommonLoadBalancerCommandBuilder.groupHealthCheckNamesByAccount(
|
|
136
|
+
backingData.healthChecks as IGceHealthCheck[],
|
|
137
|
+
healthCheckNamesToOmit,
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
this.accountUpdated();
|
|
141
|
+
|
|
142
|
+
this.wizardSubFormValidation
|
|
143
|
+
.config({ scope: this.$scope, form: 'form' })
|
|
144
|
+
.register({ page: 'location', subForm: 'locationForm' })
|
|
145
|
+
.register({ page: 'listener', subForm: 'listenerForm' })
|
|
146
|
+
.register({ page: 'healthCheck', subForm: 'healthCheckForm' })
|
|
147
|
+
.register({ page: 'advancedSettings', subForm: 'advancedSettingsForm' });
|
|
148
|
+
|
|
149
|
+
this.taskMonitor = new TaskMonitor({
|
|
150
|
+
application: this.application,
|
|
151
|
+
title: (this.isNew ? 'Creating ' : 'Updating ') + 'your load balancer',
|
|
152
|
+
modalInstance: this.$uibModalInstance,
|
|
153
|
+
onTaskComplete: () => this.onTaskComplete(this.loadBalancer),
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
public onHealthCheckRefresh(): void {
|
|
159
|
+
this.gceCommonLoadBalancerCommandBuilder.getBackingData(['healthChecks']).then((data) => {
|
|
160
|
+
this.healthChecksByAccountAndType = this.gceCommonLoadBalancerCommandBuilder.groupHealthChecksByAccountAndType(
|
|
161
|
+
data.healthChecks as IGceHealthCheck[],
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
const healthCheckNamesToOmit = this.isNew ? [] : [this.loadBalancer.backendService.healthCheck.name];
|
|
165
|
+
this.existingHealthCheckNamesByAccount = this.gceCommonLoadBalancerCommandBuilder.groupHealthCheckNamesByAccount(
|
|
166
|
+
data.healthChecks as IGceHealthCheck[],
|
|
167
|
+
healthCheckNamesToOmit,
|
|
168
|
+
);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
public accountUpdated(): void {
|
|
173
|
+
const existingHealthCheckNames = _.get<any, string[]>(this, [
|
|
174
|
+
'existingHealthCheckNamesByAccount',
|
|
175
|
+
this.loadBalancer.credentials,
|
|
176
|
+
]);
|
|
177
|
+
this.existingHealthCheckNames = existingHealthCheckNames || [];
|
|
178
|
+
|
|
179
|
+
const existingLoadBalancerNames = _.get<any, string[]>(this, [
|
|
180
|
+
'existingLoadBalancerNamesByAccount',
|
|
181
|
+
this.loadBalancer.credentials,
|
|
182
|
+
]);
|
|
183
|
+
this.existingLoadBalancerNames = existingLoadBalancerNames || [];
|
|
184
|
+
|
|
185
|
+
AccountService.getRegionsForAccount(this.loadBalancer.credentials).then((regions: IRegion[]) => {
|
|
186
|
+
this.regions = regions.map((region: IRegion) => region.name);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
public updateName(): void {
|
|
191
|
+
this.loadBalancer.loadBalancerName = this.getName(this.loadBalancer, this.application);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
public setSessionAffinity(viewState: ViewState): void {
|
|
195
|
+
this.loadBalancer.backendService.sessionAffinity = this.sessionAffinityViewToModelMap[viewState.sessionAffinity];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
public submit(): void {
|
|
199
|
+
const descriptor = this.isNew ? 'Create' : 'Update';
|
|
200
|
+
const toSubmitLoadBalancer = _.cloneDeep(this.loadBalancer) as ITcpLoadBalancerUpsertDescription;
|
|
201
|
+
toSubmitLoadBalancer.name = toSubmitLoadBalancer.loadBalancerName;
|
|
202
|
+
toSubmitLoadBalancer.backendService.name = toSubmitLoadBalancer.loadBalancerName;
|
|
203
|
+
toSubmitLoadBalancer.cloudProvider = 'gce';
|
|
204
|
+
delete toSubmitLoadBalancer.instances;
|
|
205
|
+
|
|
206
|
+
this.taskMonitor.submit(() =>
|
|
207
|
+
LoadBalancerWriter.upsertLoadBalancer(toSubmitLoadBalancer, this.application, descriptor, {
|
|
208
|
+
healthCheck: {},
|
|
209
|
+
}),
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
private initializeEditMode(): void {
|
|
214
|
+
this.loadBalancer.portRange = this.loadBalancer.portRange.split('-')[0];
|
|
215
|
+
this.viewState = new ViewState(
|
|
216
|
+
this.sessionAffinityModelToViewMap[this.loadBalancer.backendService.sessionAffinity],
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export const GCE_TCP_LOAD_BALANCER_CTRL = 'spinnaker.gce.tcpLoadBalancer.controller';
|
|
222
|
+
|
|
223
|
+
module(GCE_TCP_LOAD_BALANCER_CTRL, [
|
|
224
|
+
GCE_HEALTH_CHECK_SELECTOR_COMPONENT,
|
|
225
|
+
GCE_COMMON_LOAD_BALANCER_COMMAND_BUILDER,
|
|
226
|
+
]).controller('gceTcpLoadBalancerCtrl', TcpLoadBalancerCtrl);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<div class="container-fluid form-horizontal">
|
|
2
|
+
<ng-form name="listenerForm">
|
|
3
|
+
<div class="form-group">
|
|
4
|
+
<div class="col-md-4 sm-label-right">Port</div>
|
|
5
|
+
<div class="col-md-4">
|
|
6
|
+
<select
|
|
7
|
+
class="form-control input-sm"
|
|
8
|
+
ng-options="port for port in ctrl.portOptions"
|
|
9
|
+
ng-disabled="!ctrl.isNew"
|
|
10
|
+
ng-model="ctrl.loadBalancer.portRange"
|
|
11
|
+
></select>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</ng-form>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { module } from 'angular';
|
|
2
|
+
|
|
3
|
+
const gceBackendServiceDetailsComponent: ng.IComponentOptions = {
|
|
4
|
+
bindings: {
|
|
5
|
+
backendService: '<',
|
|
6
|
+
},
|
|
7
|
+
template: `
|
|
8
|
+
<dt>Name</dt>
|
|
9
|
+
<dd>{{$ctrl.backendService.name}}</dd>
|
|
10
|
+
<dt>Health Check</dt>
|
|
11
|
+
<dd>{{$ctrl.backendService.healthCheck.name}}</dd>
|
|
12
|
+
<dt ng-if="$ctrl.backendService.sessionAffinity">Session Affinity</dt>
|
|
13
|
+
<dd ng-if="$ctrl.backendService.sessionAffinity">{{$ctrl.backendService.sessionAffinity | gceSessionAffinityFilter}}</dd>
|
|
14
|
+
<dt ng-if="$ctrl.backendService.sessionAffinity === 'GENERATED_COOKIE'">Affinity Cookie TTL</dt>
|
|
15
|
+
<dd ng-if="$ctrl.backendService.sessionAffinity === 'GENERATED_COOKIE'">{{$ctrl.backendService.affinityCookieTtlSec}}</dd>`,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const GCE_BACKEND_SERVICE_DETAILS_COMPONENT =
|
|
19
|
+
'spinnaker.gce.loadBalancer.details.backendServiceDetails.component';
|
|
20
|
+
module(GCE_BACKEND_SERVICE_DETAILS_COMPONENT, []).component(
|
|
21
|
+
'gceBackendServiceDetails',
|
|
22
|
+
gceBackendServiceDetailsComponent,
|
|
23
|
+
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { module } from 'angular';
|
|
2
|
+
import { sessionAffinityModelToViewMap } from '../../configure/common/sessionAffinityNameMaps';
|
|
3
|
+
|
|
4
|
+
function gceSessionAffinityFilter() {
|
|
5
|
+
return function (modelValue: string): string {
|
|
6
|
+
return sessionAffinityModelToViewMap[modelValue] || modelValue;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const SESSION_AFFINITY_FILTER = 'spinnaker.gce.loadBalancer.details.sessionAffinity.filter';
|
|
11
|
+
module(SESSION_AFFINITY_FILTER, []).filter('gceSessionAffinityFilter', gceSessionAffinityFilter);
|