@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,62 @@
|
|
|
1
|
+
import { get } from 'lodash';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { IExecutionDetailsSectionProps } from '@spinnaker/core';
|
|
5
|
+
import { AccountTag, ExecutionDetailsSection } from '@spinnaker/core';
|
|
6
|
+
import {
|
|
7
|
+
CloudFoundryRecentLogs,
|
|
8
|
+
CloudFoundryRecentLogsType,
|
|
9
|
+
} from '../../../presentation/widgets/recentLogs/CloudFoundryRecentLogs';
|
|
10
|
+
|
|
11
|
+
export class RunJobExecutionDetails extends React.Component<IExecutionDetailsSectionProps> {
|
|
12
|
+
public static title = 'runJobDetails';
|
|
13
|
+
|
|
14
|
+
public render() {
|
|
15
|
+
const { stage, name, current } = this.props;
|
|
16
|
+
const { context } = stage;
|
|
17
|
+
const account = context['deploy.account.name'];
|
|
18
|
+
const region = get(stage, ['context', 'jobStatus', 'location'], '');
|
|
19
|
+
const taskId = get(stage, ['context', 'jobStatus', 'id'], '');
|
|
20
|
+
const taskName = get(stage, ['context', 'jobStatus', 'name'], '');
|
|
21
|
+
const logsUrl: string = get(stage, ['context', 'logsUrl']);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<ExecutionDetailsSection name={name} current={current}>
|
|
25
|
+
<div className="row">
|
|
26
|
+
<div className="col-md-9">
|
|
27
|
+
<dl className="dl-narrow dl-horizontal">
|
|
28
|
+
<dt>Account</dt>
|
|
29
|
+
<dd>
|
|
30
|
+
<AccountTag account={account} />
|
|
31
|
+
</dd>
|
|
32
|
+
{region && (
|
|
33
|
+
<>
|
|
34
|
+
<dt>Region</dt>
|
|
35
|
+
<dd>{region}</dd>
|
|
36
|
+
<dt>Logs</dt>
|
|
37
|
+
<dd>
|
|
38
|
+
<CloudFoundryRecentLogs
|
|
39
|
+
account={account}
|
|
40
|
+
region={region}
|
|
41
|
+
resourceDisplayName={taskName}
|
|
42
|
+
resourceGuid={taskId}
|
|
43
|
+
logsType={CloudFoundryRecentLogsType.TASK}
|
|
44
|
+
/>
|
|
45
|
+
</dd>
|
|
46
|
+
{logsUrl && (
|
|
47
|
+
<dd>
|
|
48
|
+
<a target="_blank" href={logsUrl}>
|
|
49
|
+
External
|
|
50
|
+
</a>
|
|
51
|
+
</dd>
|
|
52
|
+
)}
|
|
53
|
+
</>
|
|
54
|
+
)}
|
|
55
|
+
{!region && <div className="well">Collecting additional details...</div>}
|
|
56
|
+
</dl>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</ExecutionDetailsSection>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IStage } from '@spinnaker/core';
|
|
2
|
+
import { ExecutionDetailsTasks, Registry } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
import { CloudFoundryRunJobStageConfig } from './CloudFoundryRunJobStageConfig';
|
|
5
|
+
import { RunJobExecutionDetails } from './RunJobExecutionDetails';
|
|
6
|
+
|
|
7
|
+
Registry.pipeline.registerStage({
|
|
8
|
+
accountExtractor: (stage: IStage) => [stage.context.credentials],
|
|
9
|
+
component: CloudFoundryRunJobStageConfig,
|
|
10
|
+
configAccountExtractor: (stage: IStage) => [stage.credentials],
|
|
11
|
+
cloudProvider: 'cloudfoundry',
|
|
12
|
+
key: 'runJob',
|
|
13
|
+
provides: 'runJob',
|
|
14
|
+
restartable: true,
|
|
15
|
+
executionDetailsSections: [ExecutionDetailsTasks, RunJobExecutionDetails],
|
|
16
|
+
supportsCustomTimeout: true,
|
|
17
|
+
validators: [
|
|
18
|
+
{ type: 'requiredField', fieldName: 'credentials' },
|
|
19
|
+
{ type: 'requiredField', fieldName: 'region' },
|
|
20
|
+
{ type: 'requiredField', fieldName: 'cluster' },
|
|
21
|
+
{ type: 'requiredField', fieldName: 'target' },
|
|
22
|
+
{ type: 'requiredField', fieldName: 'command' },
|
|
23
|
+
],
|
|
24
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { get } from 'lodash';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { IExecutionDetailsSectionProps } from '@spinnaker/core';
|
|
5
|
+
import { AccountTag, ExecutionDetailsSection, StageExecutionLogs, StageFailureMessage } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export function CloudFoundryShareServiceExecutionDetails(props: IExecutionDetailsSectionProps) {
|
|
8
|
+
const { stage } = props;
|
|
9
|
+
const { context } = stage;
|
|
10
|
+
const account = get(context, 'service.account', undefined);
|
|
11
|
+
const region = get(context, 'service.region', undefined);
|
|
12
|
+
const serviceInstanceName = get(context, 'serviceInstanceName', undefined);
|
|
13
|
+
const shareToRegions = get(context, 'shareToRegions', undefined);
|
|
14
|
+
return (
|
|
15
|
+
<ExecutionDetailsSection name={props.name} current={props.current}>
|
|
16
|
+
<div className="step-section-details">
|
|
17
|
+
<div className="row">
|
|
18
|
+
<div className="col-md-12">
|
|
19
|
+
<dl className="dl-horizontal">
|
|
20
|
+
<dt>Account</dt>
|
|
21
|
+
<dd>
|
|
22
|
+
<AccountTag account={account} />
|
|
23
|
+
</dd>
|
|
24
|
+
<dt>Region</dt>
|
|
25
|
+
<dd>
|
|
26
|
+
{region}
|
|
27
|
+
<br />
|
|
28
|
+
</dd>
|
|
29
|
+
<dt>Service Instance Name</dt>
|
|
30
|
+
<dd>
|
|
31
|
+
{serviceInstanceName}
|
|
32
|
+
<br />
|
|
33
|
+
</dd>
|
|
34
|
+
<dt>Sharing Regions</dt>
|
|
35
|
+
<dd>
|
|
36
|
+
{shareToRegions.join(', ')}
|
|
37
|
+
<br />
|
|
38
|
+
</dd>
|
|
39
|
+
</dl>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<StageFailureMessage stage={stage} message={stage.failureMessage} />
|
|
44
|
+
<StageExecutionLogs stage={stage} />
|
|
45
|
+
</ExecutionDetailsSection>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// eslint-disable-next-line
|
|
50
|
+
export namespace CloudFoundryShareServiceExecutionDetails {
|
|
51
|
+
export const title = 'cloudfoundryShareServiceConfig';
|
|
52
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
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 { IAccount, IRegion, IStageConfigProps } from '@spinnaker/core';
|
|
8
|
+
import { AccountService, ReactSelectInput, StageConfigField, TextInput } from '@spinnaker/core';
|
|
9
|
+
|
|
10
|
+
interface ICloudFoundryShareServiceStageConfigState {
|
|
11
|
+
accounts: IAccount[];
|
|
12
|
+
regions: string[];
|
|
13
|
+
shareToRegionsList: string[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class CloudFoundryShareServiceStageConfig extends React.Component<
|
|
17
|
+
IStageConfigProps,
|
|
18
|
+
ICloudFoundryShareServiceStageConfigState
|
|
19
|
+
> {
|
|
20
|
+
private destroy$ = new Subject();
|
|
21
|
+
|
|
22
|
+
constructor(props: IStageConfigProps) {
|
|
23
|
+
super(props);
|
|
24
|
+
props.stage.cloudProvider = 'cloudfoundry';
|
|
25
|
+
this.state = {
|
|
26
|
+
accounts: [],
|
|
27
|
+
regions: [],
|
|
28
|
+
shareToRegionsList: [],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public componentDidMount(): void {
|
|
33
|
+
observableFrom(AccountService.listAccounts('cloudfoundry'))
|
|
34
|
+
.pipe(takeUntil(this.destroy$))
|
|
35
|
+
.subscribe((accounts) => this.setState({ accounts }));
|
|
36
|
+
if (this.props.stage.credentials) {
|
|
37
|
+
this.clearAndReloadRegions();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public componentWillUnmount(): void {
|
|
42
|
+
this.destroy$.next();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private clearAndReloadRegions = () => {
|
|
46
|
+
this.setState({ regions: [] });
|
|
47
|
+
observableFrom(AccountService.getRegionsForAccount(this.props.stage.credentials))
|
|
48
|
+
.pipe(takeUntil(this.destroy$))
|
|
49
|
+
.subscribe((regionList: IRegion[]) => {
|
|
50
|
+
const { region } = this.props.stage;
|
|
51
|
+
const regions = regionList.map((r) => r.name);
|
|
52
|
+
regions.sort((a, b) => a.localeCompare(b));
|
|
53
|
+
this.setState({ regions });
|
|
54
|
+
if (region) {
|
|
55
|
+
this.clearAndResetShareToRegionList(region, regions);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
private serviceInstanceNameUpdated = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
61
|
+
this.props.updateStageField({ serviceInstanceName: event.target.value });
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
private clearAndResetShareToRegionList = (region: string, regions: string[]) => {
|
|
65
|
+
this.setState({ shareToRegionsList: regions.filter((r) => r !== region) });
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
private accountUpdated = (option: Option<string>) => {
|
|
69
|
+
const credentials = option.target.value;
|
|
70
|
+
this.setState({
|
|
71
|
+
regions: [],
|
|
72
|
+
shareToRegionsList: [],
|
|
73
|
+
});
|
|
74
|
+
this.props.updateStageField({
|
|
75
|
+
credentials,
|
|
76
|
+
region: '',
|
|
77
|
+
shareToRegions: [],
|
|
78
|
+
});
|
|
79
|
+
if (credentials) {
|
|
80
|
+
this.clearAndReloadRegions();
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
private regionUpdated = (option: Option<string>) => {
|
|
85
|
+
const region = option.target.value;
|
|
86
|
+
this.setState({ shareToRegionsList: [] });
|
|
87
|
+
this.props.updateStageField({
|
|
88
|
+
region,
|
|
89
|
+
shareToRegions: [],
|
|
90
|
+
});
|
|
91
|
+
this.clearAndResetShareToRegionList(region, this.state.regions);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
private shareToRegionsUpdated = (option: Option<string>) => {
|
|
95
|
+
this.props.updateStageField({ shareToRegions: option.map((o: Option) => o.value) });
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
public render() {
|
|
99
|
+
const { credentials, region, serviceInstanceName, shareToRegions } = this.props.stage;
|
|
100
|
+
const { accounts, regions, shareToRegionsList } = this.state;
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
<div className="form-horizontal">
|
|
104
|
+
<StageConfigField label="Account">
|
|
105
|
+
<ReactSelectInput
|
|
106
|
+
clearable={false}
|
|
107
|
+
onChange={this.accountUpdated}
|
|
108
|
+
value={credentials}
|
|
109
|
+
stringOptions={accounts.map((it) => it.name)}
|
|
110
|
+
/>
|
|
111
|
+
</StageConfigField>
|
|
112
|
+
<StageConfigField label="Region">
|
|
113
|
+
<ReactSelectInput clearable={false} onChange={this.regionUpdated} value={region} stringOptions={regions} />
|
|
114
|
+
</StageConfigField>
|
|
115
|
+
<StageConfigField label="Service Instance Name">
|
|
116
|
+
<TextInput
|
|
117
|
+
type="text"
|
|
118
|
+
className="form-control"
|
|
119
|
+
onChange={this.serviceInstanceNameUpdated}
|
|
120
|
+
value={serviceInstanceName}
|
|
121
|
+
/>
|
|
122
|
+
</StageConfigField>
|
|
123
|
+
<StageConfigField label="Share To Regions">
|
|
124
|
+
<Select
|
|
125
|
+
options={
|
|
126
|
+
shareToRegionsList &&
|
|
127
|
+
shareToRegionsList.map((r: string) => ({
|
|
128
|
+
label: r,
|
|
129
|
+
value: r,
|
|
130
|
+
}))
|
|
131
|
+
}
|
|
132
|
+
multi={true}
|
|
133
|
+
clearable={false}
|
|
134
|
+
value={shareToRegions}
|
|
135
|
+
onChange={this.shareToRegionsUpdated}
|
|
136
|
+
/>
|
|
137
|
+
</StageConfigField>
|
|
138
|
+
</div>
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IStage } from '@spinnaker/core';
|
|
2
|
+
import { ExecutionDetailsTasks, Registry } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
import { CloudFoundryShareServiceExecutionDetails } from './CloudFoundryShareServiceExecutionDetails';
|
|
5
|
+
import { CloudFoundryShareServiceStageConfig } from './CloudFoundryShareServiceStageConfig';
|
|
6
|
+
|
|
7
|
+
Registry.pipeline.registerStage({
|
|
8
|
+
accountExtractor: (stage: IStage) => [stage.context.credentials],
|
|
9
|
+
configAccountExtractor: (stage: IStage) => [stage.credentials],
|
|
10
|
+
provides: 'shareService',
|
|
11
|
+
key: 'shareService',
|
|
12
|
+
cloudProvider: 'cloudfoundry',
|
|
13
|
+
component: CloudFoundryShareServiceStageConfig,
|
|
14
|
+
executionDetailsSections: [CloudFoundryShareServiceExecutionDetails, ExecutionDetailsTasks],
|
|
15
|
+
supportsCustomTimeout: true,
|
|
16
|
+
validators: [
|
|
17
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
18
|
+
{ type: 'requiredField', fieldName: 'region' },
|
|
19
|
+
{ type: 'requiredField', fieldName: 'serviceInstanceName', preventSave: true },
|
|
20
|
+
],
|
|
21
|
+
});
|
|
@@ -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: 'Unmap a load balancer',
|
|
11
|
+
executionDetailsSections: [CloudFoundryLoadBalancersExecutionDetails, ExecutionDetailsTasks],
|
|
12
|
+
key: 'unmapLoadBalancers',
|
|
13
|
+
label: 'Unmap 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,46 @@
|
|
|
1
|
+
import { get } from 'lodash';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { IExecutionDetailsSectionProps } from '@spinnaker/core';
|
|
5
|
+
import { AccountTag, ExecutionDetailsSection, StageExecutionLogs, StageFailureMessage } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export function CloudFoundryUnshareServiceExecutionDetails(props: IExecutionDetailsSectionProps) {
|
|
8
|
+
const { stage } = props;
|
|
9
|
+
const { context } = stage;
|
|
10
|
+
const account = get(context, 'service.account', undefined);
|
|
11
|
+
const serviceInstanceName = get(context, 'serviceInstanceName', undefined);
|
|
12
|
+
const unshareFromRegions = get(context, 'unshareFromRegions', undefined);
|
|
13
|
+
return (
|
|
14
|
+
<ExecutionDetailsSection name={props.name} current={props.current}>
|
|
15
|
+
<div className="step-section-details">
|
|
16
|
+
<div className="row">
|
|
17
|
+
<div className="col-md-12">
|
|
18
|
+
<dl className="dl-horizontal">
|
|
19
|
+
<dt>Account</dt>
|
|
20
|
+
<dd>
|
|
21
|
+
<AccountTag account={account} />
|
|
22
|
+
</dd>
|
|
23
|
+
<dt>Service Instance Name</dt>
|
|
24
|
+
<dd>
|
|
25
|
+
{serviceInstanceName}
|
|
26
|
+
<br />
|
|
27
|
+
</dd>
|
|
28
|
+
<dt>Unsharing Regions</dt>
|
|
29
|
+
<dd>
|
|
30
|
+
{unshareFromRegions.join(', ')}
|
|
31
|
+
<br />
|
|
32
|
+
</dd>
|
|
33
|
+
</dl>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<StageFailureMessage stage={stage} message={stage.failureMessage} />
|
|
38
|
+
<StageExecutionLogs stage={stage} />
|
|
39
|
+
</ExecutionDetailsSection>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// eslint-disable-next-line
|
|
44
|
+
export namespace CloudFoundryUnshareServiceExecutionDetails {
|
|
45
|
+
export const title = 'cloudfoundryUnshareServiceConfig';
|
|
46
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
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 { IAccount, IRegion, IStageConfigProps } from '@spinnaker/core';
|
|
8
|
+
import { AccountService, ReactSelectInput, StageConfigField, TextInput } from '@spinnaker/core';
|
|
9
|
+
|
|
10
|
+
interface ICloudFoundryShareServiceStageConfigState {
|
|
11
|
+
accounts: IAccount[];
|
|
12
|
+
regions: string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class CloudFoundryUnshareServiceStageConfig extends React.Component<
|
|
16
|
+
IStageConfigProps,
|
|
17
|
+
ICloudFoundryShareServiceStageConfigState
|
|
18
|
+
> {
|
|
19
|
+
private destroy$ = new Subject();
|
|
20
|
+
|
|
21
|
+
constructor(props: IStageConfigProps) {
|
|
22
|
+
super(props);
|
|
23
|
+
props.stage.cloudProvider = 'cloudfoundry';
|
|
24
|
+
this.state = {
|
|
25
|
+
accounts: [],
|
|
26
|
+
regions: [],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public componentDidMount(): void {
|
|
31
|
+
observableFrom(AccountService.listAccounts('cloudfoundry'))
|
|
32
|
+
.pipe(takeUntil(this.destroy$))
|
|
33
|
+
.subscribe((accounts) => this.setState({ accounts }));
|
|
34
|
+
if (this.props.stage.credentials) {
|
|
35
|
+
this.clearAndReloadRegions();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public componentWillUnmount(): void {
|
|
40
|
+
this.destroy$.next();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private clearAndReloadRegions = () => {
|
|
44
|
+
this.setState({ regions: [] });
|
|
45
|
+
observableFrom(AccountService.getRegionsForAccount(this.props.stage.credentials))
|
|
46
|
+
.pipe(takeUntil(this.destroy$))
|
|
47
|
+
.subscribe((regionList: IRegion[]) => {
|
|
48
|
+
const regions = regionList.map((r) => r.name);
|
|
49
|
+
regions.sort((a, b) => a.localeCompare(b));
|
|
50
|
+
this.setState({ regions });
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
private serviceInstanceNameUpdated = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
55
|
+
this.props.updateStageField({ serviceInstanceName: event.target.value });
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
private accountUpdated = (option: Option<string>) => {
|
|
59
|
+
const credentials = option.target.value;
|
|
60
|
+
this.setState({ regions: [] });
|
|
61
|
+
this.props.updateStageField({
|
|
62
|
+
credentials,
|
|
63
|
+
unshareFromRegions: [],
|
|
64
|
+
});
|
|
65
|
+
if (credentials) {
|
|
66
|
+
this.clearAndReloadRegions();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
private unshareFromRegionsUpdated = (option: Option<string>) => {
|
|
71
|
+
this.props.updateStageField({ unshareFromRegions: option.map((o: Option) => o.value) });
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
public render() {
|
|
75
|
+
const { credentials, serviceInstanceName, unshareFromRegions } = this.props.stage;
|
|
76
|
+
const { accounts, regions } = this.state;
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<div className="form-horizontal">
|
|
80
|
+
<StageConfigField label="Account">
|
|
81
|
+
<ReactSelectInput
|
|
82
|
+
clearable={false}
|
|
83
|
+
onChange={this.accountUpdated}
|
|
84
|
+
value={credentials}
|
|
85
|
+
stringOptions={accounts.map((it) => it.name)}
|
|
86
|
+
/>
|
|
87
|
+
</StageConfigField>
|
|
88
|
+
<StageConfigField label="Service Instance Name">
|
|
89
|
+
<TextInput
|
|
90
|
+
type="text"
|
|
91
|
+
className="form-control"
|
|
92
|
+
onChange={this.serviceInstanceNameUpdated}
|
|
93
|
+
value={serviceInstanceName}
|
|
94
|
+
/>
|
|
95
|
+
</StageConfigField>
|
|
96
|
+
<StageConfigField label="Unshare From Regions">
|
|
97
|
+
<Select
|
|
98
|
+
options={
|
|
99
|
+
regions &&
|
|
100
|
+
regions.map((r: string) => ({
|
|
101
|
+
label: r,
|
|
102
|
+
value: r,
|
|
103
|
+
}))
|
|
104
|
+
}
|
|
105
|
+
multi={true}
|
|
106
|
+
clearable={false}
|
|
107
|
+
value={unshareFromRegions}
|
|
108
|
+
onChange={this.unshareFromRegionsUpdated}
|
|
109
|
+
/>
|
|
110
|
+
</StageConfigField>
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IStage } from '@spinnaker/core';
|
|
2
|
+
import { ExecutionDetailsTasks, Registry } from '@spinnaker/core';
|
|
3
|
+
|
|
4
|
+
import { CloudFoundryUnshareServiceExecutionDetails } from './CloudFoundryUnshareServiceExecutionDetails';
|
|
5
|
+
import { CloudFoundryUnshareServiceStageConfig } from './CloudFoundryUnshareServiceStageConfig';
|
|
6
|
+
|
|
7
|
+
Registry.pipeline.registerStage({
|
|
8
|
+
accountExtractor: (stage: IStage) => [stage.context.credentials],
|
|
9
|
+
configAccountExtractor: (stage: IStage) => [stage.credentials],
|
|
10
|
+
provides: 'unshareService',
|
|
11
|
+
key: 'unshareService',
|
|
12
|
+
cloudProvider: 'cloudfoundry',
|
|
13
|
+
component: CloudFoundryUnshareServiceStageConfig,
|
|
14
|
+
controller: 'cfUnshareServiceStageCtrl',
|
|
15
|
+
executionDetailsSections: [CloudFoundryUnshareServiceExecutionDetails, ExecutionDetailsTasks],
|
|
16
|
+
supportsCustomTimeout: true,
|
|
17
|
+
validators: [
|
|
18
|
+
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' },
|
|
19
|
+
{ type: 'requiredField', fieldName: 'serviceInstanceName', preventSave: true },
|
|
20
|
+
],
|
|
21
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { HelpField } from '@spinnaker/core';
|
|
4
|
+
|
|
5
|
+
export interface IFormikConfigFieldProps {
|
|
6
|
+
label: string;
|
|
7
|
+
helpKey?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class FormikConfigField extends React.Component<IFormikConfigFieldProps> {
|
|
12
|
+
constructor(props: IFormikConfigFieldProps) {
|
|
13
|
+
super(props);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public render(): JSX.Element {
|
|
17
|
+
const { label, helpKey, children } = this.props;
|
|
18
|
+
return (
|
|
19
|
+
<div className={'StandardFieldLayout flex-container-h baseline margin-between-lg'}>
|
|
20
|
+
<label className={`sm-label-right`}>
|
|
21
|
+
<span className="label-text">{label} </span>
|
|
22
|
+
{helpKey && <HelpField id={helpKey} />}
|
|
23
|
+
</label>
|
|
24
|
+
<div className={`flex-grow`}>{children}</div>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormikConfigField';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { FieldArray, getIn } from 'formik';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { FormikFormField, TextInput } from '@spinnaker/core';
|
|
5
|
+
import type { ICloudFoundryCreateServerGroupCommand } from '../../../serverGroup/configure/serverGroupConfigurationModel.cf';
|
|
6
|
+
|
|
7
|
+
export interface IBuildpacksProps {
|
|
8
|
+
fieldName: string;
|
|
9
|
+
onChange?: (value: string[]) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class Buildpacks extends React.Component<IBuildpacksProps> {
|
|
13
|
+
public render() {
|
|
14
|
+
const { fieldName, onChange } = this.props;
|
|
15
|
+
return (
|
|
16
|
+
<div>
|
|
17
|
+
<div className="form-group">
|
|
18
|
+
<div className="col-md-12">
|
|
19
|
+
<b>Buildpacks</b>
|
|
20
|
+
<FieldArray
|
|
21
|
+
name={fieldName}
|
|
22
|
+
render={(arrayHelpers) => {
|
|
23
|
+
const serverGroupCommand: ICloudFoundryCreateServerGroupCommand = arrayHelpers.form.values;
|
|
24
|
+
const buildpacks: string[] = getIn(serverGroupCommand, fieldName) || [];
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<table className="table table-condensed packed metadata">
|
|
28
|
+
<tbody>
|
|
29
|
+
{buildpacks.map((_, index: number) => (
|
|
30
|
+
<tr key={index}>
|
|
31
|
+
<td>
|
|
32
|
+
<div className="sp-margin-m-bottom">
|
|
33
|
+
<FormikFormField
|
|
34
|
+
name={`${fieldName}[${index}]`}
|
|
35
|
+
onChange={() => {
|
|
36
|
+
onChange && onChange(getIn(serverGroupCommand, fieldName) || []);
|
|
37
|
+
}}
|
|
38
|
+
input={(props) => <TextInput {...props} />}
|
|
39
|
+
required={true}
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</td>
|
|
43
|
+
<td>
|
|
44
|
+
<a className="btn btn-link sm-label" onClick={() => arrayHelpers.remove(index)}>
|
|
45
|
+
<span className="glyphicon glyphicon-trash" />
|
|
46
|
+
</a>
|
|
47
|
+
</td>
|
|
48
|
+
</tr>
|
|
49
|
+
))}
|
|
50
|
+
</tbody>
|
|
51
|
+
<tfoot>
|
|
52
|
+
<tr>
|
|
53
|
+
<td colSpan={2}>
|
|
54
|
+
<button type="button" className="add-new col-md-12" onClick={() => arrayHelpers.push('')}>
|
|
55
|
+
<span className="glyphicon glyphicon-plus-sign" /> Add New Buildpack
|
|
56
|
+
</button>
|
|
57
|
+
</td>
|
|
58
|
+
</tr>
|
|
59
|
+
</tfoot>
|
|
60
|
+
</table>
|
|
61
|
+
);
|
|
62
|
+
}}
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
}
|