Skip to content

Commit

Permalink
refactor(core): remove unused parameter options from confirmation mod…
Browse files Browse the repository at this point in the history
…al (spinnaker#7716)

* refactor(core): remove unused parameter options from confirmation modal

* chore(core): remove unused file
  • Loading branch information
anotherchrisberry authored and mergify[bot] committed Dec 18, 2019
1 parent 0de53cf commit d2838d8
Show file tree
Hide file tree
Showing 36 changed files with 0 additions and 327 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ export class FunctionActions extends React.Component<IFunctionActionsProps, IFun
ReactInjector.confirmationModalService.confirm({
header: `Really delete ${functionFromParams.functionName} in ${functionFromParams.region}: ${functionFromParams.account}?`,
buttonText: `Delete ${functionFromParams.functionName}`,
provider: 'aws',
account: functionFromParams.account,
applicationName: app.name,
taskMonitorConfig: taskMonitor,
submitMethod,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ module(AMAZON_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
header: 'Really terminate ' + instance.instanceId + '?',
buttonText: 'Terminate ' + instance.instanceId,
account: instance.account,
provider: 'aws',
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
});
Expand All @@ -347,7 +346,6 @@ module(AMAZON_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
header: 'Really terminate ' + instance.instanceId + ' and shrink ' + instance.serverGroup + '?',
buttonText: 'Terminate ' + instance.instanceId + ' and shrink ' + instance.serverGroup,
account: instance.account,
provider: 'aws',
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
});
Expand All @@ -373,7 +371,6 @@ module(AMAZON_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
header: 'Really reboot ' + instance.instanceId + '?',
buttonText: 'Reboot ' + instance.instanceId,
account: instance.account,
provider: 'aws',
platformHealthOnlyShowOverride: app.attributes.platformHealthOnlyShowOverride,
platformHealthType: 'Amazon',
taskMonitorConfig: taskMonitor,
Expand Down Expand Up @@ -419,7 +416,6 @@ module(AMAZON_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
confirmationModalService.confirm({
header: 'Really deregister ' + instance.instanceId + ' from ' + loadBalancerNames + '?',
buttonText: 'Deregister ' + instance.instanceId,
provider: 'aws',
account: instance.account,
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
Expand Down Expand Up @@ -464,7 +460,6 @@ module(AMAZON_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
confirmationModalService.confirm({
header: 'Really deregister ' + instance.instanceId + ' from ' + targetGroupNames + '?',
buttonText: 'Deregister ' + instance.instanceId,
provider: 'aws',
account: instance.account,
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
Expand Down Expand Up @@ -507,7 +502,6 @@ module(AMAZON_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
confirmationModalService.confirm({
header: 'Really disable ' + instance.instanceId + ' in discovery?',
buttonText: 'Disable ' + instance.instanceId,
provider: 'aws',
account: instance.account,
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ export class LoadBalancerActions extends React.Component<ILoadBalancerActionsPro
ReactInjector.confirmationModalService.confirm({
header: `Really delete ${loadBalancerFromParams.name} in ${loadBalancerFromParams.region}: ${loadBalancerFromParams.accountId}?`,
buttonText: `Delete ${loadBalancerFromParams.name}`,
provider: 'aws',
account: loadBalancerFromParams.accountId,
applicationName: app.name,
taskMonitorConfig: taskMonitor,
submitMethod,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,7 @@ angular
confirmationModalService.confirm({
header: 'Really delete ' + securityGroup.name + '?',
buttonText: 'Delete ' + securityGroup.name,
provider: 'aws',
account: securityGroup.accountId,
applicationName: application.name,
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
retryBody: `<div><p>Retry deleting the ${FirewallLabels.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export class AmazonServerGroupActions extends React.Component<IAmazonServerGroup
header: 'Really destroy ' + serverGroup.name + '?',
buttonText: 'Destroy ' + serverGroup.name,
account: serverGroup.account,
provider: 'aws',
taskMonitorConfig: taskMonitor,
interestingHealthProviderNames: undefined as string[],
submitMethod,
Expand Down Expand Up @@ -143,7 +142,6 @@ export class AmazonServerGroupActions extends React.Component<IAmazonServerGroup
header: 'Really disable ' + serverGroup.name + '?',
buttonText: 'Disable ' + serverGroup.name,
account: serverGroup.account,
provider: 'aws',
interestingHealthProviderNames: undefined as string[],
taskMonitorConfig: taskMonitor,
platformHealthOnlyShowOverride: app.attributes.platformHealthOnlyShowOverride,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ module(AMAZON_SERVERGROUP_DETAILS_SCALINGPOLICY_ALARMBASEDSUMMARY_COMPONENT, [
header: 'Really delete ' + this.policy.policyName + '?',
buttonText: 'Delete scaling policy',
account: this.policy.alarms.length ? this.serverGroup.account : null, // don't confirm if it's a junk policy
provider: 'aws',
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class TargetTrackingSummaryController implements IComponentController {
header: `Really delete ${this.policy.policyName}?`,
buttonText: 'Delete scaling policy',
account: this.serverGroup.account,
provider: 'aws',
taskMonitorConfig: taskMonitor,
submitMethod: () => ScalingPolicyWriter.deleteScalingPolicy(this.application, this.serverGroup, this.policy),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ class AppengineServerGroupDetailsController implements IController {
header: 'Really destroy ' + this.serverGroup.name + '?',
buttonText: 'Destroy ' + this.serverGroup.name,
account: this.serverGroup.account,
provider: 'appengine',
taskMonitorConfig: taskMonitor,
submitMethod,
askForReason: true,
Expand Down Expand Up @@ -190,7 +189,6 @@ class AppengineServerGroupDetailsController implements IController {
const confirmationModalParams = {
header: 'Really enable ' + this.serverGroup.name + '?',
buttonText: 'Enable ' + this.serverGroup.name,
provider: 'appengine',
body: modalBody,
account: this.serverGroup.account,
taskMonitorConfig: taskMonitor,
Expand Down Expand Up @@ -240,7 +238,6 @@ class AppengineServerGroupDetailsController implements IController {
const confirmationModalParams = {
header: 'Really disable ' + this.serverGroup.name + '?',
buttonText: 'Disable ' + this.serverGroup.name,
provider: 'appengine',
body: modalBody,
account: this.serverGroup.account,
taskMonitorConfig: taskMonitor,
Expand Down Expand Up @@ -281,7 +278,6 @@ class AppengineServerGroupDetailsController implements IController {
const confirmationModalParams = {
header: 'Really stop ' + this.serverGroup.name + '?',
buttonText: 'Stop ' + this.serverGroup.name,
provider: 'appengine',
account: this.serverGroup.account,
body: modalBody,
platformHealthOnlyShowOverride: this.app.attributes.platformHealthOnlyShowOverride,
Expand All @@ -305,7 +301,6 @@ class AppengineServerGroupDetailsController implements IController {
const confirmationModalParams = {
header: 'Really start ' + this.serverGroup.name + '?',
buttonText: 'Start ' + this.serverGroup.name,
provider: 'appengine',
account: this.serverGroup.account,
platformHealthOnlyShowOverride: this.app.attributes.platformHealthOnlyShowOverride,
platformHealthType: AppengineHealth.PLATFORM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ module(AZURE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
header: 'Really terminate ' + instance.instanceId + '?',
buttonText: 'Terminate ' + instance.instanceId,
account: instance.account,
provider: 'azure',
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
});
Expand All @@ -239,7 +238,6 @@ module(AZURE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
header: 'Really terminate ' + instance.instanceId + ' and shrink ' + instance.serverGroup + '?',
buttonText: 'Terminate ' + instance.instanceId + ' and shrink ' + instance.serverGroup,
account: instance.account,
provider: 'azure',
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
});
Expand All @@ -261,7 +259,6 @@ module(AZURE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
header: 'Really reboot ' + instance.instanceId + '?',
buttonText: 'Reboot ' + instance.instanceId,
account: instance.account,
provider: 'azure',
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
});
Expand Down Expand Up @@ -305,7 +302,6 @@ module(AZURE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
confirmationModalService.confirm({
header: 'Really deregister ' + instance.instanceId + ' from ' + loadBalancerNames + '?',
buttonText: 'Deregister ' + instance.instanceId,
provider: 'azure',
account: instance.account,
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
Expand Down Expand Up @@ -348,7 +344,6 @@ module(AZURE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [
confirmationModalService.confirm({
header: 'Really disable ' + instance.instanceId + ' in discovery?',
buttonText: 'Disable ' + instance.instanceId,
provider: 'azure',
account: instance.account,
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ angular
confirmationModalService.confirm({
header: 'Really delete ' + loadBalancer.name + '?',
buttonText: 'Delete ' + loadBalancer.name,
provider: 'azure',
account: loadBalancer.accountId,
applicationName: app.name,
taskMonitorConfig: taskMonitor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ angular
confirmationModalService.confirm({
header: 'Really delete ' + securityGroup.name + '?',
buttonText: 'Delete ' + securityGroup.name,
provider: 'azure',
account: securityGroup.accountId,
applicationName: application.name,
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export class CloudFoundryServerGroupActions extends React.Component<ICloudFoundr
header: 'Really destroy ' + serverGroup.name + '?',
buttonText: 'Destroy ' + serverGroup.name,
account: serverGroup.account,
provider: 'cloudfoundry',
taskMonitorConfig: taskMonitor,
interestingHealthProviderNames: undefined as string[],
submitMethod,
Expand Down Expand Up @@ -130,7 +129,6 @@ export class CloudFoundryServerGroupActions extends React.Component<ICloudFoundr
header: 'Really disable ' + serverGroup.name + '?',
buttonText: 'Disable ' + serverGroup.name,
account: serverGroup.account,
provider: 'cloudfoundry',
interestingHealthProviderNames: undefined as string[],
taskMonitorConfig: taskMonitor,
platformHealthOnlyShowOverride: app.attributes.platformHealthOnlyShowOverride,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export function DeleteApplicationSection(props: IDeleteApplicationSection) {
const taskMonitor = {
application,
title: `Deleting ${application.name}`,
hasKatoTask: false,
onTaskComplete: () => {
ReactInjector.$state.go('home.infrastructure');
},
Expand All @@ -23,7 +22,6 @@ export function DeleteApplicationSection(props: IDeleteApplicationSection) {
ReactInjector.confirmationModalService.confirm({
header: `Really delete ${application.name} ?`,
buttonText: `Delete ${application.name}`,
provider: 'aws',
taskMonitorConfig: taskMonitor,
submitMethod: () => ApplicationWriter.deleteApplication(application.attributes),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ module(CORE_APPLICATION_CONFIG_APPLICATIONSNAPSHOTSECTION_COMPONENT, [
const taskMonitor = {
application: this.application,
title: 'Taking snapshot of ' + this.application.name,
hasKatoTask: true,
};

confirmationModalService.confirm({
header: 'Are you sure you want to take a snapshot of: ' + this.application.name + '?',
buttonText: 'Take snapshot',
provider: 'gce',
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { CORE_CONFIRMATIONMODAL_CONFIRMATIONMODAL_CONTROLLER } from './confirmat

export interface IConfirmationModalParams {
account?: string;
applicationName?: string;
askForReason?: boolean;
body?: string;
buttonText?: string;
Expand All @@ -15,7 +14,6 @@ export interface IConfirmationModalParams {
multiTaskTitle?: string;
platformHealthOnlyShowOverride?: boolean;
platformHealthType?: string;
provider?: string;
reason?: string;
size?: string;
submitJustWithReason?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ export class NotificationsPopover extends React.Component<INotificationsPopoverP
confirmationModalService.confirm({
header: `Really delete ${type}?`,
buttonText: `Delete ${type}`,
provider: entity.cloudProvider,
account: entity.account,
applicationName: application.name,
taskMonitorConfig,
submitMethod: () => EntityTagWriter.deleteEntityTag(application, entity, entityTags, entityTag.name),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,11 @@ module(CORE_SNAPSHOT_DIFF_SNAPSHOTDIFF_MODAL_CONTROLLER, [
const taskMonitor = {
application: application,
title: 'Restoring snapshot of ' + application.name,
hasKatoTask: true,
};

confirmationModalService.confirm({
header: `Are you sure you want to restore snapshot of: ${application.name}?`,
buttonText: 'Restore snapshot',
provider: 'gce',
body: '<p>This will change your infrastructure to the state specified in the snapshot selected</p>',
taskMonitorConfig: taskMonitor,
submitMethod: submitMethod,
Expand Down
Loading

0 comments on commit d2838d8

Please sign in to comment.