Skip to content

Commit

Permalink
fix(cf): Clone sg modal appears. Removed unused lb code. (#6915)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Chu <jchu@pivotal.io>
  • Loading branch information
2 people authored and Jon Schneider committed May 6, 2019
1 parent fc6c843 commit f646a5a
Show file tree
Hide file tree
Showing 13 changed files with 191 additions and 318 deletions.
4 changes: 2 additions & 2 deletions app/scripts/modules/cloudfoundry/src/cf.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
cfServerGroupDetailsGetter,
CloudFoundryCreateServerGroupModal,
CloudFoundryServerGroupActions,
CloudFoundryServerGroupCommandBuilder,
CloudFoundryServerGroupCommandBuilderShim,
CloudFoundryServerGroupTransformer,
EvironmentVariablesSection,
HealthCheckSection,
Expand Down Expand Up @@ -71,7 +71,7 @@ CloudProviderRegistry.registerProvider('cloudfoundry', {
EvironmentVariablesSection,
],
CloneServerGroupModal: CloudFoundryCreateServerGroupModal,
commandBuilder: CloudFoundryServerGroupCommandBuilder,
commandBuilder: CloudFoundryServerGroupCommandBuilderShim,
scalingActivitiesEnabled: false, // FIXME enable?
},
instance: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { ICloudFoundryInstance } from 'cloudfoundry/domain/ICloudFoundryInstance

export interface ICloudFoundryServerGroup extends IServerGroup {
appsManagerUri?: string;
metricsUri?: string;
memory: number;
diskQuota: number;
healthCheckType: string;
healthCheckHttpEndpoint: string;
state: 'STARTED' | 'STOPPED';
instances: ICloudFoundryInstance[];
metricsUri?: string;
memory: number;
space: ICloudFoundrySpace;
droplet?: ICloudFoundryDroplet;
serviceInstances: ICloudFoundryServiceInstance[];
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
import { IStageConfigProps, StageConstants } from '@spinnaker/core';

import { CloudFoundryCreateServerGroupModal } from 'cloudfoundry/serverGroup/configure/wizard/CreateServerGroupModal';
import { CloudFoundryReactInjector } from 'cloudfoundry/reactShims';
import { CloudFoundryServerGroupCommandBuilder } from 'cloudfoundry/serverGroup/configure';

export interface ICloudfoundryCloneServerGroupStageConfigState {
buttonText: string;
Expand Down Expand Up @@ -47,16 +47,13 @@ export class CloudfoundryCloneServerGroupStageConfig extends React.Component<
private addCluster = () => {
const { application, stage, pipeline } = this.props;
const title = 'Clone Cluster';
CloudFoundryReactInjector.cfServerGroupCommandBuilder
.buildCloneServerGroupCommandFromPipeline(stage, pipeline)
.then((command: any) => {
return CloudFoundryCreateServerGroupModal.show({
application,
command,
isSourceConstant: false,
title,
});
})
const command = CloudFoundryServerGroupCommandBuilder.buildCloneServerGroupCommandFromPipeline(stage, pipeline);
CloudFoundryCreateServerGroupModal.show({
application,
command,
isSourceConstant: false,
title,
})
.then(this.handleResult)
.catch(() => {});
};
Expand All @@ -82,7 +79,7 @@ export class CloudfoundryCloneServerGroupStageConfig extends React.Component<
<tr>
<td>{stage.source ? stage.source.account : ''}</td>
<td>{stage.source ? stage.source.region : ''}</td>
<td>{stage.source ? stage.source.targetCluster : ''}</td>
<td>{stage.source ? stage.source.clusterName : ''}</td>
<td>{stage.source ? cloneTargets.filter(t => t.val === stage.source.target).map(t => t.label) : ''}</td>
</tr>
</tbody>
Expand Down

This file was deleted.

12 changes: 0 additions & 12 deletions app/scripts/modules/cloudfoundry/src/reactShims/cf.react.module.ts

This file was deleted.

1 change: 0 additions & 1 deletion app/scripts/modules/cloudfoundry/src/reactShims/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './serverGroupConfigurationModel.cf';
export * from './serverGroupCommandBuilder.service.cf';
export * from './serverGroupCommandBuilderShim.service.cf';
export * from './wizard/CreateServerGroupModal';
Loading

0 comments on commit f646a5a

Please sign in to comment.