@spinnaker/appengine 0.0.0-2025.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +981 -0
- package/LICENSE.txt +203 -0
- package/dist/appengine.logoc2c312af6aa99037.png +0 -0
- package/dist/appengine.module.d.ts +5 -0
- package/dist/appengine.settings.d.ts +7 -0
- package/dist/common/FormikAccountRegionSelector.d.ts +26 -0
- package/dist/common/appengineHealth.d.ts +3 -0
- package/dist/common/componentUrlDetails.component.d.ts +1 -0
- package/dist/common/conditionalDescriptionListItem.component.d.ts +1 -0
- package/dist/common/loadBalancerMessage.component.d.ts +1 -0
- package/dist/domain/IAppengineAccount.d.ts +6 -0
- package/dist/domain/IAppengineInstance.d.ts +20 -0
- package/dist/domain/IAppengineLoadBalancer.d.ts +19 -0
- package/dist/domain/IAppengineServerGroup.d.ts +11 -0
- package/dist/domain/IAppengineStageScope.d.ts +18 -0
- package/dist/domain/IAppengineTriggers.d.ts +11 -0
- package/dist/domain/index.d.ts +6 -0
- package/dist/helpContents/appengineHelpContents.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4084 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/details/details.controller.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/advancedSettings.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/allocationConfigurationRow.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/basicSettings.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/wizard.controller.d.ts +2 -0
- package/dist/loadBalancer/details/details.controller.d.ts +1 -0
- package/dist/loadBalancer/loadBalancer.module.d.ts +1 -0
- package/dist/loadBalancer/transformer.d.ts +40 -0
- package/dist/pipeline/pipeline.module.d.ts +1 -0
- package/dist/pipeline/stages/appengineStage.controller.d.ts +12 -0
- package/dist/pipeline/stages/deployAppengineConfig/DeployAppengineConfigForm.d.ts +16 -0
- package/dist/pipeline/stages/deployAppengineConfig/DeployAppengineConfigurationConfig.d.ts +5 -0
- package/dist/pipeline/stages/deployAppengineConfig/deployAppengineConfigStage.d.ts +1 -0
- package/dist/pipeline/stages/destroyAsg/appengineDestroyAsgStage.d.ts +1 -0
- package/dist/pipeline/stages/disableAsg/appengineDisableAsgStage.d.ts +1 -0
- package/dist/pipeline/stages/editLoadBalancer/appengineEditLoadBalancerStage.d.ts +1 -0
- package/dist/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.controller.d.ts +1 -0
- package/dist/pipeline/stages/enableAsg/appengineEnableAsgStage.d.ts +1 -0
- package/dist/pipeline/stages/shrinkCluster/appengineShrinkClusterStage.d.ts +1 -0
- package/dist/pipeline/stages/startServerGroup/appengineStartServerGroupStage.d.ts +1 -0
- package/dist/pipeline/stages/stopServerGroup/appengineStopServerGroupStage.d.ts +1 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +74 -0
- package/dist/serverGroup/configure/wizard/ConfigFileArtifactList.d.ts +10 -0
- package/dist/serverGroup/configure/wizard/basicSettings.controller.d.ts +1 -0
- package/dist/serverGroup/configure/wizard/cloneServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/configFileArtifactList.module.d.ts +1 -0
- package/dist/serverGroup/configure/wizard/configFiles.component.d.ts +20 -0
- package/dist/serverGroup/configure/wizard/dynamicBranchLabel.component.d.ts +1 -0
- package/dist/serverGroup/details/details.controller.d.ts +1 -0
- package/dist/serverGroup/transformer.d.ts +45 -0
- package/dist/serverGroup/writer/serverGroup.write.service.d.ts +8 -0
- package/dist/validation/ApplicationNameValidator.d.ts +1 -0
- package/package.json +46 -0
- package/src/appengine.module.ts +70 -0
- package/src/appengine.settings.ts +14 -0
- package/src/common/FormikAccountRegionSelector.tsx +107 -0
- package/src/common/appengineHealth.ts +3 -0
- package/src/common/componentUrlDetails.component.ts +29 -0
- package/src/common/conditionalDescriptionListItem.component.ts +37 -0
- package/src/common/loadBalancerMessage.component.html +33 -0
- package/src/common/loadBalancerMessage.component.ts +13 -0
- package/src/domain/IAppengineAccount.ts +8 -0
- package/src/domain/IAppengineInstance.ts +21 -0
- package/src/domain/IAppengineLoadBalancer.ts +21 -0
- package/src/domain/IAppengineServerGroup.ts +13 -0
- package/src/domain/IAppengineStageScope.ts +22 -0
- package/src/domain/IAppengineTriggers.ts +12 -0
- package/src/domain/index.ts +6 -0
- package/src/helpContents/appengineHelpContents.ts +141 -0
- package/src/index.ts +1 -0
- package/src/instance/details/details.controller.ts +116 -0
- package/src/instance/details/details.html +99 -0
- package/src/loadBalancer/configure/wizard/advancedSettings.component.ts +56 -0
- package/src/loadBalancer/configure/wizard/allocationConfigurationRow.component.ts +70 -0
- package/src/loadBalancer/configure/wizard/basicSettings.component.html +65 -0
- package/src/loadBalancer/configure/wizard/basicSettings.component.ts +98 -0
- package/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.html +117 -0
- package/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.ts +108 -0
- package/src/loadBalancer/configure/wizard/wizard.controller.ts +163 -0
- package/src/loadBalancer/configure/wizard/wizard.html +44 -0
- package/src/loadBalancer/configure/wizard/wizard.less +17 -0
- package/src/loadBalancer/details/details.controller.ts +151 -0
- package/src/loadBalancer/details/details.html +102 -0
- package/src/loadBalancer/loadBalancer.module.ts +21 -0
- package/src/loadBalancer/transformer.ts +170 -0
- package/src/logo/appengine.icon.svg +37 -0
- package/src/logo/appengine.logo.less +6 -0
- package/src/logo/appengine.logo.png +0 -0
- package/src/pipeline/pipeline.module.ts +20 -0
- package/src/pipeline/stages/appengineStage.controller.ts +45 -0
- package/src/pipeline/stages/deployAppengineConfig/DeployAppengineConfigForm.tsx +203 -0
- package/src/pipeline/stages/deployAppengineConfig/DeployAppengineConfigurationConfig.tsx +34 -0
- package/src/pipeline/stages/deployAppengineConfig/deployAppengineConfigStage.ts +19 -0
- package/src/pipeline/stages/destroyAsg/appengineDestroyAsgStage.ts +45 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +16 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +1 -0
- package/src/pipeline/stages/disableAsg/appengineDisableAsgStage.ts +54 -0
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +18 -0
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/editLoadBalancer/appengineEditLoadBalancerStage.ts +74 -0
- package/src/pipeline/stages/editLoadBalancer/editLoadBalancerExecutionDetails.html +33 -0
- package/src/pipeline/stages/editLoadBalancer/editLoadBalancerStage.html +51 -0
- package/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.controller.ts +65 -0
- package/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.html +45 -0
- package/src/pipeline/stages/enableAsg/appengineEnableAsgStage.ts +49 -0
- package/src/pipeline/stages/enableAsg/enableAsgStage.html +18 -0
- package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/shrinkCluster/appengineShrinkClusterStage.ts +62 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +41 -0
- package/src/pipeline/stages/startServerGroup/appengineStartServerGroupStage.ts +54 -0
- package/src/pipeline/stages/startServerGroup/startServerGroupExecutionDetails.html +26 -0
- package/src/pipeline/stages/startServerGroup/startServerGroupStage.html +18 -0
- package/src/pipeline/stages/startServerGroup/startServerGroupStepLabel.html +1 -0
- package/src/pipeline/stages/stopServerGroup/appengineStopServerGroupStage.ts +54 -0
- package/src/pipeline/stages/stopServerGroup/stopServerGroupExecutionDetails.html +26 -0
- package/src/pipeline/stages/stopServerGroup/stopServerGroupStage.html +18 -0
- package/src/pipeline/stages/stopServerGroup/stopServerGroupStepLabel.html +1 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +235 -0
- package/src/serverGroup/configure/wizard/ConfigFileArtifactList.tsx +81 -0
- package/src/serverGroup/configure/wizard/advancedSettings.html +33 -0
- package/src/serverGroup/configure/wizard/basicSettings.controller.ts +151 -0
- package/src/serverGroup/configure/wizard/basicSettings.html +287 -0
- package/src/serverGroup/configure/wizard/cloneServerGroup.controller.ts +103 -0
- package/src/serverGroup/configure/wizard/configFileArtifactList.module.ts +18 -0
- package/src/serverGroup/configure/wizard/configFileArtifactList.spec.tsx +78 -0
- package/src/serverGroup/configure/wizard/configFiles.component.html +81 -0
- package/src/serverGroup/configure/wizard/configFiles.component.ts +121 -0
- package/src/serverGroup/configure/wizard/dynamicBranchLabel.component.ts +19 -0
- package/src/serverGroup/configure/wizard/serverGroupWizard.html +39 -0
- package/src/serverGroup/configure/wizard/serverGroupWizard.less +28 -0
- package/src/serverGroup/details/details.controller.ts +463 -0
- package/src/serverGroup/details/details.html +229 -0
- package/src/serverGroup/transformer.ts +92 -0
- package/src/serverGroup/transformet.spec.ts +40 -0
- package/src/serverGroup/writer/serverGroup.write.service.ts +57 -0
- package/src/validation/ApplicationNameValidator.ts +40 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { mount } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { IArtifactAccount, IArtifactAccountPair } from '@spinnaker/core';
|
|
5
|
+
import { StageArtifactSelector } from '@spinnaker/core';
|
|
6
|
+
import { mockDeployStage, mockPipeline } from '@spinnaker/mocks';
|
|
7
|
+
|
|
8
|
+
import { ConfigFileArtifactList } from './ConfigFileArtifactList';
|
|
9
|
+
// eslint-disable-next-line @spinnaker/import-from-npm-not-relative
|
|
10
|
+
import { mockHttpClient } from '../../../../../core/src/api/mock/jasmine';
|
|
11
|
+
|
|
12
|
+
describe('<ConfigFileArtifactList/>', () => {
|
|
13
|
+
it('renders empty children when null/empty artifacts are passed in', () => {
|
|
14
|
+
const configArtifacts: IArtifactAccountPair[] = [];
|
|
15
|
+
const wrapper = mount(
|
|
16
|
+
<ConfigFileArtifactList
|
|
17
|
+
configArtifacts={configArtifacts}
|
|
18
|
+
pipeline={mockPipeline}
|
|
19
|
+
stage={mockDeployStage}
|
|
20
|
+
updateConfigArtifacts={() => {}}
|
|
21
|
+
/>,
|
|
22
|
+
);
|
|
23
|
+
expect(wrapper.find(StageArtifactSelector).length).toBe(0);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('renders 2 children of StageArtifactSelector when 2 artifacts are passed in', async () => {
|
|
27
|
+
const http = mockHttpClient();
|
|
28
|
+
const body: IArtifactAccount[] = [{ name: 'http-acc', types: ['http'] }];
|
|
29
|
+
http.expectGET(`/artifacts/credentials`).respond(200, body);
|
|
30
|
+
http.expectGET(`/artifacts/credentials`).respond(200, body);
|
|
31
|
+
|
|
32
|
+
const configArtifacts = [
|
|
33
|
+
{ account: 'http-acc', id: '123abc', artifact: { id: '123abc' } },
|
|
34
|
+
{ account: 'http-acc', id: '1234abcd', artifact: { id: '1234abcd' } },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const wrapper = mount(
|
|
38
|
+
<ConfigFileArtifactList
|
|
39
|
+
configArtifacts={configArtifacts}
|
|
40
|
+
pipeline={mockPipeline}
|
|
41
|
+
stage={mockDeployStage}
|
|
42
|
+
updateConfigArtifacts={() => {}}
|
|
43
|
+
/>,
|
|
44
|
+
);
|
|
45
|
+
expect(wrapper.find(StageArtifactSelector).length).toBe(2);
|
|
46
|
+
await http.flush();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('renders 1 children of StageArtifactSelector when 1 expectedArtifacts are passed in', async () => {
|
|
50
|
+
const http = mockHttpClient();
|
|
51
|
+
const body: IArtifactAccount[] = [
|
|
52
|
+
{
|
|
53
|
+
name: 'http-acc',
|
|
54
|
+
types: ['http'],
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
http.expectGET(`/artifacts/credentials`).respond(200, body);
|
|
58
|
+
|
|
59
|
+
// artifact intentionally left null indicating an expected artifact
|
|
60
|
+
const configArtifacts = [
|
|
61
|
+
{
|
|
62
|
+
account: 'http-acc',
|
|
63
|
+
id: '123abc',
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
const wrapper = mount(
|
|
68
|
+
<ConfigFileArtifactList
|
|
69
|
+
configArtifacts={configArtifacts}
|
|
70
|
+
pipeline={mockPipeline}
|
|
71
|
+
stage={mockDeployStage}
|
|
72
|
+
updateConfigArtifacts={() => {}}
|
|
73
|
+
/>,
|
|
74
|
+
);
|
|
75
|
+
expect(wrapper.find(StageArtifactSelector).length).toBe(1);
|
|
76
|
+
await http.flush();
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<div class="form-horizontal container-fluid">
|
|
2
|
+
<div class="form-group" ng-if="!$ctrl.isContainerImageSource()">
|
|
3
|
+
<div class="col-md-3 sm-label-right">
|
|
4
|
+
Application Root
|
|
5
|
+
<help-field class="help-field-absolute" key="appengine.serverGroup.applicationDirectoryRoot"></help-field>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="col-md-7">
|
|
8
|
+
<input
|
|
9
|
+
type="text"
|
|
10
|
+
class="form-control input-sm"
|
|
11
|
+
name="applicationDirectoryRoot"
|
|
12
|
+
ng-model="$ctrl.command.applicationDirectoryRoot"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div class="form-group" ng-if="!$ctrl.isContainerImageSource()">
|
|
18
|
+
<div class="col-md-3 sm-label-right">
|
|
19
|
+
Config Filepaths <help-field key="appengine.serverGroup.configFilepaths"></help-field>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="col-md-7">
|
|
22
|
+
<ui-select
|
|
23
|
+
multiple
|
|
24
|
+
tagging
|
|
25
|
+
tagging-label=""
|
|
26
|
+
style="width: 380px"
|
|
27
|
+
name="configFilepaths"
|
|
28
|
+
ng-model="$ctrl.command.configFilepaths"
|
|
29
|
+
class="form-control input-sm"
|
|
30
|
+
>
|
|
31
|
+
<ui-select-match>{{ $item }}</ui-select-match>
|
|
32
|
+
<ui-select-choices repeat="filepath in []">
|
|
33
|
+
<span ng-bind-html="filepath"></span>
|
|
34
|
+
</ui-select-choices>
|
|
35
|
+
</ui-select>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="form-group">
|
|
40
|
+
<div class="col-md-3 sm-label-right">
|
|
41
|
+
Config Files
|
|
42
|
+
<span ng-if="!$ctrl.isContainerImageSource()">
|
|
43
|
+
<help-field key="appengine.serverGroup.configFiles"></help-field>
|
|
44
|
+
</span>
|
|
45
|
+
<span ng-if="$ctrl.isContainerImageSource()">
|
|
46
|
+
<help-field key="appengine.serverGroup.configFilesRequired"></help-field>
|
|
47
|
+
</span>
|
|
48
|
+
</div>
|
|
49
|
+
<div ng-repeat="configFile in $ctrl.command.configFiles track by $index">
|
|
50
|
+
<div class="col-md-7" ng-class="{ 'col-md-offset-3': $index > 0 }" style="margin-top: 5px">
|
|
51
|
+
<textarea
|
|
52
|
+
cols="46"
|
|
53
|
+
rows="10"
|
|
54
|
+
class="small"
|
|
55
|
+
spellcheck="false"
|
|
56
|
+
ng-keydown="$ctrl.mapTabToSpaces($event)"
|
|
57
|
+
style="font-family: Menlo, Monaco, Consolas, 'Courier New', monospace"
|
|
58
|
+
ng-model="$ctrl.command.configFiles[$index]"
|
|
59
|
+
></textarea>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="col-md-1" style="margin-top: 5px">
|
|
62
|
+
<button type="button" class="btn btn-sm btn-default" ng-click="$ctrl.deleteConfigFile($index)">
|
|
63
|
+
<span class="glyphicon glyphicon-trash"></span> Delete
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="col-md-7" ng-class="{ 'col-md-offset-3': $ctrl.command.configFiles.length > 0 }">
|
|
68
|
+
<button class="btn btn-block btn-add-trigger add-new" ng-click="$ctrl.addConfigFile()">
|
|
69
|
+
<span class="glyphicon glyphicon-plus-sign"></span> Add Config File
|
|
70
|
+
</button>
|
|
71
|
+
</div>
|
|
72
|
+
<config-file-artifact-list
|
|
73
|
+
ng-if="$ctrl.command.viewState.pipeline"
|
|
74
|
+
config-artifacts="$ctrl.command.configArtifacts"
|
|
75
|
+
pipeline="$ctrl.command.viewState.pipeline"
|
|
76
|
+
stage="$ctrl.command.viewState.stage"
|
|
77
|
+
update-config-artifacts="$ctrl.updateConfigArtifacts"
|
|
78
|
+
>
|
|
79
|
+
</config-file-artifact-list>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { IController, IScope } from 'angular';
|
|
2
|
+
import { module } from 'angular';
|
|
3
|
+
|
|
4
|
+
import type { IArtifact, IArtifactAccount, IArtifactAccountPair } from '@spinnaker/core';
|
|
5
|
+
import {
|
|
6
|
+
AccountService,
|
|
7
|
+
ExpectedArtifactSelectorViewController,
|
|
8
|
+
NgAppengineConfigArtifactDelegate,
|
|
9
|
+
} from '@spinnaker/core';
|
|
10
|
+
|
|
11
|
+
import { AppengineSourceType } from '../serverGroupCommandBuilder.service';
|
|
12
|
+
|
|
13
|
+
import './serverGroupWizard.less';
|
|
14
|
+
|
|
15
|
+
export interface IAppengineConfigFileConfigurerCtrlCommand {
|
|
16
|
+
configFiles: string[];
|
|
17
|
+
configArtifacts: ConfigArtifact[];
|
|
18
|
+
sourceType: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class ConfigArtifact implements IArtifactAccountPair {
|
|
22
|
+
public $scope: IScope;
|
|
23
|
+
public controller: ExpectedArtifactSelectorViewController;
|
|
24
|
+
public delegate: NgAppengineConfigArtifactDelegate;
|
|
25
|
+
public id: string;
|
|
26
|
+
public account: string;
|
|
27
|
+
public artifact?: IArtifact;
|
|
28
|
+
|
|
29
|
+
constructor($scope: IScope, pair: IArtifactAccountPair = { id: '', account: '' }) {
|
|
30
|
+
const unserializable = { configurable: false, enumerable: false, writable: false };
|
|
31
|
+
this.id = pair?.id;
|
|
32
|
+
this.account = pair.account || pair?.artifact?.artifactAccount;
|
|
33
|
+
this.artifact = pair?.artifact;
|
|
34
|
+
Object.defineProperty(this, '$scope', { ...unserializable, value: $scope });
|
|
35
|
+
const delegate = new NgAppengineConfigArtifactDelegate(this);
|
|
36
|
+
const controller = new ExpectedArtifactSelectorViewController(delegate);
|
|
37
|
+
Object.defineProperty(this, 'delegate', { ...unserializable, value: delegate });
|
|
38
|
+
Object.defineProperty(this, 'controller', { ...unserializable, value: controller });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
class AppengineConfigFileConfigurerCtrl implements IController {
|
|
43
|
+
private artifactAccounts: IArtifactAccount[] = [];
|
|
44
|
+
public command: IAppengineConfigFileConfigurerCtrlCommand;
|
|
45
|
+
|
|
46
|
+
public static $inject = ['$scope'];
|
|
47
|
+
constructor(public $scope: IScope) {}
|
|
48
|
+
|
|
49
|
+
public $onInit(): void {
|
|
50
|
+
if (!this.command.configFiles) {
|
|
51
|
+
this.command.configFiles = [];
|
|
52
|
+
}
|
|
53
|
+
if (!this.command.configArtifacts) {
|
|
54
|
+
this.command.configArtifacts = [];
|
|
55
|
+
}
|
|
56
|
+
if (!this.$scope.command) {
|
|
57
|
+
this.$scope.command = this.command;
|
|
58
|
+
}
|
|
59
|
+
this.command.configArtifacts = this.command.configArtifacts.map((artifactAccountPair) => {
|
|
60
|
+
return new ConfigArtifact(this.$scope, artifactAccountPair);
|
|
61
|
+
});
|
|
62
|
+
AccountService.getArtifactAccounts().then((accounts: IArtifactAccount[]) => {
|
|
63
|
+
this.artifactAccounts = accounts;
|
|
64
|
+
this.command.configArtifacts.forEach((a: ConfigArtifact) => {
|
|
65
|
+
a.delegate.setAccounts(accounts);
|
|
66
|
+
a.controller.updateAccounts(a.delegate.getSelectedExpectedArtifact());
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public addConfigFile(): void {
|
|
72
|
+
this.command.configFiles.push('');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public addConfigArtifact(): void {
|
|
76
|
+
const artifact = new ConfigArtifact(this.$scope, { id: '', account: '' });
|
|
77
|
+
artifact.delegate.setAccounts(this.artifactAccounts);
|
|
78
|
+
artifact.controller.updateAccounts(artifact.delegate.getSelectedExpectedArtifact());
|
|
79
|
+
this.command.configArtifacts.push(artifact);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public deleteConfigFile(index: number): void {
|
|
83
|
+
this.command.configFiles.splice(index, 1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public deleteConfigArtifact(index: number): void {
|
|
87
|
+
this.command.configArtifacts.splice(index, 1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public mapTabToSpaces(event: any) {
|
|
91
|
+
if (event.which === 9) {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
const cursorPosition = event.target.selectionStart;
|
|
94
|
+
const inputValue = event.target.value;
|
|
95
|
+
event.target.value = `${inputValue.substring(0, cursorPosition)} ${inputValue.substring(cursorPosition)}`;
|
|
96
|
+
event.target.selectionStart += 2;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public isContainerImageSource(): boolean {
|
|
101
|
+
return this.command.sourceType === AppengineSourceType.CONTAINER_IMAGE;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public updateConfigArtifacts = (configArtifacts: ConfigArtifact[]): void => {
|
|
105
|
+
this.$scope.$applyAsync(() => {
|
|
106
|
+
this.command.configArtifacts = configArtifacts;
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const appengineConfigFileConfigurerComponent: ng.IComponentOptions = {
|
|
112
|
+
bindings: { command: '=' },
|
|
113
|
+
controller: AppengineConfigFileConfigurerCtrl,
|
|
114
|
+
templateUrl: require('./configFiles.component.html'),
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export const APPENGINE_CONFIG_FILE_CONFIGURER = 'spinnaker.appengine.configFileConfigurer.component';
|
|
118
|
+
module(APPENGINE_CONFIG_FILE_CONFIGURER, []).component(
|
|
119
|
+
'appengineConfigFileConfigurer',
|
|
120
|
+
appengineConfigFileConfigurerComponent,
|
|
121
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { module } from 'angular';
|
|
2
|
+
|
|
3
|
+
const appengineDynamicBranchLabelComponent: ng.IComponentOptions = {
|
|
4
|
+
bindings: { trigger: '<' },
|
|
5
|
+
template: `
|
|
6
|
+
<span ng-if="$ctrl.trigger.type === 'git'">
|
|
7
|
+
Resolved at runtime by <b>{{$ctrl.trigger.source}}</b> trigger: {{$ctrl.trigger.project}}/{{$ctrl.trigger.slug}}<span ng-if="$ctrl.trigger.branch">:{{$ctrl.trigger.branch}}</span>
|
|
8
|
+
</span>
|
|
9
|
+
<span ng-if="$ctrl.trigger.type === 'jenkins'">
|
|
10
|
+
Resolved at runtime by <b>Jenkins</b> trigger: {{$ctrl.trigger.master}}/{{$ctrl.trigger.job}}
|
|
11
|
+
</span>
|
|
12
|
+
`,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const APPENGINE_DYNAMIC_BRANCH_LABEL = 'spinnaker.appengine.dynamicBranchLabel.component';
|
|
16
|
+
module(APPENGINE_DYNAMIC_BRANCH_LABEL, []).component(
|
|
17
|
+
'appengineDynamicBranchLabel',
|
|
18
|
+
appengineDynamicBranchLabelComponent,
|
|
19
|
+
);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<form name="form" class="form-horizontal appengine-server-group-wizard" novalidate>
|
|
2
|
+
<div ng-if="ctrl.state.loading" style="height: 200px" class="horizontal center middle">
|
|
3
|
+
<loading-spinner size="'small'"></loading-spinner>
|
|
4
|
+
</div>
|
|
5
|
+
<div>
|
|
6
|
+
<v2-modal-wizard
|
|
7
|
+
ng-if="!ctrl.state.loading"
|
|
8
|
+
heading="Create Server Group"
|
|
9
|
+
task-monitor="ctrl.taskMonitor"
|
|
10
|
+
dismiss="$dismiss()"
|
|
11
|
+
>
|
|
12
|
+
<v2-wizard-page key="basic-settings" label="Basic Settings" mark-complete-on-view="false">
|
|
13
|
+
<ng-include src="ctrl.pages.basicSettings"></ng-include>
|
|
14
|
+
</v2-wizard-page>
|
|
15
|
+
<v2-wizard-page key="load-balancer" label="Config Files" mark-complete-on-view="false">
|
|
16
|
+
<appengine-config-file-configurer command="command"></appengine-config-file-configurer>
|
|
17
|
+
</v2-wizard-page>
|
|
18
|
+
<v2-wizard-page key="load-balancer" label="Load Balancer" done="true">
|
|
19
|
+
<appengine-load-balancer-message show-create-message="false"></appengine-load-balancer-message>
|
|
20
|
+
</v2-wizard-page>
|
|
21
|
+
<v2-wizard-page key="advanced-settings" label="Advanced Settings" done="true">
|
|
22
|
+
<ng-include src="ctrl.pages.advancedSettings"></ng-include>
|
|
23
|
+
</v2-wizard-page>
|
|
24
|
+
</v2-modal-wizard>
|
|
25
|
+
<div class="modal-footer" ng-if="!state.loading">
|
|
26
|
+
<button ng-disabled="ctrl.taskMonitor.submitting" class="btn btn-default btn-cancel" ng-click="ctrl.cancel()">
|
|
27
|
+
Cancel
|
|
28
|
+
</button>
|
|
29
|
+
<submit-button
|
|
30
|
+
ng-if="form.$valid"
|
|
31
|
+
is-disabled="form.$invalid || ctrl.taskMonitor.submitting"
|
|
32
|
+
label="command.viewState.submitButtonLabel"
|
|
33
|
+
submitting="ctrl.taskMonitor.submitting"
|
|
34
|
+
on-click="ctrl.submit()"
|
|
35
|
+
is-new="true"
|
|
36
|
+
></submit-button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</form>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.appengine-server-group-wizard {
|
|
2
|
+
input[type='checkbox'] {
|
|
3
|
+
margin-top: 0.75rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
help-field.help-field-absolute {
|
|
7
|
+
span {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 7px;
|
|
10
|
+
right: 2px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.artifact-configuration-section {
|
|
15
|
+
border-bottom: 1px solid #eee;
|
|
16
|
+
padding: 0 0 4px 0;
|
|
17
|
+
margin: 0 0 5px 0;
|
|
18
|
+
|
|
19
|
+
&.last-entry {
|
|
20
|
+
border-bottom: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.Select,
|
|
24
|
+
input {
|
|
25
|
+
margin: 0 0 1px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|