Skip to content

Commit

Permalink
refactor(provider/cf): rename deleteService to destroyService
Browse files Browse the repository at this point in the history
  • Loading branch information
jmelchio authored and jkschneider committed Oct 19, 2018
1 parent bdca8aa commit 73ed9ae
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion app/scripts/modules/cloudfoundry/src/cf.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module(CLOUD_FOUNDRY_MODULE, [
require('./pipeline/stages/resizeAsg/cloudfoundryResizeAsgStage.js').name,
require('./pipeline/stages/rollbackCluster/cloudfoundryRollbackClusterStage.js').name,
require('./pipeline/stages/deployService/cloudfoundryDeployServiceStage.js').name,
require('./pipeline/stages/deleteService/cloudfoundryDeleteServiceStage.js').name,
require('./pipeline/stages/destroyService/cloudfoundryDestroyServiceStage.js').name,
]).config(() => {
CloudProviderRegistry.registerProvider('cloudfoundry', {
name: 'Cloud Foundry',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const angular = require('angular');
import { AccountService, Registry } from '@spinnaker/core';

module.exports = angular
.module('spinnaker.cloudfoundry.pipeline.stage.deleteServiceStage', [])
.module('spinnaker.cloudfoundry.pipeline.stage.destroyServiceStage', [])
.config(function() {
Registry.pipeline.registerStage({
provides: 'deleteService',
provides: 'destroyService',
cloudProvider: 'cloudfoundry',
templateUrl: require('./deleteServiceStage.html'),
executionStepLabelUrl: require('./deleteServiceStepLabel.html'),
templateUrl: require('./destroyServiceStage.html'),
executionStepLabelUrl: require('./destroyServiceStepLabel.html'),
accountExtractor: stage => [stage.context.credentials],
configAccountExtractor: stage => [stage.credentials],
validators: [
Expand All @@ -22,9 +22,9 @@ module.exports = angular
],
});
})
.controller('CloudfoundryDeleteServiceStageCtrl', function($scope) {
.controller('CloudfoundryDestroyServiceStageCtrl', function($scope) {
let stage = $scope.stage;
stage.action = 'deleteService';
stage.action = 'destroyService';
$scope.state = {
accounts: false,
regionsLoaded: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div ng-controller="CloudfoundryDeleteServiceStageCtrl as ctrl" class="form-horizontal">
<div ng-controller="CloudfoundryDestroyServiceStageCtrl as ctrl" class="form-horizontal">
<stage-config-field label="Account">
<account-select-field component="stage"
field="credentials"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<span class="task-label">
Destroy Service: {{step.context.serviceName}}
</span>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ExecutionDetailsSection, IExecutionDetailsSectionProps } from 'core/pip
import { AccountTag } from 'core/account';
import { StageFailureMessage } from 'core/pipeline/details';

export function DeleteServiceExecutionDetails(props: IExecutionDetailsSectionProps) {
export function DestroyServiceExecutionDetails(props: IExecutionDetailsSectionProps) {
const { stage } = props;
return (
<ExecutionDetailsSection name={props.name} current={props.current}>
Expand All @@ -25,6 +25,6 @@ export function DeleteServiceExecutionDetails(props: IExecutionDetailsSectionPro
);
}

export namespace DeleteServiceExecutionDetails {
export const title = 'deleteServiceConfig';
export namespace DestroyServiceExecutionDetails {
export const title = 'destroyServiceConfig';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { module } from 'angular';

import { Registry } from 'core/registry';
import { ExecutionDetailsTasks } from '../core';
import { DestroyServiceExecutionDetails } from './DestroyServiceExecutionDetails';

export const DESTROY_SERVICE_STAGE = 'spinnaker.core.pipeline.stage.destroyService';

module(DESTROY_SERVICE_STAGE, []).config(() => {
Registry.pipeline.registerStage({
executionDetailsSections: [DestroyServiceExecutionDetails, ExecutionDetailsTasks],
useBaseProvider: true,
key: 'destroyService',
label: 'Destroy Service',
description: 'Destroys a service',
strategy: true,
});
});
4 changes: 2 additions & 2 deletions app/scripts/modules/core/src/pipeline/pipeline.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { CHECK_PRECONDITIONS_STAGE_MODULE } from './config/stages/checkPrecondit
import { CLONE_SERVER_GROUP_STAGE } from './config/stages/cloneServerGroup/cloneServerGroupStage.module';
import { COPY_STAGE_MODAL_CONTROLLER } from './config/copyStage/copyStage.modal.controller';
import { DEPLOY_SERVICE_STAGE } from './config/stages/deployService/deployServiceStage';
import { DELETE_SERVICE_STAGE } from './config/stages/deleteService/deleteServiceStage';
import { DESTROY_SERVICE_STAGE } from './config/stages/destroyService/destroyServiceStage';
import { CREATE_LOAD_BALANCER_STAGE } from './config/stages/createLoadBalancer/createLoadBalancerStage.module';
import { DESTROY_ASG_STAGE } from './config/stages/destroyAsg/destroyAsgStage';
import { DISABLE_ASG_STAGE_MODULE } from './config/stages/disableAsg/disableAsgStage.module';
Expand Down Expand Up @@ -69,7 +69,7 @@ module(PIPELINE_MODULE, [
STAGE_CORE_MODULE,
require('./config/stages/deploy/deployStage.module').name,
DEPLOY_SERVICE_STAGE,
DELETE_SERVICE_STAGE,
DESTROY_SERVICE_STAGE,
DESTROY_ASG_STAGE,
DISABLE_ASG_STAGE_MODULE,
DISABLE_CLUSTER_STAGE,
Expand Down

0 comments on commit 73ed9ae

Please sign in to comment.