@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,57 @@
|
|
|
1
|
+
<ng-form name="backendServices">
|
|
2
|
+
<div class="col-md-12" ng-if="ctrl.command.getUnusedBackendServices(ctrl.command).length">
|
|
3
|
+
<div class="alert alert-warning">
|
|
4
|
+
<p>
|
|
5
|
+
<i class="fa fa-exclamation-triangle"></i>
|
|
6
|
+
The following backend services have not been associated with a host or path rule, or set as this load balancer's
|
|
7
|
+
default service:
|
|
8
|
+
</p>
|
|
9
|
+
<ul>
|
|
10
|
+
<li ng-repeat="service in ctrl.command.getUnusedBackendServices(ctrl.command)" ng-bind-html="service"></li>
|
|
11
|
+
</ul>
|
|
12
|
+
<p class="text-right">
|
|
13
|
+
<a
|
|
14
|
+
class="btn btn-sm btn-default dirty-flag-dismiss"
|
|
15
|
+
href
|
|
16
|
+
ng-click="ctrl.command.removeUnusedBackendServices(ctrl.command)"
|
|
17
|
+
>Remove backend services</a
|
|
18
|
+
>
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
class="col-md-12"
|
|
24
|
+
ng-if="!ctrl.command.loadBalancer.backendServices.length && !ctrl.command.backingData.backendServices.length"
|
|
25
|
+
>
|
|
26
|
+
<div class="alert alert-warning">
|
|
27
|
+
<p>
|
|
28
|
+
<i class="fa fa-exclamation-triangle"></i>
|
|
29
|
+
You have not configured any backend services.
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<gce-http-load-balancer-backend-service-selector
|
|
34
|
+
ng-repeat="backendService in ctrl.command.loadBalancer.backendServices"
|
|
35
|
+
backend-service="backendService"
|
|
36
|
+
index="$index"
|
|
37
|
+
command="ctrl.command"
|
|
38
|
+
delete-service="ctrl.remove('backendServices', $index)"
|
|
39
|
+
>
|
|
40
|
+
</gce-http-load-balancer-backend-service-selector>
|
|
41
|
+
<div class="row">
|
|
42
|
+
<div class="col-md-12">
|
|
43
|
+
<button class="add-new btn btn-block" ng-click="ctrl.add('backendServices')">
|
|
44
|
+
<span class="glyphicon glyphicon-plus-sign"></span> Add backend service
|
|
45
|
+
</button>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="form-group small" style="margin-top: 20px">
|
|
49
|
+
<div class="col-md-offset-2 col-md-6">
|
|
50
|
+
<gce-cache-refresh
|
|
51
|
+
cache-key="backendServices"
|
|
52
|
+
cache-key-alias="backend services"
|
|
53
|
+
on-refresh="ctrl.command.onBackendServiceRefresh(ctrl.command)"
|
|
54
|
+
></gce-cache-refresh>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</ng-form>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<div class="container-fluid form-horizontal">
|
|
2
|
+
<ng-form name="basicSettings">
|
|
3
|
+
<div class="modal-body">
|
|
4
|
+
<div class="form-group">
|
|
5
|
+
<div
|
|
6
|
+
class="col-md-12 well"
|
|
7
|
+
ng-class="{
|
|
8
|
+
'alert-danger': basicSettings.urlMapName.$error.validateUnique,
|
|
9
|
+
'alert-info': !basicSettings.urlMapName.$error.validateUnique
|
|
10
|
+
}"
|
|
11
|
+
>
|
|
12
|
+
<strong>Your load balancer will be named:</strong>
|
|
13
|
+
<span>{{ $ctrl.getName($ctrl.loadBalancer, $ctrl.application.name) }}</span>
|
|
14
|
+
<!-- Angular does not seem to run length validation on hidden inputs, hence the text + display:none -->
|
|
15
|
+
<input
|
|
16
|
+
type="text"
|
|
17
|
+
style="display: none"
|
|
18
|
+
ng-maxlength="63"
|
|
19
|
+
class="form-control input-sm"
|
|
20
|
+
ng-model="$ctrl.loadBalancer.urlMapName"
|
|
21
|
+
validate-unique="$ctrl.existingLoadBalancerNames"
|
|
22
|
+
validate-ignore-case="true"
|
|
23
|
+
name="urlMapName"
|
|
24
|
+
/>
|
|
25
|
+
<validation-error
|
|
26
|
+
ng-if="basicSettings.urlMapName.$error.validateUnique"
|
|
27
|
+
message="There is already a load balancer in {{ $ctrl.loadBalancer.credentials }} with that name."
|
|
28
|
+
>
|
|
29
|
+
</validation-error>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="form-group">
|
|
33
|
+
<div class="col-md-2 sm-label-right">Account</div>
|
|
34
|
+
<div class="col-md-8">
|
|
35
|
+
<account-select-field
|
|
36
|
+
component="$ctrl.loadBalancer"
|
|
37
|
+
field="credentials"
|
|
38
|
+
accounts="$ctrl.accounts"
|
|
39
|
+
provider="'gce'"
|
|
40
|
+
on-change="$ctrl.accountChanged($ctrl.loadBalancer.credentials)"
|
|
41
|
+
>
|
|
42
|
+
</account-select-field>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<gce-region-select-field
|
|
46
|
+
ng-if="$ctrl.loadBalancer.loadBalancerType === 'INTERNAL_MANAGED'"
|
|
47
|
+
label-columns="2"
|
|
48
|
+
field-columns="8"
|
|
49
|
+
component="$ctrl.loadBalancer"
|
|
50
|
+
field="region"
|
|
51
|
+
account="$ctrl.loadBalancer.credentials"
|
|
52
|
+
on-change="$ctrl.command.onRegionSelected($ctrl.command)"
|
|
53
|
+
regions="$ctrl.command.backingData.regions"
|
|
54
|
+
></gce-region-select-field>
|
|
55
|
+
<gce-network-select-field
|
|
56
|
+
ng-if="$ctrl.loadBalancer.loadBalancerType === 'INTERNAL_MANAGED'"
|
|
57
|
+
label-columns="2"
|
|
58
|
+
field-columns="8"
|
|
59
|
+
component="$ctrl.loadBalancer"
|
|
60
|
+
field="network"
|
|
61
|
+
helpKey="gce.internalHttpLoadBalancer.network"
|
|
62
|
+
account="$ctrl.loadBalancer.credentials"
|
|
63
|
+
networks="$ctrl.command.backingData.internalHttpLbNetworks"
|
|
64
|
+
></gce-network-select-field>
|
|
65
|
+
|
|
66
|
+
<div class="form-group">
|
|
67
|
+
<div class="col-md-2 sm-label-right">Stack <help-field key="aws.loadBalancer.stack"></help-field></div>
|
|
68
|
+
<div class="col-md-3">
|
|
69
|
+
<input
|
|
70
|
+
type="text"
|
|
71
|
+
class="form-control input-sm"
|
|
72
|
+
ng-model="$ctrl.loadBalancer.stack"
|
|
73
|
+
name="stackName"
|
|
74
|
+
ng-change="$ctrl.updateName($ctrl.loadBalancer, $ctrl.application.name)"
|
|
75
|
+
ng-pattern="/^[a-z0-9]*$/"
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="col-md-2 sm-label-right">Detail<help-field key="gce.loadBalancer.detail"></help-field></div>
|
|
79
|
+
<div class="col-md-3">
|
|
80
|
+
<input
|
|
81
|
+
type="text"
|
|
82
|
+
class="form-control input-sm"
|
|
83
|
+
ng-model="$ctrl.loadBalancer.detail"
|
|
84
|
+
name="detailName"
|
|
85
|
+
ng-change="$ctrl.updateName($ctrl.loadBalancer, $ctrl.application.name)"
|
|
86
|
+
ng-pattern="/^[a-z0-9-]*$/"
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="col-md-7 col-md-offset-3" ng-if="basicSettings.stackName.$error.pattern">
|
|
90
|
+
<validation-error message="Stack can only contain lowercase letters and numbers."></validation-error>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="col-md-7 col-md-offset-3" ng-if="basicSettings.detailName.$error.pattern">
|
|
93
|
+
<validation-error
|
|
94
|
+
message="Detail can only contain lowercase letters, numbers, and dashes(-)."
|
|
95
|
+
></validation-error>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="form-group">
|
|
99
|
+
<div class="col-md-9 col-md-offset-3" ng-if="basicSettings.urlMapName.$error.maxlength">
|
|
100
|
+
<validation-error message="Load Balancer name can only be 63 characters."></validation-error>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</ng-form>
|
|
105
|
+
</div>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
import _ from 'lodash';
|
|
5
|
+
|
|
6
|
+
export const GOOGLE_LOADBALANCER_CONFIGURE_HTTP_BASICSETTINGS_BASICSETTINGS_COMPONENT =
|
|
7
|
+
'spinnaker.deck.gce.httpLoadBalancer.basicSettings.component';
|
|
8
|
+
export const name = GOOGLE_LOADBALANCER_CONFIGURE_HTTP_BASICSETTINGS_BASICSETTINGS_COMPONENT; // for backwards compatibility
|
|
9
|
+
module(GOOGLE_LOADBALANCER_CONFIGURE_HTTP_BASICSETTINGS_BASICSETTINGS_COMPONENT, []).component(
|
|
10
|
+
'gceHttpLoadBalancerBasicSettings',
|
|
11
|
+
{
|
|
12
|
+
bindings: {
|
|
13
|
+
command: '=',
|
|
14
|
+
application: '=',
|
|
15
|
+
},
|
|
16
|
+
templateUrl: require('./basicSettings.component.html'),
|
|
17
|
+
controller: function () {
|
|
18
|
+
this.$onInit = () => {
|
|
19
|
+
const c = this.command;
|
|
20
|
+
this.loadBalancer = c.loadBalancer;
|
|
21
|
+
this.accounts = c.backingData.accounts;
|
|
22
|
+
const loadBalancerMap = c.backingData.loadBalancerMap;
|
|
23
|
+
|
|
24
|
+
this.getName = (loadBalancer, applicationName) => {
|
|
25
|
+
const loadBalancerName = [applicationName, loadBalancer.stack || '', loadBalancer.detail || ''].join('-');
|
|
26
|
+
return _.trimEnd(loadBalancerName, '-');
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
this.updateName = (lb, appName) => {
|
|
30
|
+
lb.urlMapName = this.getName(lb, appName);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
this.accountChanged = (account) => {
|
|
34
|
+
this.existingLoadBalancerNames = _.get(loadBalancerMap, [account, 'urlMapNames']) || [];
|
|
35
|
+
c.onAccountChange(c);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
if (!this.loadBalancer.name) {
|
|
39
|
+
this.updateName(this.loadBalancer, this.application.name);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
this.existingLoadBalancerNames = _.get(loadBalancerMap, [this.loadBalancer.credentials, 'urlMapNames']) || [];
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
);
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
import _ from 'lodash';
|
|
5
|
+
|
|
6
|
+
import { AccountService, LOAD_BALANCER_READ_SERVICE, NetworkReader, SubnetReader } from '@spinnaker/core';
|
|
7
|
+
|
|
8
|
+
import { GCE_ADDRESS_READER } from '../../../address/address.reader';
|
|
9
|
+
import { GOOGLE_BACKENDSERVICE_BACKENDSERVICE_READER } from '../../../backendService/backendService.reader';
|
|
10
|
+
import { GCE_CERTIFICATE_READER } from '../../../certificate/certificate.reader';
|
|
11
|
+
import { sessionAffinityModelToViewMap } from '../common/sessionAffinityNameMaps';
|
|
12
|
+
import { GOOGLE_COMMON_XPNNAMING_GCE_SERVICE } from '../../../common/xpnNaming.gce.service';
|
|
13
|
+
import { GCEProviderSettings } from '../../../gce.settings';
|
|
14
|
+
import { GCE_HEALTH_CHECK_READER } from '../../../healthCheck/healthCheck.read.service';
|
|
15
|
+
import { GCE_HTTP_LOAD_BALANCER_UTILS } from '../../httpLoadBalancerUtils.service';
|
|
16
|
+
import { HttpLoadBalancerTemplate, ListenerTemplate } from './templates';
|
|
17
|
+
import { GOOGLE_LOADBALANCER_CONFIGURE_HTTP_TRANSFORMER_SERVICE } from './transformer.service';
|
|
18
|
+
|
|
19
|
+
export const GOOGLE_LOADBALANCER_CONFIGURE_HTTP_COMMANDBUILDER_SERVICE =
|
|
20
|
+
'spinnaker.deck.gce.httpLoadBalancer.backing.service';
|
|
21
|
+
export const name = GOOGLE_LOADBALANCER_CONFIGURE_HTTP_COMMANDBUILDER_SERVICE; // for backwards compatibility
|
|
22
|
+
module(GOOGLE_LOADBALANCER_CONFIGURE_HTTP_COMMANDBUILDER_SERVICE, [
|
|
23
|
+
GOOGLE_BACKENDSERVICE_BACKENDSERVICE_READER,
|
|
24
|
+
GCE_CERTIFICATE_READER,
|
|
25
|
+
LOAD_BALANCER_READ_SERVICE,
|
|
26
|
+
GCE_HTTP_LOAD_BALANCER_UTILS,
|
|
27
|
+
GCE_ADDRESS_READER,
|
|
28
|
+
GCE_HEALTH_CHECK_READER,
|
|
29
|
+
GOOGLE_LOADBALANCER_CONFIGURE_HTTP_TRANSFORMER_SERVICE,
|
|
30
|
+
GOOGLE_COMMON_XPNNAMING_GCE_SERVICE,
|
|
31
|
+
]).factory('gceHttpLoadBalancerCommandBuilder', [
|
|
32
|
+
'$q',
|
|
33
|
+
'gceHttpLoadBalancerUtils',
|
|
34
|
+
'gceBackendServiceReader',
|
|
35
|
+
'gceCertificateReader',
|
|
36
|
+
'gceHealthCheckReader',
|
|
37
|
+
'gceHttpLoadBalancerTransformer',
|
|
38
|
+
'loadBalancerReader',
|
|
39
|
+
'gceAddressReader',
|
|
40
|
+
'gceXpnNamingService',
|
|
41
|
+
function (
|
|
42
|
+
$q,
|
|
43
|
+
gceHttpLoadBalancerUtils,
|
|
44
|
+
gceBackendServiceReader,
|
|
45
|
+
gceCertificateReader,
|
|
46
|
+
gceHealthCheckReader,
|
|
47
|
+
gceHttpLoadBalancerTransformer,
|
|
48
|
+
loadBalancerReader,
|
|
49
|
+
gceAddressReader,
|
|
50
|
+
gceXpnNamingService,
|
|
51
|
+
) {
|
|
52
|
+
function buildCommand({ originalLoadBalancer, isNew, isInternal }) {
|
|
53
|
+
originalLoadBalancer = _.cloneDeep(originalLoadBalancer);
|
|
54
|
+
|
|
55
|
+
return buildBackingDataAndLoadBalancer(originalLoadBalancer, isNew, isInternal).then(
|
|
56
|
+
({ backingData, loadBalancer }) => {
|
|
57
|
+
return {
|
|
58
|
+
backingData,
|
|
59
|
+
getAllBackendServices,
|
|
60
|
+
isNew,
|
|
61
|
+
loadBalancer,
|
|
62
|
+
onAccountChange,
|
|
63
|
+
onBackendServiceRefresh,
|
|
64
|
+
onBackendServiceSelected,
|
|
65
|
+
onRegionSelected,
|
|
66
|
+
onCertificateRefresh,
|
|
67
|
+
onHealthCheckRefresh,
|
|
68
|
+
onHealthCheckSelected,
|
|
69
|
+
getUnusedBackendServices,
|
|
70
|
+
removeUnusedBackendServices,
|
|
71
|
+
getUnusedHealthChecks,
|
|
72
|
+
removeUnusedHealthChecks,
|
|
73
|
+
onAddressRefresh,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function buildBackingDataAndLoadBalancer(originalLoadBalancer, isNew, isInternal) {
|
|
80
|
+
let region = null;
|
|
81
|
+
if (isInternal) {
|
|
82
|
+
region = originalLoadBalancer ? originalLoadBalancer.region : GCEProviderSettings.defaults.region;
|
|
83
|
+
}
|
|
84
|
+
return buildBackingData(region).then((backingData) => {
|
|
85
|
+
const loadBalancer = buildLoadBalancer(isNew, originalLoadBalancer, isInternal);
|
|
86
|
+
|
|
87
|
+
unifyDataSources(backingData, loadBalancer);
|
|
88
|
+
|
|
89
|
+
return { backingData, loadBalancer };
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function buildBackingData(region) {
|
|
94
|
+
const promises = {
|
|
95
|
+
backendServices: getBackendServices(region),
|
|
96
|
+
healthChecks: getHealthChecks(region),
|
|
97
|
+
certificates: getCertificates(),
|
|
98
|
+
loadBalancerMap: getLoadBalancerMap(region),
|
|
99
|
+
networks: getNetworks(),
|
|
100
|
+
subnets: SubnetReader.listSubnetsByProvider('gce'),
|
|
101
|
+
addresses: gceAddressReader.listAddresses(region),
|
|
102
|
+
accounts: getAccounts(),
|
|
103
|
+
};
|
|
104
|
+
return $q.all(promises);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function buildLoadBalancer(isNew, loadBalancer, isInternal) {
|
|
108
|
+
const loadBalancerTemplate = new HttpLoadBalancerTemplate(GCEProviderSettings.defaults.account || null);
|
|
109
|
+
if (isInternal) {
|
|
110
|
+
loadBalancerTemplate.loadBalancerType = 'INTERNAL_MANAGED';
|
|
111
|
+
loadBalancerTemplate.isInternal = true;
|
|
112
|
+
if (loadBalancer) {
|
|
113
|
+
loadBalancer.network = gceXpnNamingService.decorateXpnResourceIfNecessary(
|
|
114
|
+
loadBalancer.project,
|
|
115
|
+
loadBalancer.network,
|
|
116
|
+
);
|
|
117
|
+
loadBalancer.listeners.forEach((listener) => {
|
|
118
|
+
listener.subnet = gceXpnNamingService.decorateXpnResourceIfNecessary(loadBalancer.project, listener.subnet);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
loadBalancerTemplate.region = GCEProviderSettings.defaults.region;
|
|
122
|
+
loadBalancerTemplate.network = 'default';
|
|
123
|
+
} else {
|
|
124
|
+
loadBalancerTemplate.loadBalancerType = 'HTTP';
|
|
125
|
+
loadBalancerTemplate.isInternal = false;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
let mixinData;
|
|
129
|
+
if (isNew) {
|
|
130
|
+
mixinData = {
|
|
131
|
+
backendServices: [],
|
|
132
|
+
listeners: [new ListenerTemplate()],
|
|
133
|
+
healthChecks: [],
|
|
134
|
+
};
|
|
135
|
+
} else {
|
|
136
|
+
mixinData = gceHttpLoadBalancerTransformer.deserialize(loadBalancer);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const loadBalancerData = _.assign(loadBalancerTemplate, mixinData);
|
|
140
|
+
return loadBalancerData;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function unifyDataSources(backingData, loadBalancer) {
|
|
144
|
+
setAccount(backingData.accounts, loadBalancer);
|
|
145
|
+
removeExistingListenersFromBackingData(backingData, loadBalancer.listeners);
|
|
146
|
+
|
|
147
|
+
// update backing data with any values coming from load balancer -- they are more up to date.
|
|
148
|
+
const lbHealthCheckMap = _.keyBy(loadBalancer.healthChecks, 'name');
|
|
149
|
+
const backingDataHealthCheckMap = _.keyBy(backingData.healthChecks, 'name');
|
|
150
|
+
|
|
151
|
+
backingData.healthChecksKeyedByName = _.assign(backingDataHealthCheckMap, _.cloneDeep(lbHealthCheckMap));
|
|
152
|
+
backingData.healthChecksKeyedByNameCopy = _.cloneDeep(backingDataHealthCheckMap);
|
|
153
|
+
backingData.healthChecks = _.map(backingDataHealthCheckMap, _.identity);
|
|
154
|
+
|
|
155
|
+
const lbBackendServicesMap = _.keyBy(loadBalancer.backendServices, 'name');
|
|
156
|
+
const backingDataBackendServiceMap = _.keyBy(backingData.backendServices, 'name');
|
|
157
|
+
|
|
158
|
+
backingData.backendServicesKeyedByName = _.assign(
|
|
159
|
+
backingDataBackendServiceMap,
|
|
160
|
+
_.cloneDeep(lbBackendServicesMap),
|
|
161
|
+
);
|
|
162
|
+
backingData.backendServicesKeyedByNameCopy = _.cloneDeep(backingDataBackendServiceMap);
|
|
163
|
+
backingData.backendServices = _.map(backingDataBackendServiceMap, _.identity);
|
|
164
|
+
|
|
165
|
+
backingData.regions = backingData.accounts
|
|
166
|
+
.find((account) => account.name === loadBalancer.credentials)
|
|
167
|
+
.regions.map((region) => region.name);
|
|
168
|
+
|
|
169
|
+
backingData.subnetMap = _.groupBy(backingData.subnets, 'network');
|
|
170
|
+
backingData.internalHttpLbNetworks = backingData.networks.filter((network) =>
|
|
171
|
+
backingData.subnetMap[network].find((subnet) => subnet.purpose === 'INTERNAL_HTTPS_LOAD_BALANCER'),
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function removeExistingListenersFromBackingData(backingData, existingListeners) {
|
|
176
|
+
const accountNames = backingData.accounts.map((account) => account.name);
|
|
177
|
+
|
|
178
|
+
accountNames.forEach((accountName) => {
|
|
179
|
+
if (_.has(backingData, ['loadBalancerMap', accountName, 'listeners'])) {
|
|
180
|
+
backingData.loadBalancerMap[accountName].listeners = _.without(
|
|
181
|
+
backingData.loadBalancerMap[accountName].listeners,
|
|
182
|
+
...existingListeners.map((listener) => listener.name),
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function setAccount(accounts, loadBalancerData) {
|
|
189
|
+
const accountNames = _.map(accounts, 'name');
|
|
190
|
+
const credentials = _.get(loadBalancerData, 'credentials.name') || loadBalancerData.credentials;
|
|
191
|
+
|
|
192
|
+
if (!accountNames.includes(credentials)) {
|
|
193
|
+
loadBalancerData.credentials = _.first(accountNames);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function getHealthChecks(region) {
|
|
198
|
+
return gceHealthCheckReader.listHealthChecks().then((healthChecks) => {
|
|
199
|
+
return healthChecks.filter((healthCheck) => !region || healthCheck.region === region);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function getNetworks() {
|
|
204
|
+
return NetworkReader.listNetworksByProvider('gce').then((networks) => {
|
|
205
|
+
return _.chain(networks).map('name').compact().uniq().value();
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function getBackendServices(region) {
|
|
210
|
+
const kind = region ? 'regionBackendService' : 'globalBackendService';
|
|
211
|
+
return gceBackendServiceReader.listBackendServices(kind).then((backendServices) => {
|
|
212
|
+
backendServices = backendServices.filter((backendService) => !region || backendService.region === region);
|
|
213
|
+
backendServices.forEach((service) => {
|
|
214
|
+
service.healthCheck = service.healthCheckLink.split('/').pop();
|
|
215
|
+
|
|
216
|
+
const ttlIsDefined = typeof service.affinityCookieTtlSec === 'string';
|
|
217
|
+
service.affinityCookieTtlSec = ttlIsDefined ? Number(service.affinityCookieTtlSec) : null;
|
|
218
|
+
|
|
219
|
+
service.sessionAffinity = sessionAffinityModelToViewMap[service.sessionAffinity] || service.sessionAffinity;
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
return backendServices;
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function getCertificates() {
|
|
227
|
+
return gceCertificateReader.listCertificates();
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function getAccounts() {
|
|
231
|
+
return AccountService.listAccounts('gce');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function getLoadBalancerMap(region) {
|
|
235
|
+
return loadBalancerReader.listLoadBalancers('gce').then((lbs) => {
|
|
236
|
+
return _.chain(lbs)
|
|
237
|
+
.map((lb) => lb.accounts)
|
|
238
|
+
.flatten()
|
|
239
|
+
.groupBy('name')
|
|
240
|
+
.mapValues((accounts) => {
|
|
241
|
+
const loadBalancers = _.chain(accounts)
|
|
242
|
+
.map((a) => a.regions)
|
|
243
|
+
.flatten()
|
|
244
|
+
.filter((region) => region.name === (region || gceHttpLoadBalancerUtils.REGION))
|
|
245
|
+
.map((region) => region.loadBalancers)
|
|
246
|
+
.flatten()
|
|
247
|
+
.value();
|
|
248
|
+
|
|
249
|
+
const urlMapNames = _.chain(loadBalancers).map('urlMapName').uniq().value();
|
|
250
|
+
const listeners = _.chain(loadBalancers).map('name').uniq().value();
|
|
251
|
+
|
|
252
|
+
return { urlMapNames, listeners };
|
|
253
|
+
})
|
|
254
|
+
.valueOf();
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function onHealthCheckRefresh(command) {
|
|
259
|
+
getHealthChecks(command.loadBalancer.region).then((healthChecks) => {
|
|
260
|
+
command.backingData.healthChecks = healthChecks;
|
|
261
|
+
command.backingData.healthChecksKeyedByName = _.keyBy(healthChecks, 'name');
|
|
262
|
+
command.backingData.healthChecksKeyedByNameCopy = _.cloneDeep(command.backingData.healthChecksKeyedByName);
|
|
263
|
+
|
|
264
|
+
command.loadBalancer.healthChecks = command.loadBalancer.healthChecks.map((hc) => {
|
|
265
|
+
const updated = command.backingData.healthChecksKeyedByName[_.get(hc, 'name')];
|
|
266
|
+
if (updated) {
|
|
267
|
+
return _.cloneDeep(updated);
|
|
268
|
+
} else {
|
|
269
|
+
return hc;
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
function onCertificateRefresh(command) {
|
|
276
|
+
getCertificates().then((certificates) => {
|
|
277
|
+
command.backingData.certificates = certificates;
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function onBackendServiceRefresh(command) {
|
|
282
|
+
getBackendServices(command.loadBalancer.region).then((backendServices) => {
|
|
283
|
+
command.backingData.backendServices = backendServices;
|
|
284
|
+
command.backingData.backendServicesKeyedByName = _.keyBy(backendServices, 'name');
|
|
285
|
+
command.backingData.backendServicesKeyedByNameCopy = _.cloneDeep(
|
|
286
|
+
command.backingData.backendServicesKeyedByName,
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
command.loadBalancer.backendServices = command.loadBalancer.backendServices.map((service) => {
|
|
290
|
+
const updated = command.backingData.backendServicesKeyedByName[_.get(service, 'name')];
|
|
291
|
+
if (updated) {
|
|
292
|
+
return _.cloneDeep(updated);
|
|
293
|
+
} else {
|
|
294
|
+
return service;
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
function onRegionSelected(command) {
|
|
301
|
+
buildBackingData(command.loadBalancer.region).then((backingData) => {
|
|
302
|
+
Object.assign(command.backingData, backingData);
|
|
303
|
+
unifyDataSources(command.backingData, command.loadBalancer);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function onHealthCheckSelected(selectedName, command) {
|
|
308
|
+
if (!command.loadBalancer.healthChecks.find((hc) => _.get(hc, 'name') === selectedName)) {
|
|
309
|
+
const selectedObject = command.backingData.healthChecksKeyedByName[selectedName];
|
|
310
|
+
if (selectedObject) {
|
|
311
|
+
command.loadBalancer.healthChecks.push(selectedObject);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
function onBackendServiceSelected(selectedName, command) {
|
|
317
|
+
if (!command.loadBalancer.backendServices.find((service) => service.name === selectedName)) {
|
|
318
|
+
const selectedObject = command.backingData.backendServicesKeyedByName[selectedName];
|
|
319
|
+
command.loadBalancer.backendServices.push(selectedObject);
|
|
320
|
+
if (selectedObject.healthCheck) {
|
|
321
|
+
onHealthCheckSelected(selectedObject.healthCheck, command);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
function getAllBackendServices(command) {
|
|
327
|
+
const allBackendServices = command.loadBalancer.backendServices.concat(command.backingData.backendServices);
|
|
328
|
+
return _.chain(allBackendServices)
|
|
329
|
+
.filter((service) => {
|
|
330
|
+
return (
|
|
331
|
+
service.account === command.loadBalancer.credentials || service.account === command.loadBalancer.account
|
|
332
|
+
);
|
|
333
|
+
})
|
|
334
|
+
.map('name')
|
|
335
|
+
.compact()
|
|
336
|
+
.uniq()
|
|
337
|
+
.value();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
function getUnusedHealthChecks(command) {
|
|
341
|
+
return _.chain(command.loadBalancer.healthChecks)
|
|
342
|
+
.map('name')
|
|
343
|
+
.difference(_.map(command.loadBalancer.backendServices, 'healthCheck'))
|
|
344
|
+
.compact()
|
|
345
|
+
.uniq()
|
|
346
|
+
.value();
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
function getUnusedBackendServices(command) {
|
|
350
|
+
const defaultService = command.loadBalancer.defaultService;
|
|
351
|
+
const hostRuleServices = _.map(command.loadBalancer.hostRules, 'pathMatcher.defaultService');
|
|
352
|
+
const pathRuleServices = _.chain(command.loadBalancer.hostRules)
|
|
353
|
+
.map('pathMatcher.pathRules')
|
|
354
|
+
.flatten()
|
|
355
|
+
.map('backendService')
|
|
356
|
+
.value();
|
|
357
|
+
|
|
358
|
+
const usedServices = _.chain([defaultService, ...hostRuleServices, ...pathRuleServices])
|
|
359
|
+
.compact()
|
|
360
|
+
.uniq()
|
|
361
|
+
.value();
|
|
362
|
+
|
|
363
|
+
return _.chain(command.loadBalancer.backendServices)
|
|
364
|
+
.map('name')
|
|
365
|
+
.difference(usedServices)
|
|
366
|
+
.compact()
|
|
367
|
+
.uniq()
|
|
368
|
+
.value();
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
function removeUnusedBackendServices(command) {
|
|
372
|
+
const unusedBackendServices = getUnusedBackendServices(command);
|
|
373
|
+
command.loadBalancer.backendServices = command.loadBalancer.backendServices.filter(
|
|
374
|
+
(service) => !unusedBackendServices.includes(service.name),
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
function removeUnusedHealthChecks(command) {
|
|
379
|
+
const unusedHealthChecks = getUnusedHealthChecks(command);
|
|
380
|
+
command.loadBalancer.healthChecks = command.loadBalancer.healthChecks.filter(
|
|
381
|
+
(healthCheck) => !unusedHealthChecks.includes(healthCheck.name),
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
function onAccountChange(command) {
|
|
386
|
+
command.loadBalancer.backendServices = [];
|
|
387
|
+
command.loadBalancer.healthChecks = [];
|
|
388
|
+
command.loadBalancer.hostRules = [];
|
|
389
|
+
command.loadBalancer.listeners = [new ListenerTemplate()];
|
|
390
|
+
command.loadBalancer.defaultService = null;
|
|
391
|
+
command.backingData.regions = command.backingData.accounts
|
|
392
|
+
.find((account) => account.name === command.loadBalancer.credentials)
|
|
393
|
+
.regions.map((region) => region.name);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
function onAddressRefresh(command) {
|
|
397
|
+
gceAddressReader.listAddresses('global').then((addresses) => {
|
|
398
|
+
command.backingData.addresses = addresses;
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
return { buildCommand };
|
|
403
|
+
},
|
|
404
|
+
]);
|