@spinnaker/appengine
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -45,7 +45,7 @@ import React from 'react'; | ||
React.createElement("div", { className: "sp-margin-m-bottom" }, | ||
React.createElement(FormikFormField, { name: componentName ? `${componentName}.${credentialsField}` : `${credentialsField}`, label: "Account", input: props => (React.createElement(ReactSelectInput, Object.assign({}, props, { stringOptions: accounts && accounts.map((acc) => acc.name), clearable: false }))), onChange: this.accountChanged, required: true })), | ||
React.createElement(FormikFormField, { name: componentName ? `${componentName}.${credentialsField}` : `${credentialsField}`, label: "Account", input: (props) => (React.createElement(ReactSelectInput, Object.assign({}, props, { stringOptions: accounts && accounts.map((acc) => acc.name), clearable: false }))), onChange: this.accountChanged, required: true })), | ||
React.createElement("div", { className: "sp-margin-m-bottom" }, | ||
React.createElement(FormikFormField, { name: componentName ? `${componentName}.region` : 'region', label: "Region", input: props => React.createElement(ReactSelectInput, Object.assign({}, props, { stringOptions: availableRegions, clearable: false })), required: true })))); | ||
React.createElement(FormikFormField, { name: componentName ? `${componentName}.region` : 'region', label: "Region", input: (props) => React.createElement(ReactSelectInput, Object.assign({}, props, { stringOptions: availableRegions, clearable: false })), required: true })))); | ||
} | ||
} | ||
//# sourceMappingURL=FormikAccountRegionSelector.js.map |
@@ -138,3 +138,3 @@ import { HelpContentsRegistry } from '@spinnaker/core'; | ||
]; | ||
helpContents.forEach(entry => HelpContentsRegistry.register(entry.key, entry.value)); | ||
helpContents.forEach((entry) => HelpContentsRegistry.register(entry.key, entry.value)); | ||
//# sourceMappingURL=appengineHelpContents.js.map |
@@ -16,3 +16,3 @@ import { module } from 'angular'; | ||
.then(() => this.retrieveInstance(instance)) | ||
.then(instanceDetails => { | ||
.then((instanceDetails) => { | ||
this.instance = instanceDetails; | ||
@@ -53,3 +53,3 @@ this.state.loading = false; | ||
const instanceLocatorPredicate = (dataSource) => { | ||
return dataSource.instances.some(possibleMatch => possibleMatch.id === instance.instanceId); | ||
return dataSource.instances.some((possibleMatch) => possibleMatch.id === instance.instanceId); | ||
}; | ||
@@ -56,0 +56,0 @@ const dataSources = flattenDeep([ |
@@ -12,3 +12,3 @@ import { module } from 'angular'; | ||
const targetServerGroupName = this.loadBalancer.splitDescription.allocationDescriptions[0].serverGroupName; | ||
const targetServerGroup = this.loadBalancer.serverGroups.find(candidate => candidate.name === targetServerGroupName); | ||
const targetServerGroup = this.loadBalancer.serverGroups.find((candidate) => candidate.name === targetServerGroupName); | ||
if (targetServerGroup) { | ||
@@ -15,0 +15,0 @@ return !targetServerGroup.allowsGradualTrafficMigration; |
@@ -52,3 +52,3 @@ import { module } from 'angular'; | ||
if (this.forPipelineConfig) { | ||
return !this.loadBalancer.serverGroups.map(serverGroup => serverGroup.name).includes(serverGroupName); | ||
return !this.loadBalancer.serverGroups.map((serverGroup) => serverGroup.name).includes(serverGroupName); | ||
} | ||
@@ -60,4 +60,4 @@ else { | ||
serverGroupsWithoutAllocation() { | ||
const serverGroupsWithAllocation = this.loadBalancer.splitDescription.allocationDescriptions.map(description => description.serverGroupName); | ||
const allServerGroups = this.loadBalancer.serverGroups.map(serverGroup => serverGroup.name); | ||
const serverGroupsWithAllocation = this.loadBalancer.splitDescription.allocationDescriptions.map((description) => description.serverGroupName); | ||
const allServerGroups = this.loadBalancer.serverGroups.map((serverGroup) => serverGroup.name); | ||
return difference(allServerGroups, serverGroupsWithAllocation); | ||
@@ -64,0 +64,0 @@ } |
@@ -6,3 +6,3 @@ import { module } from 'angular'; | ||
static mapTargetCoordinateToLabel(targetCoordinate) { | ||
const target = StageConstants.TARGET_LIST.find(t => t.val === targetCoordinate); | ||
const target = StageConstants.TARGET_LIST.find((t) => t.val === targetCoordinate); | ||
if (target) { | ||
@@ -9,0 +9,0 @@ return target.label; |
@@ -29,3 +29,3 @@ import { module } from 'angular'; | ||
.convertLoadBalancerForEditing(loadBalancer, application) | ||
.then(convertedLoadBalancer => { | ||
.then((convertedLoadBalancer) => { | ||
this.loadBalancer = this.appengineLoadBalancerTransformer.convertLoadBalancerToUpsertDescription(convertedLoadBalancer); | ||
@@ -32,0 +32,0 @@ if (loadBalancer.split && !this.loadBalancer.splitDescription) { |
@@ -72,3 +72,3 @@ import { module } from 'angular'; | ||
if (this.loadBalancer && this.loadBalancer.dispatchRules) { | ||
this.loadBalancer.dispatchRules.forEach(rule => { | ||
this.loadBalancer.dispatchRules.forEach((rule) => { | ||
if (rule.service === this.loadBalancer.name) { | ||
@@ -81,3 +81,3 @@ this.dispatchRules.push(rule.domain + rule.path); | ||
getConfirmationModalBodyHtml() { | ||
const serverGroupNames = this.loadBalancer.serverGroups.map(serverGroup => serverGroup.name); | ||
const serverGroupNames = this.loadBalancer.serverGroups.map((serverGroup) => serverGroup.name); | ||
const hasAny = serverGroupNames ? serverGroupNames.length > 0 : false; | ||
@@ -88,3 +88,3 @@ const hasMoreThanOne = serverGroupNames ? serverGroupNames.length > 1 : false; | ||
if (hasMoreThanOne) { | ||
const listOfServerGroupNames = serverGroupNames.map(name => `<li>${name}</li>`).join(''); | ||
const listOfServerGroupNames = serverGroupNames.map((name) => `<li>${name}</li>`).join(''); | ||
return `<div class="alert alert-warning"> | ||
@@ -91,0 +91,0 @@ <p> |
@@ -21,3 +21,3 @@ import { module } from 'angular'; | ||
mapAllocationsToDecimals() { | ||
this.splitDescription.allocationDescriptions.forEach(description => { | ||
this.splitDescription.allocationDescriptions.forEach((description) => { | ||
description.allocation = description.allocation / 100; | ||
@@ -27,3 +27,3 @@ }); | ||
mapAllocationsToPercentages() { | ||
this.splitDescription.allocationDescriptions.forEach(description => { | ||
this.splitDescription.allocationDescriptions.forEach((description) => { | ||
// An allocation percent has at most one decimal place. | ||
@@ -42,3 +42,3 @@ description.allocation = Math.round(description.allocation * 1000) / 10; | ||
loadBalancer.instances = []; | ||
loadBalancer.serverGroups.forEach(serverGroup => { | ||
loadBalancer.serverGroups.forEach((serverGroup) => { | ||
serverGroup.account = loadBalancer.account; | ||
@@ -54,6 +54,3 @@ serverGroup.region = loadBalancer.region; | ||
const activeServerGroups = filter(loadBalancer.serverGroups, { isDisabled: false }); | ||
loadBalancer.instances = chain(activeServerGroups) | ||
.map('instances') | ||
.flatten() | ||
.value(); | ||
loadBalancer.instances = chain(activeServerGroups).map('instances').flatten().value(); | ||
return this.$q.resolve(loadBalancer); | ||
@@ -92,6 +89,3 @@ } | ||
.value(); | ||
instanceCounts.outOfService += chain(serverGroups) | ||
.map('detachedInstances') | ||
.flatten() | ||
.value().length; | ||
instanceCounts.outOfService += chain(serverGroups).map('detachedInstances').flatten().value().length; | ||
return instanceCounts; | ||
@@ -98,0 +92,0 @@ } |
@@ -9,3 +9,3 @@ import { AccountService, StageConstants } from '@spinnaker/core'; | ||
setStageRegion() { | ||
const selected = this.$scope.accounts.find(account => account.name === this.$scope.stage.credentials); | ||
const selected = this.$scope.accounts.find((account) => account.name === this.$scope.stage.credentials); | ||
if (selected && selected.name) { | ||
@@ -12,0 +12,0 @@ AccountService.getAccountDetails(selected.name).then((accountDetails) => { |
@@ -39,3 +39,3 @@ import React from 'react'; | ||
.takeUntil(this.destroy$) | ||
.subscribe(accounts => this.setState({ accounts })); | ||
.subscribe((accounts) => this.setState({ accounts })); | ||
} | ||
@@ -54,3 +54,3 @@ render() { | ||
React.createElement("div", { className: "col-md-offset-1 col-md-9" }, | ||
React.createElement(StageArtifactSelectorDelegate, { artifact: this.getInputArtifact(stage, 'cronArtifact').artifact, excludedArtifactTypePatterns: DeployAppengineConfigForm.excludedArtifactTypes, expectedArtifactId: this.getInputArtifact(stage, 'cronArtifact').id, label: "Cron Artifact", onArtifactEdited: artifact => { | ||
React.createElement(StageArtifactSelectorDelegate, { artifact: this.getInputArtifact(stage, 'cronArtifact').artifact, excludedArtifactTypePatterns: DeployAppengineConfigForm.excludedArtifactTypes, expectedArtifactId: this.getInputArtifact(stage, 'cronArtifact').id, label: "Cron Artifact", onArtifactEdited: (artifact) => { | ||
this.onTemplateArtifactEdited(artifact, 'cronArtifact'); | ||
@@ -65,3 +65,3 @@ }, helpKey: '', onExpectedArtifactSelected: (artifact) => this.onTemplateArtifactSelected(artifact.id, 'cronArtifact'), pipeline: this.props.pipeline, stage: stage })), | ||
React.createElement("div", { className: "col-md-offset-1 col-md-9" }, | ||
React.createElement(StageArtifactSelectorDelegate, { artifact: this.getInputArtifact(stage, 'dispatchArtifact').artifact, excludedArtifactTypePatterns: DeployAppengineConfigForm.excludedArtifactTypes, expectedArtifactId: this.getInputArtifact(stage, 'dispatchArtifact').id, label: "Dispatch Artifact", onArtifactEdited: artifact => { | ||
React.createElement(StageArtifactSelectorDelegate, { artifact: this.getInputArtifact(stage, 'dispatchArtifact').artifact, excludedArtifactTypePatterns: DeployAppengineConfigForm.excludedArtifactTypes, expectedArtifactId: this.getInputArtifact(stage, 'dispatchArtifact').id, label: "Dispatch Artifact", onArtifactEdited: (artifact) => { | ||
this.onTemplateArtifactEdited(artifact, 'dispatchArtifact'); | ||
@@ -76,3 +76,3 @@ }, helpKey: '', onExpectedArtifactSelected: (artifact) => this.onTemplateArtifactSelected(artifact.id, 'dispatchArtifact'), pipeline: this.props.pipeline, stage: stage })), | ||
React.createElement("div", { className: "col-md-offset-1 col-md-9" }, | ||
React.createElement(StageArtifactSelectorDelegate, { artifact: this.getInputArtifact(stage, 'indexArtifact').artifact, excludedArtifactTypePatterns: DeployAppengineConfigForm.excludedArtifactTypes, expectedArtifactId: this.getInputArtifact(stage, 'indexArtifact').id, label: "Index Artifact", onArtifactEdited: artifact => { | ||
React.createElement(StageArtifactSelectorDelegate, { artifact: this.getInputArtifact(stage, 'indexArtifact').artifact, excludedArtifactTypePatterns: DeployAppengineConfigForm.excludedArtifactTypes, expectedArtifactId: this.getInputArtifact(stage, 'indexArtifact').id, label: "Index Artifact", onArtifactEdited: (artifact) => { | ||
this.onTemplateArtifactEdited(artifact, 'indexArtifact'); | ||
@@ -87,3 +87,3 @@ }, helpKey: '', onExpectedArtifactSelected: (artifact) => this.onTemplateArtifactSelected(artifact.id, 'indexArtifact'), pipeline: this.props.pipeline, stage: stage })), | ||
React.createElement("div", { className: "col-md-offset-1 col-md-9" }, | ||
React.createElement(StageArtifactSelectorDelegate, { artifact: this.getInputArtifact(stage, 'queueArtifact').artifact, excludedArtifactTypePatterns: DeployAppengineConfigForm.excludedArtifactTypes, expectedArtifactId: this.getInputArtifact(stage, 'queueArtifact').id, label: "Queue Artifact", onArtifactEdited: artifact => { | ||
React.createElement(StageArtifactSelectorDelegate, { artifact: this.getInputArtifact(stage, 'queueArtifact').artifact, excludedArtifactTypePatterns: DeployAppengineConfigForm.excludedArtifactTypes, expectedArtifactId: this.getInputArtifact(stage, 'queueArtifact').id, label: "Queue Artifact", onArtifactEdited: (artifact) => { | ||
this.onTemplateArtifactEdited(artifact, 'queueArtifact'); | ||
@@ -90,0 +90,0 @@ }, helpKey: '', onExpectedArtifactSelected: (artifact) => this.onTemplateArtifactSelected(artifact.id, 'queueArtifact'), pipeline: this.props.pipeline, stage: stage })), |
@@ -9,3 +9,3 @@ import React from 'react'; | ||
}, []); | ||
return (React.createElement(FormikStageConfig, { application: application, onChange: updateStage, pipeline: pipeline, stage: stageWithDefaults, validate: validateDeployAppengineConfigurationStage, render: props => React.createElement(DeployAppengineConfigForm, Object.assign({}, props)) })); | ||
return (React.createElement(FormikStageConfig, { application: application, onChange: updateStage, pipeline: pipeline, stage: stageWithDefaults, validate: validateDeployAppengineConfigurationStage, render: (props) => React.createElement(DeployAppengineConfigForm, Object.assign({}, props)) })); | ||
} | ||
@@ -12,0 +12,0 @@ export function validateDeployAppengineConfigurationStage(stage) { |
@@ -35,3 +35,3 @@ import { module } from 'angular'; | ||
.then(() => { | ||
this.loadBalancers = this.application.loadBalancers.data.filter(candidate => candidate.cloudProvider === 'appengine'); | ||
this.loadBalancers = this.application.loadBalancers.data.filter((candidate) => candidate.cloudProvider === 'appengine'); | ||
if (this.loadBalancers.length) { | ||
@@ -38,0 +38,0 @@ this.selectedLoadBalancer = this.loadBalancers[0]; |
@@ -17,3 +17,3 @@ import { module } from 'angular'; | ||
return (pipeline.triggers || []) | ||
.filter(trigger => trigger.type === 'git' || trigger.type === 'jenkins' || trigger.type === 'travis') | ||
.filter((trigger) => trigger.type === 'git' || trigger.type === 'jenkins' || trigger.type === 'travis') | ||
.map((trigger) => { | ||
@@ -67,3 +67,3 @@ if (trigger.type === 'git') { | ||
buildServerGroupCommandFromExisting(app, serverGroup) { | ||
return this.buildNewServerGroupCommand(app, 'appengine', 'clone').then(command => { | ||
return this.buildNewServerGroupCommand(app, 'appengine', 'clone').then((command) => { | ||
command.stack = serverGroup.stack; | ||
@@ -95,3 +95,3 @@ command.freeFormDetails = serverGroup.detail; | ||
getCredentials(accounts) { | ||
const accountNames = (accounts || []).map(account => account.name); | ||
const accountNames = (accounts || []).map((account) => account.name); | ||
const defaultCredentials = AppengineProviderSettings.defaults.account; | ||
@@ -101,3 +101,3 @@ return accountNames.includes(defaultCredentials) ? defaultCredentials : accountNames[0]; | ||
getRegion(accounts, credentials) { | ||
const account = accounts.find(_account => _account.name === credentials); | ||
const account = accounts.find((_account) => _account.name === credentials); | ||
return account ? account.region : null; | ||
@@ -104,0 +104,0 @@ } |
@@ -30,3 +30,3 @@ import { copy, module } from 'angular'; | ||
.buildNewServerGroupCommand(application, 'appengine', 'createPipeline') | ||
.then(constructedCommand => { | ||
.then((constructedCommand) => { | ||
this.$scope.command = merge(constructedCommand, serverGroupCommand); | ||
@@ -33,0 +33,0 @@ // Re-establish references to the original pipeline and stage objects so that |
@@ -0,1 +1,2 @@ | ||
import { withErrorBoundary } from '@spinnaker/core'; | ||
import { module } from 'angular'; | ||
@@ -5,3 +6,8 @@ import { react2angular } from 'react2angular'; | ||
export const CONFIG_FILE_ARTIFACT_LIST = 'spinnaker.appengine.configFileArtifactList.component'; | ||
module(CONFIG_FILE_ARTIFACT_LIST, []).component('configFileArtifactList', react2angular(ConfigFileArtifactList, ['configArtifacts', 'pipeline', 'stage', 'updateConfigArtifacts'])); | ||
module(CONFIG_FILE_ARTIFACT_LIST, []).component('configFileArtifactList', react2angular(withErrorBoundary(ConfigFileArtifactList, 'configFileArtifactList'), [ | ||
'configArtifacts', | ||
'pipeline', | ||
'stage', | ||
'updateConfigArtifacts', | ||
])); | ||
//# sourceMappingURL=configFileArtifactList.module.js.map |
@@ -39,3 +39,3 @@ import { module } from 'angular'; | ||
} | ||
this.command.configArtifacts = this.command.configArtifacts.map(artifactAccountPair => { | ||
this.command.configArtifacts = this.command.configArtifacts.map((artifactAccountPair) => { | ||
return new ConfigArtifact(this.$scope, artifactAccountPair); | ||
@@ -42,0 +42,0 @@ }); |
@@ -315,3 +315,3 @@ import { module } from 'angular'; | ||
const precision = loadBalancer.split.shardBy === 'COOKIE' ? 1000 : 100; | ||
allocations = mapValues(allocations, allocation => Math.round((allocation / denominator) * precision) / precision); | ||
allocations = mapValues(allocations, (allocation) => Math.round((allocation / denominator) * precision) / precision); | ||
return allocations; | ||
@@ -318,0 +318,0 @@ } |
@@ -25,3 +25,3 @@ import { module } from 'angular'; | ||
this.configFiles = command.configFiles; | ||
this.configArtifacts = command.configArtifacts.filter(a => !!a.id || !!a.artifact); | ||
this.configArtifacts = command.configArtifacts.filter((a) => !!a.id || !!a.artifact); | ||
this.applicationDirectoryRoot = command.applicationDirectoryRoot; | ||
@@ -28,0 +28,0 @@ this.interestingHealthProviderNames = command.interestingHealthProviderNames || []; |
{ | ||
"name": "@spinnaker/appengine", | ||
"license": "Apache-2.0", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"main": "lib/lib.js", | ||
@@ -6,0 +6,0 @@ "typings": "lib/index.d.ts", |
@@ -25,3 +25,3 @@ import { module } from 'angular'; | ||
const templates = require.context('./', true, /\.html$/); | ||
templates.keys().forEach(function(key) { | ||
templates.keys().forEach(function (key) { | ||
templates(key); | ||
@@ -28,0 +28,0 @@ }); |
@@ -141,2 +141,2 @@ import { HelpContentsRegistry } from '@spinnaker/core'; | ||
helpContents.forEach(entry => HelpContentsRegistry.register(entry.key, entry.value)); | ||
helpContents.forEach((entry) => HelpContentsRegistry.register(entry.key, entry.value)); |
@@ -46,3 +46,3 @@ import { IController, IPromise, IQService, module } from 'angular'; | ||
.then(() => this.retrieveInstance(instance)) | ||
.then(instanceDetails => { | ||
.then((instanceDetails) => { | ||
this.instance = instanceDetails; | ||
@@ -88,3 +88,3 @@ this.state.loading = false; | ||
const instanceLocatorPredicate = (dataSource: InstanceManager) => { | ||
return dataSource.instances.some(possibleMatch => possibleMatch.id === instance.instanceId); | ||
return dataSource.instances.some((possibleMatch) => possibleMatch.id === instance.instanceId); | ||
}; | ||
@@ -91,0 +91,0 @@ |
@@ -14,3 +14,3 @@ import { IController, IComponentOptions, module } from 'angular'; | ||
const targetServerGroup = this.loadBalancer.serverGroups.find( | ||
candidate => candidate.name === targetServerGroupName, | ||
(candidate) => candidate.name === targetServerGroupName, | ||
); | ||
@@ -17,0 +17,0 @@ |
@@ -71,3 +71,3 @@ import { IController, module } from 'angular'; | ||
if (this.forPipelineConfig) { | ||
return !this.loadBalancer.serverGroups.map(serverGroup => serverGroup.name).includes(serverGroupName); | ||
return !this.loadBalancer.serverGroups.map((serverGroup) => serverGroup.name).includes(serverGroupName); | ||
} else { | ||
@@ -80,5 +80,5 @@ return false; | ||
const serverGroupsWithAllocation = this.loadBalancer.splitDescription.allocationDescriptions.map( | ||
description => description.serverGroupName, | ||
(description) => description.serverGroupName, | ||
); | ||
const allServerGroups = this.loadBalancer.serverGroups.map(serverGroup => serverGroup.name); | ||
const allServerGroups = this.loadBalancer.serverGroups.map((serverGroup) => serverGroup.name); | ||
return difference(allServerGroups, serverGroupsWithAllocation); | ||
@@ -85,0 +85,0 @@ } |
@@ -13,3 +13,3 @@ import { IController, IComponentOptions, module } from 'angular'; | ||
private static mapTargetCoordinateToLabel(targetCoordinate: string): string { | ||
const target = StageConstants.TARGET_LIST.find(t => t.val === targetCoordinate); | ||
const target = StageConstants.TARGET_LIST.find((t) => t.val === targetCoordinate); | ||
if (target) { | ||
@@ -16,0 +16,0 @@ return target.label; |
@@ -57,3 +57,3 @@ import { IController, module } from 'angular'; | ||
.convertLoadBalancerForEditing(loadBalancer, application) | ||
.then(convertedLoadBalancer => { | ||
.then((convertedLoadBalancer) => { | ||
this.loadBalancer = this.appengineLoadBalancerTransformer.convertLoadBalancerToUpsertDescription( | ||
@@ -60,0 +60,0 @@ convertedLoadBalancer, |
@@ -103,3 +103,3 @@ import { IController, IScope, module } from 'angular'; | ||
if (this.loadBalancer && this.loadBalancer.dispatchRules) { | ||
this.loadBalancer.dispatchRules.forEach(rule => { | ||
this.loadBalancer.dispatchRules.forEach((rule) => { | ||
if (rule.service === this.loadBalancer.name) { | ||
@@ -113,3 +113,3 @@ this.dispatchRules.push(rule.domain + rule.path); | ||
private getConfirmationModalBodyHtml(): string { | ||
const serverGroupNames = this.loadBalancer.serverGroups.map(serverGroup => serverGroup.name); | ||
const serverGroupNames = this.loadBalancer.serverGroups.map((serverGroup) => serverGroup.name); | ||
const hasAny = serverGroupNames ? serverGroupNames.length > 0 : false; | ||
@@ -121,3 +121,3 @@ const hasMoreThanOne = serverGroupNames ? serverGroupNames.length > 1 : false; | ||
if (hasMoreThanOne) { | ||
const listOfServerGroupNames = serverGroupNames.map(name => `<li>${name}</li>`).join(''); | ||
const listOfServerGroupNames = serverGroupNames.map((name) => `<li>${name}</li>`).join(''); | ||
return `<div class="alert alert-warning"> | ||
@@ -124,0 +124,0 @@ <p> |
@@ -66,3 +66,3 @@ import { module } from 'angular'; | ||
public mapAllocationsToDecimals() { | ||
this.splitDescription.allocationDescriptions.forEach(description => { | ||
this.splitDescription.allocationDescriptions.forEach((description) => { | ||
description.allocation = description.allocation / 100; | ||
@@ -73,3 +73,3 @@ }); | ||
public mapAllocationsToPercentages() { | ||
this.splitDescription.allocationDescriptions.forEach(description => { | ||
this.splitDescription.allocationDescriptions.forEach((description) => { | ||
// An allocation percent has at most one decimal place. | ||
@@ -89,3 +89,3 @@ description.allocation = Math.round(description.allocation * 1000) / 10; | ||
loadBalancer.instances = []; | ||
loadBalancer.serverGroups.forEach(serverGroup => { | ||
loadBalancer.serverGroups.forEach((serverGroup) => { | ||
serverGroup.account = loadBalancer.account; | ||
@@ -103,6 +103,3 @@ serverGroup.region = loadBalancer.region; | ||
const activeServerGroups = filter(loadBalancer.serverGroups, { isDisabled: false }); | ||
loadBalancer.instances = chain(activeServerGroups) | ||
.map('instances') | ||
.flatten() | ||
.value() as IInstance[]; | ||
loadBalancer.instances = chain(activeServerGroups).map('instances').flatten().value() as IInstance[]; | ||
return this.$q.resolve(loadBalancer); | ||
@@ -156,6 +153,3 @@ } | ||
instanceCounts.outOfService += chain(serverGroups) | ||
.map('detachedInstances') | ||
.flatten() | ||
.value().length; | ||
instanceCounts.outOfService += chain(serverGroups).map('detachedInstances').flatten().value().length; | ||
return instanceCounts; | ||
@@ -162,0 +156,0 @@ } |
@@ -15,3 +15,3 @@ import { IController, IPromise } from 'angular'; | ||
public setStageRegion(): void { | ||
const selected = this.$scope.accounts.find(account => account.name === this.$scope.stage.credentials); | ||
const selected = this.$scope.accounts.find((account) => account.name === this.$scope.stage.credentials); | ||
if (selected && selected.name) { | ||
@@ -18,0 +18,0 @@ AccountService.getAccountDetails(selected.name).then((accountDetails: IAppengineAccount) => { |
@@ -48,3 +48,3 @@ import { IController, module } from 'angular'; | ||
this.loadBalancers = (this.application.loadBalancers.data as ILoadBalancer[]).filter( | ||
candidate => candidate.cloudProvider === 'appengine', | ||
(candidate) => candidate.cloudProvider === 'appengine', | ||
); | ||
@@ -51,0 +51,0 @@ |
@@ -49,3 +49,3 @@ import { module } from 'angular'; | ||
module(APPENGINE_SHRINK_CLUSTER_STAGE, []) | ||
.config(function() { | ||
.config(function () { | ||
Registry.pipeline.registerStage({ | ||
@@ -52,0 +52,0 @@ provides: 'shrinkCluster', |
@@ -79,3 +79,3 @@ import { IPromise, IQService, module } from 'angular'; | ||
return (pipeline.triggers || []) | ||
.filter(trigger => trigger.type === 'git' || trigger.type === 'jenkins' || trigger.type === 'travis') | ||
.filter((trigger) => trigger.type === 'git' || trigger.type === 'jenkins' || trigger.type === 'travis') | ||
.map((trigger: IGitTrigger | IBuildTrigger) => { | ||
@@ -144,3 +144,3 @@ if (trigger.type === 'git') { | ||
): IPromise<IAppengineServerGroupCommand> { | ||
return this.buildNewServerGroupCommand(app, 'appengine', 'clone').then(command => { | ||
return this.buildNewServerGroupCommand(app, 'appengine', 'clone').then((command) => { | ||
command.stack = serverGroup.stack; | ||
@@ -208,3 +208,3 @@ command.freeFormDetails = serverGroup.detail; | ||
private getCredentials(accounts: IAppengineAccount[]): string { | ||
const accountNames: string[] = (accounts || []).map(account => account.name); | ||
const accountNames: string[] = (accounts || []).map((account) => account.name); | ||
const defaultCredentials: string = AppengineProviderSettings.defaults.account; | ||
@@ -216,3 +216,3 @@ | ||
private getRegion(accounts: IAppengineAccount[], credentials: string): string { | ||
const account = accounts.find(_account => _account.name === credentials); | ||
const account = accounts.find((_account) => _account.name === credentials); | ||
return account ? account.region : null; | ||
@@ -219,0 +219,0 @@ } |
@@ -47,3 +47,3 @@ import { IController, IScope, copy, module } from 'angular'; | ||
.buildNewServerGroupCommand(application, 'appengine', 'createPipeline') | ||
.then(constructedCommand => { | ||
.then((constructedCommand) => { | ||
this.$scope.command = merge(constructedCommand, serverGroupCommand); | ||
@@ -50,0 +50,0 @@ // Re-establish references to the original pipeline and stage objects so that |
@@ -0,1 +1,2 @@ | ||
import { withErrorBoundary } from '@spinnaker/core'; | ||
import { module } from 'angular'; | ||
@@ -9,3 +10,8 @@ import { react2angular } from 'react2angular'; | ||
'configFileArtifactList', | ||
react2angular(ConfigFileArtifactList, ['configArtifacts', 'pipeline', 'stage', 'updateConfigArtifacts']), | ||
react2angular(withErrorBoundary(ConfigFileArtifactList, 'configFileArtifactList'), [ | ||
'configArtifacts', | ||
'pipeline', | ||
'stage', | ||
'updateConfigArtifacts', | ||
]), | ||
); |
@@ -59,3 +59,3 @@ import { module, IController, IScope } from 'angular'; | ||
} | ||
this.command.configArtifacts = this.command.configArtifacts.map(artifactAccountPair => { | ||
this.command.configArtifacts = this.command.configArtifacts.map((artifactAccountPair) => { | ||
return new ConfigArtifact(this.$scope, artifactAccountPair); | ||
@@ -62,0 +62,0 @@ }); |
@@ -399,3 +399,3 @@ import { IController, IScope, module } from 'angular'; | ||
allocations, | ||
allocation => Math.round((allocation / denominator) * precision) / precision, | ||
(allocation) => Math.round((allocation / denominator) * precision) / precision, | ||
); | ||
@@ -402,0 +402,0 @@ return allocations; |
@@ -60,3 +60,3 @@ import { module } from 'angular'; | ||
this.configFiles = command.configFiles; | ||
this.configArtifacts = command.configArtifacts.filter(a => !!a.id || !!a.artifact); | ||
this.configArtifacts = command.configArtifacts.filter((a) => !!a.id || !!a.artifact); | ||
this.applicationDirectoryRoot = command.applicationDirectoryRoot; | ||
@@ -63,0 +63,0 @@ this.interestingHealthProviderNames = command.interestingHealthProviderNames || []; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
969833