@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,94 @@
|
|
|
1
|
+
import { FieldArray, getIn } from 'formik';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { FormikFormField, TextInput } from '@spinnaker/core';
|
|
5
|
+
import type { ICloudFoundryEnvVar } from '../../../domain';
|
|
6
|
+
import type { ICloudFoundryCreateServerGroupCommand } from '../../../serverGroup/configure/serverGroupConfigurationModel.cf';
|
|
7
|
+
|
|
8
|
+
export interface IEnvironmentVariablesProps {
|
|
9
|
+
fieldName: string;
|
|
10
|
+
onChange?: (value: string[]) => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class EnvironmentVariables extends React.Component<IEnvironmentVariablesProps> {
|
|
14
|
+
public render() {
|
|
15
|
+
const { fieldName, onChange } = this.props;
|
|
16
|
+
return (
|
|
17
|
+
<div>
|
|
18
|
+
<div className="form-group">
|
|
19
|
+
<div className="col-md-12">
|
|
20
|
+
<b>Environment Variables</b>
|
|
21
|
+
<FieldArray
|
|
22
|
+
name={fieldName}
|
|
23
|
+
render={(arrayHelpers) => {
|
|
24
|
+
const serverGroupCommand: ICloudFoundryCreateServerGroupCommand = arrayHelpers.form.values;
|
|
25
|
+
const environmentVariables: string[] = getIn(serverGroupCommand, fieldName) || [];
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<table className="table table-condensed packed tags">
|
|
29
|
+
<thead>
|
|
30
|
+
<tr>
|
|
31
|
+
<th>Name</th>
|
|
32
|
+
<th>Value</th>
|
|
33
|
+
</tr>
|
|
34
|
+
</thead>
|
|
35
|
+
<tbody>
|
|
36
|
+
{environmentVariables.map((_, index: number) => {
|
|
37
|
+
const envPath = `${fieldName}[${index}]`;
|
|
38
|
+
return (
|
|
39
|
+
<tr key={index}>
|
|
40
|
+
<td>
|
|
41
|
+
<FormikFormField
|
|
42
|
+
name={`${envPath}.key`}
|
|
43
|
+
onChange={() => {
|
|
44
|
+
onChange && onChange(getIn(serverGroupCommand, fieldName) || []);
|
|
45
|
+
}}
|
|
46
|
+
input={(props) => <TextInput {...props} />}
|
|
47
|
+
required={true}
|
|
48
|
+
/>
|
|
49
|
+
</td>
|
|
50
|
+
<td>
|
|
51
|
+
<FormikFormField
|
|
52
|
+
name={`${envPath}.value`}
|
|
53
|
+
onChange={() => {
|
|
54
|
+
onChange && onChange(getIn(serverGroupCommand, fieldName) || []);
|
|
55
|
+
}}
|
|
56
|
+
input={(props) => <TextInput {...props} />}
|
|
57
|
+
required={true}
|
|
58
|
+
/>
|
|
59
|
+
</td>
|
|
60
|
+
<td>
|
|
61
|
+
<a className="btn btn-link sm-label">
|
|
62
|
+
<span
|
|
63
|
+
className="glyphicon glyphicon-trash"
|
|
64
|
+
onClick={() => arrayHelpers.remove(index)}
|
|
65
|
+
/>
|
|
66
|
+
</a>
|
|
67
|
+
</td>
|
|
68
|
+
</tr>
|
|
69
|
+
);
|
|
70
|
+
})}
|
|
71
|
+
</tbody>
|
|
72
|
+
<tfoot>
|
|
73
|
+
<tr>
|
|
74
|
+
<td colSpan={3}>
|
|
75
|
+
<button
|
|
76
|
+
type="button"
|
|
77
|
+
className="add-new col-md-12"
|
|
78
|
+
onClick={() => arrayHelpers.push({ key: '', value: '' } as ICloudFoundryEnvVar)}
|
|
79
|
+
>
|
|
80
|
+
<span className="glyphicon glyphicon-plus-sign" /> Add New Environment Variable
|
|
81
|
+
</button>
|
|
82
|
+
</td>
|
|
83
|
+
</tr>
|
|
84
|
+
</tfoot>
|
|
85
|
+
</table>
|
|
86
|
+
);
|
|
87
|
+
}}
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { FormikFormField, RadioButtonInput, TextInput } from '@spinnaker/core';
|
|
4
|
+
|
|
5
|
+
export interface IHealthCheckProps {
|
|
6
|
+
healthCheckHttpEndpointFieldName: string;
|
|
7
|
+
healthCheckType: string;
|
|
8
|
+
healthCheckTypeFieldName: string;
|
|
9
|
+
onHealthCheckHttpEndpointChange?: (value: string) => void;
|
|
10
|
+
onHealthCheckTypeChange?: (value: string) => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class HealthCheck extends React.Component<IHealthCheckProps> {
|
|
14
|
+
private HEALTH_CHECK_TYPE_OPTIONS = [
|
|
15
|
+
{ label: 'port', value: 'port' },
|
|
16
|
+
{ label: 'HTTP', value: 'http' },
|
|
17
|
+
{ label: 'process', value: 'process' },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
public render() {
|
|
21
|
+
const {
|
|
22
|
+
healthCheckTypeFieldName,
|
|
23
|
+
healthCheckType,
|
|
24
|
+
healthCheckHttpEndpointFieldName,
|
|
25
|
+
onHealthCheckTypeChange,
|
|
26
|
+
onHealthCheckHttpEndpointChange,
|
|
27
|
+
} = this.props;
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className="col-md-9">
|
|
31
|
+
<div className="sp-margin-m-bottom">
|
|
32
|
+
<FormikFormField
|
|
33
|
+
name={healthCheckTypeFieldName}
|
|
34
|
+
label="Health Check Type"
|
|
35
|
+
input={(props) => <RadioButtonInput {...props} inline={true} options={this.HEALTH_CHECK_TYPE_OPTIONS} />}
|
|
36
|
+
onChange={(value) => {
|
|
37
|
+
onHealthCheckTypeChange && onHealthCheckTypeChange(value);
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
{healthCheckType === 'http' && (
|
|
42
|
+
<div className="sp-margin-m-bottom">
|
|
43
|
+
<FormikFormField
|
|
44
|
+
name={healthCheckHttpEndpointFieldName}
|
|
45
|
+
label="Endpoint"
|
|
46
|
+
input={(props) => <TextInput {...props} required={true} />}
|
|
47
|
+
onChange={(value) => {
|
|
48
|
+
onHealthCheckHttpEndpointChange && onHealthCheckHttpEndpointChange(value);
|
|
49
|
+
}}
|
|
50
|
+
required={true}
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
)}
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { FormikFormField, TextInput } from '@spinnaker/core';
|
|
4
|
+
|
|
5
|
+
export interface IInstanceParametersProps {
|
|
6
|
+
diskQuotaFieldName: string;
|
|
7
|
+
instancesFieldName: string;
|
|
8
|
+
memoryFieldName: string;
|
|
9
|
+
onDiskQuotaChange?: (value: string) => void;
|
|
10
|
+
onInstancesChange?: (value: string) => void;
|
|
11
|
+
onMemoryChange?: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class InstanceParameters extends React.Component<IInstanceParametersProps> {
|
|
15
|
+
public render() {
|
|
16
|
+
const {
|
|
17
|
+
diskQuotaFieldName,
|
|
18
|
+
instancesFieldName,
|
|
19
|
+
memoryFieldName,
|
|
20
|
+
onDiskQuotaChange,
|
|
21
|
+
onInstancesChange,
|
|
22
|
+
onMemoryChange,
|
|
23
|
+
} = this.props;
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div>
|
|
27
|
+
<div className="col-md-9">
|
|
28
|
+
<div className="sp-margin-m-bottom">
|
|
29
|
+
<FormikFormField
|
|
30
|
+
name={memoryFieldName}
|
|
31
|
+
input={(props) => <TextInput {...props} />}
|
|
32
|
+
label="Memory"
|
|
33
|
+
onChange={(value) => {
|
|
34
|
+
onMemoryChange && onMemoryChange(value);
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
<div className="sp-margin-m-bottom">
|
|
39
|
+
<FormikFormField
|
|
40
|
+
name={diskQuotaFieldName}
|
|
41
|
+
input={(props) => <TextInput {...props} />}
|
|
42
|
+
label="Disk Quota"
|
|
43
|
+
onChange={(value) => {
|
|
44
|
+
onDiskQuotaChange && onDiskQuotaChange(value);
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
<div className="sp-margin-m-bottom">
|
|
49
|
+
<FormikFormField
|
|
50
|
+
name={instancesFieldName}
|
|
51
|
+
input={(props) => <TextInput type="number" {...props} />}
|
|
52
|
+
label="Instances"
|
|
53
|
+
onChange={(value) => {
|
|
54
|
+
onInstancesChange && onInstancesChange(value);
|
|
55
|
+
}}
|
|
56
|
+
required={true}
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { FieldArray, getIn } from 'formik';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { FormikFormField, HelpField, TextInput } from '@spinnaker/core';
|
|
5
|
+
import type { ICloudFoundryCreateServerGroupCommand } from '../../../serverGroup/configure/serverGroupConfigurationModel.cf';
|
|
6
|
+
|
|
7
|
+
export interface IRoutesProps {
|
|
8
|
+
fieldName: string;
|
|
9
|
+
onChange?: (value: string[]) => void;
|
|
10
|
+
isRequired?: boolean;
|
|
11
|
+
singleRouteOnly?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class Routes extends React.Component<IRoutesProps> {
|
|
15
|
+
public render() {
|
|
16
|
+
const { fieldName, isRequired, onChange, singleRouteOnly } = this.props;
|
|
17
|
+
return (
|
|
18
|
+
<div>
|
|
19
|
+
<div className="form-group">
|
|
20
|
+
<div className="col-md-12">
|
|
21
|
+
<b>{singleRouteOnly ? 'Route' : 'Routes'}</b>
|
|
22
|
+
|
|
23
|
+
{!isRequired && <HelpField id="cf.serverGroup.routes" />}
|
|
24
|
+
{!!isRequired && <HelpField id="cf.serverGroup.requiredRoutes" />}
|
|
25
|
+
<FieldArray
|
|
26
|
+
name={fieldName}
|
|
27
|
+
render={(arrayHelpers) => {
|
|
28
|
+
const serverGroupCommand: ICloudFoundryCreateServerGroupCommand = arrayHelpers.form.values;
|
|
29
|
+
const routes: string[] = getIn(serverGroupCommand, fieldName) || [];
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<table className="table table-condensed packed metadata">
|
|
33
|
+
<tbody>
|
|
34
|
+
{routes.map((_, index: number) => (
|
|
35
|
+
<tr key={index}>
|
|
36
|
+
<td>
|
|
37
|
+
<div className="sp-margin-m-bottom">
|
|
38
|
+
<FormikFormField
|
|
39
|
+
name={`${fieldName}[${index}]`}
|
|
40
|
+
onChange={() => {
|
|
41
|
+
onChange && onChange(getIn(serverGroupCommand, fieldName) || []);
|
|
42
|
+
}}
|
|
43
|
+
input={(props) => <TextInput {...props} />}
|
|
44
|
+
required={true}
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
</td>
|
|
48
|
+
<td hidden={singleRouteOnly}>
|
|
49
|
+
<a className="btn btn-link sm-label" onClick={() => arrayHelpers.remove(index)}>
|
|
50
|
+
<span className="glyphicon glyphicon-trash" />
|
|
51
|
+
</a>
|
|
52
|
+
</td>
|
|
53
|
+
</tr>
|
|
54
|
+
))}
|
|
55
|
+
</tbody>
|
|
56
|
+
<tfoot>
|
|
57
|
+
<tr hidden={singleRouteOnly}>
|
|
58
|
+
<td colSpan={2}>
|
|
59
|
+
<button type="button" className="add-new col-md-12" onClick={() => arrayHelpers.push('')}>
|
|
60
|
+
<span className="glyphicon glyphicon-plus-sign" /> Add New Route
|
|
61
|
+
</button>
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
</tfoot>
|
|
65
|
+
</table>
|
|
66
|
+
);
|
|
67
|
+
}}
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 IServicesProps {
|
|
8
|
+
fieldName: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Services: React.SFC<IServicesProps> = ({ fieldName }: IServicesProps) => {
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
<div className="form-group">
|
|
15
|
+
<div className="col-md-12">
|
|
16
|
+
<b>Bind Services</b>
|
|
17
|
+
<FieldArray
|
|
18
|
+
name={fieldName}
|
|
19
|
+
render={(arrayHelpers) => {
|
|
20
|
+
const serverGroupCommand: ICloudFoundryCreateServerGroupCommand = arrayHelpers.form.values;
|
|
21
|
+
const services: string[] = getIn(serverGroupCommand, fieldName) || [];
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<table className="table table-condensed packed metadata">
|
|
25
|
+
<tbody>
|
|
26
|
+
{services.map((_, index: number) => (
|
|
27
|
+
<tr key={index}>
|
|
28
|
+
<td>
|
|
29
|
+
<div className="sp-margin-m-bottom">
|
|
30
|
+
<FormikFormField
|
|
31
|
+
name={`${fieldName}[${index}]`}
|
|
32
|
+
input={(props) => <TextInput {...props} />}
|
|
33
|
+
required={true}
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
</td>
|
|
37
|
+
<td>
|
|
38
|
+
<a className="btn btn-link sm-label" onClick={() => arrayHelpers.remove(index)}>
|
|
39
|
+
<span className="glyphicon glyphicon-trash" />
|
|
40
|
+
</a>
|
|
41
|
+
</td>
|
|
42
|
+
</tr>
|
|
43
|
+
))}
|
|
44
|
+
</tbody>
|
|
45
|
+
<tfoot>
|
|
46
|
+
<tr>
|
|
47
|
+
<td colSpan={2}>
|
|
48
|
+
<button type="button" className="add-new col-md-12" onClick={() => arrayHelpers.push('')}>
|
|
49
|
+
<span className="glyphicon glyphicon-plus-sign" /> Add New Service
|
|
50
|
+
</button>
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
</tfoot>
|
|
54
|
+
</table>
|
|
55
|
+
);
|
|
56
|
+
}}
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './stages';
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
|
|
8
|
+
import { AccountRegionClusterSelector } from '../../widgets/accountRegionClusterSelector';
|
|
9
|
+
|
|
10
|
+
export interface ICloudFoundryAsgStageConfigState {
|
|
11
|
+
accounts: IAccount[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class CloudFoundryAsgStageConfig extends React.Component<IStageConfigProps, ICloudFoundryAsgStageConfigState> {
|
|
15
|
+
private destroy$ = new Subject();
|
|
16
|
+
|
|
17
|
+
constructor(props: IStageConfigProps) {
|
|
18
|
+
super(props);
|
|
19
|
+
this.props.updateStageField({ cloudProvider: 'cloudfoundry' });
|
|
20
|
+
this.state = { accounts: [] };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public componentDidMount(): void {
|
|
24
|
+
observableFrom(AccountService.listAccounts('cloudfoundry'))
|
|
25
|
+
.pipe(takeUntil(this.destroy$))
|
|
26
|
+
.subscribe((accounts) => this.setState({ accounts }));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public componentWillUnmount(): void {
|
|
30
|
+
this.destroy$.next();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
private targetUpdated = (target: string) => {
|
|
34
|
+
this.props.updateStageField({ target });
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
private componentUpdated = (stage: any): void => {
|
|
38
|
+
this.props.updateStageField({
|
|
39
|
+
credentials: stage.credentials,
|
|
40
|
+
regions: stage.regions,
|
|
41
|
+
cluster: stage.cluster,
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
public render() {
|
|
46
|
+
const { application, pipeline, stage } = this.props;
|
|
47
|
+
const { target } = stage;
|
|
48
|
+
const { accounts } = this.state;
|
|
49
|
+
const { TargetSelect } = NgReact;
|
|
50
|
+
return (
|
|
51
|
+
<div className="form-horizontal">
|
|
52
|
+
{!pipeline.strategy && (
|
|
53
|
+
<AccountRegionClusterSelector
|
|
54
|
+
accounts={accounts}
|
|
55
|
+
application={application}
|
|
56
|
+
cloudProvider={'cloudfoundry'}
|
|
57
|
+
onComponentUpdate={this.componentUpdated}
|
|
58
|
+
component={stage}
|
|
59
|
+
/>
|
|
60
|
+
)}
|
|
61
|
+
<StageConfigField label="Target">
|
|
62
|
+
<TargetSelect model={{ target }} options={StageConstants.TARGET_LIST} onChange={this.targetUpdated} />
|
|
63
|
+
</StageConfigField>
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 CloudFoundryLoadBalancersExecutionDetails(props: IExecutionDetailsSectionProps) {
|
|
8
|
+
const { stage } = props;
|
|
9
|
+
const { context } = stage;
|
|
10
|
+
const account = get(context, 'credentials', undefined);
|
|
11
|
+
const region = get(context, 'region', undefined);
|
|
12
|
+
const loadBalancerNames = get(context, 'loadBalancerNames', undefined);
|
|
13
|
+
const serverGroupName = get(context, 'serverGroupName', 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>Server Group Name</dt>
|
|
30
|
+
<dd>
|
|
31
|
+
{serverGroupName}
|
|
32
|
+
<br />
|
|
33
|
+
</dd>
|
|
34
|
+
<dt>Load Balancers</dt>
|
|
35
|
+
<dd>
|
|
36
|
+
{loadBalancerNames.join(', ')}
|
|
37
|
+
<br />
|
|
38
|
+
</dd>
|
|
39
|
+
</dl>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<StageFailureMessage stage={props.stage} message={props.stage.failureMessage} />
|
|
44
|
+
<StageExecutionLogs stage={props.stage} />
|
|
45
|
+
</ExecutionDetailsSection>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// TODO: refactor this to not use namespace
|
|
50
|
+
// eslint-disable-next-line
|
|
51
|
+
export namespace CloudFoundryLoadBalancersExecutionDetails {
|
|
52
|
+
export const title = 'cloudfoundryLoadBalancersConfig';
|
|
53
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { Formik } from 'formik';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { from as observableFrom, Subject } from 'rxjs';
|
|
4
|
+
import { takeUntil } from 'rxjs/operators';
|
|
5
|
+
|
|
6
|
+
import type { Application, IAccount, IPipeline, IStageConfigProps } from '@spinnaker/core';
|
|
7
|
+
import { AccountService, NgReact, SpinFormik, StageConfigField, StageConstants } from '@spinnaker/core';
|
|
8
|
+
|
|
9
|
+
import { Routes } from '../../forms/serverGroup';
|
|
10
|
+
import { AccountRegionClusterSelector } from '../../widgets/accountRegionClusterSelector';
|
|
11
|
+
|
|
12
|
+
interface ICloudFoundryLoadBalancerStageConfigProps extends IStageConfigProps {
|
|
13
|
+
pipeline: IPipeline;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ICloudFoundryLoadBalancersValues {
|
|
17
|
+
routes: string[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface ICloudFoundryLoadBalancersStageConfigState {
|
|
21
|
+
accounts: IAccount[];
|
|
22
|
+
application: Application;
|
|
23
|
+
initialValues: ICloudFoundryLoadBalancersValues;
|
|
24
|
+
pipeline: IPipeline;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class CloudFoundryLoadBalancersStageConfig extends React.Component<
|
|
28
|
+
ICloudFoundryLoadBalancerStageConfigProps,
|
|
29
|
+
ICloudFoundryLoadBalancersStageConfigState
|
|
30
|
+
> {
|
|
31
|
+
private destroy$ = new Subject();
|
|
32
|
+
private formikRef = React.createRef<Formik<ICloudFoundryLoadBalancersValues>>();
|
|
33
|
+
|
|
34
|
+
constructor(props: ICloudFoundryLoadBalancerStageConfigProps) {
|
|
35
|
+
super(props);
|
|
36
|
+
const { loadBalancerNames } = props.stage;
|
|
37
|
+
const routes = loadBalancerNames && loadBalancerNames.length ? loadBalancerNames : [''];
|
|
38
|
+
this.props.updateStageField({
|
|
39
|
+
cloudProvider: 'cloudfoundry',
|
|
40
|
+
loadBalancerNames: routes,
|
|
41
|
+
});
|
|
42
|
+
this.state = {
|
|
43
|
+
accounts: [],
|
|
44
|
+
application: props.application,
|
|
45
|
+
initialValues: {
|
|
46
|
+
routes,
|
|
47
|
+
},
|
|
48
|
+
pipeline: props.pipeline,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public componentDidMount(): void {
|
|
53
|
+
observableFrom(AccountService.listAccounts('cloudfoundry'))
|
|
54
|
+
.pipe(takeUntil(this.destroy$))
|
|
55
|
+
.subscribe((accounts) => this.setState({ accounts }));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public componentWillUnmount(): void {
|
|
59
|
+
this.destroy$.next();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
private targetUpdated = (target: string) => {
|
|
63
|
+
this.props.updateStageField({ target });
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
private componentUpdated = (stage: any): void => {
|
|
67
|
+
this.props.updateStageField({
|
|
68
|
+
credentials: stage.credentials,
|
|
69
|
+
region: stage.region,
|
|
70
|
+
cluster: stage.cluster,
|
|
71
|
+
loadBalancerNames: stage.loadBalancerNames,
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
public render() {
|
|
76
|
+
const { stage } = this.props;
|
|
77
|
+
const { accounts, application, initialValues, pipeline } = this.state;
|
|
78
|
+
const { target } = stage;
|
|
79
|
+
const { TargetSelect } = NgReact;
|
|
80
|
+
return (
|
|
81
|
+
<div className="form-horizontal">
|
|
82
|
+
{!pipeline.strategy && (
|
|
83
|
+
<AccountRegionClusterSelector
|
|
84
|
+
accounts={accounts}
|
|
85
|
+
application={application}
|
|
86
|
+
cloudProvider={'cloudfoundry'}
|
|
87
|
+
isSingleRegion={true}
|
|
88
|
+
onComponentUpdate={this.componentUpdated}
|
|
89
|
+
component={stage}
|
|
90
|
+
/>
|
|
91
|
+
)}
|
|
92
|
+
<StageConfigField label="Target">
|
|
93
|
+
<TargetSelect model={{ target }} options={StageConstants.TARGET_LIST} onChange={this.targetUpdated} />
|
|
94
|
+
</StageConfigField>
|
|
95
|
+
<SpinFormik<ICloudFoundryLoadBalancersValues>
|
|
96
|
+
ref={this.formikRef}
|
|
97
|
+
initialValues={initialValues}
|
|
98
|
+
onSubmit={null}
|
|
99
|
+
render={() => {
|
|
100
|
+
return (
|
|
101
|
+
<Routes
|
|
102
|
+
fieldName={'routes'}
|
|
103
|
+
isRequired={true}
|
|
104
|
+
singleRouteOnly={true}
|
|
105
|
+
onChange={(routes: string[]) => {
|
|
106
|
+
stage.loadBalancerNames = routes;
|
|
107
|
+
this.componentUpdated(stage);
|
|
108
|
+
}}
|
|
109
|
+
/>
|
|
110
|
+
);
|
|
111
|
+
}}
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -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 CloudFoundryServiceExecutionDetails(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, 'service.instance.name', 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>Region</dt>
|
|
24
|
+
<dd>
|
|
25
|
+
{region}
|
|
26
|
+
<br />
|
|
27
|
+
</dd>
|
|
28
|
+
<dt>Service Instance Name</dt>
|
|
29
|
+
<dd>
|
|
30
|
+
{serviceInstanceName}
|
|
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 CloudFoundryServiceExecutionDetails {
|
|
45
|
+
export const title = 'cloudfoundryServiceConfig';
|
|
46
|
+
}
|