From a8c174925f64045f70c11b2bfc11fe1fdd558660 Mon Sep 17 00:00:00 2001 From: Chris Thielen Date: Tue, 12 Feb 2019 11:49:25 -0800 Subject: [PATCH] =?UTF-8?q?chore(package):=20Just=20Update=20Prettier?= =?UTF-8?q?=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../loadBalancer/AmazonLoadBalancersTag.tsx | 44 ++-- .../amazon/src/loadBalancer/TargetGroup.tsx | 7 +- .../configure/application/ALBListeners.tsx | 24 +-- .../configure/common/LoadBalancerLocation.tsx | 33 ++- .../details/LoadBalancerActions.tsx | 17 +- .../configure/AmazonImageSelectInput.tsx | 4 +- .../serverGroupCommandBuilder.service.js | 8 +- .../wizard/capacity/CapacitySelector.tsx | 93 +++++---- .../wizard/pages/ServerGroupBasicSettings.tsx | 53 +++-- .../wizard/pages/ServerGroupInstanceType.tsx | 7 +- .../wizard/pages/ServerGroupLoadBalancers.tsx | 17 +- .../details/AmazonServerGroupActions.tsx | 15 +- .../modules/canary/canary/CanaryScore.tsx | 8 +- .../canary/canary/canaryStatus.directive.js | 20 +- .../routeDomains/routeDomainSelectField.tsx | 45 ++-- .../cloudFoundryServerGroupActions.tsx | 31 ++- .../details/sections/PackageSection.tsx | 17 +- .../listExtractor/AppListExtractor.ts | 4 +- .../application/service/ApplicationReader.ts | 14 +- .../strategies/PipelineSelector.tsx | 84 ++++---- .../core/src/filterModel/FilterTags.tsx | 23 +-- .../core/src/forms/mapEditor/MapEditor.tsx | 20 +- .../core/src/healthCounts/HealthCounts.tsx | 12 +- .../LoadBalancerClusterContainer.tsx | 7 +- .../config/graph/PipelineGraphNode.tsx | 22 +- .../core/AsgActionExecutionDetailsSection.tsx | 17 +- .../config/stages/entityTags/TagEditor.tsx | 4 +- .../executionWindows/atlasGraph.component.ts | 52 ++--- .../stages/script/ScriptExecutionDetails.tsx | 31 ++- .../pipeline/config/stages/stage.module.js | 4 +- .../waitForParentTasks.transformer.js | 4 +- .../base64/defaultBase64.artifact.ts | 2 +- .../pipeline/create/CreatePipelineModal.tsx | 195 +++++++++--------- .../executionBuild/ExecutionBuildLink.tsx | 11 +- .../src/pipeline/executions/Executions.tsx | 11 +- .../filter/executionFilter.service.ts | 20 +- .../src/pipeline/triggers/TriggersTag.tsx | 4 +- .../configure/common/DeployInitializer.tsx | 55 +++-- .../src/serverGroup/details/RunningTasks.tsx | 8 +- .../details/ServerGroupDetails.tsx | 7 +- .../diff/snapshotDiff.modal.controller.js | 20 +- .../modules/dcos/loadBalancer/transformer.js | 8 +- .../pipeline/stages/runJob/runJobStage.js | 4 +- .../serverGroup/configure/CommandBuilder.js | 8 +- .../google/src/address/address.reader.ts | 14 +- .../healthCheck/healthCheck.read.service.ts | 12 +- .../customInstanceBuilder.gce.service.js | 16 +- .../configure/common/healthCheck.component.ts | 9 +- .../serverGroupConfiguration.service.js | 5 +- .../src/cluster/configure/CommandBuilder.js | 4 +- .../stages/runJob/configureJob.controller.js | 10 +- .../manifestCommandBuilder.service.ts | 8 +- .../v2/manifest/selector/ManifestSelector.tsx | 63 +++--- .../pipelines/stages/ManifestCoordinates.tsx | 32 ++- .../src/common/isolateForm.directive.js | 2 +- .../configure/ServerGroupCommandBuilder.js | 4 +- .../createLoadBalancer.controller.ts | 8 +- .../stages/runJob/TitusRunJobStageConfig.tsx | 24 +-- .../runJob/TitusSecurityGroupPicker.tsx | 11 +- .../wizard/pages/ServerGroupBasicSettings.tsx | 53 +++-- 60 files changed, 667 insertions(+), 702 deletions(-) diff --git a/app/scripts/modules/amazon/src/loadBalancer/AmazonLoadBalancersTag.tsx b/app/scripts/modules/amazon/src/loadBalancer/AmazonLoadBalancersTag.tsx index 33a49712d69..3e1f7497f1a 100644 --- a/app/scripts/modules/amazon/src/loadBalancer/AmazonLoadBalancersTag.tsx +++ b/app/scripts/modules/amazon/src/loadBalancer/AmazonLoadBalancersTag.tsx @@ -199,29 +199,27 @@ export class AmazonLoadBalancersTag extends React.Component )} - {loadBalancers.length === 1 && - targetGroups.length === 0 && ( - - - - )} - - {targetGroups.length === 1 && - loadBalancers.length === 0 && ( - - - - )} + {loadBalancers.length === 1 && targetGroups.length === 0 && ( + + + + )} + + {targetGroups.length === 1 && loadBalancers.length === 0 && ( + + + + )} ); } diff --git a/app/scripts/modules/amazon/src/loadBalancer/TargetGroup.tsx b/app/scripts/modules/amazon/src/loadBalancer/TargetGroup.tsx index ccfcaa092b3..bcfb5bd762a 100644 --- a/app/scripts/modules/amazon/src/loadBalancer/TargetGroup.tsx +++ b/app/scripts/modules/amazon/src/loadBalancer/TargetGroup.tsx @@ -51,10 +51,9 @@ export class TargetGroup extends React.Component { {showServerGroups && ServerGroups} - {!showServerGroups && - showInstances && ( - - )} + {!showServerGroups && showInstances && ( + + )} ); } diff --git a/app/scripts/modules/amazon/src/loadBalancer/configure/application/ALBListeners.tsx b/app/scripts/modules/amazon/src/loadBalancer/configure/application/ALBListeners.tsx index 8f3f26c4f00..15e4eba57e9 100644 --- a/app/scripts/modules/amazon/src/loadBalancer/configure/application/ALBListeners.tsx +++ b/app/scripts/modules/amazon/src/loadBalancer/configure/application/ALBListeners.tsx @@ -841,19 +841,17 @@ const RuleActions = (props: { )} - {props.ruleIndex !== undefined && - props.ruleIndex >= 0 && - props.removeRule && ( - props.removeRule(props.listener, props.ruleIndex)} - style={{ padding: '0' }} - > - - - - - )} + {props.ruleIndex !== undefined && props.ruleIndex >= 0 && props.removeRule && ( + props.removeRule(props.listener, props.ruleIndex)} + style={{ padding: '0' }} + > + + + + + )} ); }; diff --git a/app/scripts/modules/amazon/src/loadBalancer/configure/common/LoadBalancerLocation.tsx b/app/scripts/modules/amazon/src/loadBalancer/configure/common/LoadBalancerLocation.tsx index e891515d4cf..20c21e61aef 100644 --- a/app/scripts/modules/amazon/src/loadBalancer/configure/common/LoadBalancerLocation.tsx +++ b/app/scripts/modules/amazon/src/loadBalancer/configure/common/LoadBalancerLocation.tsx @@ -370,24 +370,23 @@ export class LoadBalancerLocation extends React.Component this.handleSubnetUpdated(values.subnetType)} /> - {values.vpcId && - !hideInternalFlag && ( -
-
- Internal -
-
- -
+ {values.vpcId && !hideInternalFlag && ( +
+
+ Internal
- )} +
+ +
+
+ )}
)} diff --git a/app/scripts/modules/amazon/src/loadBalancer/details/LoadBalancerActions.tsx b/app/scripts/modules/amazon/src/loadBalancer/details/LoadBalancerActions.tsx index 7c800ace92b..586ceaaf502 100644 --- a/app/scripts/modules/amazon/src/loadBalancer/details/LoadBalancerActions.tsx +++ b/app/scripts/modules/amazon/src/loadBalancer/details/LoadBalancerActions.tsx @@ -136,15 +136,14 @@ export class LoadBalancerActions extends React.Component )} - {SETTINGS && - SETTINGS.feature.entityTags && ( - - )} + {SETTINGS && SETTINGS.feature.entityTags && ( + + )} diff --git a/app/scripts/modules/amazon/src/serverGroup/configure/AmazonImageSelectInput.tsx b/app/scripts/modules/amazon/src/serverGroup/configure/AmazonImageSelectInput.tsx index cacba8e66cc..2699b642d29 100644 --- a/app/scripts/modules/amazon/src/serverGroup/configure/AmazonImageSelectInput.tsx +++ b/app/scripts/modules/amazon/src/serverGroup/configure/AmazonImageSelectInput.tsx @@ -330,8 +330,8 @@ export class AmazonImageSelectInput extends React.Component diff --git a/app/scripts/modules/amazon/src/serverGroup/configure/serverGroupCommandBuilder.service.js b/app/scripts/modules/amazon/src/serverGroup/configure/serverGroupCommandBuilder.service.js index 6274661a844..d32e622d5c9 100644 --- a/app/scripts/modules/amazon/src/serverGroup/configure/serverGroupCommandBuilder.service.js +++ b/app/scripts/modules/amazon/src/serverGroup/configure/serverGroupCommandBuilder.service.js @@ -218,9 +218,11 @@ module.exports = angular // Might be worth feature flagging this if it turns out other folks are hard-coding these values const reservedTags = ['spinnaker:application', 'spinnaker:stack', 'spinnaker:details']; if (serverGroup.asg.tags) { - serverGroup.asg.tags.filter(t => !reservedTags.includes(t.key)).forEach(tag => { - existingTags[tag.key] = tag.value; - }); + serverGroup.asg.tags + .filter(t => !reservedTags.includes(t.key)) + .forEach(tag => { + existingTags[tag.key] = tag.value; + }); } var command = { diff --git a/app/scripts/modules/amazon/src/serverGroup/configure/wizard/capacity/CapacitySelector.tsx b/app/scripts/modules/amazon/src/serverGroup/configure/wizard/capacity/CapacitySelector.tsx index 7b5d646f1a3..9cfec2ccb71 100644 --- a/app/scripts/modules/amazon/src/serverGroup/configure/wizard/capacity/CapacitySelector.tsx +++ b/app/scripts/modules/amazon/src/serverGroup/configure/wizard/capacity/CapacitySelector.tsx @@ -86,58 +86,57 @@ export class CapacitySelector extends React.Component { {/* // TODO: Test this in a clone server group dialog or an edit pipeline dialog */} - {!readOnlyFields.useSourceCapacity && - command.viewState.mode === 'editPipeline' && ( -
-
Capacity
-
-
+ )} {(!command.useSourceCapacity || command.viewState.mode !== 'editPipeline') && (
diff --git a/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx b/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx index 2425e3a500a..b1eef6cdb4b 100644 --- a/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +++ b/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx @@ -320,14 +320,13 @@ export class ServerGroupBasicSettings
- {!values.viewState.disableStrategySelection && - values.selectedProvider && ( - - )} + {!values.viewState.disableStrategySelection && values.selectedProvider && ( + + )} {!values.viewState.hideClusterNamePreview && (
@@ -340,26 +339,24 @@ export class ServerGroupBasicSettings {createsNewCluster && (new cluster)}

- {!createsNewCluster && - values.viewState.mode === 'create' && - latestServerGroup && ( -
-

There is already a server group in this cluster. Do you want to clone it?

-

- Cloning copies the entire configuration from the selected server group, allowing you to modify - whichever fields (e.g. image) you need to change in the new server group. -

-

- To clone a server group, select "Clone" from the "Server Group Actions" menu in the details - view of the server group. -

-

- - Go to details for {latestServerGroup.name} - -

-
- )} + {!createsNewCluster && values.viewState.mode === 'create' && latestServerGroup && ( +
+

There is already a server group in this cluster. Do you want to clone it?

+

+ Cloning copies the entire configuration from the selected server group, allowing you to modify + whichever fields (e.g. image) you need to change in the new server group. +

+

+ To clone a server group, select "Clone" from the "Server Group Actions" menu in the details view + of the server group. +

+

+ + Go to details for {latestServerGroup.name} + +

+
+ )}
diff --git a/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx b/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx index 118a963a739..325fc9c5d4f 100644 --- a/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx +++ b/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupInstanceType.tsx @@ -49,10 +49,9 @@ export class ServerGroupInstanceType extends React.Component
- {values.viewState.instanceProfile && - values.viewState.instanceProfile !== 'custom' && ( - - )} + {values.viewState.instanceProfile && values.viewState.instanceProfile !== 'custom' && ( + + )}
); diff --git a/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx b/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx index ef528a7ac87..1ab312aaff3 100644 --- a/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx +++ b/app/scripts/modules/amazon/src/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.tsx @@ -194,16 +194,15 @@ export class ServerGroupLoadBalancers {!values.vpcId && (
- {!hasVpcLoadBalancers && - !showVpcLoadBalancers && ( -
- + {!hasVpcLoadBalancers && !showVpcLoadBalancers && ( + + )} {hasVpcLoadBalancers && (
diff --git a/app/scripts/modules/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx b/app/scripts/modules/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx index e140280bc8e..2865261d545 100644 --- a/app/scripts/modules/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx +++ b/app/scripts/modules/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx @@ -301,14 +301,13 @@ export class AmazonServerGroupActions extends React.Component )} - {this.hasDisabledInstances() && - !this.isEnableLocked() && ( -
  • - - Enable - -
  • - )} + {this.hasDisabledInstances() && !this.isEnableLocked() && ( +
  • + + Enable + +
  • + )} {this.isEnableLocked() && (
  • diff --git a/app/scripts/modules/canary/canary/CanaryScore.tsx b/app/scripts/modules/canary/canary/CanaryScore.tsx index f5d40f2bd32..c510e69f3c0 100644 --- a/app/scripts/modules/canary/canary/CanaryScore.tsx +++ b/app/scripts/modules/canary/canary/CanaryScore.tsx @@ -32,10 +32,10 @@ export class CanaryScore extends React.ComponentDomain
  • {!props.account &&
    (Select an account)
    }
    - {props.account && - !props.readOnly && ( - - )} + {props.account && !props.readOnly && ( + + )} {props.readOnly &&

    {props.component[props.field]}

    }
    diff --git a/app/scripts/modules/cloudfoundry/src/serverGroup/details/cloudFoundryServerGroupActions.tsx b/app/scripts/modules/cloudfoundry/src/serverGroup/details/cloudFoundryServerGroupActions.tsx index 0a9a7311bdf..faed04b4016 100644 --- a/app/scripts/modules/cloudfoundry/src/serverGroup/details/cloudFoundryServerGroupActions.tsx +++ b/app/scripts/modules/cloudfoundry/src/serverGroup/details/cloudFoundryServerGroupActions.tsx @@ -323,14 +323,13 @@ export class CloudFoundryServerGroupActions extends React.Component )} - {this.hasDisabledInstances() && - !this.isEnableLocked() && ( -
  • - - Enable - -
  • - )} + {this.hasDisabledInstances() && !this.isEnableLocked() && ( +
  • + + Enable + +
  • + )} {this.isEnableLocked() && (
  • @@ -357,15 +356,13 @@ export class CloudFoundryServerGroupActions extends React.Component
  • )} - {!serverGroup.isDisabled && - loadBalancers && - !!loadBalancers.length && ( -
  • - - Unmap Load Balancers - -
  • - )} + {!serverGroup.isDisabled && loadBalancers && !!loadBalancers.length && ( +
  • + + Unmap Load Balancers + +
  • + )} {showEntityTags && ( - {serverGroup.droplet && - serverGroup.droplet.sourcePackage && ( - -
    -
    Checksum
    -
    {serverGroup.droplet.sourcePackage.checksum}
    -
    -
    - )} + {serverGroup.droplet && serverGroup.droplet.sourcePackage && ( + +
    +
    Checksum
    +
    {serverGroup.droplet.sourcePackage.checksum}
    +
    +
    + )} ); } diff --git a/app/scripts/modules/core/src/application/listExtractor/AppListExtractor.ts b/app/scripts/modules/core/src/application/listExtractor/AppListExtractor.ts index bbe74169b17..f3d05b2bcd4 100644 --- a/app/scripts/modules/core/src/application/listExtractor/AppListExtractor.ts +++ b/app/scripts/modules/core/src/application/listExtractor/AppListExtractor.ts @@ -122,8 +122,8 @@ export class AppListExtractor { serverGroup && Array.isArray(region) && region.length ? region.includes(serverGroup.region) : region - ? serverGroup.region === region - : true; + ? serverGroup.region === region + : true; return accountMatches && regionMatches; }; diff --git a/app/scripts/modules/core/src/application/service/ApplicationReader.ts b/app/scripts/modules/core/src/application/service/ApplicationReader.ts index b7eee613955..61a3971d655 100644 --- a/app/scripts/modules/core/src/application/service/ApplicationReader.ts +++ b/app/scripts/modules/core/src/application/service/ApplicationReader.ts @@ -90,12 +90,14 @@ export class ApplicationReader { } }); } - allDataSources.filter(ds => ds.requiresDataSource).forEach(ds => { - const parent = allDataSources.find(p => p.key === ds.requiresDataSource); - if (parent) { - this.setDataSourceDisabled(ds, application, parent.disabled); - } - }); + allDataSources + .filter(ds => ds.requiresDataSource) + .forEach(ds => { + const parent = allDataSources.find(p => p.key === ds.requiresDataSource); + if (parent) { + this.setDataSourceDisabled(ds, application, parent.disabled); + } + }); } private static setDataSourceDisabled(dataSource: ApplicationDataSource, application: Application, disabled: boolean) { diff --git a/app/scripts/modules/core/src/deploymentStrategy/strategies/PipelineSelector.tsx b/app/scripts/modules/core/src/deploymentStrategy/strategies/PipelineSelector.tsx index 62e4edb361c..cea2a07410c 100644 --- a/app/scripts/modules/core/src/deploymentStrategy/strategies/PipelineSelector.tsx +++ b/app/scripts/modules/core/src/deploymentStrategy/strategies/PipelineSelector.tsx @@ -208,22 +208,21 @@ export class PipelineSelector extends React.Component
    - {application && - pipelinesLoaded && ( -
    - -
    -
    - -
    + {application && pipelinesLoaded && ( +
    + +
    +
    +
    - )} +
    + )} {pipelineParameters.length > 0 && (
    @@ -238,38 +237,35 @@ export class PipelineSelector extends React.Component )} - {useDefaultParameters[parameter.name] && - !parameter.hasOptions && ( + {useDefaultParameters[parameter.name] && !parameter.hasOptions && ( + this.updateParam(parameter.name, e.target.value)} + /> + )} + {!useDefaultParameters[parameter.name] && parameter.hasOptions && ( + ) => this.updateParam(parameter.name, o ? o.value : '')} + options={parameter.options.map(o => ({ label: o.value, value: o.value }))} + /> + )} +
    + {parameter.default !== null && parameter.default !== undefined && ( +
    +
    - {parameter.default !== null && - parameter.default !== undefined && ( -
    - -
    - )} + Use default + +
    + )}
    ))}
    diff --git a/app/scripts/modules/core/src/filterModel/FilterTags.tsx b/app/scripts/modules/core/src/filterModel/FilterTags.tsx index d23a178d9ac..e8bfbc56a00 100644 --- a/app/scripts/modules/core/src/filterModel/FilterTags.tsx +++ b/app/scripts/modules/core/src/filterModel/FilterTags.tsx @@ -62,18 +62,17 @@ export class FilterTags extends React.Component - {tags && - tags.length > 0 && ( - - Filtered by: - {tags.map(tag => this.generateTag(tag))} - {tags.length > 1 && ( - - Clear All - - )} - - )} + {tags && tags.length > 0 && ( + + Filtered by: + {tags.map(tag => this.generateTag(tag))} + {tags.length > 1 && ( + + Clear All + + )} + + )} ); } diff --git a/app/scripts/modules/core/src/forms/mapEditor/MapEditor.tsx b/app/scripts/modules/core/src/forms/mapEditor/MapEditor.tsx index 1ae91b8855d..801a93af557 100644 --- a/app/scripts/modules/core/src/forms/mapEditor/MapEditor.tsx +++ b/app/scripts/modules/core/src/forms/mapEditor/MapEditor.tsx @@ -139,15 +139,17 @@ export class MapEditor extends React.Component )} - {backingModel.filter(p => !hiddenKeys.includes(p.key)).map((pair, index) => ( - this.onChange(value, index)} - onDelete={() => this.onDelete(index)} - pair={pair} - /> - ))} + {backingModel + .filter(p => !hiddenKeys.includes(p.key)) + .map((pair, index) => ( + this.onChange(value, index)} + onDelete={() => this.onDelete(index)} + pair={pair} + /> + ))} diff --git a/app/scripts/modules/core/src/healthCounts/HealthCounts.tsx b/app/scripts/modules/core/src/healthCounts/HealthCounts.tsx index 5c358cde925..ab997673d15 100644 --- a/app/scripts/modules/core/src/healthCounts/HealthCounts.tsx +++ b/app/scripts/modules/core/src/healthCounts/HealthCounts.tsx @@ -47,12 +47,12 @@ export class HealthCounts extends React.Component 0 - ? 'unhealthy' - : percent === 0 - ? 'dead' - : 'disabled'; + ? 'healthy' + : percent < 100 && percent > 0 + ? 'unhealthy' + : percent === 0 + ? 'dead' + : 'disabled'; return { percentLabel, statusClass, total }; } diff --git a/app/scripts/modules/core/src/loadBalancer/LoadBalancerClusterContainer.tsx b/app/scripts/modules/core/src/loadBalancer/LoadBalancerClusterContainer.tsx index 84182597ed6..94a2f352a57 100644 --- a/app/scripts/modules/core/src/loadBalancer/LoadBalancerClusterContainer.tsx +++ b/app/scripts/modules/core/src/loadBalancer/LoadBalancerClusterContainer.tsx @@ -41,10 +41,9 @@ export class LoadBalancerClusterContainer extends React.Component {showServerGroups && ServerGroups} - {!showServerGroups && - showInstances && ( - - )} + {!showServerGroups && showInstances && ( + + )} ); } diff --git a/app/scripts/modules/core/src/pipeline/config/graph/PipelineGraphNode.tsx b/app/scripts/modules/core/src/pipeline/config/graph/PipelineGraphNode.tsx index ea62223fc9a..165c9ea7584 100644 --- a/app/scripts/modules/core/src/pipeline/config/graph/PipelineGraphNode.tsx +++ b/app/scripts/modules/core/src/pipeline/config/graph/PipelineGraphNode.tsx @@ -95,18 +95,16 @@ export class PipelineGraphNode extends React.Component /> )} - {(node.root || node.leaf) && - !node.executionStage && - !isGroup && ( - - )} + {(node.root || node.leaf) && !node.executionStage && !isGroup && ( + + )} ); diff --git a/app/scripts/modules/core/src/pipeline/config/stages/core/AsgActionExecutionDetailsSection.tsx b/app/scripts/modules/core/src/pipeline/config/stages/core/AsgActionExecutionDetailsSection.tsx index 3db334487e2..81ff5d03f4c 100644 --- a/app/scripts/modules/core/src/pipeline/config/stages/core/AsgActionExecutionDetailsSection.tsx +++ b/app/scripts/modules/core/src/pipeline/config/stages/core/AsgActionExecutionDetailsSection.tsx @@ -23,17 +23,16 @@ export function AsgActionExecutionDetailsSection(props: IExecutionDetailsSection - {stage.isCompleted && - stage.context.serverGroupName && ( -
    -
    -
    - {action}: - {stage.context.serverGroupName} -
    + {stage.isCompleted && stage.context.serverGroupName && ( +
    +
    +
    + {action}: + {stage.context.serverGroupName}
    - )} +
    + )} ); diff --git a/app/scripts/modules/core/src/pipeline/config/stages/entityTags/TagEditor.tsx b/app/scripts/modules/core/src/pipeline/config/stages/entityTags/TagEditor.tsx index a93ff01855b..4d69d5c4a89 100644 --- a/app/scripts/modules/core/src/pipeline/config/stages/entityTags/TagEditor.tsx +++ b/app/scripts/modules/core/src/pipeline/config/stages/entityTags/TagEditor.tsx @@ -33,8 +33,8 @@ export class TagEditor extends React.Component const type = props.tag.name.startsWith('spinnaker_ui_notice') ? 'notice' : props.tag.name.startsWith('spinnaker_ui_alert') - ? 'alert' - : 'custom'; + ? 'alert' + : 'custom'; this.state = { type, diff --git a/app/scripts/modules/core/src/pipeline/config/stages/executionWindows/atlasGraph.component.ts b/app/scripts/modules/core/src/pipeline/config/stages/executionWindows/atlasGraph.component.ts index 9c101bf7354..8dac5239f7f 100644 --- a/app/scripts/modules/core/src/pipeline/config/stages/executionWindows/atlasGraph.component.ts +++ b/app/scripts/modules/core/src/pipeline/config/stages/executionWindows/atlasGraph.component.ts @@ -112,13 +112,15 @@ class ExecutionWindowAtlasGraphController implements IController { (e: any) => e.type === 'timeseries' && e.data.values.some((v: any) => v !== 'NaN'), ); timeseries.forEach((series: any) => { - const datapoints = series.data.values.filter((v: any) => !isNaN(v)).map((val: any, idx2: number) => { - this.maxCount = Math.max(this.maxCount, val); - return { - val: Math.round(val), - timestamp: new Date(metadata.startTime + metadata.step * idx2), - }; - }); + const datapoints = series.data.values + .filter((v: any) => !isNaN(v)) + .map((val: any, idx2: number) => { + this.maxCount = Math.max(this.maxCount, val); + return { + val: Math.round(val), + timestamp: new Date(metadata.startTime + metadata.step * idx2), + }; + }); datapoints.unshift({ val: 0, timestamp: new Date(metadata.startTime - metadata.step), @@ -164,23 +166,25 @@ class ExecutionWindowAtlasGraphController implements IController { } return { abscissas: this.$filter('timestamp')(rows[0].row.x.getTime()), - rows: rows.filter(r => r.row.y1).map(row => { - if (row.series.dataset === 'windows') { - return { - label: '(in selected window)', - value: '', - color: row.series.color, - id: row.series.id, - }; - } else { - return { - label: 'SPS', - value: row.row.y1, - color: row.series.color, - id: row.series.id, - }; - } - }), + rows: rows + .filter(r => r.row.y1) + .map(row => { + if (row.series.dataset === 'windows') { + return { + label: '(in selected window)', + value: '', + color: row.series.color, + id: row.series.id, + }; + } else { + return { + label: 'SPS', + value: row.row.y1, + color: row.series.color, + id: row.series.id, + }; + } + }), }; }, series: [ diff --git a/app/scripts/modules/core/src/pipeline/config/stages/script/ScriptExecutionDetails.tsx b/app/scripts/modules/core/src/pipeline/config/stages/script/ScriptExecutionDetails.tsx index 2c86b2297c6..9665ff956f4 100644 --- a/app/scripts/modules/core/src/pipeline/config/stages/script/ScriptExecutionDetails.tsx +++ b/app/scripts/modules/core/src/pipeline/config/stages/script/ScriptExecutionDetails.tsx @@ -42,31 +42,28 @@ export function ScriptExecutionDetails(props: IExecutionDetailsSectionProps) {
    )} - {!scriptRanAndFailed && - stage.context.buildInfo && - stage.context.buildInfo.url && ( -
    -
    - + {!scriptRanAndFailed && stage.context.buildInfo && stage.context.buildInfo.url && ( + + )} {scriptRanAndFailed && (
    Script execution failed. Check - {stage.context.buildInfo && - stage.context.buildInfo.url && ( - - the script results - - )} + {stage.context.buildInfo && stage.context.buildInfo.url && ( + + the script results + + )} for details.
    diff --git a/app/scripts/modules/core/src/pipeline/config/stages/stage.module.js b/app/scripts/modules/core/src/pipeline/config/stages/stage.module.js index 6452d10f64e..8808b563576 100644 --- a/app/scripts/modules/core/src/pipeline/config/stages/stage.module.js +++ b/app/scripts/modules/core/src/pipeline/config/stages/stage.module.js @@ -73,8 +73,8 @@ module.exports = angular return stage.available ? 'Available' : requisiteStageRefIds.includes(stage.refId) - ? null - : 'Downstream dependencies (unavailable)'; + ? null + : 'Downstream dependencies (unavailable)'; }; $scope.stageProducesArtifacts = function() { diff --git a/app/scripts/modules/core/src/pipeline/config/stages/waitForParentTasks/waitForParentTasks.transformer.js b/app/scripts/modules/core/src/pipeline/config/stages/waitForParentTasks/waitForParentTasks.transformer.js index 4c1043193df..e76c9ccb6e5 100644 --- a/app/scripts/modules/core/src/pipeline/config/stages/waitForParentTasks/waitForParentTasks.transformer.js +++ b/app/scripts/modules/core/src/pipeline/config/stages/waitForParentTasks/waitForParentTasks.transformer.js @@ -7,8 +7,8 @@ module.exports = angular // injects wait for parent tasks stage function injectWaitForParentStages(execution) { /* - * Every time you see one, look at its requisite ids, then set it as the child of any that match it - * */ + * Every time you see one, look at its requisite ids, then set it as the child of any that match it + * */ let stagesToInject = []; execution.stages .filter(stage => stage.requisiteStageRefIds && stage.requisiteStageRefIds.length > 1) diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/defaultBase64.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/defaultBase64.artifact.ts index b5017eb78c1..42bf99f0377 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/defaultBase64.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/defaultBase64.artifact.ts @@ -28,7 +28,7 @@ module(DEFAULT_BASE64_ARTIFACT, []).config(() => { this.decoded = ''; this.encodeDecodeError = ''; - this.convert = (fn: ((s: string) => string), str: string): string => { + this.convert = (fn: (s: string) => string, str: string): string => { this.encodeDecodeError = ''; try { return fn(str); diff --git a/app/scripts/modules/core/src/pipeline/create/CreatePipelineModal.tsx b/app/scripts/modules/core/src/pipeline/create/CreatePipelineModal.tsx index 1f6a84d53d8..879ff5a6377 100644 --- a/app/scripts/modules/core/src/pipeline/create/CreatePipelineModal.tsx +++ b/app/scripts/modules/core/src/pipeline/create/CreatePipelineModal.tsx @@ -410,125 +410,118 @@ export class CreatePipelineModal extends React.Component
    )} - {SETTINGS.feature.pipelineTemplates && - !this.state.command.strategy && ( + {SETTINGS.feature.pipelineTemplates && !this.state.command.strategy && ( +
    +
    + Create From +
    +
    + + +
    +
    + )} + {this.state.configs.length > 1 && !this.state.command.strategy && !this.state.useTemplate && ( +
    + {SETTINGS.feature.pipelineTemplates &&
    }
    - Create From + Copy From
    - - + -
    -
    -
    - )} - {SETTINGS.feature.pipelineTemplates && - this.state.useTemplate && ( -
    -
    - {this.state.templates.length > 0 && ( -
    -
    Template Source
    -
    - - -
    -
    - )} - {this.state.useManagedTemplate && ( - - )} - {!this.state.useManagedTemplate && ( -
    - {this.state.templates.length === 0 && ( -
    Source URL
    - )} -
    + +
    + URL +
    - )} - + )} + {this.state.useManagedTemplate && ( + -
    - )} + )} + {!this.state.useManagedTemplate && ( +
    + {this.state.templates.length === 0 &&
    Source URL
    } +
    + +
    +
    + )} + +
    + )} )} )} - {SETTINGS.feature.pipelineTemplates && - this.state.useTemplate && ( - - )} + {SETTINGS.feature.pipelineTemplates && this.state.useTemplate && ( + + )} {!this.state.useTemplate && ( - {trigger.parentExecution && - trigger.parentExecution.id && ( - - {trigger.parentExecution.name} - - )} + {trigger.parentExecution && trigger.parentExecution.id && ( + + {trigger.parentExecution.name} + + )} {this.getBuildLink()} ); diff --git a/app/scripts/modules/core/src/pipeline/executions/Executions.tsx b/app/scripts/modules/core/src/pipeline/executions/Executions.tsx index d3e36b79558..b008297be00 100644 --- a/app/scripts/modules/core/src/pipeline/executions/Executions.tsx +++ b/app/scripts/modules/core/src/pipeline/executions/Executions.tsx @@ -450,12 +450,11 @@ export class Executions extends React.Component )} - {!loading && - !hasPipelines && ( -
    -

    No pipelines configured for this application.

    -
    - )} + {!loading && !hasPipelines && ( +
    +

    No pipelines configured for this application.

    +
    + )} {app.executions.loadFailure && (

    There was an error loading executions. We'll try again shortly.

    diff --git a/app/scripts/modules/core/src/pipeline/filter/executionFilter.service.ts b/app/scripts/modules/core/src/pipeline/filter/executionFilter.service.ts index fef44fcf51b..ced060a3d47 100644 --- a/app/scripts/modules/core/src/pipeline/filter/executionFilter.service.ts +++ b/app/scripts/modules/core/src/pipeline/filter/executionFilter.service.ts @@ -148,15 +148,17 @@ export class ExecutionFilterService { const configs = (application.pipelineConfigs.data || []).concat(application.strategyConfigs.data || []); const sortFilter: ISortFilter = ExecutionState.filterModel.asFilterModel.sortFilter; if (!this.isFilterable(sortFilter.pipeline) && !this.isFilterable(sortFilter.status) && !sortFilter.filter) { - configs.filter((config: any) => !groups[config.name]).forEach((config: any) => - groups.push({ - heading: config.name, - config, - executions: [], - targetAccounts: this.extractAccounts(config), - fromTemplate: (config && config.type === 'templatedPipeline') || false, - }), - ); + configs + .filter((config: any) => !groups[config.name]) + .forEach((config: any) => + groups.push({ + heading: config.name, + config, + executions: [], + targetAccounts: this.extractAccounts(config), + fromTemplate: (config && config.type === 'templatedPipeline') || false, + }), + ); } else { configs .filter((config: any) => !groups[config.name] && sortFilter.pipeline[config.name]) diff --git a/app/scripts/modules/core/src/pipeline/triggers/TriggersTag.tsx b/app/scripts/modules/core/src/pipeline/triggers/TriggersTag.tsx index c35af1a3a00..dc94c9b1c5d 100644 --- a/app/scripts/modules/core/src/pipeline/triggers/TriggersTag.tsx +++ b/app/scripts/modules/core/src/pipeline/triggers/TriggersTag.tsx @@ -57,8 +57,8 @@ export class TriggersTag extends React.Component{command.viewState.customTemplateMessage}

    )} - {selectedTemplate.serverGroup && - templateSelectionText && ( -
    -
    - {templateSelectionText.copied.length > 0 && ( -
    - These fields will be copied over from the most recent server group: -
      - {templateSelectionText.copied.map((text, i) => ( -
    • {text}
    • - ))} -
    -
    - )} - {templateSelectionText.notCopied.length > 0 && ( -
    - These fields will NOT be copied over, and will be reset to defaults: -
      - {templateSelectionText.notCopied.map((text, i) => ( -
    • {text}
    • - ))} -
    -
    - )} - {templateSelectionText.additionalCopyText && ( -
    {templateSelectionText.additionalCopyText}
    - )} -
    + {selectedTemplate.serverGroup && templateSelectionText && ( +
    +
    + {templateSelectionText.copied.length > 0 && ( +
    + These fields will be copied over from the most recent server group: +
      + {templateSelectionText.copied.map((text, i) => ( +
    • {text}
    • + ))} +
    +
    + )} + {templateSelectionText.notCopied.length > 0 && ( +
    + These fields will NOT be copied over, and will be reset to defaults: +
      + {templateSelectionText.notCopied.map((text, i) => ( +
    • {text}
    • + ))} +
    +
    + )} + {templateSelectionText.additionalCopyText &&
    {templateSelectionText.additionalCopyText}
    }
    - )} +
    + )}
    diff --git a/app/scripts/modules/core/src/serverGroup/details/RunningTasks.tsx b/app/scripts/modules/core/src/serverGroup/details/RunningTasks.tsx index 3d569ec1669..82519640f00 100644 --- a/app/scripts/modules/core/src/serverGroup/details/RunningTasks.tsx +++ b/app/scripts/modules/core/src/serverGroup/details/RunningTasks.tsx @@ -27,9 +27,11 @@ export class RunningTasks extends React.Component { defaultExpanded={true} bodyClassName="content-body details-running-tasks" > - {tasks.sort((a, b) => a.startTime - b.startTime).map(task => ( - - ))} + {tasks + .sort((a, b) => a.startTime - b.startTime) + .map(task => ( + + ))} {executions.map(execution => ( ))} diff --git a/app/scripts/modules/core/src/serverGroup/details/ServerGroupDetails.tsx b/app/scripts/modules/core/src/serverGroup/details/ServerGroupDetails.tsx index 914a9b81df0..4d1482be236 100644 --- a/app/scripts/modules/core/src/serverGroup/details/ServerGroupDetails.tsx +++ b/app/scripts/modules/core/src/serverGroup/details/ServerGroupDetails.tsx @@ -118,10 +118,9 @@ export class ServerGroupDetails extends React.Component
    )} - {serverGroup && - serverGroup.isDisabled && ( -
    Disabled {timestamp(serverGroup.disabledDate)}
    - )} + {serverGroup && serverGroup.isDisabled && ( +
    Disabled {timestamp(serverGroup.disabledDate)}
    + )} {!loading && (
    diff --git a/app/scripts/modules/core/src/snapshot/diff/snapshotDiff.modal.controller.js b/app/scripts/modules/core/src/snapshot/diff/snapshotDiff.modal.controller.js index fa4145115ec..6e4235267da 100644 --- a/app/scripts/modules/core/src/snapshot/diff/snapshotDiff.modal.controller.js +++ b/app/scripts/modules/core/src/snapshot/diff/snapshotDiff.modal.controller.js @@ -50,15 +50,17 @@ module.exports = angular }; let formatSnapshots = snapshots => { - let formatted = snapshots.sort((a, b) => b.timestamp - a.timestamp).map((s, index) => { - return { - formattedTimestamp: $filter('timestamp')(s.timestamp), - timestamp: s.timestamp, - contents: JSON.stringify(s.infrastructure, null, 2), - json: s.infrastructure, - index: index, - }; - }); + let formatted = snapshots + .sort((a, b) => b.timestamp - a.timestamp) + .map((s, index) => { + return { + formattedTimestamp: $filter('timestamp')(s.timestamp), + timestamp: s.timestamp, + contents: JSON.stringify(s.infrastructure, null, 2), + json: s.infrastructure, + index: index, + }; + }); _.head(formatted).formattedTimestamp += ' (most recent)'; return formatted; diff --git a/app/scripts/modules/dcos/loadBalancer/transformer.js b/app/scripts/modules/dcos/loadBalancer/transformer.js index 3390f0a7734..a23202f1faa 100644 --- a/app/scripts/modules/dcos/loadBalancer/transformer.js +++ b/app/scripts/modules/dcos/loadBalancer/transformer.js @@ -31,8 +31,8 @@ module.exports = angular loadBalancer.account = defaultAccountIsValid ? defaultAccount : firstDcosAccount - ? firstDcosAccount - : 'my-dcos-account'; + ? firstDcosAccount + : 'my-dcos-account'; attemptToSetValidDcosCluster(dcosAccountsByName, defaultDcosCluster, loadBalancer); }); @@ -46,8 +46,8 @@ module.exports = angular loadBalancer.dcosCluster = defaultDcosClusterIsValid ? defaultDcosCluster : clusterNames.length == 1 - ? clusterNames[0] - : null; + ? clusterNames[0] + : null; loadBalancer.region = loadBalancer.dcosCluster; } } diff --git a/app/scripts/modules/dcos/pipeline/stages/runJob/runJobStage.js b/app/scripts/modules/dcos/pipeline/stages/runJob/runJobStage.js index 26277b60ced..d2f6b2fa61d 100644 --- a/app/scripts/modules/dcos/pipeline/stages/runJob/runJobStage.js +++ b/app/scripts/modules/dcos/pipeline/stages/runJob/runJobStage.js @@ -89,8 +89,8 @@ module.exports = angular stage.dcosCluster = defaultDcosClusterIsValid ? defaultDcosCluster : clusterNames.length == 1 - ? clusterNames[0] - : null; + ? clusterNames[0] + : null; stage.region = stage.dcosCluster; } } diff --git a/app/scripts/modules/dcos/serverGroup/configure/CommandBuilder.js b/app/scripts/modules/dcos/serverGroup/configure/CommandBuilder.js index f4d0af6cc4e..6d6e14220dd 100644 --- a/app/scripts/modules/dcos/serverGroup/configure/CommandBuilder.js +++ b/app/scripts/modules/dcos/serverGroup/configure/CommandBuilder.js @@ -27,8 +27,8 @@ module.exports = angular command.account = defaultAccountIsValid ? defaultAccount : firstDcosAccount - ? firstDcosAccount - : 'my-dcos-account'; + ? firstDcosAccount + : 'my-dcos-account'; attemptToSetValidDcosCluster(dcosAccountsByName, defaultDcosCluster, command); }); @@ -42,8 +42,8 @@ module.exports = angular command.dcosCluster = defaultDcosClusterIsValid ? defaultDcosCluster : clusterNames.length == 1 - ? clusterNames[0] - : null; + ? clusterNames[0] + : null; command.region = command.dcosCluster; } } diff --git a/app/scripts/modules/google/src/address/address.reader.ts b/app/scripts/modules/google/src/address/address.reader.ts index afa6d53ecde..b72bb8bc2ae 100644 --- a/app/scripts/modules/google/src/address/address.reader.ts +++ b/app/scripts/modules/google/src/address/address.reader.ts @@ -39,12 +39,14 @@ class GceAddressReader { ) .then((searchResults: ISearchResults) => { if (searchResults && searchResults.results) { - return searchResults.results.filter(result => result.provider === 'gce').map(result => { - const address = JSON.parse(result.address) as IGceAddress; - address.account = result.account; - address.region = result.region; - return address; - }); + return searchResults.results + .filter(result => result.provider === 'gce') + .map(result => { + const address = JSON.parse(result.address) as IGceAddress; + address.account = result.account; + address.region = result.region; + return address; + }); } else { return []; } diff --git a/app/scripts/modules/google/src/healthCheck/healthCheck.read.service.ts b/app/scripts/modules/google/src/healthCheck/healthCheck.read.service.ts index 4005910595a..105e7e54aef 100644 --- a/app/scripts/modules/google/src/healthCheck/healthCheck.read.service.ts +++ b/app/scripts/modules/google/src/healthCheck/healthCheck.read.service.ts @@ -27,11 +27,13 @@ export class GceHealthCheckReader { ) .then((searchResults: ISearchResults) => { if (searchResults && searchResults.results) { - const healthChecks = searchResults.results.filter(result => result.provider === 'gce').map(result => { - const healthCheck = JSON.parse(result.healthCheck) as IGceHealthCheck; - healthCheck.account = result.account; - return healthCheck; - }); + const healthChecks = searchResults.results + .filter(result => result.provider === 'gce') + .map(result => { + const healthCheck = JSON.parse(result.healthCheck) as IGceHealthCheck; + healthCheck.account = result.account; + return healthCheck; + }); return uniqWith(healthChecks, (checkA: IGceHealthCheck, checkB: IGceHealthCheck) => { return ( checkA.name === checkB.name && diff --git a/app/scripts/modules/google/src/instance/custom/customInstanceBuilder.gce.service.js b/app/scripts/modules/google/src/instance/custom/customInstanceBuilder.gce.service.js index 16beb2cf946..ddd3c4e7980 100644 --- a/app/scripts/modules/google/src/instance/custom/customInstanceBuilder.gce.service.js +++ b/app/scripts/modules/google/src/instance/custom/customInstanceBuilder.gce.service.js @@ -13,8 +13,8 @@ module.exports = angular } /* - * Above 1, vCPU count must be even. - * */ + * Above 1, vCPU count must be even. + * */ function numberOfVCpusIsValid(vCpuCount) { if (vCpuCount === 1) { return true; @@ -28,9 +28,9 @@ module.exports = angular } /* - * Memory per vCPU must be between .9 GB and 6.5 GB - * Total memory must be a multiple of 256 MB. - * */ + * Memory per vCPU must be between .9 GB and 6.5 GB + * Total memory must be a multiple of 256 MB. + * */ function minMemoryForVCpuCount(vCpuCount) { return Math.ceil(0.9 * vCpuCount * 4) / 4; } @@ -52,9 +52,9 @@ module.exports = angular } /* - * In the API, you must always provide memory in MB units. - * Format: custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY - * */ + * In the API, you must always provide memory in MB units. + * Format: custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY + * */ function generateInstanceTypeString(vCpuCount, totalMemory) { const memoryInMbs = Number(totalMemory) * 1024; return `custom-${vCpuCount}-${memoryInMbs}`; diff --git a/app/scripts/modules/google/src/loadBalancer/configure/common/healthCheck.component.ts b/app/scripts/modules/google/src/loadBalancer/configure/common/healthCheck.component.ts index 6b0b3ecf652..56cb355fb1b 100644 --- a/app/scripts/modules/google/src/loadBalancer/configure/common/healthCheck.component.ts +++ b/app/scripts/modules/google/src/loadBalancer/configure/common/healthCheck.component.ts @@ -36,10 +36,11 @@ class HealthCheckCreateCtrl implements IController { public setExistingHealthChecksForProtocol() { this.existingHealthChecksForProtocol = - get<{}, IGceHealthCheck[]>( - this, - ['healthChecksByAccountAndType', this.credentials, this.healthCheck.healthCheckType], - ) || []; + get<{}, IGceHealthCheck[]>(this, [ + 'healthChecksByAccountAndType', + this.credentials, + this.healthCheck.healthCheckType, + ]) || []; if (!this.existingHealthChecksForProtocol.find(healthCheck => healthCheck.name === this.healthCheck.name)) { delete this.healthCheck.name; diff --git a/app/scripts/modules/google/src/serverGroup/configure/serverGroupConfiguration.service.js b/app/scripts/modules/google/src/serverGroup/configure/serverGroupConfiguration.service.js index ef9ac7a933e..871324b8e53 100644 --- a/app/scripts/modules/google/src/serverGroup/configure/serverGroupConfiguration.service.js +++ b/app/scripts/modules/google/src/serverGroup/configure/serverGroupConfiguration.service.js @@ -599,9 +599,8 @@ module.exports = angular // Only include explicitly-selected firewalls in the body of the command. const xpnHostProject = getXpnHostProjectIfAny(command.network); - const decoratedSecurityGroups = _.map( - command.securityGroups, - sg => (!sg.startsWith(xpnHostProject) ? xpnHostProject + sg : sg), + const decoratedSecurityGroups = _.map(command.securityGroups, sg => + !sg.startsWith(xpnHostProject) ? xpnHostProject + sg : sg, ); command.securityGroups = _.difference(decoratedSecurityGroups, _.map(command.implicitSecurityGroups, 'id')); diff --git a/app/scripts/modules/kubernetes/src/cluster/configure/CommandBuilder.js b/app/scripts/modules/kubernetes/src/cluster/configure/CommandBuilder.js index 3a2bd6a875d..8513e89b29f 100644 --- a/app/scripts/modules/kubernetes/src/cluster/configure/CommandBuilder.js +++ b/app/scripts/modules/kubernetes/src/cluster/configure/CommandBuilder.js @@ -28,8 +28,8 @@ module.exports = angular command.account = defaultAccountIsValid ? defaultAccount : firstKubernetesAccount - ? firstKubernetesAccount - : 'my-account-name'; + ? firstKubernetesAccount + : 'my-account-name'; }); } diff --git a/app/scripts/modules/kubernetes/src/pipeline/stages/runJob/configureJob.controller.js b/app/scripts/modules/kubernetes/src/pipeline/stages/runJob/configureJob.controller.js index 68d86dee73f..7c2da20444f 100644 --- a/app/scripts/modules/kubernetes/src/pipeline/stages/runJob/configureJob.controller.js +++ b/app/scripts/modules/kubernetes/src/pipeline/stages/runJob/configureJob.controller.js @@ -71,10 +71,12 @@ module.exports = angular }) .filter(image => !!image); - this.triggerImages = (this.pipeline.triggers || []).filter(trigger => trigger.type === 'docker').map(image => { - image.fromTrigger = true; - return image; - }); + this.triggerImages = (this.pipeline.triggers || []) + .filter(trigger => trigger.type === 'docker') + .map(image => { + image.fromTrigger = true; + return image; + }); this.searchImages = query => { kubernetesImageReader diff --git a/app/scripts/modules/kubernetes/src/v2/manifest/manifestCommandBuilder.service.ts b/app/scripts/modules/kubernetes/src/v2/manifest/manifestCommandBuilder.service.ts index 68d81184c0e..e87c60880a1 100644 --- a/app/scripts/modules/kubernetes/src/v2/manifest/manifestCommandBuilder.service.ts +++ b/app/scripts/modules/kubernetes/src/v2/manifest/manifestCommandBuilder.service.ts @@ -79,8 +79,8 @@ export class KubernetesManifestCommandBuilder { const account = accounts.some(a => a.name === sourceAccount) ? accounts.find(a => a.name === sourceAccount).name : accounts.length - ? accounts[0].name - : null; + ? accounts[0].name + : null; let manifestArtifactAccount: string = null; const [artifactAccountData] = artifactAccounts; @@ -107,8 +107,8 @@ export class KubernetesManifestCommandBuilder { manifests: Array.isArray(sourceManifest) ? sourceManifest : sourceManifest != null - ? [sourceManifest] - : null, + ? [sourceManifest] + : null, relationships, moniker, account, diff --git a/app/scripts/modules/kubernetes/src/v2/manifest/selector/ManifestSelector.tsx b/app/scripts/modules/kubernetes/src/v2/manifest/selector/ManifestSelector.tsx index 3899f233fe6..508dabd38e4 100644 --- a/app/scripts/modules/kubernetes/src/v2/manifest/selector/ManifestSelector.tsx +++ b/app/scripts/modules/kubernetes/src/v2/manifest/selector/ManifestSelector.tsx @@ -170,11 +170,10 @@ export class ManifestSelector extends React.Component - this.props.includeSpinnakerKinds && this.props.includeSpinnakerKinds.length - ? this.props.includeSpinnakerKinds.includes(spinnakerKind) - : true, + .filter(([, spinnakerKind]) => + this.props.includeSpinnakerKinds && this.props.includeSpinnakerKinds.length + ? this.props.includeSpinnakerKinds.includes(spinnakerKind) + : true, ) .map(([kind]) => kind) .sort(); @@ -324,38 +323,32 @@ export class ManifestSelector extends React.Component )} - {modes.includes(SelectorMode.Static) && - mode === SelectorMode.Static && ( - - ({ value: r, label: r }))} - onChange={(option: Option) => this.handleNameChange(option ? (option.value as string) : '')} - promptTextCreator={this.promptTextCreator} + {modes.includes(SelectorMode.Static) && mode === SelectorMode.Static && ( + + ({ value: r, label: r }))} + onChange={(option: Option) => this.handleNameChange(option ? (option.value as string) : '')} + promptTextCreator={this.promptTextCreator} + /> + + )} + {modes.includes(SelectorMode.Dynamic) && mode === SelectorMode.Dynamic && ( + <> + + + + + - )} - {modes.includes(SelectorMode.Dynamic) && - mode === SelectorMode.Dynamic && ( - <> - - - - - - - - )} + + )} ); } diff --git a/app/scripts/modules/kubernetes/src/v2/pipelines/stages/ManifestCoordinates.tsx b/app/scripts/modules/kubernetes/src/v2/pipelines/stages/ManifestCoordinates.tsx index b6d1470a449..3ffb6d9e5a8 100644 --- a/app/scripts/modules/kubernetes/src/v2/pipelines/stages/ManifestCoordinates.tsx +++ b/app/scripts/modules/kubernetes/src/v2/pipelines/stages/ManifestCoordinates.tsx @@ -105,23 +105,21 @@ export const ManifestCoordinates = ({ {formatManifestNames(manifestName, manifestNamesByNamespace)}
    Namespace
    {location}
    - {mapCriteriaToLabel(criteria) != null && - cluster != null && ( - <> -
    Target
    -
    {`${mapCriteriaToLabel(criteria)} in cluster ${cluster}`}
    - - )} - {labelSelectors != null && - !!formatLabelSelectors(labelSelectors) && ( - <> -
    - Selector - {(labelSelectors.selectors || []).length > 1 ? 's' : ''} -
    -
    {formatLabelSelectors(labelSelectors)}
    - - )} + {mapCriteriaToLabel(criteria) != null && cluster != null && ( + <> +
    Target
    +
    {`${mapCriteriaToLabel(criteria)} in cluster ${cluster}`}
    + + )} + {labelSelectors != null && !!formatLabelSelectors(labelSelectors) && ( + <> +
    + Selector + {(labelSelectors.selectors || []).length > 1 ? 's' : ''} +
    +
    {formatLabelSelectors(labelSelectors)}
    + + )} ); }; diff --git a/app/scripts/modules/openstack/src/common/isolateForm.directive.js b/app/scripts/modules/openstack/src/common/isolateForm.directive.js index 486bec63723..50c7db57b5d 100644 --- a/app/scripts/modules/openstack/src/common/isolateForm.directive.js +++ b/app/scripts/modules/openstack/src/common/isolateForm.directive.js @@ -1,5 +1,5 @@ /* Directive to prevent form validation from propagating to the parent/enclosing form. -*/ + */ 'use strict'; diff --git a/app/scripts/modules/openstack/src/serverGroup/configure/ServerGroupCommandBuilder.js b/app/scripts/modules/openstack/src/serverGroup/configure/ServerGroupCommandBuilder.js index 25570923f78..1b86434973d 100644 --- a/app/scripts/modules/openstack/src/serverGroup/configure/ServerGroupCommandBuilder.js +++ b/app/scripts/modules/openstack/src/serverGroup/configure/ServerGroupCommandBuilder.js @@ -73,8 +73,8 @@ module.exports = angular stack: serverGroupName.stack, freeFormDetails: serverGroupName.freeFormDetails, credentials: serverGroup.account, - loadBalancers: serverGroup.loadBalancers.map( - lbName => (/^openstack:/.test(lbName) ? lbName.split(':')[4] : loadBalancers[lbName]), + loadBalancers: serverGroup.loadBalancers.map(lbName => + /^openstack:/.test(lbName) ? lbName.split(':')[4] : loadBalancers[lbName], ), region: serverGroup.region, minSize: parseInt(serverGroup.scalingConfig.minSize), diff --git a/app/scripts/modules/oracle/src/loadBalancer/configure/createLoadBalancer.controller.ts b/app/scripts/modules/oracle/src/loadBalancer/configure/createLoadBalancer.controller.ts index 55b1a5ad40c..67d675b4aa4 100644 --- a/app/scripts/modules/oracle/src/loadBalancer/configure/createLoadBalancer.controller.ts +++ b/app/scripts/modules/oracle/src/loadBalancer/configure/createLoadBalancer.controller.ts @@ -363,9 +363,11 @@ export class OracleLoadBalancerController implements IController { public backendSetNameChanged(idx: number) { const prevName = this.$scope.prevBackendSetNames && this.$scope.prevBackendSetNames[idx]; if (prevName && prevName !== this.backendSets[idx].name) { - this.listeners.filter(lis => lis.defaultBackendSetName === prevName).forEach(lis => { - lis.defaultBackendSetName = this.backendSets[idx].name; - }); + this.listeners + .filter(lis => lis.defaultBackendSetName === prevName) + .forEach(lis => { + lis.defaultBackendSetName = this.backendSets[idx].name; + }); } } diff --git a/app/scripts/modules/titus/src/pipeline/stages/runJob/TitusRunJobStageConfig.tsx b/app/scripts/modules/titus/src/pipeline/stages/runJob/TitusRunJobStageConfig.tsx index 76b3a382168..f57e36becef 100644 --- a/app/scripts/modules/titus/src/pipeline/stages/runJob/TitusRunJobStageConfig.tsx +++ b/app/scripts/modules/titus/src/pipeline/stages/runJob/TitusRunJobStageConfig.tsx @@ -340,19 +340,17 @@ export class TitusRunJobStageConfig extends React.ComponentAccount and region must be selected before {FirewallLabels.get('firewalls')} can be added
    )} - {loaded && - stage.credentials && - stage.cluster.region && ( - - )} + {loaded && stage.credentials && stage.cluster.region && ( + + )} diff --git a/app/scripts/modules/titus/src/pipeline/stages/runJob/TitusSecurityGroupPicker.tsx b/app/scripts/modules/titus/src/pipeline/stages/runJob/TitusSecurityGroupPicker.tsx index 27fc31fa363..872367aeba6 100644 --- a/app/scripts/modules/titus/src/pipeline/stages/runJob/TitusSecurityGroupPicker.tsx +++ b/app/scripts/modules/titus/src/pipeline/stages/runJob/TitusSecurityGroupPicker.tsx @@ -165,12 +165,11 @@ export class TitusSecurityGroupPicker extends React.Component< helpKey="titus.deploy.securityGroups" /> - {amazonAccount && - command.credentials !== undefined && ( -
    - Uses {firewallsLabel} from the Amazon account -
    - )} + {amazonAccount && command.credentials !== undefined && ( +
    + Uses {firewallsLabel} from the Amazon account +
    + )}
    ); } diff --git a/app/scripts/modules/titus/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx b/app/scripts/modules/titus/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx index f562c25f3b8..e116c873caa 100644 --- a/app/scripts/modules/titus/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx +++ b/app/scripts/modules/titus/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.tsx @@ -281,14 +281,13 @@ export class ServerGroupBasicSettings
    - {!values.viewState.disableStrategySelection && - values.selectedProvider && ( - - )} + {!values.viewState.disableStrategySelection && values.selectedProvider && ( + + )} {!values.viewState.hideClusterNamePreview && (
    @@ -301,26 +300,24 @@ export class ServerGroupBasicSettings {createsNewCluster && (new cluster)}

    - {!createsNewCluster && - values.viewState.mode === 'create' && - latestServerGroup && ( -
    -

    There is already a server group in this cluster. Do you want to clone it?

    -

    - Cloning copies the entire configuration from the selected server group, allowing you to modify - whichever fields (e.g. image) you need to change in the new server group. -

    -

    - To clone a server group, select "Clone" from the "Server Group Actions" menu in the details - view of the server group. -

    -

    - - Go to details for {latestServerGroup.name} - -

    -
    - )} + {!createsNewCluster && values.viewState.mode === 'create' && latestServerGroup && ( +
    +

    There is already a server group in this cluster. Do you want to clone it?

    +

    + Cloning copies the entire configuration from the selected server group, allowing you to modify + whichever fields (e.g. image) you need to change in the new server group. +

    +

    + To clone a server group, select "Clone" from the "Server Group Actions" menu in the details view + of the server group. +

    +

    + + Go to details for {latestServerGroup.name} + +

    +
    + )}