@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,42 @@
|
|
|
1
|
+
<div class="form-group">
|
|
2
|
+
<div class="col-md-12">
|
|
3
|
+
<p>Sets min, max, and desired instance counts for this server group's autoscaling policy.</p>
|
|
4
|
+
</div>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="form-group">
|
|
7
|
+
<div class="col-md-2 col-md-offset-3">Min</div>
|
|
8
|
+
<div class="col-md-2">Max</div>
|
|
9
|
+
<div class="col-md-2">Desired</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="form-group">
|
|
12
|
+
<div class="col-md-3 sm-label-right">Capacity</div>
|
|
13
|
+
<div class="col-md-2">
|
|
14
|
+
<input
|
|
15
|
+
type="number"
|
|
16
|
+
class="form-control input-sm"
|
|
17
|
+
ng-model="$ctrl.command.autoscalingPolicy.minNumReplicas"
|
|
18
|
+
min="0"
|
|
19
|
+
max="{{ $ctrl.command.autoscalingPolicy.maxNumReplicas }}"
|
|
20
|
+
required
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="col-md-2">
|
|
24
|
+
<input
|
|
25
|
+
type="number"
|
|
26
|
+
class="form-control input-sm"
|
|
27
|
+
ng-model="$ctrl.command.autoscalingPolicy.maxNumReplicas"
|
|
28
|
+
min="{{ $ctrl.command.autoscalingPolicy.minNumReplicas }}"
|
|
29
|
+
required
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="col-md-2">
|
|
33
|
+
<input
|
|
34
|
+
type="number"
|
|
35
|
+
class="form-control input-sm"
|
|
36
|
+
ng-model="$ctrl.command.capacity.desired"
|
|
37
|
+
min="{{ $ctrl.command.autoscalingPolicy.minNumReplicas }}"
|
|
38
|
+
max="{{ $ctrl.command.autoscalingPolicy.maxNumReplicas }}"
|
|
39
|
+
required
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
export const GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_ADVANCEDCAPACITYSELECTOR_COMPONENT =
|
|
6
|
+
'spinnaker.deck.gce.serverGroup.configure.advancedCapacitySelector.component';
|
|
7
|
+
export const name = GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_ADVANCEDCAPACITYSELECTOR_COMPONENT; // for backwards compatibility
|
|
8
|
+
module(GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_ADVANCEDCAPACITYSELECTOR_COMPONENT, []).component(
|
|
9
|
+
'gceServerGroupAdvancedCapacitySelector',
|
|
10
|
+
{
|
|
11
|
+
bindings: {
|
|
12
|
+
command: '=',
|
|
13
|
+
},
|
|
14
|
+
templateUrl: require('./advancedCapacitySelector.component.html'),
|
|
15
|
+
},
|
|
16
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<ng-form name="capacitySubForm">
|
|
2
|
+
<div class="clearfix">
|
|
3
|
+
<div class="row">
|
|
4
|
+
<div class="col-md-12">
|
|
5
|
+
<gce-server-group-simple-capacity-selector
|
|
6
|
+
ng-if="command.viewState.useSimpleCapacity"
|
|
7
|
+
command="command"
|
|
8
|
+
></gce-server-group-simple-capacity-selector>
|
|
9
|
+
<gce-server-group-advanced-capacity-selector
|
|
10
|
+
ng-if="!command.viewState.useSimpleCapacity"
|
|
11
|
+
command="command"
|
|
12
|
+
></gce-server-group-advanced-capacity-selector>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</ng-form>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div class="form-group">
|
|
2
|
+
<div class="col-md-3 sm-label-right">Number of Instances</div>
|
|
3
|
+
<help-field key="gce.serverGroup.capacity"></help-field>
|
|
4
|
+
<div class="col-md-2">
|
|
5
|
+
<input
|
|
6
|
+
type="number"
|
|
7
|
+
ng-change="$ctrl.setMinMax($ctrl.command.capacity.desired)"
|
|
8
|
+
class="form-control input-sm"
|
|
9
|
+
ng-model="$ctrl.command.capacity.desired"
|
|
10
|
+
min="0"
|
|
11
|
+
required
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
export const GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_SIMPLECAPACITYSELECTOR_COMPONENT =
|
|
6
|
+
'spinnaker.google.serverGroup.configure.wizard.simpleCapacity.selector.component';
|
|
7
|
+
export const name = GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_SIMPLECAPACITYSELECTOR_COMPONENT; // for backwards compatibility
|
|
8
|
+
module(GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_SIMPLECAPACITYSELECTOR_COMPONENT, [])
|
|
9
|
+
.component('gceServerGroupSimpleCapacitySelector', {
|
|
10
|
+
templateUrl: require('./simpleCapacitySelector.component.html'),
|
|
11
|
+
bindings: {
|
|
12
|
+
command: '=',
|
|
13
|
+
setSimpleCapacity: '=',
|
|
14
|
+
},
|
|
15
|
+
controller: 'gceServerGroupSimpleCapacitySelectorCtrl',
|
|
16
|
+
})
|
|
17
|
+
.controller('gceServerGroupSimpleCapacitySelectorCtrl', function () {
|
|
18
|
+
this.setMinMax = (newVal) => {
|
|
19
|
+
this.command.capacity.min = newVal;
|
|
20
|
+
this.command.capacity.max = newVal;
|
|
21
|
+
};
|
|
22
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import * as angular from 'angular';
|
|
4
|
+
require('./simpleCapacitySelector.component.html');
|
|
5
|
+
|
|
6
|
+
describe('Directive: GCE Server Group Capacity Selector', function () {
|
|
7
|
+
beforeEach(window.module(require('./simpleCapacitySelector.component').name));
|
|
8
|
+
|
|
9
|
+
beforeEach(
|
|
10
|
+
window.inject(function ($rootScope, $compile) {
|
|
11
|
+
this.scope = $rootScope.$new();
|
|
12
|
+
this.scope.command = { capacity: {} };
|
|
13
|
+
this.elem = angular.element('<gce-server-group-simple-capacity-selector command="command" />');
|
|
14
|
+
this.element = $compile(this.elem)(this.scope);
|
|
15
|
+
this.scope.$digest();
|
|
16
|
+
}),
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
it('should correctly assign min/max/desired capacity to the same values', function () {
|
|
20
|
+
expect(this.scope.command.capacity.max).toBeUndefined();
|
|
21
|
+
expect(this.scope.command.capacity.desired).toBeUndefined();
|
|
22
|
+
expect(this.scope.command.capacity.min).toBeUndefined();
|
|
23
|
+
|
|
24
|
+
this.elem.find('input').val(3).trigger('input');
|
|
25
|
+
this.scope.$apply();
|
|
26
|
+
|
|
27
|
+
expect(this.scope.command.capacity.max).toEqual(3);
|
|
28
|
+
expect(this.scope.command.capacity.desired).toEqual(3);
|
|
29
|
+
expect(this.scope.command.capacity.min).toEqual(3);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<ng-form name="zonesSubForm">
|
|
2
|
+
<div class="container-fluid form-horizontal">
|
|
3
|
+
<gce-regional-selector command="command"></gce-regional-selector>
|
|
4
|
+
<gce-zone-selector command="command"></gce-zone-selector>
|
|
5
|
+
<gce-target-shape-selector command="command"></gce-target-shape-selector>
|
|
6
|
+
</div>
|
|
7
|
+
</ng-form>
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import UIROUTER_ANGULARJS from '@uirouter/angularjs';
|
|
4
|
+
import * as angular from 'angular';
|
|
5
|
+
import _, { isEmpty } from 'lodash';
|
|
6
|
+
|
|
7
|
+
import { FirewallLabels, INSTANCE_TYPE_SERVICE, ModalWizard, TaskMonitor } from '@spinnaker/core';
|
|
8
|
+
|
|
9
|
+
import { GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_HIDDENMETADATAKEYS_VALUE } from './hiddenMetadataKeys.value';
|
|
10
|
+
import { GOOGLE_INSTANCE_CUSTOM_CUSTOMINSTANCEBUILDER_GCE_SERVICE } from '../../../instance/custom/customInstanceBuilder.gce.service';
|
|
11
|
+
import { GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_SECURITYGROUPS_TAGMANAGER_SERVICE } from './securityGroups/tagManager.service';
|
|
12
|
+
|
|
13
|
+
export const GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_CLONESERVERGROUP_GCE_CONTROLLER =
|
|
14
|
+
'spinnaker.serverGroup.configure.gce.cloneServerGroup';
|
|
15
|
+
export const name = GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_CLONESERVERGROUP_GCE_CONTROLLER; // for backwards compatibility
|
|
16
|
+
angular
|
|
17
|
+
.module(GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_CLONESERVERGROUP_GCE_CONTROLLER, [
|
|
18
|
+
UIROUTER_ANGULARJS,
|
|
19
|
+
GOOGLE_INSTANCE_CUSTOM_CUSTOMINSTANCEBUILDER_GCE_SERVICE,
|
|
20
|
+
INSTANCE_TYPE_SERVICE,
|
|
21
|
+
GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_HIDDENMETADATAKEYS_VALUE,
|
|
22
|
+
GOOGLE_SERVERGROUP_CONFIGURE_WIZARD_SECURITYGROUPS_TAGMANAGER_SERVICE,
|
|
23
|
+
])
|
|
24
|
+
.controller('gceCloneServerGroupCtrl', [
|
|
25
|
+
'$scope',
|
|
26
|
+
'$uibModalInstance',
|
|
27
|
+
'$q',
|
|
28
|
+
'$state',
|
|
29
|
+
'$log',
|
|
30
|
+
'serverGroupWriter',
|
|
31
|
+
'gceServerGroupConfigurationService',
|
|
32
|
+
'serverGroupCommand',
|
|
33
|
+
'application',
|
|
34
|
+
'title',
|
|
35
|
+
'gceCustomInstanceBuilderService',
|
|
36
|
+
'instanceTypeService',
|
|
37
|
+
'wizardSubFormValidation',
|
|
38
|
+
'gceServerGroupHiddenMetadataKeys',
|
|
39
|
+
'gceTagManager',
|
|
40
|
+
function (
|
|
41
|
+
$scope,
|
|
42
|
+
$uibModalInstance,
|
|
43
|
+
$q,
|
|
44
|
+
$state,
|
|
45
|
+
$log,
|
|
46
|
+
serverGroupWriter,
|
|
47
|
+
gceServerGroupConfigurationService,
|
|
48
|
+
serverGroupCommand,
|
|
49
|
+
application,
|
|
50
|
+
title,
|
|
51
|
+
gceCustomInstanceBuilderService,
|
|
52
|
+
instanceTypeService,
|
|
53
|
+
wizardSubFormValidation,
|
|
54
|
+
gceServerGroupHiddenMetadataKeys,
|
|
55
|
+
gceTagManager,
|
|
56
|
+
) {
|
|
57
|
+
$scope.pages = {
|
|
58
|
+
templateSelection: require('./templateSelection/templateSelection.html'),
|
|
59
|
+
basicSettings: require('./location/basicSettings.html'),
|
|
60
|
+
loadBalancers: require('./loadBalancers/loadBalancers.html'),
|
|
61
|
+
securityGroups: require('./securityGroups/securityGroups.html'),
|
|
62
|
+
instanceType: require('./instanceType/instanceType.html'),
|
|
63
|
+
capacity: require('./capacity/capacity.html'),
|
|
64
|
+
autoHealingPolicy: require('./autoHealingPolicy/autoHealingPolicy.html'),
|
|
65
|
+
autoScalingPolicy: require('./autoScalingPolicy/autoScalingPolicy.html'),
|
|
66
|
+
zones: require('./capacity/zones.html'),
|
|
67
|
+
advancedSettings: require('./advancedSettings/advancedSettings.html'),
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
$scope.firewallsLabel = FirewallLabels.get('Firewalls');
|
|
71
|
+
|
|
72
|
+
$scope.title = title;
|
|
73
|
+
|
|
74
|
+
$scope.applicationName = application.name;
|
|
75
|
+
$scope.application = application;
|
|
76
|
+
|
|
77
|
+
$scope.command = serverGroupCommand;
|
|
78
|
+
|
|
79
|
+
$scope.state = {
|
|
80
|
+
loaded: false,
|
|
81
|
+
requiresTemplateSelection: !!serverGroupCommand.viewState.requiresTemplateSelection,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
this.templateSelectionText = {
|
|
85
|
+
copied: [
|
|
86
|
+
'account, region, subnet, cluster name (stack, details)',
|
|
87
|
+
'load balancers',
|
|
88
|
+
FirewallLabels.get('firewalls'),
|
|
89
|
+
'instance type',
|
|
90
|
+
'all fields on the Advanced Settings page',
|
|
91
|
+
],
|
|
92
|
+
notCopied: [],
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
if (!$scope.command.viewState.disableStrategySelection) {
|
|
96
|
+
this.templateSelectionText.notCopied.push(
|
|
97
|
+
'the deployment strategy (if any) used to deploy the most recent server group',
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function onApplicationRefresh() {
|
|
102
|
+
// If the user has already closed the modal, do not navigate to the new details view
|
|
103
|
+
if ($scope.$$destroyed) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const cloneStage = $scope.taskMonitor.task.execution.stages.find((stage) => stage.type === 'cloneServerGroup');
|
|
107
|
+
if (cloneStage && cloneStage.context['deploy.server.groups']) {
|
|
108
|
+
const newServerGroupName = cloneStage.context['deploy.server.groups'][$scope.command.region];
|
|
109
|
+
if (newServerGroupName) {
|
|
110
|
+
const newStateParams = {
|
|
111
|
+
serverGroup: newServerGroupName,
|
|
112
|
+
accountId: $scope.command.credentials,
|
|
113
|
+
region: $scope.command.region,
|
|
114
|
+
provider: 'gce',
|
|
115
|
+
};
|
|
116
|
+
let transitionTo = '^.^.^.clusters.serverGroup';
|
|
117
|
+
if ($state.includes('**.clusters.serverGroup')) {
|
|
118
|
+
// clone via details, all view
|
|
119
|
+
transitionTo = '^.serverGroup';
|
|
120
|
+
}
|
|
121
|
+
if ($state.includes('**.clusters.cluster.serverGroup')) {
|
|
122
|
+
// clone or create with details open
|
|
123
|
+
transitionTo = '^.^.serverGroup';
|
|
124
|
+
}
|
|
125
|
+
if ($state.includes('**.clusters')) {
|
|
126
|
+
// create new, no details open
|
|
127
|
+
transitionTo = '.serverGroup';
|
|
128
|
+
}
|
|
129
|
+
$state.go(transitionTo, newStateParams);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function onTaskComplete() {
|
|
135
|
+
application.serverGroups.refresh();
|
|
136
|
+
application.serverGroups.onNextRefresh($scope, onApplicationRefresh);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
$scope.taskMonitor = new TaskMonitor({
|
|
140
|
+
application: application,
|
|
141
|
+
title: 'Creating your server group',
|
|
142
|
+
modalInstance: $uibModalInstance,
|
|
143
|
+
onTaskComplete: onTaskComplete,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
function configureCommand() {
|
|
147
|
+
gceServerGroupConfigurationService
|
|
148
|
+
.configureCommand(application, serverGroupCommand)
|
|
149
|
+
.then(function () {
|
|
150
|
+
$scope.state.loaded = true;
|
|
151
|
+
initializeSelectOptions();
|
|
152
|
+
initializeWatches();
|
|
153
|
+
wizardSubFormValidation
|
|
154
|
+
.config({ scope: $scope, form: 'form' })
|
|
155
|
+
.register({ page: 'location', subForm: 'basicSettings' })
|
|
156
|
+
.register({ page: 'capacity', subForm: 'capacitySubForm' })
|
|
157
|
+
.register({ page: 'zones', subForm: 'zonesSubForm' })
|
|
158
|
+
.register({ page: 'load-balancers', subForm: 'loadBalancerSubForm' })
|
|
159
|
+
.register({ page: 'autohealing-policy', subForm: 'autoHealingPolicySubForm' })
|
|
160
|
+
.register({ page: 'autoscaling-policy', subForm: 'autoScalingPolicySubForm' });
|
|
161
|
+
})
|
|
162
|
+
.catch((e) => {
|
|
163
|
+
$log.error('Error generating server group command: ', e);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function initializeWatches() {
|
|
168
|
+
$scope.$watch('command.credentials', createResultProcessor($scope.command.credentialsChanged));
|
|
169
|
+
$scope.$watch('command.regional', createResultProcessor($scope.command.regionalChanged));
|
|
170
|
+
$scope.$watch('command.region', createResultProcessor($scope.command.regionChanged));
|
|
171
|
+
$scope.$watch('command.network', createResultProcessor($scope.command.networkChanged));
|
|
172
|
+
$scope.$watch('command.zone', createResultProcessor($scope.command.zoneChanged));
|
|
173
|
+
$scope.$watch('command.viewState.instanceTypeDetails', updateStorageSettingsFromInstanceType());
|
|
174
|
+
$scope.$watch('command.selectZones', createResultProcessor($scope.command.selectZonesChanged));
|
|
175
|
+
$scope.$watch('command.distributionPolicy.zones', createResultProcessor($scope.command.selectZonesChanged));
|
|
176
|
+
$scope.$watch(
|
|
177
|
+
'command.viewState.customInstance',
|
|
178
|
+
() => {
|
|
179
|
+
$scope.command.customInstanceChanged($scope.command);
|
|
180
|
+
setInstanceTypeFromCustomChoices();
|
|
181
|
+
},
|
|
182
|
+
true,
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function initializeSelectOptions() {
|
|
187
|
+
processCommandUpdateResult($scope.command.credentialsChanged($scope.command));
|
|
188
|
+
processCommandUpdateResult($scope.command.regionalChanged($scope.command));
|
|
189
|
+
processCommandUpdateResult($scope.command.regionChanged($scope.command));
|
|
190
|
+
processCommandUpdateResult($scope.command.networkChanged($scope.command));
|
|
191
|
+
processCommandUpdateResult($scope.command.zoneChanged($scope.command));
|
|
192
|
+
processCommandUpdateResult($scope.command.customInstanceChanged($scope.command));
|
|
193
|
+
gceServerGroupConfigurationService.configureSubnets($scope.command);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function createResultProcessor(method) {
|
|
197
|
+
return function () {
|
|
198
|
+
processCommandUpdateResult(method($scope.command));
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function processCommandUpdateResult(result) {
|
|
203
|
+
if (result.dirty.loadBalancers) {
|
|
204
|
+
ModalWizard.markDirty('load-balancers');
|
|
205
|
+
}
|
|
206
|
+
if (result.dirty.securityGroups) {
|
|
207
|
+
ModalWizard.markDirty('security-groups');
|
|
208
|
+
}
|
|
209
|
+
if (result.dirty.availabilityZones) {
|
|
210
|
+
ModalWizard.markDirty('capacity');
|
|
211
|
+
}
|
|
212
|
+
if (result.dirty.instanceType) {
|
|
213
|
+
ModalWizard.markDirty('instance-type');
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function setInstanceTypeFromCustomChoices() {
|
|
218
|
+
const c = $scope.command;
|
|
219
|
+
const location = c.regional ? c.region : c.zone;
|
|
220
|
+
const { locationToInstanceTypesMap } = c.backingData.credentialsKeyedByAccount[c.credentials];
|
|
221
|
+
const extendedMemory = _.get(c, 'viewState.customInstance.extendedMemory');
|
|
222
|
+
const customInstanceChoices = [
|
|
223
|
+
_.get(c, 'viewState.customInstance.instanceFamily'),
|
|
224
|
+
_.get(c, 'viewState.customInstance.vCpuCount'),
|
|
225
|
+
_.get(c, 'viewState.customInstance.memory'),
|
|
226
|
+
];
|
|
227
|
+
|
|
228
|
+
if (
|
|
229
|
+
_.every([
|
|
230
|
+
...customInstanceChoices,
|
|
231
|
+
gceCustomInstanceBuilderService.customInstanceChoicesAreValid(
|
|
232
|
+
...customInstanceChoices,
|
|
233
|
+
location,
|
|
234
|
+
locationToInstanceTypesMap,
|
|
235
|
+
extendedMemory,
|
|
236
|
+
),
|
|
237
|
+
])
|
|
238
|
+
) {
|
|
239
|
+
c.instanceType = gceCustomInstanceBuilderService.generateInstanceTypeString(
|
|
240
|
+
...customInstanceChoices,
|
|
241
|
+
extendedMemory,
|
|
242
|
+
);
|
|
243
|
+
|
|
244
|
+
instanceTypeService.getInstanceTypeDetails(c.selectedProvider, 'buildCustom').then((instanceTypeDetails) => {
|
|
245
|
+
c.viewState.instanceTypeDetails = instanceTypeDetails;
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function updateStorageSettingsFromInstanceType() {
|
|
251
|
+
return function (instanceTypeDetails) {
|
|
252
|
+
if ($scope.command.viewState.initialized) {
|
|
253
|
+
if (instanceTypeDetails && instanceTypeDetails.storage && instanceTypeDetails.storage.defaultSettings) {
|
|
254
|
+
$scope.command.disks = instanceTypeDetails.storage.defaultSettings.disks;
|
|
255
|
+
delete $scope.command.viewState.overriddenStorageDescription;
|
|
256
|
+
}
|
|
257
|
+
} else {
|
|
258
|
+
$scope.command.viewState.initialized = true;
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
this.isValid = function () {
|
|
264
|
+
const selectedZones =
|
|
265
|
+
$scope.command.selectZones && _.get($scope, 'command.distributionPolicy.zones.length') >= 1;
|
|
266
|
+
const autoScalingPolicy = $scope.command.autoscalingPolicy;
|
|
267
|
+
return (
|
|
268
|
+
$scope.command &&
|
|
269
|
+
($scope.command.viewState.disableImageSelection || $scope.command.image) &&
|
|
270
|
+
$scope.command.application &&
|
|
271
|
+
$scope.command.credentials &&
|
|
272
|
+
$scope.command.instanceType &&
|
|
273
|
+
$scope.command.region &&
|
|
274
|
+
($scope.command.regional || $scope.command.zone) &&
|
|
275
|
+
$scope.command.capacity.desired !== null &&
|
|
276
|
+
(!$scope.command.selectZones || selectedZones) &&
|
|
277
|
+
$scope.form.$valid &&
|
|
278
|
+
(!autoScalingPolicy ||
|
|
279
|
+
(autoScalingPolicy &&
|
|
280
|
+
(!isEmpty(autoScalingPolicy.cpuUtilization) ||
|
|
281
|
+
!isEmpty(autoScalingPolicy.customMetricUtilizations) ||
|
|
282
|
+
!isEmpty(autoScalingPolicy.loadBalancingUtilization)))) &&
|
|
283
|
+
ModalWizard.isComplete()
|
|
284
|
+
);
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
this.showSubmitButton = function () {
|
|
288
|
+
return ModalWizard.allPagesVisited();
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
function buildLoadBalancerMetadata(loadBalancerNames, loadBalancerIndex, backendServices) {
|
|
292
|
+
let metadata = {};
|
|
293
|
+
|
|
294
|
+
if (_.get(loadBalancerNames, 'length') > 0) {
|
|
295
|
+
metadata = loadBalancerNames.reduce(
|
|
296
|
+
(metadata, name) => {
|
|
297
|
+
const loadBalancerDetails = loadBalancerIndex[name];
|
|
298
|
+
|
|
299
|
+
if (loadBalancerDetails.loadBalancerType === 'HTTP') {
|
|
300
|
+
metadata['global-load-balancer-names'] = metadata['global-load-balancer-names'].concat(
|
|
301
|
+
loadBalancerDetails.listeners.map((listener) => listener.name),
|
|
302
|
+
);
|
|
303
|
+
} else if (loadBalancerDetails.loadBalancerType === 'INTERNAL_MANAGED') {
|
|
304
|
+
metadata['load-balancer-names'] = metadata['load-balancer-names'].concat(
|
|
305
|
+
loadBalancerDetails.listeners.map((listener) => listener.name),
|
|
306
|
+
);
|
|
307
|
+
} else if (loadBalancerDetails.loadBalancerType === 'SSL') {
|
|
308
|
+
metadata['global-load-balancer-names'].push(name);
|
|
309
|
+
} else if (loadBalancerDetails.loadBalancerType === 'TCP') {
|
|
310
|
+
metadata['global-load-balancer-names'].push(name);
|
|
311
|
+
} else {
|
|
312
|
+
metadata['load-balancer-names'].push(name);
|
|
313
|
+
}
|
|
314
|
+
return metadata;
|
|
315
|
+
},
|
|
316
|
+
{ 'load-balancer-names': [], 'global-load-balancer-names': [] },
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if (_.isObject(backendServices) && Object.keys(backendServices).length > 0) {
|
|
321
|
+
metadata['backend-service-names'] = _.reduce(
|
|
322
|
+
backendServices,
|
|
323
|
+
(accumulatedBackends, backends) => accumulatedBackends.concat(backends),
|
|
324
|
+
[],
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
for (const key in metadata) {
|
|
329
|
+
if (metadata[key].length === 0) {
|
|
330
|
+
delete metadata[key];
|
|
331
|
+
} else {
|
|
332
|
+
metadata[key] = _.uniq(metadata[key]).toString();
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
return metadata;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function collectLoadBalancerNamesForCommand(loadBalancerIndex, loadBalancerMetadata) {
|
|
340
|
+
let loadBalancerNames = [];
|
|
341
|
+
if (loadBalancerMetadata['load-balancer-names']) {
|
|
342
|
+
loadBalancerNames = loadBalancerNames.concat(loadBalancerMetadata['load-balancer-names'].split(','));
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const selectedSslLoadBalancerNames = _.chain(loadBalancerIndex)
|
|
346
|
+
.filter({ loadBalancerType: 'SSL' })
|
|
347
|
+
.map('name')
|
|
348
|
+
.intersection(
|
|
349
|
+
loadBalancerMetadata['global-load-balancer-names']
|
|
350
|
+
? loadBalancerMetadata['global-load-balancer-names'].split(',')
|
|
351
|
+
: [],
|
|
352
|
+
)
|
|
353
|
+
.value();
|
|
354
|
+
|
|
355
|
+
const selectedTcpLoadBalancerNames = _.chain(loadBalancerIndex)
|
|
356
|
+
.filter({ loadBalancerType: 'TCP' })
|
|
357
|
+
.map('name')
|
|
358
|
+
.intersection(
|
|
359
|
+
loadBalancerMetadata['global-load-balancer-names']
|
|
360
|
+
? loadBalancerMetadata['global-load-balancer-names'].split(',')
|
|
361
|
+
: [],
|
|
362
|
+
)
|
|
363
|
+
.value();
|
|
364
|
+
|
|
365
|
+
return loadBalancerNames.concat(selectedSslLoadBalancerNames).concat(selectedTcpLoadBalancerNames);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
this.submit = function () {
|
|
369
|
+
// We use this list of load balancer names when 'Enabling' a server group.
|
|
370
|
+
const loadBalancerMetadata = buildLoadBalancerMetadata(
|
|
371
|
+
$scope.command.loadBalancers,
|
|
372
|
+
$scope.command.backingData.filtered.loadBalancerIndex,
|
|
373
|
+
$scope.command.backendServices,
|
|
374
|
+
);
|
|
375
|
+
|
|
376
|
+
const origLoadBalancers = $scope.command.loadBalancers;
|
|
377
|
+
$scope.command.loadBalancers = collectLoadBalancerNamesForCommand(
|
|
378
|
+
$scope.command.backingData.filtered.loadBalancerIndex,
|
|
379
|
+
loadBalancerMetadata,
|
|
380
|
+
);
|
|
381
|
+
|
|
382
|
+
if ($scope.command.minCpuPlatform === '(Automatic)') {
|
|
383
|
+
$scope.command.minCpuPlatform = '';
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
angular.extend($scope.command.instanceMetadata, loadBalancerMetadata);
|
|
387
|
+
|
|
388
|
+
const origTags = $scope.command.tags;
|
|
389
|
+
const transformedTags = [];
|
|
390
|
+
// The tags are stored using a 'value' attribute to enable the Add/Remove behavior in the wizard.
|
|
391
|
+
$scope.command.tags.forEach(function (tag) {
|
|
392
|
+
transformedTags.push(tag.value);
|
|
393
|
+
});
|
|
394
|
+
$scope.command.tags = transformedTags;
|
|
395
|
+
|
|
396
|
+
$scope.command.targetSize = $scope.command.capacity.desired;
|
|
397
|
+
|
|
398
|
+
if ($scope.command.autoscalingPolicy) {
|
|
399
|
+
$scope.command.capacity.min = $scope.command.autoscalingPolicy.minNumReplicas;
|
|
400
|
+
$scope.command.capacity.max = $scope.command.autoscalingPolicy.maxNumReplicas;
|
|
401
|
+
} else {
|
|
402
|
+
$scope.command.capacity.min = $scope.command.capacity.desired;
|
|
403
|
+
$scope.command.capacity.max = $scope.command.capacity.desired;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
delete $scope.command.securityGroups;
|
|
407
|
+
|
|
408
|
+
if ($scope.command.viewState.mode === 'editPipeline' || $scope.command.viewState.mode === 'createPipeline') {
|
|
409
|
+
return $uibModalInstance.close($scope.command);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
$scope.taskMonitor.submit(function () {
|
|
413
|
+
const promise = serverGroupWriter.cloneServerGroup(angular.copy($scope.command), application);
|
|
414
|
+
|
|
415
|
+
// Copy back the original objects so the wizard can still be used if the command needs to be resubmitted.
|
|
416
|
+
$scope.command.instanceMetadata = _.omit($scope.command.instanceMetadata, gceServerGroupHiddenMetadataKeys);
|
|
417
|
+
|
|
418
|
+
$scope.command.tags = origTags;
|
|
419
|
+
$scope.command.loadBalancers = origLoadBalancers;
|
|
420
|
+
$scope.command.securityGroups = gceTagManager.inferSecurityGroupIdsFromTags($scope.command.tags);
|
|
421
|
+
|
|
422
|
+
return promise;
|
|
423
|
+
});
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
this.onHealthCheckRefresh = function () {
|
|
427
|
+
gceServerGroupConfigurationService.refreshHealthChecks($scope.command);
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
this.onEnableAutoHealingChange = function () {
|
|
431
|
+
// Prevent empty auto-healing policies from being overwritten by those of their ancestors
|
|
432
|
+
$scope.command.overwriteAncestorAutoHealingPolicy =
|
|
433
|
+
$scope.command.viewState.mode === 'clone' &&
|
|
434
|
+
$scope.command.autoHealingPolicy != null &&
|
|
435
|
+
$scope.command.enableAutoHealing === false;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
this.setAutoHealingPolicy = function (autoHealingPolicy) {
|
|
439
|
+
$scope.command.autoHealingPolicy = autoHealingPolicy;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
this.onEnableAutoScalingChange = function () {
|
|
443
|
+
// Prevent empty auto-scaling policies from being overwritten by those of their ancestors
|
|
444
|
+
$scope.command.overwriteAncestorAutoScalingPolicy =
|
|
445
|
+
$scope.command.autoscalingPolicy != null && $scope.command.enableAutoScaling === false;
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
this.setAutoScalingPolicy = function (autoScalingPolicy) {
|
|
449
|
+
$scope.command.autoscalingPolicy = autoScalingPolicy;
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
this.cancel = function () {
|
|
453
|
+
$uibModalInstance.dismiss();
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
this.specialInstanceProfiles = new Set(['custom', 'buildCustom']);
|
|
457
|
+
|
|
458
|
+
// This function is called from within React, and without $apply, Angular does not know when it has been called.
|
|
459
|
+
$scope.command.setCustomInstanceViewState = (customInstanceChoices) => {
|
|
460
|
+
$scope.$apply(() => ($scope.command.viewState.customInstance = customInstanceChoices));
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
if (!$scope.state.requiresTemplateSelection) {
|
|
464
|
+
configureCommand();
|
|
465
|
+
} else {
|
|
466
|
+
$scope.state.loaded = true;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
this.templateSelected = () => {
|
|
470
|
+
$scope.state.requiresTemplateSelection = false;
|
|
471
|
+
configureCommand();
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
$scope.$on('$destroy', gceTagManager.reset);
|
|
475
|
+
},
|
|
476
|
+
]);
|