-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cf): Remove React shims from pipeline stages (#6856)
- Also repaired minor bug in Unshare Service - Added Map / Unmap Load Balancer execution details spinnaker/spinnaker#4284 Co-Authored-By: Joris Melchior <joris.melchior@gmail.com>
- Loading branch information
1 parent
fee4c12
commit 33373c4
Showing
33 changed files
with
334 additions
and
896 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 23 additions & 24 deletions
47
...dfoundry/src/pipeline/stages/cloneServerGroup/CloudfoundryCloneServerGroupStageConfig.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
.../cloudfoundry/src/pipeline/stages/cloneServerGroup/cloudfoundryCloneServerGroupStage.html
This file was deleted.
Oops, something went wrong.
35 changes: 9 additions & 26 deletions
35
...dfoundry/src/pipeline/stages/cloneServerGroup/cloudfoundryCloneServerGroupStage.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,12 @@ | ||
import { IController, IScope, module } from 'angular'; | ||
import { react2angular } from 'react2angular'; | ||
import { CloudfoundryCloneServerGroupStageConfig } from './CloudfoundryCloneServerGroupStageConfig'; | ||
import { IStage, Registry } from '@spinnaker/core'; | ||
|
||
class CloudfoundryCloneServerGroupStageCtrl implements IController { | ||
public static $inject = ['$scope']; | ||
constructor(public $scope: IScope) {} | ||
} | ||
|
||
export const CLOUD_FOUNDRY_CLONE_SERVER_GROUP_STAGE = 'spinnaker.cloudfoundry.pipeline.stage.cloneServerGroupStage'; | ||
module(CLOUD_FOUNDRY_CLONE_SERVER_GROUP_STAGE, []) | ||
.config(function() { | ||
Registry.pipeline.registerStage({ | ||
accountExtractor: (stage: IStage) => stage.context.credentials, | ||
configAccountExtractor: (stage: IStage) => [stage.credentials], | ||
provides: 'cloneServerGroup', | ||
key: 'cloneServerGroup', | ||
cloudProvider: 'cloudfoundry', | ||
templateUrl: require('./cloudfoundryCloneServerGroupStage.html'), | ||
controller: 'cfCloneServerGroupStageCtrl', | ||
validators: [], | ||
}); | ||
}) | ||
.component( | ||
'cfCloneServerGroupStage', | ||
react2angular(CloudfoundryCloneServerGroupStageConfig, ['application', 'pipeline', 'stage', 'stageFieldUpdated']), | ||
) | ||
.controller('cfCloneServerGroupStageCtrl', CloudfoundryCloneServerGroupStageCtrl); | ||
Registry.pipeline.registerStage({ | ||
accountExtractor: (stage: IStage) => stage.context.credentials, | ||
cloudProvider: 'cloudfoundry', | ||
component: CloudfoundryCloneServerGroupStageConfig, | ||
configAccountExtractor: (stage: IStage) => [stage.credentials], | ||
key: 'cloneServerGroup', | ||
provides: 'cloneServerGroup', | ||
validators: [], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 0 additions & 114 deletions
114
...modules/cloudfoundry/src/pipeline/stages/destroyAsg/CloudfoundryDestroyAsgStageConfig.tsx
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...ipts/modules/cloudfoundry/src/pipeline/stages/destroyAsg/cloudfoundryDestroyAsgStage.html
This file was deleted.
Oops, something went wrong.
62 changes: 21 additions & 41 deletions
62
...modules/cloudfoundry/src/pipeline/stages/destroyAsg/cloudfoundryDestroyAsgStage.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,22 @@ | ||
import { IController, IScope, module } from 'angular'; | ||
import { react2angular } from 'react2angular'; | ||
import { CloudfoundryAsgStageConfig } from 'cloudfoundry/presentation'; | ||
import { IStage, Registry } from '@spinnaker/core'; | ||
|
||
import { CloudfoundryDestroyAsgStageConfig } from './CloudfoundryDestroyAsgStageConfig'; | ||
import { Application, IStage, Registry } from '@spinnaker/core'; | ||
|
||
class CloudFoundryDestroyAsgStageCtrl implements IController { | ||
public static $inject = ['$scope', 'application']; | ||
constructor(public $scope: IScope, private application: Application) { | ||
this.$scope.application = this.application; | ||
} | ||
} | ||
|
||
export const CLOUD_FOUNDRY_DESTROY_ASG_STAGE = 'spinnaker.cloudfoundry.pipeline.stage.destroyAsgStage'; | ||
module(CLOUD_FOUNDRY_DESTROY_ASG_STAGE, []) | ||
.config(function() { | ||
Registry.pipeline.registerStage({ | ||
accountExtractor: (stage: IStage) => stage.context.credentials, | ||
configAccountExtractor: (stage: IStage) => [stage.credentials], | ||
provides: 'destroyServerGroup', | ||
key: 'destroyServerGroup', | ||
cloudProvider: 'cloudfoundry', | ||
templateUrl: require('./cloudfoundryDestroyAsgStage.html'), | ||
controller: 'cfDestroyAsgStageCtrl', | ||
validators: [ | ||
{ | ||
type: 'cfTargetImpedance', | ||
message: | ||
'This pipeline will attempt to destroy a server group without deploying a new version into the same cluster.', | ||
}, | ||
{ type: 'requiredField', fieldName: 'cluster' }, | ||
{ type: 'requiredField', fieldName: 'target' }, | ||
{ type: 'requiredField', fieldName: 'regions' }, | ||
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' }, | ||
], | ||
}); | ||
}) | ||
.component( | ||
'cfDestroyAsgStage', | ||
react2angular(CloudfoundryDestroyAsgStageConfig, ['application', 'pipeline', 'stage', 'stageFieldUpdated']), | ||
) | ||
.controller('cfDestroyAsgStageCtrl', CloudFoundryDestroyAsgStageCtrl); | ||
Registry.pipeline.registerStage({ | ||
accountExtractor: (stage: IStage) => stage.context.credentials, | ||
cloudProvider: 'cloudfoundry', | ||
component: CloudfoundryAsgStageConfig, | ||
configAccountExtractor: (stage: IStage) => [stage.credentials], | ||
key: 'destroyServerGroup', | ||
provides: 'destroyServerGroup', | ||
validators: [ | ||
{ | ||
type: 'cfTargetImpedance', | ||
message: | ||
'This pipeline will attempt to destroy a server group without deploying a new version into the same cluster.', | ||
}, | ||
{ type: 'requiredField', fieldName: 'cluster' }, | ||
{ type: 'requiredField', fieldName: 'target' }, | ||
{ type: 'requiredField', fieldName: 'regions' }, | ||
{ type: 'requiredField', fieldName: 'credentials', fieldLabel: 'account' }, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.