@spinnaker/appengine 2026.2.2 → 2026.3.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.
Files changed (131) hide show
  1. package/dist/appengine.module.d.ts +7 -1
  2. package/dist/domain/index.d.ts +0 -1
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/instance/details/AppengineInstanceDetails.d.ts +11 -0
  7. package/dist/loadBalancer/configure/AppengineCreateLoadBalancerModal.d.ts +29 -0
  8. package/dist/loadBalancer/details/AppengineLoadBalancerActions.d.ts +5 -0
  9. package/dist/loadBalancer/details/AppengineLoadBalancerDetailsSection.d.ts +3 -0
  10. package/dist/loadBalancer/details/index.d.ts +3 -0
  11. package/dist/loadBalancer/details/useAppengineLoadBalancerDetails.d.ts +3 -0
  12. package/dist/loadBalancer/transformer.d.ts +2 -6
  13. package/dist/pipeline/stages/AppengineExecutionDetails.d.ts +15 -0
  14. package/dist/pipeline/stages/AppengineServerGroupStageConfig.d.ts +12 -0
  15. package/dist/pipeline/stages/destroyAsg/appengineDestroyAsgStage.d.ts +1 -1
  16. package/dist/pipeline/stages/disableAsg/appengineDisableAsgStage.d.ts +1 -1
  17. package/dist/pipeline/stages/editLoadBalancer/AppengineEditLoadBalancerStageConfig.d.ts +3 -0
  18. package/dist/pipeline/stages/editLoadBalancer/appengineEditLoadBalancerStage.d.ts +1 -1
  19. package/dist/pipeline/stages/enableAsg/appengineEnableAsgStage.d.ts +1 -1
  20. package/dist/pipeline/stages/shrinkCluster/appengineShrinkClusterStage.d.ts +1 -1
  21. package/dist/pipeline/stages/startServerGroup/appengineStartServerGroupStage.d.ts +1 -1
  22. package/dist/pipeline/stages/stopServerGroup/appengineStopServerGroupStage.d.ts +1 -1
  23. package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +5 -9
  24. package/dist/serverGroup/configure/wizard/AppengineCloneServerGroupModal.d.ts +22 -0
  25. package/dist/serverGroup/details/AppengineServerGroupActions.d.ts +12 -0
  26. package/dist/serverGroup/details/AppengineServerGroupDetailsSection.d.ts +3 -0
  27. package/dist/serverGroup/details/appengineServerGroupDetailsGetter.d.ts +4 -0
  28. package/dist/serverGroup/details/index.d.ts +3 -0
  29. package/dist/serverGroup/transformer.d.ts +1 -5
  30. package/dist/serverGroup/writer/serverGroup.write.service.d.ts +15 -4
  31. package/package.json +4 -8
  32. package/src/appengine.module.spec.ts +194 -0
  33. package/src/appengine.module.ts +47 -58
  34. package/src/domain/index.ts +0 -1
  35. package/src/index.ts +1 -1
  36. package/src/instance/details/AppengineInstanceDetails.tsx +33 -0
  37. package/src/loadBalancer/configure/AppengineCreateLoadBalancerModal.tsx +342 -0
  38. package/src/loadBalancer/details/AppengineLoadBalancerActions.tsx +66 -0
  39. package/src/loadBalancer/details/AppengineLoadBalancerDetailsSection.tsx +42 -0
  40. package/src/loadBalancer/details/index.ts +3 -0
  41. package/src/loadBalancer/details/useAppengineLoadBalancerDetails.ts +37 -0
  42. package/src/loadBalancer/transformer.ts +3 -14
  43. package/src/pipeline/stages/AppengineExecutionDetails.tsx +90 -0
  44. package/src/pipeline/stages/AppengineServerGroupStageConfig.tsx +190 -0
  45. package/src/pipeline/stages/destroyAsg/appengineDestroyAsgStage.ts +17 -43
  46. package/src/pipeline/stages/disableAsg/appengineDisableAsgStage.ts +18 -53
  47. package/src/pipeline/stages/editLoadBalancer/AppengineEditLoadBalancerStageConfig.tsx +94 -0
  48. package/src/pipeline/stages/editLoadBalancer/appengineEditLoadBalancerStage.ts +14 -74
  49. package/src/pipeline/stages/enableAsg/appengineEnableAsgStage.ts +13 -48
  50. package/src/pipeline/stages/shrinkCluster/appengineShrinkClusterStage.ts +13 -61
  51. package/src/pipeline/stages/startServerGroup/appengineStartServerGroupStage.ts +17 -54
  52. package/src/pipeline/stages/stopServerGroup/appengineStopServerGroupStage.ts +17 -54
  53. package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +20 -19
  54. package/src/serverGroup/configure/wizard/AppengineCloneServerGroupModal.tsx +119 -0
  55. package/src/serverGroup/configure/wizard/serverGroupWizard.less +0 -8
  56. package/src/serverGroup/details/AppengineServerGroupActions.tsx +245 -0
  57. package/src/serverGroup/details/AppengineServerGroupDetailsSection.tsx +27 -0
  58. package/src/serverGroup/details/appengineServerGroupDetailsGetter.ts +62 -0
  59. package/src/serverGroup/details/index.ts +3 -0
  60. package/src/serverGroup/transformer.ts +3 -15
  61. package/src/serverGroup/writer/serverGroup.write.service.ts +57 -8
  62. package/dist/common/componentUrlDetails.component.d.ts +0 -1
  63. package/dist/common/conditionalDescriptionListItem.component.d.ts +0 -1
  64. package/dist/common/loadBalancerMessage.component.d.ts +0 -1
  65. package/dist/domain/IAppengineStageScope.d.ts +0 -18
  66. package/dist/instance/details/details.controller.d.ts +0 -1
  67. package/dist/loadBalancer/configure/wizard/advancedSettings.component.d.ts +0 -1
  68. package/dist/loadBalancer/configure/wizard/allocationConfigurationRow.component.d.ts +0 -1
  69. package/dist/loadBalancer/configure/wizard/basicSettings.component.d.ts +0 -1
  70. package/dist/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.d.ts +0 -1
  71. package/dist/loadBalancer/configure/wizard/wizard.controller.d.ts +0 -2
  72. package/dist/loadBalancer/details/details.controller.d.ts +0 -1
  73. package/dist/loadBalancer/loadBalancer.module.d.ts +0 -1
  74. package/dist/pipeline/pipeline.module.d.ts +0 -1
  75. package/dist/pipeline/stages/appengineStage.controller.d.ts +0 -12
  76. package/dist/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.controller.d.ts +0 -1
  77. package/dist/serverGroup/configure/wizard/basicSettings.controller.d.ts +0 -1
  78. package/dist/serverGroup/configure/wizard/cloneServerGroup.controller.d.ts +0 -2
  79. package/dist/serverGroup/configure/wizard/configFileArtifactList.module.d.ts +0 -1
  80. package/dist/serverGroup/configure/wizard/configFiles.component.d.ts +0 -20
  81. package/dist/serverGroup/configure/wizard/dynamicBranchLabel.component.d.ts +0 -1
  82. package/dist/serverGroup/details/details.controller.d.ts +0 -1
  83. package/src/common/componentUrlDetails.component.ts +0 -29
  84. package/src/common/conditionalDescriptionListItem.component.ts +0 -37
  85. package/src/common/loadBalancerMessage.component.html +0 -33
  86. package/src/common/loadBalancerMessage.component.ts +0 -13
  87. package/src/domain/IAppengineStageScope.ts +0 -22
  88. package/src/instance/details/details.controller.ts +0 -116
  89. package/src/instance/details/details.html +0 -99
  90. package/src/loadBalancer/configure/wizard/advancedSettings.component.ts +0 -56
  91. package/src/loadBalancer/configure/wizard/allocationConfigurationRow.component.ts +0 -70
  92. package/src/loadBalancer/configure/wizard/basicSettings.component.html +0 -65
  93. package/src/loadBalancer/configure/wizard/basicSettings.component.ts +0 -98
  94. package/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.html +0 -117
  95. package/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.ts +0 -108
  96. package/src/loadBalancer/configure/wizard/wizard.controller.ts +0 -163
  97. package/src/loadBalancer/configure/wizard/wizard.html +0 -44
  98. package/src/loadBalancer/configure/wizard/wizard.less +0 -17
  99. package/src/loadBalancer/details/details.controller.ts +0 -151
  100. package/src/loadBalancer/details/details.html +0 -102
  101. package/src/loadBalancer/loadBalancer.module.ts +0 -21
  102. package/src/pipeline/pipeline.module.ts +0 -20
  103. package/src/pipeline/stages/appengineStage.controller.ts +0 -45
  104. package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +0 -16
  105. package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +0 -1
  106. package/src/pipeline/stages/disableAsg/disableAsgStage.html +0 -18
  107. package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +0 -1
  108. package/src/pipeline/stages/editLoadBalancer/editLoadBalancerExecutionDetails.html +0 -33
  109. package/src/pipeline/stages/editLoadBalancer/editLoadBalancerStage.html +0 -51
  110. package/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.controller.ts +0 -65
  111. package/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.html +0 -45
  112. package/src/pipeline/stages/enableAsg/enableAsgStage.html +0 -18
  113. package/src/pipeline/stages/enableAsg/enableAsgStepLabel.html +0 -1
  114. package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +0 -41
  115. package/src/pipeline/stages/startServerGroup/startServerGroupExecutionDetails.html +0 -26
  116. package/src/pipeline/stages/startServerGroup/startServerGroupStage.html +0 -18
  117. package/src/pipeline/stages/startServerGroup/startServerGroupStepLabel.html +0 -1
  118. package/src/pipeline/stages/stopServerGroup/stopServerGroupExecutionDetails.html +0 -26
  119. package/src/pipeline/stages/stopServerGroup/stopServerGroupStage.html +0 -18
  120. package/src/pipeline/stages/stopServerGroup/stopServerGroupStepLabel.html +0 -1
  121. package/src/serverGroup/configure/wizard/advancedSettings.html +0 -33
  122. package/src/serverGroup/configure/wizard/basicSettings.controller.ts +0 -151
  123. package/src/serverGroup/configure/wizard/basicSettings.html +0 -287
  124. package/src/serverGroup/configure/wizard/cloneServerGroup.controller.ts +0 -103
  125. package/src/serverGroup/configure/wizard/configFileArtifactList.module.ts +0 -18
  126. package/src/serverGroup/configure/wizard/configFiles.component.html +0 -81
  127. package/src/serverGroup/configure/wizard/configFiles.component.ts +0 -121
  128. package/src/serverGroup/configure/wizard/dynamicBranchLabel.component.ts +0 -19
  129. package/src/serverGroup/configure/wizard/serverGroupWizard.html +0 -39
  130. package/src/serverGroup/details/details.controller.ts +0 -463
  131. package/src/serverGroup/details/details.html +0 -229
@@ -1,287 +0,0 @@
1
- <div class="container-fluid form-horizontal" ng-controller="appengineServerGroupBasicSettingsCtrl as basicSettingsCtrl">
2
- <ng-form name="basicSettings">
3
- <div class="form-group">
4
- <div class="col-md-3 sm-label-right">Account</div>
5
- <div class="col-md-7">
6
- <account-select-field
7
- read-only="command.viewState.readOnlyFields.credentials"
8
- component="command"
9
- field="credentials"
10
- on-change="basicSettingsCtrl.onAccountChange()"
11
- accounts="command.backingData.accounts"
12
- provider="'appengine'"
13
- ></account-select-field>
14
- </div>
15
- </div>
16
-
17
- <div class="form-group">
18
- <div class="col-md-3 sm-label-right">Region</div>
19
- <div class="col-md-7">
20
- <input type="text" readonly class="form-control input-sm" name="region" ng-model="command.region" />
21
- </div>
22
- </div>
23
-
24
- <div class="form-group">
25
- <div class="col-md-3 sm-label-right">
26
- Stack
27
- <help-field key="aws.serverGroup.stack"></help-field>
28
- </div>
29
- <div class="col-md-7">
30
- <input
31
- type="text"
32
- class="form-control input-sm no-spel"
33
- ng-pattern="basicSettingsCtrl.stackPattern"
34
- name="stack"
35
- ng-model="command.stack"
36
- />
37
- </div>
38
- </div>
39
- <div class="form-group row slide-in" ng-if="basicSettings.stack.$error.pattern">
40
- <div class="col-sm-9 col-sm-offset-2 error-message">
41
- <span>Only dot(.) and underscore(_) special characters are allowed in the Stack field.</span>
42
- </div>
43
- </div>
44
- <div class="form-group">
45
- <div class="col-md-3 sm-label-right">
46
- Detail
47
- <help-field key="aws.serverGroup.detail"></help-field>
48
- </div>
49
- <div class="col-md-7">
50
- <input
51
- type="text"
52
- class="form-control input-sm no-spel"
53
- ng-pattern="basicSettingsCtrl.detailPattern"
54
- name="details"
55
- ng-model="command.freeFormDetails"
56
- />
57
- </div>
58
- </div>
59
-
60
- <div class="form-group row slide-in" ng-if="basicSettings.details.$error.pattern">
61
- <div class="col-sm-9 col-sm-offset-2 error-message">
62
- <span>Only dot(.), underscore(_), and dash(-) special characters are allowed in the Detail field.</span>
63
- </div>
64
- </div>
65
-
66
- <div class="form-group row">
67
- <label class="col-md-3 sm-label-right">Source Type</label>
68
- <div class="col-md-7">
69
- <div class="radio radio-inline">
70
- <label> <input type="radio" ng-model="command.sourceType" value="git" /> Git </label>
71
- </div>
72
- <div class="radio radio-inline">
73
- <label> <input type="radio" ng-model="command.sourceType" value="gcs" /> GCS </label>
74
- </div>
75
- <div class="radio radio-inline">
76
- <label> <input type="radio" ng-model="command.sourceType" value="containerImage" /> Container Image </label>
77
- </div>
78
- </div>
79
- </div>
80
-
81
- <div ng-if="basicSettingsCtrl.isGcsSource()">
82
- <div class="form-group row">
83
- <label class="col-md-3 sm-label-right">Resolve URL</label>
84
- <div class="col-md-7">
85
- <div class="radio radio-inline">
86
- <label> <input type="radio" ng-model="command.fromArtifact" ng-value="false" /> via text input </label>
87
- </div>
88
- <div class="radio radio-inline" ng-if="command.viewState.pipeline">
89
- <label>
90
- <input type="radio" ng-model="command.fromArtifact" ng-value="true" /> via pipeline artifact
91
- </label>
92
- </div>
93
- </div>
94
- </div>
95
- <stage-artifact-selector-delegate
96
- ng-if="command.fromArtifact"
97
- artifact="command.expectedArtifact"
98
- excluded-artifact-type-patterns="basicSettingsCtrl.excludedGcsArtifactTypes"
99
- expected-artifact-id="command.expectedArtifactId"
100
- field-columns="7"
101
- label="'Expected Artifact'"
102
- on-artifact-edited="basicSettingsCtrl.onExpectedArtifactEdited"
103
- on-expected-artifact-selected="basicSettingsCtrl.onExpectedArtifactSelected"
104
- pipeline="command.viewState.pipeline"
105
- stage="command.viewState.stage"
106
- >
107
- </stage-artifact-selector-delegate>
108
- <div class="form-group" ng-if="!command.fromArtifact">
109
- <div class="col-md-3 sm-label-right">
110
- GCS URL
111
- <help-field class="help-field-absolute" key="appengine.serverGroup.gcs.repositoryUrl"></help-field>
112
- </div>
113
- <div class="col-md-7">
114
- <input type="text" required class="form-control input-sm" name="gcsUrl" ng-model="command.repositoryUrl" />
115
- </div>
116
- </div>
117
- </div>
118
-
119
- <div ng-if="basicSettingsCtrl.isGitSource()">
120
- <div class="form-group">
121
- <div class="col-md-3 sm-label-right">
122
- Git Repository URL
123
- <help-field class="help-field-absolute" key="appengine.serverGroup.git.repositoryUrl"></help-field>
124
- </div>
125
- <div class="col-md-7">
126
- <input type="text" required class="form-control input-sm" name="gitRepo" ng-model="command.repositoryUrl" />
127
- </div>
128
- </div>
129
-
130
- <div class="form-group">
131
- <div class="col-md-3 sm-label-right">
132
- Git Credential Type
133
- <help-field class="help-field-absolute" key="appengine.serverGroup.gitCredentialType"></help-field>
134
- </div>
135
- <div class="col-md-7">
136
- <select
137
- class="form-control input-sm"
138
- ng-options="basicSettingsCtrl.humanReadableGitCredentialType(type) for type in basicSettingsCtrl.getSupportedGitCredentialTypes()"
139
- ng-model="command.gitCredentialType"
140
- ></select>
141
- </div>
142
- </div>
143
-
144
- <div class="form-group">
145
- <div class="col-md-3 sm-label-right">Branch <help-field key="appengine.serverGroup.branch"></help-field></div>
146
- <div class="col-md-7">
147
- <input
148
- ng-if="!command.fromTrigger"
149
- type="text"
150
- required
151
- class="form-control input-sm"
152
- name="branch"
153
- ng-model="command.branch"
154
- />
155
-
156
- <ui-select
157
- ng-if="command.fromTrigger"
158
- ng-model="command.trigger"
159
- class="form-control input-sm"
160
- on-select="basicSettingsCtrl.onTriggerChange()"
161
- required
162
- >
163
- <ui-select-match allow-clear>
164
- <appengine-dynamic-branch-label trigger="command.trigger"></appengine-dynamic-branch-label>
165
- </ui-select-match>
166
- <ui-select-choices repeat="trigger in command.backingData.triggerOptions">
167
- <appengine-dynamic-branch-label trigger="trigger"></appengine-dynamic-branch-label>
168
- </ui-select-choices>
169
- </ui-select>
170
- </div>
171
-
172
- <div
173
- class="col-md-7 col-md-offset-3"
174
- ng-if="command.viewState.mode === 'createPipeline' || command.viewState.mode === 'editPipeline'"
175
- >
176
- <span class="pull-right small" ng-if="!command.fromTrigger">
177
- <a href ng-click="basicSettingsCtrl.toggleResolveViaTrigger()">Resolve via trigger</a>
178
- </span>
179
- <span class="pull-right small" ng-if="command.fromTrigger">
180
- <a href ng-click="basicSettingsCtrl.toggleResolveViaTrigger()">Click for text input</a>
181
- </span>
182
- </div>
183
- </div>
184
- </div>
185
-
186
- <div ng-if="basicSettingsCtrl.isContainerImageSource()">
187
- <div class="form-group">
188
- <label class="col-md-3 sm-label-right">Resolve URL</label>
189
- <div class="col-md-7">
190
- <div class="radio radio-inline">
191
- <label> <input type="radio" ng-model="command.fromArtifact" ng-value="false" /> via text input </label>
192
- </div>
193
- <div class="radio radio-inline" ng-if="command.viewState.pipeline">
194
- <label>
195
- <input type="radio" ng-model="command.fromArtifact" ng-value="true" /> via pipeline artifact
196
- </label>
197
- </div>
198
- </div>
199
- </div>
200
- <stage-artifact-selector-delegate
201
- ng-if="command.fromArtifact"
202
- artifact="command.expectedArtifact"
203
- excluded-artifact-type-patterns="basicSettingsCtrl.excludedContainerArtifactTypes"
204
- expected-artifact-id="command.expectedArtifactId"
205
- field-columns="7"
206
- label="'Expected Artifact'"
207
- on-artifact-edited="basicSettingsCtrl.onExpectedArtifactEdited"
208
- on-expected-artifact-selected="basicSettingsCtrl.onExpectedArtifactSelected"
209
- pipeline="command.viewState.pipeline"
210
- stage="command.viewState.stage"
211
- >
212
- </stage-artifact-selector-delegate>
213
- <div class="form-group" ng-if="!command.fromArtifact">
214
- <div class="col-md-3 sm-label-right">
215
- Image URL
216
- <help-field key="appengine.serverGroup.containerImageUrl"></help-field>
217
- </div>
218
- <div class="col-md-7">
219
- <input
220
- type="text"
221
- required
222
- class="form-control input-sm"
223
- name="containerImageUrl"
224
- ng-model="command.containerImageUrl"
225
- />
226
- </div>
227
- </div>
228
- </div>
229
-
230
- <div ng-if="command.trigger.type === 'jenkins'" class="form-group">
231
- <div class="col-md-7 col-md-offset-3">
232
- <div class="form-inline">
233
- <small>Match branch from trigger on regex</small>
234
- <help-field key="appengine.serverGroup.matchBranchOnRegex"></help-field>
235
- <input
236
- type="text"
237
- style="width: 140px"
238
- class="form-control input-sm pull-right"
239
- name="matchOnRegex"
240
- ng-model="command.trigger.matchBranchOnRegex"
241
- />
242
- </div>
243
- </div>
244
- </div>
245
-
246
- <deployment-strategy-selector
247
- field-columns="7"
248
- ng-if="!command.viewState.disableStrategySelection"
249
- command="command"
250
- ></deployment-strategy-selector>
251
-
252
- <div class="form-group" ng-if="!command.viewState.hideClusterNamePreview">
253
- <div class="col-md-12">
254
- <div class="well-compact" ng-class="basicSettingsCtrl.showPreviewAsWarning() ? 'alert alert-warning' : 'well'">
255
- <h5 class="text-center">
256
- <p>Your server group will be in the cluster:</p>
257
- <p>
258
- <strong>
259
- {{basicSettingsCtrl.getNamePreview()}}
260
- <span ng-if="basicSettingsCtrl.createsNewCluster()"> (new cluster)</span>
261
- </strong>
262
- </p>
263
- <div
264
- class="text-left"
265
- ng-if="!basicSettingsCtrl.createsNewCluster() && command.viewState.mode === 'create' && latestServerGroup"
266
- >
267
- <p>There is already a server group in this cluster. Do you want to clone it?</p>
268
- <p>
269
- Cloning copies the entire configuration from the selected server group, allowing you to modify whichever
270
- fields (e.g. image) you need to change in the new server group.
271
- </p>
272
- <p>
273
- To clone a server group, select "Clone" from the "Server Group Actions" menu in the details view of the
274
- server group.
275
- </p>
276
- <p>
277
- <a href ng-click="basicSettingsCtrl.navigateToLatestServerGroup()">
278
- Go to details for {{latestServerGroup.name}}
279
- </a>
280
- </p>
281
- </div>
282
- </h5>
283
- </div>
284
- </div>
285
- </div>
286
- </ng-form>
287
- </div>
@@ -1,103 +0,0 @@
1
- import type { IController, IScope } from 'angular';
2
- import { copy, module } from 'angular';
3
- import type { IModalInstanceService } from 'angular-ui-bootstrap';
4
- import { get, merge } from 'lodash';
5
-
6
- import type { Application, ServerGroupWriter } from '@spinnaker/core';
7
- import { SERVER_GROUP_WRITER, TaskMonitor } from '@spinnaker/core';
8
- import { AppengineHealth } from '../../../common/appengineHealth';
9
-
10
- import { APPENGINE_CONFIG_FILE_CONFIGURER } from './configFiles.component';
11
- import { APPENGINE_DYNAMIC_BRANCH_LABEL } from './dynamicBranchLabel.component';
12
- import type {
13
- AppengineServerGroupCommandBuilder,
14
- IAppengineServerGroupCommand,
15
- } from '../serverGroupCommandBuilder.service';
16
-
17
- import './serverGroupWizard.less';
18
-
19
- class AppengineCloneServerGroupCtrl implements IController {
20
- public pages: { [pageKey: string]: string } = {
21
- basicSettings: require('./basicSettings.html'),
22
- advancedSettings: require('./advancedSettings.html'),
23
- };
24
- public state = {
25
- loading: true,
26
- };
27
- public taskMonitor: TaskMonitor;
28
-
29
- public static $inject = [
30
- '$scope',
31
- '$uibModalInstance',
32
- 'serverGroupCommand',
33
- 'application',
34
- 'serverGroupWriter',
35
- 'appengineServerGroupCommandBuilder',
36
- ];
37
- constructor(
38
- public $scope: IScope,
39
- private $uibModalInstance: IModalInstanceService,
40
- public serverGroupCommand: IAppengineServerGroupCommand,
41
- private application: Application,
42
- private serverGroupWriter: ServerGroupWriter,
43
- appengineServerGroupCommandBuilder: AppengineServerGroupCommandBuilder,
44
- ) {
45
- if (['create', 'clone', 'editPipeline'].includes(get<string>(serverGroupCommand, 'viewState.mode'))) {
46
- this.$scope.command = serverGroupCommand;
47
- this.state.loading = false;
48
- this.initialize();
49
- } else {
50
- appengineServerGroupCommandBuilder
51
- .buildNewServerGroupCommand(application, 'appengine', 'createPipeline')
52
- .then((constructedCommand) => {
53
- this.$scope.command = merge(constructedCommand, serverGroupCommand);
54
- // Re-establish references to the original pipeline and stage objects so that
55
- // we don't mutate copies of them when assigning expected artifacts.
56
- this.$scope.command.viewState.pipeline = serverGroupCommand.viewState.pipeline;
57
- this.$scope.command.viewState.stage = serverGroupCommand.viewState.stage;
58
- this.state.loading = false;
59
- this.initialize();
60
- });
61
- }
62
- }
63
-
64
- public cancel(): void {
65
- this.$uibModalInstance.dismiss();
66
- }
67
-
68
- public submit(): void {
69
- const mode = this.$scope.command.viewState.mode;
70
- if (['editPipeline', 'createPipeline'].includes(mode)) {
71
- return this.$uibModalInstance.close(this.$scope.command);
72
- } else {
73
- const command = copy(this.$scope.command);
74
- // Make sure we're sending off a create operation, because there's no such thing as clone for App Engine.
75
- command.viewState.mode = 'create';
76
- const submitMethod = () => this.serverGroupWriter.cloneServerGroup(command, this.$scope.application);
77
- this.taskMonitor.submit(submitMethod);
78
-
79
- return null;
80
- }
81
- }
82
-
83
- private initialize(): void {
84
- this.$scope.application = this.application;
85
- this.taskMonitor = new TaskMonitor({
86
- application: this.application,
87
- title: 'Creating your server group',
88
- modalInstance: this.$uibModalInstance,
89
- });
90
- this.$scope.showPlatformHealthOnlyOverride = this.application.attributes.platformHealthOnlyShowOverride;
91
- this.$scope.platformHealth = AppengineHealth.PLATFORM;
92
- if (this.application.attributes.platformHealthOnly) {
93
- this.$scope.command.interestingHealthProviderNames = [AppengineHealth.PLATFORM];
94
- }
95
- }
96
- }
97
-
98
- export const APPENGINE_CLONE_SERVER_GROUP_CTRL = 'spinnaker.appengine.cloneServerGroup.controller';
99
- module(APPENGINE_CLONE_SERVER_GROUP_CTRL, [
100
- SERVER_GROUP_WRITER,
101
- APPENGINE_DYNAMIC_BRANCH_LABEL,
102
- APPENGINE_CONFIG_FILE_CONFIGURER,
103
- ]).controller('appengineCloneServerGroupCtrl', AppengineCloneServerGroupCtrl);
@@ -1,18 +0,0 @@
1
- import { module } from 'angular';
2
- import { react2angular } from 'react2angular';
3
-
4
- import { withErrorBoundary } from '@spinnaker/core';
5
-
6
- import { ConfigFileArtifactList } from './ConfigFileArtifactList';
7
-
8
- export const CONFIG_FILE_ARTIFACT_LIST = 'spinnaker.appengine.configFileArtifactList.component';
9
-
10
- module(CONFIG_FILE_ARTIFACT_LIST, []).component(
11
- 'configFileArtifactList',
12
- react2angular(withErrorBoundary(ConfigFileArtifactList, 'configFileArtifactList'), [
13
- 'configArtifacts',
14
- 'pipeline',
15
- 'stage',
16
- 'updateConfigArtifacts',
17
- ]),
18
- );
@@ -1,81 +0,0 @@
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>
@@ -1,121 +0,0 @@
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
- );
@@ -1,19 +0,0 @@
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
- );
@@ -1,39 +0,0 @@
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>