@spinnaker/google 0.0.0-2025.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,518 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import UIROUTER_ANGULARJS from '@uirouter/angularjs';
|
|
4
|
+
import { module } from 'angular';
|
|
5
|
+
import ANGULAR_UI_BOOTSTRAP from 'angular-ui-bootstrap';
|
|
6
|
+
import _ from 'lodash';
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
CloudProviderRegistry,
|
|
10
|
+
ConfirmationModalService,
|
|
11
|
+
FirewallLabels,
|
|
12
|
+
InstanceReader,
|
|
13
|
+
InstanceWriter,
|
|
14
|
+
RecentHistoryService,
|
|
15
|
+
} from '@spinnaker/core';
|
|
16
|
+
import { GOOGLE_COMMON_XPNNAMING_GCE_SERVICE } from '../../common/xpnNaming.gce.service';
|
|
17
|
+
import { GCE_HTTP_LOAD_BALANCER_UTILS } from '../../loadBalancer/httpLoadBalancerUtils.service';
|
|
18
|
+
|
|
19
|
+
export const GOOGLE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER = 'spinnaker.instance.detail.gce.controller';
|
|
20
|
+
export const name = GOOGLE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER; // for backwards compatibility
|
|
21
|
+
module(GOOGLE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
|
|
22
|
+
UIROUTER_ANGULARJS,
|
|
23
|
+
ANGULAR_UI_BOOTSTRAP,
|
|
24
|
+
GOOGLE_COMMON_XPNNAMING_GCE_SERVICE,
|
|
25
|
+
GCE_HTTP_LOAD_BALANCER_UTILS,
|
|
26
|
+
]).controller('gceInstanceDetailsCtrl', [
|
|
27
|
+
'$scope',
|
|
28
|
+
'$state',
|
|
29
|
+
'$uibModal',
|
|
30
|
+
'instance',
|
|
31
|
+
'app',
|
|
32
|
+
'moniker',
|
|
33
|
+
'environment',
|
|
34
|
+
'$q',
|
|
35
|
+
'gceHttpLoadBalancerUtils',
|
|
36
|
+
'gceXpnNamingService',
|
|
37
|
+
function (
|
|
38
|
+
$scope,
|
|
39
|
+
$state,
|
|
40
|
+
$uibModal,
|
|
41
|
+
instance,
|
|
42
|
+
app,
|
|
43
|
+
moniker,
|
|
44
|
+
environment,
|
|
45
|
+
$q,
|
|
46
|
+
gceHttpLoadBalancerUtils,
|
|
47
|
+
gceXpnNamingService,
|
|
48
|
+
) {
|
|
49
|
+
// needed for standalone instances
|
|
50
|
+
$scope.detailsTemplateUrl = CloudProviderRegistry.getValue('gce', 'instance.detailsTemplateUrl');
|
|
51
|
+
|
|
52
|
+
$scope.firewallsLabel = FirewallLabels.get('Firewalls');
|
|
53
|
+
|
|
54
|
+
$scope.state = {
|
|
55
|
+
loading: true,
|
|
56
|
+
standalone: app.isStandalone,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
$scope.application = app;
|
|
60
|
+
$scope.moniker = moniker;
|
|
61
|
+
$scope.environment = environment;
|
|
62
|
+
|
|
63
|
+
function extractHealthMetrics(instance, latest) {
|
|
64
|
+
// do not backfill on standalone instances
|
|
65
|
+
if (app.isStandalone) {
|
|
66
|
+
instance.health = latest.health;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
instance.health = instance.health || [];
|
|
70
|
+
const displayableMetrics = instance.health.filter(function (metric) {
|
|
71
|
+
return metric.type !== 'Google' || metric.state !== 'Unknown';
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// backfill details where applicable
|
|
75
|
+
if (latest.health) {
|
|
76
|
+
displayableMetrics.forEach(function (metric) {
|
|
77
|
+
const detailsMatch = latest.health.filter(function (latestHealth) {
|
|
78
|
+
return latestHealth.type === metric.type;
|
|
79
|
+
});
|
|
80
|
+
if (detailsMatch.length) {
|
|
81
|
+
_.defaults(metric, detailsMatch[0]);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
$scope.healthMetrics = displayableMetrics;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function retrieveInstance() {
|
|
89
|
+
const extraData = {};
|
|
90
|
+
let instanceSummary, loadBalancers, account, region, vpcId;
|
|
91
|
+
if (!app.serverGroups) {
|
|
92
|
+
// standalone instance
|
|
93
|
+
instanceSummary = {};
|
|
94
|
+
loadBalancers = [];
|
|
95
|
+
account = instance.account;
|
|
96
|
+
region = instance.region;
|
|
97
|
+
} else {
|
|
98
|
+
app.serverGroups.data.some(function (serverGroup) {
|
|
99
|
+
return serverGroup.instances.some(function (possibleInstance) {
|
|
100
|
+
if (possibleInstance.id === instance.instanceId) {
|
|
101
|
+
instanceSummary = possibleInstance;
|
|
102
|
+
loadBalancers = serverGroup.loadBalancers;
|
|
103
|
+
account = serverGroup.account;
|
|
104
|
+
region = serverGroup.region;
|
|
105
|
+
extraData.serverGroup = serverGroup.name;
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
if (!instanceSummary) {
|
|
111
|
+
// perhaps it is in a server group that is part of another application
|
|
112
|
+
app.loadBalancers.data.some(function (loadBalancer) {
|
|
113
|
+
return loadBalancer.instances.some(function (possibleInstance) {
|
|
114
|
+
if (possibleInstance.id === instance.instanceId) {
|
|
115
|
+
instanceSummary = possibleInstance;
|
|
116
|
+
loadBalancers = [loadBalancer.name];
|
|
117
|
+
account = loadBalancer.account;
|
|
118
|
+
region = loadBalancer.region;
|
|
119
|
+
vpcId = loadBalancer.vpcId;
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
if (!instanceSummary) {
|
|
125
|
+
// perhaps it is in a disabled server group via a load balancer
|
|
126
|
+
app.loadBalancers.data.some(function (loadBalancer) {
|
|
127
|
+
return loadBalancer.serverGroups.some(function (serverGroup) {
|
|
128
|
+
if (!serverGroup.isDisabled) {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
return serverGroup.instances.some(function (possibleInstance) {
|
|
132
|
+
if (possibleInstance.id === instance.instanceId) {
|
|
133
|
+
instanceSummary = possibleInstance;
|
|
134
|
+
loadBalancers = [loadBalancer.name];
|
|
135
|
+
account = loadBalancer.account;
|
|
136
|
+
region = loadBalancer.region;
|
|
137
|
+
vpcId = loadBalancer.vpcId;
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (instanceSummary && account && region) {
|
|
148
|
+
extraData.account = account;
|
|
149
|
+
extraData.region = region;
|
|
150
|
+
RecentHistoryService.addExtraDataToLatest('instances', extraData);
|
|
151
|
+
return InstanceReader.getInstanceDetails(account, region, instance.instanceId).then(function (details) {
|
|
152
|
+
$scope.state.loading = false;
|
|
153
|
+
extractHealthMetrics(instanceSummary, details);
|
|
154
|
+
$scope.instance = _.defaults(details, instanceSummary);
|
|
155
|
+
$scope.instance.account = account;
|
|
156
|
+
$scope.instance.region = region;
|
|
157
|
+
$scope.instance.vpcId = vpcId;
|
|
158
|
+
if (app.getDataSource('loadBalancers')) {
|
|
159
|
+
$scope.instance.loadBalancers = gceHttpLoadBalancerUtils.normalizeLoadBalancerNamesForAccount(
|
|
160
|
+
loadBalancers,
|
|
161
|
+
account,
|
|
162
|
+
app.getDataSource('loadBalancers').data,
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
$scope.instance.internalDnsName = $scope.instance.instanceId;
|
|
167
|
+
$scope.instance.internalIpAddress = $scope.instance.networkInterfaces[0].networkIP;
|
|
168
|
+
|
|
169
|
+
if ($scope.instance.networkInterfaces[0].accessConfigs) {
|
|
170
|
+
$scope.instance.externalIpAddress = $scope.instance.networkInterfaces[0].accessConfigs[0].natIP;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
$scope.baseIpAddress = $scope.instance.externalIpAddress || $scope.instance.internalIpAddress;
|
|
174
|
+
|
|
175
|
+
const projectId = gceXpnNamingService.deriveProjectId($scope.instance);
|
|
176
|
+
$scope.instance.logsLink =
|
|
177
|
+
'https://console.developers.google.com/project/' +
|
|
178
|
+
projectId +
|
|
179
|
+
'/logs?service=gce_instance&minLogLevel=0&filters=text:' +
|
|
180
|
+
$scope.instance.instanceId;
|
|
181
|
+
|
|
182
|
+
$scope.instance.network = getNetwork(projectId);
|
|
183
|
+
$scope.instance.subnet = getSubnet(projectId);
|
|
184
|
+
|
|
185
|
+
$scope.instance.sshLink =
|
|
186
|
+
$scope.instance.selfLink.replace(
|
|
187
|
+
/www.googleapis.com\/compute\/(alpha|beta|v1)/,
|
|
188
|
+
'cloudssh.developers.google.com',
|
|
189
|
+
) + '?authuser=0&hl=en_US';
|
|
190
|
+
|
|
191
|
+
$scope.instance.gcloudSSHCommand =
|
|
192
|
+
'gcloud compute ssh --project ' +
|
|
193
|
+
projectId +
|
|
194
|
+
' --zone ' +
|
|
195
|
+
$scope.instance.placement.availabilityZone +
|
|
196
|
+
' ' +
|
|
197
|
+
instance.instanceId;
|
|
198
|
+
|
|
199
|
+
augmentTagsWithHelp();
|
|
200
|
+
}, autoClose);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (!instanceSummary) {
|
|
204
|
+
$scope.instanceIdNotFound = instance.instanceId;
|
|
205
|
+
$scope.state.loading = false;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return $q.when(null);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function autoClose() {
|
|
212
|
+
if ($scope.$$destroyed) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
$state.go('^', { allowModalToStayOpen: true }, { location: 'replace' });
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function augmentTagsWithHelp() {
|
|
219
|
+
if (_.has($scope, 'instance.tags.items') && _.has($scope, 'instance.securityGroups')) {
|
|
220
|
+
const securityGroups = _.chain($scope.instance.securityGroups)
|
|
221
|
+
.map((securityGroup) => {
|
|
222
|
+
return _.find(app.securityGroups.data, {
|
|
223
|
+
accountName: $scope.instance.account,
|
|
224
|
+
region: 'global',
|
|
225
|
+
id: securityGroup.groupId,
|
|
226
|
+
});
|
|
227
|
+
})
|
|
228
|
+
.compact()
|
|
229
|
+
.value();
|
|
230
|
+
|
|
231
|
+
const helpMap = {};
|
|
232
|
+
|
|
233
|
+
$scope.instance.tags.items.forEach((tag) => {
|
|
234
|
+
const securityGroupsMatches = _.filter(securityGroups, (securityGroup) =>
|
|
235
|
+
_.includes(securityGroup.targetTags, tag),
|
|
236
|
+
);
|
|
237
|
+
const securityGroupMatchNames = _.map(securityGroupsMatches, 'name');
|
|
238
|
+
|
|
239
|
+
if (!_.isEmpty(securityGroupMatchNames)) {
|
|
240
|
+
const groupOrGroups = securityGroupMatchNames.length > 1 ? 'groups' : 'group';
|
|
241
|
+
|
|
242
|
+
helpMap[tag] =
|
|
243
|
+
'This tag associates this instance with security ' +
|
|
244
|
+
groupOrGroups +
|
|
245
|
+
' <em>' +
|
|
246
|
+
securityGroupMatchNames.join(', ') +
|
|
247
|
+
'</em>.';
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
$scope.instance.tags.helpMap = helpMap;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function getNetwork(projectId) {
|
|
256
|
+
const networkUrl = _.get($scope.instance, 'networkInterfaces[0].network');
|
|
257
|
+
return gceXpnNamingService.decorateXpnResourceIfNecessary(projectId, networkUrl);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function getSubnet(projectId) {
|
|
261
|
+
const subnetUrl = _.get($scope.instance, 'networkInterfaces[0].subnetwork');
|
|
262
|
+
return gceXpnNamingService.decorateXpnResourceIfNecessary(projectId, subnetUrl);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
this.canRegisterWithLoadBalancer = function () {
|
|
266
|
+
const instance = $scope.instance;
|
|
267
|
+
const instanceLoadBalancerDoesNotSupportRegister =
|
|
268
|
+
!app.loadBalancers ||
|
|
269
|
+
_.chain(app.loadBalancers.data)
|
|
270
|
+
.filter((lb) => lb.loadBalancerType !== 'NETWORK' && lb.account === instance.account)
|
|
271
|
+
.map('name')
|
|
272
|
+
.intersection(instance.loadBalancers || [])
|
|
273
|
+
.value().length;
|
|
274
|
+
|
|
275
|
+
if (!instance.loadBalancers || !instance.loadBalancers.length || instanceLoadBalancerDoesNotSupportRegister) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
const outOfService = instance.health.some(function (health) {
|
|
279
|
+
return health.type === 'LoadBalancer' && health.state === 'OutOfService';
|
|
280
|
+
});
|
|
281
|
+
const hasLoadBalancerHealth = instance.health.some(function (health) {
|
|
282
|
+
return health.type === 'LoadBalancer';
|
|
283
|
+
});
|
|
284
|
+
return outOfService || !hasLoadBalancerHealth;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
this.canDeregisterFromLoadBalancer = function () {
|
|
288
|
+
const instance = $scope.instance;
|
|
289
|
+
const instanceLoadBalancerDoesNotSupportDeregister =
|
|
290
|
+
!app.loadBalancers ||
|
|
291
|
+
_.chain(app.loadBalancers.data)
|
|
292
|
+
.filter((lb) => lb.loadBalancerType !== 'NETWORK' && lb.account === instance.account)
|
|
293
|
+
.map('name')
|
|
294
|
+
.intersection(instance.loadBalancers || [])
|
|
295
|
+
.value().length;
|
|
296
|
+
|
|
297
|
+
if (!instance.loadBalancers || !instance.loadBalancers.length || instanceLoadBalancerDoesNotSupportDeregister) {
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
const hasLoadBalancerHealth = instance.health.some(function (health) {
|
|
301
|
+
return health.type === 'LoadBalancer';
|
|
302
|
+
});
|
|
303
|
+
return hasLoadBalancerHealth;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
this.canRegisterWithDiscovery = function () {
|
|
307
|
+
const instance = $scope.instance;
|
|
308
|
+
const discoveryHealth = instance.health.filter(function (health) {
|
|
309
|
+
return health.type === 'Discovery';
|
|
310
|
+
});
|
|
311
|
+
return discoveryHealth.length ? discoveryHealth[0].state === 'OutOfService' : false;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
this.showInstanceActionsDivider = function () {
|
|
315
|
+
return (
|
|
316
|
+
this.canRegisterWithDiscovery() ||
|
|
317
|
+
this.hasHealthState('Discovery', 'Up') ||
|
|
318
|
+
this.canRegisterWithLoadBalancer() ||
|
|
319
|
+
this.canDeregisterFromLoadBalancer()
|
|
320
|
+
);
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
this.terminateInstance = function terminateInstance() {
|
|
324
|
+
const instance = $scope.instance;
|
|
325
|
+
|
|
326
|
+
const taskMonitor = {
|
|
327
|
+
application: app,
|
|
328
|
+
title: 'Terminating ' + instance.instanceId,
|
|
329
|
+
onTaskComplete: function () {
|
|
330
|
+
if ($state.includes('**.instanceDetails', { instanceId: instance.instanceId })) {
|
|
331
|
+
$state.go('^');
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
const submitMethod = function () {
|
|
337
|
+
const params = { cloudProvider: 'gce' };
|
|
338
|
+
|
|
339
|
+
if (instance.serverGroup) {
|
|
340
|
+
params.managedInstanceGroupName = instance.serverGroup;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
return InstanceWriter.terminateInstance(instance, app, params);
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
ConfirmationModalService.confirm({
|
|
347
|
+
header: 'Really terminate ' + instance.instanceId + '?',
|
|
348
|
+
buttonText: 'Terminate ' + instance.instanceId,
|
|
349
|
+
account: instance.account,
|
|
350
|
+
taskMonitorConfig: taskMonitor,
|
|
351
|
+
submitMethod: submitMethod,
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
this.terminateInstanceAndShrinkServerGroup = function terminateInstanceAndShrinkServerGroup() {
|
|
356
|
+
const instance = $scope.instance;
|
|
357
|
+
|
|
358
|
+
const taskMonitor = {
|
|
359
|
+
application: app,
|
|
360
|
+
title: 'Terminating ' + instance.instanceId + ' and shrinking server group',
|
|
361
|
+
onTaskComplete: function () {
|
|
362
|
+
if ($state.includes('**.instanceDetails', { instanceId: instance.instanceId })) {
|
|
363
|
+
$state.go('^');
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
const submitMethod = function () {
|
|
369
|
+
return InstanceWriter.terminateInstanceAndShrinkServerGroup(instance, app, {
|
|
370
|
+
serverGroupName: instance.serverGroup,
|
|
371
|
+
instanceIds: [instance.instanceId],
|
|
372
|
+
zone: instance.placement.availabilityZone,
|
|
373
|
+
});
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
ConfirmationModalService.confirm({
|
|
377
|
+
header: 'Really terminate ' + instance.instanceId + ' and shrink ' + instance.serverGroup + '?',
|
|
378
|
+
buttonText: 'Terminate ' + instance.instanceId + ' and shrink ' + instance.serverGroup,
|
|
379
|
+
account: instance.account,
|
|
380
|
+
taskMonitorConfig: taskMonitor,
|
|
381
|
+
submitMethod: submitMethod,
|
|
382
|
+
});
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
this.rebootInstance = function rebootInstance() {
|
|
386
|
+
const instance = $scope.instance;
|
|
387
|
+
|
|
388
|
+
const taskMonitor = {
|
|
389
|
+
application: app,
|
|
390
|
+
title: 'Rebooting ' + instance.instanceId,
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
const submitMethod = function () {
|
|
394
|
+
return InstanceWriter.rebootInstance(instance, app, {
|
|
395
|
+
// We can't really reliably do anything other than ignore health here.
|
|
396
|
+
interestingHealthProviderNames: [],
|
|
397
|
+
});
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
ConfirmationModalService.confirm({
|
|
401
|
+
header: 'Really reboot ' + instance.instanceId + '?',
|
|
402
|
+
buttonText: 'Reboot ' + instance.instanceId,
|
|
403
|
+
account: instance.account,
|
|
404
|
+
taskMonitorConfig: taskMonitor,
|
|
405
|
+
submitMethod: submitMethod,
|
|
406
|
+
});
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
this.registerInstanceWithLoadBalancer = function registerInstanceWithLoadBalancer() {
|
|
410
|
+
const instance = $scope.instance;
|
|
411
|
+
const loadBalancerNames = instance.loadBalancers.join(' and ');
|
|
412
|
+
|
|
413
|
+
const taskMonitor = {
|
|
414
|
+
application: app,
|
|
415
|
+
title: 'Registering ' + instance.instanceId + ' with ' + loadBalancerNames,
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
const submitMethod = function () {
|
|
419
|
+
return InstanceWriter.registerInstanceWithLoadBalancer(instance, app);
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
ConfirmationModalService.confirm({
|
|
423
|
+
header: 'Really register ' + instance.instanceId + ' with ' + loadBalancerNames + '?',
|
|
424
|
+
buttonText: 'Register ' + instance.instanceId,
|
|
425
|
+
account: instance.account,
|
|
426
|
+
taskMonitorConfig: taskMonitor,
|
|
427
|
+
submitMethod: submitMethod,
|
|
428
|
+
});
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
this.deregisterInstanceFromLoadBalancer = function deregisterInstanceFromLoadBalancer() {
|
|
432
|
+
const instance = $scope.instance;
|
|
433
|
+
const loadBalancerNames = instance.loadBalancers.join(' and ');
|
|
434
|
+
|
|
435
|
+
const taskMonitor = {
|
|
436
|
+
application: app,
|
|
437
|
+
title: 'Deregistering ' + instance.instanceId + ' from ' + loadBalancerNames,
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
const submitMethod = function () {
|
|
441
|
+
return InstanceWriter.deregisterInstanceFromLoadBalancer(instance, app);
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
ConfirmationModalService.confirm({
|
|
445
|
+
header: 'Really deregister ' + instance.instanceId + ' from ' + loadBalancerNames + '?',
|
|
446
|
+
buttonText: 'Deregister ' + instance.instanceId,
|
|
447
|
+
account: instance.account,
|
|
448
|
+
taskMonitorConfig: taskMonitor,
|
|
449
|
+
submitMethod: submitMethod,
|
|
450
|
+
});
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
this.enableInstanceInDiscovery = function enableInstanceInDiscovery() {
|
|
454
|
+
const instance = $scope.instance;
|
|
455
|
+
|
|
456
|
+
const taskMonitor = {
|
|
457
|
+
application: app,
|
|
458
|
+
title: 'Enabling ' + instance.instanceId + ' in discovery',
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
const submitMethod = function () {
|
|
462
|
+
return InstanceWriter.enableInstanceInDiscovery(instance, app);
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
ConfirmationModalService.confirm({
|
|
466
|
+
header: 'Really enable ' + instance.instanceId + ' in discovery?',
|
|
467
|
+
buttonText: 'Enable ' + instance.instanceId,
|
|
468
|
+
account: instance.account,
|
|
469
|
+
taskMonitorConfig: taskMonitor,
|
|
470
|
+
submitMethod: submitMethod,
|
|
471
|
+
});
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
this.disableInstanceInDiscovery = function disableInstanceInDiscovery() {
|
|
475
|
+
const instance = $scope.instance;
|
|
476
|
+
|
|
477
|
+
const taskMonitor = {
|
|
478
|
+
application: app,
|
|
479
|
+
title: 'Disabling ' + instance.instanceId + ' in discovery',
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
const submitMethod = function () {
|
|
483
|
+
return InstanceWriter.disableInstanceInDiscovery(instance, app);
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
ConfirmationModalService.confirm({
|
|
487
|
+
header: 'Really disable ' + instance.instanceId + ' in discovery?',
|
|
488
|
+
buttonText: 'Disable ' + instance.instanceId,
|
|
489
|
+
account: instance.account,
|
|
490
|
+
taskMonitorConfig: taskMonitor,
|
|
491
|
+
submitMethod: submitMethod,
|
|
492
|
+
});
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
this.hasHealthState = function hasHealthState(healthProviderType, state) {
|
|
496
|
+
const instance = $scope.instance;
|
|
497
|
+
return instance.health.some(function (health) {
|
|
498
|
+
return health.type === healthProviderType && health.state === state;
|
|
499
|
+
});
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
const initialize = app.isStandalone
|
|
503
|
+
? retrieveInstance()
|
|
504
|
+
: $q.all([app.serverGroups.ready(), app.loadBalancers.ready()]).then(retrieveInstance);
|
|
505
|
+
|
|
506
|
+
initialize.then(() => {
|
|
507
|
+
// Two things to look out for here:
|
|
508
|
+
// 1. If the retrieveInstance call completes *after* the user has navigated away from the view, there
|
|
509
|
+
// is no point in subscribing to the refresh
|
|
510
|
+
// 2. If this is a standalone instance, there is no application that will refresh
|
|
511
|
+
if (!$scope.$$destroyed && !app.isStandalone) {
|
|
512
|
+
app.serverGroups.onRefresh($scope, retrieveInstance);
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
$scope.account = instance.account;
|
|
517
|
+
},
|
|
518
|
+
]);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
describe('Controller: gceInstanceDetailsCtrl', function () {
|
|
4
|
+
//NOTE: This is only testing the controllers dependencies. Please add more tests.
|
|
5
|
+
|
|
6
|
+
let controller;
|
|
7
|
+
let scope;
|
|
8
|
+
|
|
9
|
+
beforeEach(window.module(require('./instance.details.controller').name));
|
|
10
|
+
|
|
11
|
+
beforeEach(
|
|
12
|
+
window.inject(function ($rootScope, $controller) {
|
|
13
|
+
scope = $rootScope.$new();
|
|
14
|
+
controller = $controller('gceInstanceDetailsCtrl', {
|
|
15
|
+
$scope: scope,
|
|
16
|
+
instance: {},
|
|
17
|
+
moniker: {},
|
|
18
|
+
environment: 'test',
|
|
19
|
+
app: { isStandalone: true },
|
|
20
|
+
});
|
|
21
|
+
}),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
it('should instantiate the controller', function () {
|
|
25
|
+
expect(controller).toBeDefined();
|
|
26
|
+
});
|
|
27
|
+
});
|