@spinnaker/cloudfoundry 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 +1085 -0
- package/LICENSE.txt +203 -0
- package/dist/cf.module.d.ts +24 -0
- package/dist/cf.settings.d.ts +7 -0
- package/dist/common/applicationName.validator.d.ts +1 -0
- package/dist/deploymentStrategy/CloudFoundryDeploymentStrategySelector.d.ts +21 -0
- package/dist/deploymentStrategy/strategies/redblack/redblack.strategy.d.ts +10 -0
- package/dist/deploymentStrategy/strategies/rollingredblack/AdditionalFields.d.ts +22 -0
- package/dist/domain/ICloudFoundryAccount.d.ts +7 -0
- package/dist/domain/ICloudFoundryApplication.d.ts +4 -0
- package/dist/domain/ICloudFoundryCluster.d.ts +5 -0
- package/dist/domain/ICloudFoundryDroplet.d.ts +19 -0
- package/dist/domain/ICloudFoundryInstance.d.ts +4 -0
- package/dist/domain/ICloudFoundryLoadBalancer.d.ts +25 -0
- package/dist/domain/ICloudFoundryServerGroup.d.ts +41 -0
- package/dist/domain/ICloudFoundrySpace.d.ts +9 -0
- package/dist/domain/index.d.ts +8 -0
- package/dist/help/cloudfoundry.help.d.ts +1 -0
- package/dist/image/image.reader.cf.d.ts +4 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5929 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/details/CloudFoundryInstanceActions.d.ts +11 -0
- package/dist/instance/details/CloudFoundryInstanceDetails.d.ts +23 -0
- package/dist/instance/details/index.d.ts +1 -0
- package/dist/instance/details/sections/CloudFoundryInstanceDetailsSection.d.ts +9 -0
- package/dist/instance/details/sections/index.d.ts +1 -0
- package/dist/loadBalancer/configure/CloudFoundryMapLoadBalancerModal.d.ts +33 -0
- package/dist/loadBalancer/configure/loadBalancerDetails.d.ts +32 -0
- package/dist/loadBalancer/details/CloudFoundryLoadBalancerActions.d.ts +10 -0
- package/dist/loadBalancer/details/CloudFoundryLoadBalancerDetails.d.ts +26 -0
- package/dist/loadBalancer/details/index.d.ts +1 -0
- package/dist/loadBalancer/details/sections/CloudFoundryLoadBalancerDetailsSection.d.ts +9 -0
- package/dist/loadBalancer/details/sections/CloudFoundryLoadBalancerLinksSection.d.ts +9 -0
- package/dist/loadBalancer/details/sections/CloudFoundryLoadBalancerStatusSection.d.ts +9 -0
- package/dist/loadBalancer/details/sections/index.d.ts +3 -0
- package/dist/loadBalancer/index.d.ts +3 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +25 -0
- package/dist/pipeline/config/validation/cfTargetImpedance.validator.d.ts +9 -0
- package/dist/pipeline/config/validation/instanceSize.validator.d.ts +15 -0
- package/dist/pipeline/config/validation/requiredRoutes.validator.d.ts +4 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfig.d.ts +7 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfigForm.d.ts +13 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestDetailsTab.d.ts +6 -0
- package/dist/pipeline/stages/bakeCloudFoundryManifest/bakeCloudFoundryManifestStage.d.ts +1 -0
- package/dist/pipeline/stages/cloneServerGroup/CloudFoundryCloneServerGroupStageConfig.d.ts +11 -0
- package/dist/pipeline/stages/cloneServerGroup/cloudFoundryCloneServerGroupStage.module.d.ts +1 -0
- package/dist/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsConfig.d.ts +9 -0
- package/dist/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsStageConfigForm.d.ts +26 -0
- package/dist/pipeline/stages/createServiceBindings/cloudFoundryCreateServiceBindingsStage.d.ts +1 -0
- package/dist/pipeline/stages/createServiceKey/CloudFoundryCreateServiceKeyStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/createServiceKey/cloudFoundryCreateServiceKeyStage.module.d.ts +1 -0
- package/dist/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsConfig.d.ts +10 -0
- package/dist/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsStageConfigForm.d.ts +20 -0
- package/dist/pipeline/stages/deleteServiceBindings/cloudFoundryDeleteServiceBindingsStage.d.ts +1 -0
- package/dist/pipeline/stages/deleteServiceKey/CloudFoundryDeleteServiceKeyStageConfig.d.ts +19 -0
- package/dist/pipeline/stages/deleteServiceKey/cloudFoundryDeleteServiceKeyStage.module.d.ts +1 -0
- package/dist/pipeline/stages/deployService/CloudFoundryDeployServiceStageConfig.d.ts +24 -0
- package/dist/pipeline/stages/deployService/CreateServiceInstanceDirectInput.d.ts +29 -0
- package/dist/pipeline/stages/deployService/CreateUserProvidedInput.d.ts +19 -0
- package/dist/pipeline/stages/deployService/ICloudFoundryServiceManifestSource.d.ts +24 -0
- package/dist/pipeline/stages/deployService/ServiceTagsInput.d.ts +17 -0
- package/dist/pipeline/stages/deployService/cloudFoundryDeployServiceStage.module.d.ts +1 -0
- package/dist/pipeline/stages/destroyAsg/cloudFoundryDestroyAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfig.d.ts +5 -0
- package/dist/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfigForm.d.ts +19 -0
- package/dist/pipeline/stages/destroyService/cloudFoundryDestroyServiceStage.module.d.ts +1 -0
- package/dist/pipeline/stages/disableAsg/cloudFoundryDisableAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/enableAsg/cloudFoundryEnableAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/mapLoadBalancers/cloudFoundryMapLoadBalancersStage.module.d.ts +1 -0
- package/dist/pipeline/stages/resizeAsg/CloudFoundryResizeAsgStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/resizeAsg/cloudFoundryResizeAsgStage.module.d.ts +1 -0
- package/dist/pipeline/stages/rollbackCluster/CloudFoundryRollbackClusterStageConfig.d.ts +17 -0
- package/dist/pipeline/stages/rollbackCluster/cloudFoundryRollbackClusterStage.module.d.ts +1 -0
- package/dist/pipeline/stages/runJob/CloudFoundryRunJobStageConfig.d.ts +14 -0
- package/dist/pipeline/stages/runJob/RunJobExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/runJob/cloudFoundryRunJob.module.d.ts +1 -0
- package/dist/pipeline/stages/shareService/CloudFoundryShareServiceExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/shareService/CloudFoundryShareServiceStageConfig.d.ts +21 -0
- package/dist/pipeline/stages/shareService/cloudFoundryShareServiceStage.module.d.ts +1 -0
- package/dist/pipeline/stages/unmapLoadBalancers/cloudFoundryUnmapLoadBalancersStage.module.d.ts +1 -0
- package/dist/pipeline/stages/unshareService/CloudFoundryUnshareServiceExecutionDetails.d.ts +6 -0
- package/dist/pipeline/stages/unshareService/CloudFoundryUnshareServiceStageConfig.d.ts +18 -0
- package/dist/pipeline/stages/unshareService/cloudFoundryUnshareServiceStage.module.d.ts +1 -0
- package/dist/presentation/forms/index.d.ts +2 -0
- package/dist/presentation/forms/inputs/FormikConfigField.d.ts +10 -0
- package/dist/presentation/forms/inputs/index.d.ts +1 -0
- package/dist/presentation/forms/serverGroup/Buildpacks.d.ts +8 -0
- package/dist/presentation/forms/serverGroup/EnvironmentVariables.d.ts +8 -0
- package/dist/presentation/forms/serverGroup/HealthCheck.d.ts +12 -0
- package/dist/presentation/forms/serverGroup/InstanceParameters.d.ts +12 -0
- package/dist/presentation/forms/serverGroup/Routes.d.ts +10 -0
- package/dist/presentation/forms/serverGroup/Services.d.ts +5 -0
- package/dist/presentation/forms/serverGroup/index.d.ts +6 -0
- package/dist/presentation/index.d.ts +3 -0
- package/dist/presentation/pipeline/index.d.ts +1 -0
- package/dist/presentation/pipeline/stages/CloudFoundryAsgStageConfig.d.ts +14 -0
- package/dist/presentation/pipeline/stages/CloudFoundryLoadBalancersExecutionDetails.d.ts +6 -0
- package/dist/presentation/pipeline/stages/CloudFoundryLoadBalancersStageConfig.d.ts +25 -0
- package/dist/presentation/pipeline/stages/CloudFoundryServiceExecutionDetails.d.ts +6 -0
- package/dist/presentation/pipeline/stages/CloudFoundryServiceKeyExecutionDetails.d.ts +6 -0
- package/dist/presentation/pipeline/stages/index.d.ts +5 -0
- package/dist/presentation/widgets/accountRegionClusterSelector/AccountRegionClusterSelector.d.ts +33 -0
- package/dist/presentation/widgets/accountRegionClusterSelector/FormikAccountRegionClusterSelector.d.ts +32 -0
- package/dist/presentation/widgets/accountRegionClusterSelector/index.d.ts +2 -0
- package/dist/presentation/widgets/index.d.ts +1 -0
- package/dist/presentation/widgets/recentLogs/CloudFoundryRecentLogs.d.ts +27 -0
- package/dist/routeDomains/index.d.ts +1 -0
- package/dist/routeDomains/routeDomainSelectField.d.ts +15 -0
- package/dist/serverGroup/configure/index.d.ts +4 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.cf.d.ts +12 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilderShim.service.cf.d.ts +14 -0
- package/dist/serverGroup/configure/serverGroupConfigurationModel.cf.d.ts +65 -0
- package/dist/serverGroup/configure/wizard/CreateServerGroupModal.d.ts +31 -0
- package/dist/serverGroup/configure/wizard/ServerGroupTemplateSelection.d.ts +16 -0
- package/dist/serverGroup/configure/wizard/sections/artifactSettings/ArtifactSettings.cf.d.ts +17 -0
- package/dist/serverGroup/configure/wizard/sections/artifactSettings/ConstantArtifactSettings.cf.d.ts +11 -0
- package/dist/serverGroup/configure/wizard/sections/basicSettings/BasicSettings.cf.d.ts +24 -0
- package/dist/serverGroup/configure/wizard/sections/cloneSettings/CloneSettings.cf.d.ts +21 -0
- package/dist/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.d.ts +22 -0
- package/dist/serverGroup/details/cfServerGroupDetailsGetter.d.ts +4 -0
- package/dist/serverGroup/details/cloudFoundryServerGroupActions.d.ts +24 -0
- package/dist/serverGroup/details/mapLoadBalancers/CloudFoundryMapLoadBalancersModal.d.ts +28 -0
- package/dist/serverGroup/details/mapLoadBalancers/CloudFoundryUnmapLoadBalancersModal.d.ts +28 -0
- package/dist/serverGroup/details/resize/CloudFoundryResizeServerGroupModal.d.ts +37 -0
- package/dist/serverGroup/details/rollback/CloudFoundryRollbackServerGroupModal.d.ts +36 -0
- package/dist/serverGroup/details/sections/ApplicationManagerSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/BoundServicesSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/BuildSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/EnvironmentVariablesSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/HealthCheckSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/ICloudFoundryServerGroupDetailsSectionProps.d.ts +5 -0
- package/dist/serverGroup/details/sections/MetricsSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/PackageSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/ServerGroupInformationSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/ServerGroupSizingSection.d.ts +6 -0
- package/dist/serverGroup/details/sections/index.d.ts +9 -0
- package/dist/serverGroup/index.d.ts +5 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +10 -0
- package/package.json +52 -0
- package/src/cf.module.ts +85 -0
- package/src/cf.settings.ts +14 -0
- package/src/common/applicationName.validator.ts +43 -0
- package/src/common/cloudFoundry.less +16 -0
- package/src/deploymentStrategy/CloudFoundryDeploymentStrategySelector.tsx +175 -0
- package/src/deploymentStrategy/strategies/redblack/redblack.strategy.ts +11 -0
- package/src/deploymentStrategy/strategies/rollingredblack/AdditionalFields.tsx +161 -0
- package/src/domain/ICloudFoundryAccount.ts +9 -0
- package/src/domain/ICloudFoundryApplication.ts +5 -0
- package/src/domain/ICloudFoundryCluster.ts +6 -0
- package/src/domain/ICloudFoundryDroplet.ts +22 -0
- package/src/domain/ICloudFoundryInstance.ts +5 -0
- package/src/domain/ICloudFoundryLoadBalancer.ts +29 -0
- package/src/domain/ICloudFoundryServerGroup.ts +47 -0
- package/src/domain/ICloudFoundrySpace.ts +10 -0
- package/src/domain/index.ts +8 -0
- package/src/help/cloudfoundry.help.ts +31 -0
- package/src/image/image.reader.cf.ts +17 -0
- package/src/index.ts +7 -0
- package/src/instance/details/CloudFoundryInstanceActions.tsx +59 -0
- package/src/instance/details/CloudFoundryInstanceDetails.tsx +154 -0
- package/src/instance/details/index.ts +1 -0
- package/src/instance/details/sections/CloudFoundryInstanceDetailsSection.tsx +49 -0
- package/src/instance/details/sections/index.ts +1 -0
- package/src/loadBalancer/configure/CloudFoundryMapLoadBalancerModal.tsx +210 -0
- package/src/loadBalancer/configure/loadBalancerDetails.tsx +228 -0
- package/src/loadBalancer/details/CloudFoundryLoadBalancerActions.tsx +61 -0
- package/src/loadBalancer/details/CloudFoundryLoadBalancerDetails.tsx +148 -0
- package/src/loadBalancer/details/index.ts +1 -0
- package/src/loadBalancer/details/sections/CloudFoundryLoadBalancerDetailsSection.tsx +63 -0
- package/src/loadBalancer/details/sections/CloudFoundryLoadBalancerLinksSection.tsx +34 -0
- package/src/loadBalancer/details/sections/CloudFoundryLoadBalancerStatusSection.tsx +27 -0
- package/src/loadBalancer/details/sections/index.ts +3 -0
- package/src/loadBalancer/index.ts +3 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +144 -0
- package/src/logo/cf.icon.svg +12 -0
- package/src/logo/cf.logo.less +5 -0
- package/src/logo/cf.logo.svg +12 -0
- package/src/pipeline/config/validation/cfTargetImpedance.validator.ts +60 -0
- package/src/pipeline/config/validation/instanceSize.validator.ts +66 -0
- package/src/pipeline/config/validation/requiredRoutes.validator.ts +26 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfig.tsx +62 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestConfigForm.tsx +174 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/BakeCloudFoundryManifestDetailsTab.tsx +35 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/bakeCloudFoundryManifestConfig.spec.tsx +80 -0
- package/src/pipeline/stages/bakeCloudFoundryManifest/bakeCloudFoundryManifestStage.ts +35 -0
- package/src/pipeline/stages/cloneServerGroup/CloudFoundryCloneServerGroupStageConfig.tsx +113 -0
- package/src/pipeline/stages/cloneServerGroup/cloudFoundryCloneServerGroupStage.module.ts +14 -0
- package/src/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsConfig.spec.tsx +35 -0
- package/src/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsConfig.tsx +69 -0
- package/src/pipeline/stages/createServiceBindings/CloudFoundryCreateServiceBindingsStageConfigForm.tsx +230 -0
- package/src/pipeline/stages/createServiceBindings/cloudFoundryCreateServiceBindingsStage.ts +19 -0
- package/src/pipeline/stages/createServiceBindings/cloudFoundryCreateServiceBindingsStageForm.spec.tsx +50 -0
- package/src/pipeline/stages/createServiceKey/CloudFoundryCreateServiceKeyStageConfig.tsx +116 -0
- package/src/pipeline/stages/createServiceKey/cloudFoundryCreateServiceKeyStage.module.ts +21 -0
- package/src/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsConfig.tsx +69 -0
- package/src/pipeline/stages/deleteServiceBindings/CloudFoundryDeleteServiceBindingsStageConfigForm.tsx +158 -0
- package/src/pipeline/stages/deleteServiceBindings/cloudFoundryDeleteServiceBindingsStage.ts +19 -0
- package/src/pipeline/stages/deleteServiceBindings/cloudFoundryDeleteServiceBindingsStageForm.spec.tsx +49 -0
- package/src/pipeline/stages/deleteServiceKey/CloudFoundryDeleteServiceKeyStageConfig.tsx +116 -0
- package/src/pipeline/stages/deleteServiceKey/cloudFoundryDeleteServiceKeyStage.module.ts +22 -0
- package/src/pipeline/stages/deployService/CloudFoundryDeployServiceStageConfig.tsx +198 -0
- package/src/pipeline/stages/deployService/CreateServiceInstanceDirectInput.tsx +164 -0
- package/src/pipeline/stages/deployService/CreateUserProvidedInput.tsx +116 -0
- package/src/pipeline/stages/deployService/ICloudFoundryServiceManifestSource.ts +27 -0
- package/src/pipeline/stages/deployService/ServiceTagsInput.tsx +89 -0
- package/src/pipeline/stages/deployService/cloudFoundryDeployServiceStage.module.ts +153 -0
- package/src/pipeline/stages/deployService/cloudfoundryDeployServiceStage.less +12 -0
- package/src/pipeline/stages/destroyAsg/cloudFoundryDestroyAsgStage.module.ts +23 -0
- package/src/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfig.tsx +46 -0
- package/src/pipeline/stages/destroyService/CloudFoundryDestroyServiceStageConfigForm.tsx +134 -0
- package/src/pipeline/stages/destroyService/cloudFoundryDestroyServiceStage.module.ts +20 -0
- package/src/pipeline/stages/disableAsg/cloudFoundryDisableAsgStage.module.ts +18 -0
- package/src/pipeline/stages/enableAsg/cloudFoundryEnableAsgStage.module.ts +18 -0
- package/src/pipeline/stages/mapLoadBalancers/cloudFoundryMapLoadBalancersStage.module.ts +21 -0
- package/src/pipeline/stages/resizeAsg/CloudFoundryResizeAsgStageConfig.tsx +148 -0
- package/src/pipeline/stages/resizeAsg/cloudFoundryResizeAsgStage.module.ts +52 -0
- package/src/pipeline/stages/rollbackCluster/CloudFoundryRollbackClusterStageConfig.tsx +90 -0
- package/src/pipeline/stages/rollbackCluster/cloudFoundryRollbackClusterStage.module.ts +19 -0
- package/src/pipeline/stages/runJob/CloudFoundryRunJobStageConfig.tsx +100 -0
- package/src/pipeline/stages/runJob/RunJobExecutionDetails.tsx +62 -0
- package/src/pipeline/stages/runJob/cloudFoundryRunJob.module.ts +24 -0
- package/src/pipeline/stages/shareService/CloudFoundryShareServiceExecutionDetails.tsx +52 -0
- package/src/pipeline/stages/shareService/CloudFoundryShareServiceStageConfig.tsx +141 -0
- package/src/pipeline/stages/shareService/cloudFoundryShareServiceStage.module.ts +21 -0
- package/src/pipeline/stages/unmapLoadBalancers/cloudFoundryUnmapLoadBalancersStage.module.ts +21 -0
- package/src/pipeline/stages/unshareService/CloudFoundryUnshareServiceExecutionDetails.tsx +46 -0
- package/src/pipeline/stages/unshareService/CloudFoundryUnshareServiceStageConfig.tsx +114 -0
- package/src/pipeline/stages/unshareService/cloudFoundryUnshareServiceStage.module.ts +21 -0
- package/src/presentation/forms/index.ts +2 -0
- package/src/presentation/forms/inputs/FormikConfigField.tsx +28 -0
- package/src/presentation/forms/inputs/index.ts +1 -0
- package/src/presentation/forms/serverGroup/Buildpacks.tsx +69 -0
- package/src/presentation/forms/serverGroup/EnvironmentVariables.tsx +94 -0
- package/src/presentation/forms/serverGroup/HealthCheck.tsx +57 -0
- package/src/presentation/forms/serverGroup/InstanceParameters.tsx +63 -0
- package/src/presentation/forms/serverGroup/Routes.tsx +74 -0
- package/src/presentation/forms/serverGroup/Services.tsx +62 -0
- package/src/presentation/forms/serverGroup/index.ts +6 -0
- package/src/presentation/index.ts +3 -0
- package/src/presentation/pipeline/index.ts +1 -0
- package/src/presentation/pipeline/stages/CloudFoundryAsgStageConfig.tsx +67 -0
- package/src/presentation/pipeline/stages/CloudFoundryLoadBalancersExecutionDetails.tsx +53 -0
- package/src/presentation/pipeline/stages/CloudFoundryLoadBalancersStageConfig.tsx +116 -0
- package/src/presentation/pipeline/stages/CloudFoundryServiceExecutionDetails.tsx +46 -0
- package/src/presentation/pipeline/stages/CloudFoundryServiceKeyExecutionDetails.tsx +52 -0
- package/src/presentation/pipeline/stages/index.ts +5 -0
- package/src/presentation/widgets/accountRegionClusterSelector/AccountRegionClusterSelector.spec.tsx +385 -0
- package/src/presentation/widgets/accountRegionClusterSelector/AccountRegionClusterSelector.tsx +231 -0
- package/src/presentation/widgets/accountRegionClusterSelector/FormikAccountRegionClusterSelector.tsx +164 -0
- package/src/presentation/widgets/accountRegionClusterSelector/index.ts +2 -0
- package/src/presentation/widgets/index.ts +1 -0
- package/src/presentation/widgets/recentLogs/CloudFoundryRecentLogs.tsx +112 -0
- package/src/routeDomains/index.ts +1 -0
- package/src/routeDomains/routeDomainSelectField.tsx +48 -0
- package/src/serverGroup/configure/index.ts +4 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.cf.ts +168 -0
- package/src/serverGroup/configure/serverGroupCommandBuilderShim.service.cf.ts +64 -0
- package/src/serverGroup/configure/serverGroupConfigurationModel.cf.ts +77 -0
- package/src/serverGroup/configure/wizard/CreateServerGroupModal.tsx +194 -0
- package/src/serverGroup/configure/wizard/ServerGroupTemplateSelection.tsx +55 -0
- package/src/serverGroup/configure/wizard/sections/artifactSettings/ArtifactSettings.cf.tsx +78 -0
- package/src/serverGroup/configure/wizard/sections/artifactSettings/ConstantArtifactSettings.cf.tsx +49 -0
- package/src/serverGroup/configure/wizard/sections/basicSettings/BasicSettings.cf.tsx +163 -0
- package/src/serverGroup/configure/wizard/sections/cloneSettings/CloneSettings.cf.tsx +101 -0
- package/src/serverGroup/configure/wizard/sections/configurationSettings/ConfigurationSettings.cf.tsx +230 -0
- package/src/serverGroup/configure/wizard/serverGroup.less +3 -0
- package/src/serverGroup/details/cfServerGroupDetailsGetter.ts +60 -0
- package/src/serverGroup/details/cloudFoundryServerGroupActions.tsx +365 -0
- package/src/serverGroup/details/mapLoadBalancers/CloudFoundryMapLoadBalancersModal.tsx +137 -0
- package/src/serverGroup/details/mapLoadBalancers/CloudFoundryUnmapLoadBalancersModal.tsx +137 -0
- package/src/serverGroup/details/resize/CloudFoundryResizeServerGroupModal.tsx +232 -0
- package/src/serverGroup/details/rollback/CloudFoundryRollbackServerGroupModal.tsx +179 -0
- package/src/serverGroup/details/sections/ApplicationManagerSection.tsx +28 -0
- package/src/serverGroup/details/sections/BoundServicesSection.tsx +39 -0
- package/src/serverGroup/details/sections/BuildSection.tsx +61 -0
- package/src/serverGroup/details/sections/EnvironmentVariablesSection.tsx +34 -0
- package/src/serverGroup/details/sections/HealthCheckSection.tsx +28 -0
- package/src/serverGroup/details/sections/ICloudFoundryServerGroupDetailsSectionProps.ts +6 -0
- package/src/serverGroup/details/sections/MetricsSection.tsx +28 -0
- package/src/serverGroup/details/sections/PackageSection.tsx +27 -0
- package/src/serverGroup/details/sections/ServerGroupInformationSection.tsx +58 -0
- package/src/serverGroup/details/sections/ServerGroupSizingSection.tsx +27 -0
- package/src/serverGroup/details/sections/index.ts +9 -0
- package/src/serverGroup/index.ts +5 -0
- package/src/serverGroup/serverGroup.transformer.ts +42 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Option } from 'react-select';
|
|
3
|
+
import Select from 'react-select';
|
|
4
|
+
import { from as observableFrom, Subject } from 'rxjs';
|
|
5
|
+
import { takeUntil } from 'rxjs/operators';
|
|
6
|
+
|
|
7
|
+
import type { Application, IAccount, IFormikStageConfigInjectedProps, IRegion } from '@spinnaker/core';
|
|
8
|
+
import { AccountService, StageConfigField } from '@spinnaker/core';
|
|
9
|
+
|
|
10
|
+
export interface ICloudFoundryDestroyServiceStageConfigState {
|
|
11
|
+
accounts: IAccount[];
|
|
12
|
+
regions: string[];
|
|
13
|
+
application: Application;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class CloudFoundryDestroyServiceStageConfigForm extends React.Component<
|
|
17
|
+
IFormikStageConfigInjectedProps,
|
|
18
|
+
ICloudFoundryDestroyServiceStageConfigState
|
|
19
|
+
> {
|
|
20
|
+
private destroy$ = new Subject();
|
|
21
|
+
|
|
22
|
+
constructor(props: IFormikStageConfigInjectedProps, context: any) {
|
|
23
|
+
super(props, context);
|
|
24
|
+
this.props.formik.setFieldValue('cloudProvider', 'cloudfoundry');
|
|
25
|
+
this.state = {
|
|
26
|
+
accounts: [],
|
|
27
|
+
regions: [],
|
|
28
|
+
application: props.application,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public componentDidMount() {
|
|
33
|
+
const stage = this.props.formik.values;
|
|
34
|
+
this.props.formik.setFieldValue('application', this.state.application.name);
|
|
35
|
+
observableFrom(AccountService.listAccounts('cloudfoundry'))
|
|
36
|
+
.pipe(takeUntil(this.destroy$))
|
|
37
|
+
.subscribe((rawAccounts: IAccount[]) => this.setState({ accounts: rawAccounts }));
|
|
38
|
+
if (stage.credentials) {
|
|
39
|
+
this.loadRegions(stage.credentials);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public componentWillUnmount(): void {
|
|
44
|
+
this.destroy$.next();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
private loadRegions = (creds: string) => {
|
|
48
|
+
this.setState({ regions: [] });
|
|
49
|
+
observableFrom(AccountService.getRegionsForAccount(creds))
|
|
50
|
+
.pipe(takeUntil(this.destroy$))
|
|
51
|
+
.subscribe((regionList: IRegion[]) => {
|
|
52
|
+
const regions = regionList.map((r) => r.name);
|
|
53
|
+
regions.sort((a, b) => a.localeCompare(b));
|
|
54
|
+
this.setState({ regions: regions });
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
private accountUpdated = (option: Option<string>) => {
|
|
59
|
+
const creds = option.value;
|
|
60
|
+
this.props.formik.setFieldValue('credentials', creds);
|
|
61
|
+
this.props.formik.setFieldValue('region', '');
|
|
62
|
+
if (creds) {
|
|
63
|
+
this.loadRegions(creds);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
private regionUpdated = (option: Option<string>) => {
|
|
68
|
+
this.props.formik.setFieldValue('region', option.value);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
private serviceInstanceNameUpdated = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
72
|
+
this.props.formik.setFieldValue('serviceInstanceName', event.target.value);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
private removeBindingsUpdated = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
76
|
+
this.props.formik.setFieldValue('removeBindings', event.target.checked);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
public render() {
|
|
80
|
+
const stage = this.props.formik.values;
|
|
81
|
+
const { accounts, regions } = this.state;
|
|
82
|
+
const { credentials, region, serviceInstanceName } = stage;
|
|
83
|
+
return (
|
|
84
|
+
<div className="form-horizontal">
|
|
85
|
+
<StageConfigField label="Account">
|
|
86
|
+
<Select
|
|
87
|
+
options={
|
|
88
|
+
accounts &&
|
|
89
|
+
accounts.map((acc: IAccount) => ({
|
|
90
|
+
label: acc.name,
|
|
91
|
+
value: acc.name,
|
|
92
|
+
}))
|
|
93
|
+
}
|
|
94
|
+
clearable={false}
|
|
95
|
+
value={credentials}
|
|
96
|
+
onChange={this.accountUpdated}
|
|
97
|
+
/>
|
|
98
|
+
</StageConfigField>
|
|
99
|
+
<StageConfigField label="Region">
|
|
100
|
+
<Select
|
|
101
|
+
options={
|
|
102
|
+
regions &&
|
|
103
|
+
regions.map((r: string) => ({
|
|
104
|
+
label: r,
|
|
105
|
+
value: r,
|
|
106
|
+
}))
|
|
107
|
+
}
|
|
108
|
+
clearable={false}
|
|
109
|
+
value={region}
|
|
110
|
+
onChange={this.regionUpdated}
|
|
111
|
+
/>
|
|
112
|
+
</StageConfigField>
|
|
113
|
+
<StageConfigField label="Service Instance Name">
|
|
114
|
+
<input
|
|
115
|
+
type="text"
|
|
116
|
+
className="form-control"
|
|
117
|
+
required={true}
|
|
118
|
+
onChange={this.serviceInstanceNameUpdated}
|
|
119
|
+
value={serviceInstanceName}
|
|
120
|
+
/>
|
|
121
|
+
</StageConfigField>
|
|
122
|
+
<StageConfigField label="Remove Bindings">
|
|
123
|
+
<input type="checkbox" checked={stage.removeBindings} onChange={this.removeBindingsUpdated} />
|
|
124
|
+
{stage.removeBindings && (
|
|
125
|
+
<div>
|
|
126
|
+
Warning: Prior to destroying, this will attempt to unbind any server groups that are bound to this
|
|
127
|
+
service. This stage will fail if any server groups don't belong to the spinnaker application.
|
|
128
|
+
</div>
|
|
129
|
+
)}
|
|
130
|
+
</StageConfigField>
|
|
131
|
+
</div>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IStage } from '@spinnaker/core';
|
|
2
|
+
import { ExecutionDetailsTasks, Registry } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
CloudFoundryDestroyServiceStageConfig,
|
|
6
|
+
validateCloudFoundryDestroyServiceStage,
|
|
7
|
+
} from './CloudFoundryDestroyServiceStageConfig';
|
|
8
|
+
import { CloudFoundryServiceExecutionDetails } from '../../../presentation';
|
|
9
|
+
|
|
10
|
+
Registry.pipeline.registerStage({
|
|
11
|
+
accountExtractor: (stage: IStage) => [stage.context.credentials],
|
|
12
|
+
configAccountExtractor: (stage: IStage) => [stage.credentials],
|
|
13
|
+
cloudProvider: 'cloudfoundry',
|
|
14
|
+
component: CloudFoundryDestroyServiceStageConfig,
|
|
15
|
+
supportsCustomTimeout: true,
|
|
16
|
+
executionDetailsSections: [CloudFoundryServiceExecutionDetails, ExecutionDetailsTasks],
|
|
17
|
+
key: 'destroyService',
|
|
18
|
+
provides: 'destroyService',
|
|
19
|
+
validateFn: validateCloudFoundryDestroyServiceStage,
|
|
20
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IStage } from '@spinnaker/core';
|
|
2
|
+
import { Registry } from '@spinnaker/core';
|
|
3
|
+
import { CloudFoundryAsgStageConfig } from '../../../presentation';
|
|
4
|
+
|
|
5
|
+
Registry.pipeline.registerStage({
|
|
6
|
+
accountExtractor: (stage: IStage) => [stage.context.credentials],
|
|
7
|
+
cloudProvider: 'cloudfoundry',
|
|
8
|
+
component: CloudFoundryAsgStageConfig,
|
|
9
|
+
configAccountExtractor: (stage: IStage) => [stage.credentials],
|
|
10
|
+
key: 'disableServerGroup',
|
|
11
|
+
provides: 'disableServerGroup',
|
|
12
|
+
validators: [
|
|
13
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
14
|
+
{ type: 'requiredField', fieldName: 'target' },
|
|
15
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
16
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
17
|
+
],
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IStage } from '@spinnaker/core';
|
|
2
|
+
import { Registry } from '@spinnaker/core';
|
|
3
|
+
import { CloudFoundryAsgStageConfig } from '../../../presentation';
|
|
4
|
+
|
|
5
|
+
Registry.pipeline.registerStage({
|
|
6
|
+
accountExtractor: (stage: IStage) => [stage.context.credentials],
|
|
7
|
+
cloudProvider: 'cloudfoundry',
|
|
8
|
+
component: CloudFoundryAsgStageConfig,
|
|
9
|
+
configAccountExtractor: (stage: IStage) => [stage.credentials],
|
|
10
|
+
key: 'enableServerGroup',
|
|
11
|
+
provides: 'enableServerGroup',
|
|
12
|
+
validators: [
|
|
13
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
14
|
+
{ type: 'requiredField', fieldName: 'target' },
|
|
15
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
16
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
17
|
+
],
|
|
18
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IStage } from '@spinnaker/core';
|
|
2
|
+
import { ExecutionDetailsTasks, Registry } from '@spinnaker/core';
|
|
3
|
+
import { CloudFoundryLoadBalancersExecutionDetails, CloudFoundryLoadBalancersStageConfig } from '../../../presentation';
|
|
4
|
+
|
|
5
|
+
Registry.pipeline.registerStage({
|
|
6
|
+
accountExtractor: (stage: IStage) => [stage.context.credentials],
|
|
7
|
+
configAccountExtractor: (stage: IStage) => [stage.credentials],
|
|
8
|
+
cloudProvider: 'cloudfoundry',
|
|
9
|
+
component: CloudFoundryLoadBalancersStageConfig,
|
|
10
|
+
description: 'Map a load balancer',
|
|
11
|
+
executionDetailsSections: [CloudFoundryLoadBalancersExecutionDetails, ExecutionDetailsTasks],
|
|
12
|
+
key: 'mapLoadBalancers',
|
|
13
|
+
label: 'Map Load Balancer',
|
|
14
|
+
validators: [
|
|
15
|
+
{ type: 'requiredField', preventSave: true, fieldName: 'cluster' },
|
|
16
|
+
{ type: 'requiredField', preventSave: true, fieldName: 'credentials', fieldLabel: 'account' },
|
|
17
|
+
{ type: 'requiredField', preventSave: true, fieldName: 'region' },
|
|
18
|
+
{ type: 'requiredField', preventSave: true, fieldName: 'target' },
|
|
19
|
+
{ type: 'cfRequiredRoutesField', preventSave: true, fieldName: 'loadBalancerNames' },
|
|
20
|
+
],
|
|
21
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { from as observableFrom, Subject } from 'rxjs';
|
|
3
|
+
import { takeUntil } from 'rxjs/operators';
|
|
4
|
+
|
|
5
|
+
import type { IAccount, IStageConfigProps } from '@spinnaker/core';
|
|
6
|
+
import { AccountService, NgReact, StageConfigField, StageConstants } from '@spinnaker/core';
|
|
7
|
+
import { AccountRegionClusterSelector } from '../../../presentation';
|
|
8
|
+
|
|
9
|
+
export interface ICloudFoundryResizeAsgStageConfigState {
|
|
10
|
+
accounts: IAccount[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class CloudFoundryResizeAsgStageConfig extends React.Component<
|
|
14
|
+
IStageConfigProps,
|
|
15
|
+
ICloudFoundryResizeAsgStageConfigState
|
|
16
|
+
> {
|
|
17
|
+
private destroy$ = new Subject();
|
|
18
|
+
|
|
19
|
+
constructor(props: IStageConfigProps) {
|
|
20
|
+
super(props);
|
|
21
|
+
const { stage } = props;
|
|
22
|
+
let interestingHealthProviderNames;
|
|
23
|
+
if (
|
|
24
|
+
stage.isNew &&
|
|
25
|
+
props.application.attributes.platformHealthOnlyShowOverride &&
|
|
26
|
+
props.application.attributes.platformHealthOnly
|
|
27
|
+
) {
|
|
28
|
+
interestingHealthProviderNames = ['Cloud Foundry'];
|
|
29
|
+
}
|
|
30
|
+
const { capacity } = stage;
|
|
31
|
+
this.props.updateStageField({
|
|
32
|
+
action: 'scale_exact',
|
|
33
|
+
capacity: capacity && capacity.desired ? capacity : { desired: 1, min: 1, max: 1 },
|
|
34
|
+
cloudProvider: 'cloudfoundry',
|
|
35
|
+
diskQuota: stage.diskQuota || 1024,
|
|
36
|
+
interestingHealthProviderNames: interestingHealthProviderNames,
|
|
37
|
+
memory: stage.memory || 1024,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
this.state = { accounts: [] };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public componentDidMount(): void {
|
|
44
|
+
observableFrom(AccountService.listAccounts('cloudfoundry'))
|
|
45
|
+
.pipe(takeUntil(this.destroy$))
|
|
46
|
+
.subscribe((accounts) => this.setState({ accounts }));
|
|
47
|
+
this.props.stageFieldUpdated();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public componentWillUnmount(): void {
|
|
51
|
+
this.destroy$.next();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
private instanceCountUpdated = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
55
|
+
const instanceCount = parseInt(event.target.value, 10);
|
|
56
|
+
this.props.updateStageField({
|
|
57
|
+
capacity: {
|
|
58
|
+
desired: instanceCount,
|
|
59
|
+
min: instanceCount,
|
|
60
|
+
max: instanceCount,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
private memoryUpdated = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
66
|
+
this.props.updateStageField({ memory: parseInt(event.target.value, 10) });
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
private diskQuotaUpdated = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
70
|
+
this.props.updateStageField({ diskQuota: parseInt(event.target.value, 10) });
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
private targetUpdated = (target: string) => {
|
|
74
|
+
this.props.updateStageField({ target });
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
private componentUpdated = (stage: any): void => {
|
|
78
|
+
this.props.updateStageField({
|
|
79
|
+
credentials: stage.credentials,
|
|
80
|
+
regions: stage.regions,
|
|
81
|
+
cluster: stage.cluster,
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
public render() {
|
|
86
|
+
const { accounts } = this.state;
|
|
87
|
+
const { application, pipeline, stage } = this.props;
|
|
88
|
+
const { capacity, diskQuota, memory, target } = stage;
|
|
89
|
+
const instanceCount = capacity.desired;
|
|
90
|
+
const { TargetSelect } = NgReact;
|
|
91
|
+
return (
|
|
92
|
+
<div className="cloudfoundry-resize-asg-stage form-horizontal">
|
|
93
|
+
{!pipeline.strategy && (
|
|
94
|
+
<AccountRegionClusterSelector
|
|
95
|
+
accounts={accounts}
|
|
96
|
+
application={application}
|
|
97
|
+
cloudProvider={'cloudfoundry'}
|
|
98
|
+
onComponentUpdate={this.componentUpdated}
|
|
99
|
+
component={stage}
|
|
100
|
+
/>
|
|
101
|
+
)}
|
|
102
|
+
<StageConfigField label="Target">
|
|
103
|
+
<TargetSelect model={{ target }} options={StageConstants.TARGET_LIST} onChange={this.targetUpdated} />
|
|
104
|
+
</StageConfigField>
|
|
105
|
+
<div className="form-group">
|
|
106
|
+
<span className="col-md-3 sm-label-right" />
|
|
107
|
+
<div className="col-md-9">
|
|
108
|
+
<div className="col-md-3 sm-label-left">Instances</div>
|
|
109
|
+
<div className="col-md-3 sm-label-left">Mem (MB)</div>
|
|
110
|
+
<div className="col-md-3 sm-label-left">Disk (MB)</div>
|
|
111
|
+
</div>
|
|
112
|
+
<StageConfigField label="Match capacity">
|
|
113
|
+
<div className="col-md-3">
|
|
114
|
+
<input
|
|
115
|
+
type="number"
|
|
116
|
+
key="instanceCount"
|
|
117
|
+
onChange={this.instanceCountUpdated}
|
|
118
|
+
value={instanceCount}
|
|
119
|
+
className="form-control input-sm"
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
<div className="col-md-3">
|
|
123
|
+
<input
|
|
124
|
+
type="number"
|
|
125
|
+
key="memory"
|
|
126
|
+
onChange={this.memoryUpdated}
|
|
127
|
+
value={memory}
|
|
128
|
+
className="form-control input-sm"
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
<div className="col-md-3">
|
|
132
|
+
<input
|
|
133
|
+
type="number"
|
|
134
|
+
key="diskQuota"
|
|
135
|
+
onChange={this.diskQuotaUpdated}
|
|
136
|
+
value={diskQuota}
|
|
137
|
+
className="form-control input-sm"
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
<div className="col-md-9 col-md-offset-3">
|
|
141
|
+
<em className="subinput-note">Scaled capacity will match the numbers entered</em>
|
|
142
|
+
</div>
|
|
143
|
+
</StageConfigField>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { IStage } from '@spinnaker/core';
|
|
2
|
+
import { Registry } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
import { CloudFoundryResizeAsgStageConfig } from './CloudFoundryResizeAsgStageConfig';
|
|
5
|
+
import type { IInstanceFieldSizeValidationConfig } from '../../config/validation/instanceSize.validator';
|
|
6
|
+
|
|
7
|
+
const diskValidator: IInstanceFieldSizeValidationConfig = {
|
|
8
|
+
type: 'cfInstanceSizeField',
|
|
9
|
+
fieldName: 'diskQuota',
|
|
10
|
+
fieldLabel: 'Disk Mb',
|
|
11
|
+
min: 256,
|
|
12
|
+
preventSave: true,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const instanceCountValidator: IInstanceFieldSizeValidationConfig = {
|
|
16
|
+
type: 'cfInstanceSizeField',
|
|
17
|
+
fieldName: 'capacity.desired',
|
|
18
|
+
fieldLabel: 'Instances',
|
|
19
|
+
min: 0,
|
|
20
|
+
preventSave: true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const memoryValidator: IInstanceFieldSizeValidationConfig = {
|
|
24
|
+
type: 'cfInstanceSizeField',
|
|
25
|
+
fieldName: 'memory',
|
|
26
|
+
fieldLabel: 'Mem Mb',
|
|
27
|
+
min: 256,
|
|
28
|
+
preventSave: true,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
Registry.pipeline.registerStage({
|
|
32
|
+
accountExtractor: (stage: IStage) => [stage.context.credentials],
|
|
33
|
+
cloudProvider: 'cloudfoundry',
|
|
34
|
+
component: CloudFoundryResizeAsgStageConfig,
|
|
35
|
+
configAccountExtractor: (stage: IStage) => [stage.credentials],
|
|
36
|
+
key: 'resizeServerGroup',
|
|
37
|
+
provides: 'resizeServerGroup',
|
|
38
|
+
validators: [
|
|
39
|
+
{
|
|
40
|
+
type: 'cfTargetImpedance',
|
|
41
|
+
message:
|
|
42
|
+
'This pipeline will attempt to resize a server group without deploying a new version into the same cluster.',
|
|
43
|
+
},
|
|
44
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
45
|
+
{ type: 'requiredField', fieldName: 'target' },
|
|
46
|
+
{ type: 'requiredField', fieldName: 'regions' },
|
|
47
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
48
|
+
instanceCountValidator,
|
|
49
|
+
memoryValidator,
|
|
50
|
+
diskValidator,
|
|
51
|
+
],
|
|
52
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { from as observableFrom, Subject } from 'rxjs';
|
|
3
|
+
import { takeUntil } from 'rxjs/operators';
|
|
4
|
+
|
|
5
|
+
import type { IAccount, IPipeline, IStageConfigProps } from '@spinnaker/core';
|
|
6
|
+
import { AccountService, StageConfigField } from '@spinnaker/core';
|
|
7
|
+
import { AccountRegionClusterSelector } from '../../../presentation';
|
|
8
|
+
|
|
9
|
+
export interface ICloudFoundryRollbackClusterStageProps extends IStageConfigProps {
|
|
10
|
+
pipeline: IPipeline;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ICloudFoundryRollbackClusterStageConfigState {
|
|
14
|
+
accounts: IAccount[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class CloudFoundryRollbackClusterStageConfig extends React.Component<
|
|
18
|
+
ICloudFoundryRollbackClusterStageProps,
|
|
19
|
+
ICloudFoundryRollbackClusterStageConfigState
|
|
20
|
+
> {
|
|
21
|
+
private destroy$ = new Subject();
|
|
22
|
+
|
|
23
|
+
constructor(props: ICloudFoundryRollbackClusterStageProps) {
|
|
24
|
+
super(props);
|
|
25
|
+
|
|
26
|
+
this.props.updateStageField({
|
|
27
|
+
cloudProvider: 'cloudfoundry',
|
|
28
|
+
regions: this.props.stage.regions || [],
|
|
29
|
+
targetHealthyRollbackPercentage: 100,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
this.state = { accounts: [] };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public componentDidMount(): void {
|
|
36
|
+
observableFrom(AccountService.listAccounts('cloudfoundry'))
|
|
37
|
+
.pipe(takeUntil(this.destroy$))
|
|
38
|
+
.subscribe((accounts) => this.setState({ accounts }));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public componentWillUnmount(): void {
|
|
42
|
+
this.destroy$.next();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private waitTimeBetweenRegionsUpdated = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
|
46
|
+
const time = parseInt(event.target.value || '0', 10);
|
|
47
|
+
this.props.updateStageField({ waitTimeBetweenRegions: time });
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
private componentUpdate = (stage: any): void => {
|
|
51
|
+
this.props.updateStageField({
|
|
52
|
+
credentials: stage.credentials,
|
|
53
|
+
regions: stage.regions,
|
|
54
|
+
cluster: stage.cluster,
|
|
55
|
+
moniker: stage.moniker,
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
public render() {
|
|
60
|
+
const { application, pipeline, stage } = this.props;
|
|
61
|
+
const { waitTimeBetweenRegions } = stage;
|
|
62
|
+
const { accounts } = this.state;
|
|
63
|
+
return (
|
|
64
|
+
<div className="form-horizontal">
|
|
65
|
+
{!pipeline.strategy && (
|
|
66
|
+
<AccountRegionClusterSelector
|
|
67
|
+
accounts={accounts}
|
|
68
|
+
application={application}
|
|
69
|
+
cloudProvider={'cloudfoundry'}
|
|
70
|
+
onComponentUpdate={this.componentUpdate}
|
|
71
|
+
component={stage}
|
|
72
|
+
/>
|
|
73
|
+
)}
|
|
74
|
+
|
|
75
|
+
{stage.regions.length > 1 && (
|
|
76
|
+
<StageConfigField label="Wait">
|
|
77
|
+
<input
|
|
78
|
+
type="number"
|
|
79
|
+
min="0"
|
|
80
|
+
value={waitTimeBetweenRegions}
|
|
81
|
+
onChange={this.waitTimeBetweenRegionsUpdated}
|
|
82
|
+
className="form-control input-sm inline-number"
|
|
83
|
+
/>
|
|
84
|
+
seconds between regional rollbacks.
|
|
85
|
+
</StageConfigField>
|
|
86
|
+
)}
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IStage } from '@spinnaker/core';
|
|
2
|
+
import { Registry } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
import { CloudFoundryRollbackClusterStageConfig } from './CloudFoundryRollbackClusterStageConfig';
|
|
5
|
+
|
|
6
|
+
Registry.pipeline.registerStage({
|
|
7
|
+
accountExtractor: (stage: IStage) => [stage.context.credentials],
|
|
8
|
+
configAccountExtractor: (stage: IStage) => [stage.credentials],
|
|
9
|
+
provides: 'rollbackCluster',
|
|
10
|
+
key: 'rollbackCluster',
|
|
11
|
+
cloudProvider: 'cloudfoundry',
|
|
12
|
+
component: CloudFoundryRollbackClusterStageConfig,
|
|
13
|
+
controller: 'cfRollbackClusterStageCtrl',
|
|
14
|
+
validators: [
|
|
15
|
+
{ type: 'requiredField', preventSave: true, fieldName: 'cluster' },
|
|
16
|
+
{ type: 'requiredField', preventSave: true, fieldName: 'regions' },
|
|
17
|
+
{ type: 'requiredField', preventSave: true, fieldName: 'credentials', fieldLabel: 'account' },
|
|
18
|
+
],
|
|
19
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { from as observableFrom, Subject } from 'rxjs';
|
|
3
|
+
import { takeUntil } from 'rxjs/operators';
|
|
4
|
+
|
|
5
|
+
import type { IAccount, IStageConfigProps } from '@spinnaker/core';
|
|
6
|
+
import { AccountService, NgReact, SpelText, StageConfigField, StageConstants, TextInput } from '@spinnaker/core';
|
|
7
|
+
import { AccountRegionClusterSelector } from '../../../presentation';
|
|
8
|
+
|
|
9
|
+
export interface ICloudFoundryRunTaskStageConfigState {
|
|
10
|
+
accounts: IAccount[];
|
|
11
|
+
region: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class CloudFoundryRunJobStageConfig extends React.Component<
|
|
15
|
+
IStageConfigProps,
|
|
16
|
+
ICloudFoundryRunTaskStageConfigState
|
|
17
|
+
> {
|
|
18
|
+
private destroy$ = new Subject();
|
|
19
|
+
|
|
20
|
+
constructor(props: IStageConfigProps) {
|
|
21
|
+
super(props);
|
|
22
|
+
props.stage.cloudProvider = 'cloudfoundry';
|
|
23
|
+
this.state = {
|
|
24
|
+
accounts: [],
|
|
25
|
+
region: '',
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public componentDidMount(): void {
|
|
30
|
+
observableFrom(AccountService.listAccounts('cloudfoundry'))
|
|
31
|
+
.pipe(takeUntil(this.destroy$))
|
|
32
|
+
.subscribe((accounts) => this.setState({ accounts }));
|
|
33
|
+
this.props.stageFieldUpdated();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public componentWillUnmount(): void {
|
|
37
|
+
this.destroy$.next();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private componentUpdated = (stage: any): void => {
|
|
41
|
+
this.props.updateStageField({
|
|
42
|
+
credentials: stage.credentials,
|
|
43
|
+
region: stage.region,
|
|
44
|
+
cluster: stage.cluster,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
public render() {
|
|
49
|
+
const { application, stage } = this.props;
|
|
50
|
+
const { target, jobName, command, logsUrl } = stage;
|
|
51
|
+
const { accounts } = this.state;
|
|
52
|
+
const { TargetSelect } = NgReact;
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<div className="cloudfoundry-resize-asg-stage form-horizontal">
|
|
56
|
+
<AccountRegionClusterSelector
|
|
57
|
+
accounts={accounts}
|
|
58
|
+
application={application}
|
|
59
|
+
cloudProvider={'cloudfoundry'}
|
|
60
|
+
onComponentUpdate={this.componentUpdated}
|
|
61
|
+
component={stage}
|
|
62
|
+
isSingleRegion={true}
|
|
63
|
+
/>
|
|
64
|
+
<StageConfigField label="Target">
|
|
65
|
+
<TargetSelect
|
|
66
|
+
model={{ target }}
|
|
67
|
+
options={StageConstants.TARGET_LIST}
|
|
68
|
+
onChange={(t) => this.props.updateStageField({ target: t })}
|
|
69
|
+
/>
|
|
70
|
+
</StageConfigField>
|
|
71
|
+
<StageConfigField label="Job Name" helpKey={'cf.runJob.jobName'}>
|
|
72
|
+
<TextInput
|
|
73
|
+
type="text"
|
|
74
|
+
className="form-control"
|
|
75
|
+
onChange={(e) => this.props.updateStageField({ jobName: e.target.value })}
|
|
76
|
+
value={jobName}
|
|
77
|
+
maxLength={238}
|
|
78
|
+
/>
|
|
79
|
+
</StageConfigField>
|
|
80
|
+
<StageConfigField label="Command">
|
|
81
|
+
<TextInput
|
|
82
|
+
type="text"
|
|
83
|
+
className="form-control"
|
|
84
|
+
onChange={(e) => this.props.updateStageField({ command: e.target.value })}
|
|
85
|
+
value={command}
|
|
86
|
+
/>
|
|
87
|
+
</StageConfigField>
|
|
88
|
+
<StageConfigField label="Logs URL" helpKey={'cf.runJob.logsUrl'}>
|
|
89
|
+
<SpelText
|
|
90
|
+
placeholder=""
|
|
91
|
+
onChange={(value) => this.props.updateStageField({ logsUrl: value })}
|
|
92
|
+
value={logsUrl}
|
|
93
|
+
pipeline={this.props.pipeline}
|
|
94
|
+
docLink={false}
|
|
95
|
+
/>
|
|
96
|
+
</StageConfigField>
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
}
|