@spinnaker/oracle 2025.3.0 → 2025.4.0-rc1
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/dist/index.js +1 -3633
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -1,3634 +1,2 @@
|
|
|
1
|
-
import * as angular from 'angular';
|
|
2
|
-
import angular__default, { module } from 'angular';
|
|
3
|
-
import { HelpContentsRegistry, REST, InstanceReader, SETTINGS, AccountService, NameUtils, TaskMonitor, NetworkReader, SubnetReader, LoadBalancerWriter, FirewallLabels, ConfirmationModalService, EXECUTION_DETAILS_SECTION_SERVICE, Registry, BakeExecutionLabel, AuthenticationService, PipelineTemplates, BakeryReader, StageConstants, SECURITY_GROUP_READER, IMAGE_READER, ModalWizard, SERVER_GROUP_WRITER, ServerGroupWarningMessageService, ServerGroupReader, CloudProviderRegistry, DeploymentStrategyRegistry } from '@spinnaker/core';
|
|
4
|
-
import UIROUTER_ANGULARJS from '@uirouter/angularjs';
|
|
5
|
-
import ANGULAR_UI_BOOTSTRAP from 'angular-ui-bootstrap';
|
|
6
|
-
import _$1, { trimEnd, cloneDeep, sortBy, size } from 'lodash';
|
|
7
|
-
import { $q } from 'ngimport';
|
|
8
|
-
|
|
9
|
-
const helpContents = [
|
|
10
|
-
{
|
|
11
|
-
key: "oracle.serverGroup.stack",
|
|
12
|
-
value: "(Optional) <b>Stack</b> Stack name"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
key: "oracle.serverGroup.detail",
|
|
16
|
-
value: "(Optional) <b>Detail</b> is a naming component to help distinguish specifics of the server group."
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
key: "oracle.pipeline.config.bake.baseOsOption",
|
|
20
|
-
value: "<p>The base image from which the image will be created.</p>"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
key: "oracle.pipeline.config.bake.image_name",
|
|
24
|
-
value: "<p>The base name of the image that will be created.</p>"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
key: "oracle.pipeline.config.bake.package",
|
|
28
|
-
value: "<p>The name of the package you want installed (without any version identifiers).</p><p>If there are multiple packages (space separated), then they will be installed in the order they are entered.</p>"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
key: "oracle.pipeline.config.bake.upgrade",
|
|
32
|
-
value: "<p>Perform a package manager upgrade before proceeding with the package installation.</p><p>For example: <i>yum update</i>.</p>"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
key: "oracle.pipeline.config.bake.regions",
|
|
36
|
-
value: "<p>The region in which the new image will be created.</p><p>NB: <i>Currently baked images are restricted to a single region</i>.</p>"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
key: "oracle.pipeline.config.bake.user",
|
|
40
|
-
value: "<p>The name of Oracle <i>user</i> that will be used during the baking process.</p>"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
key: "oracle.pipeline.config.bake.account_name",
|
|
44
|
-
value: "<p>The name of Oracle <i>account</i> that will be used during the baking process.</p>"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
key: "oracle.serverGroup.sshAuthorizedKeys",
|
|
48
|
-
value: "<p>The public SSH key for the default user on the instance.</p>"
|
|
49
|
-
}
|
|
50
|
-
];
|
|
51
|
-
helpContents.forEach((entry) => HelpContentsRegistry.register(entry.key, entry.value));
|
|
52
|
-
|
|
53
|
-
const ORACLE_IMAGE_IMAGE_READER = "spinnaker.oracle.image.reader";
|
|
54
|
-
module(ORACLE_IMAGE_IMAGE_READER, []).factory("oracleImageReader", function() {
|
|
55
|
-
function findImages(params) {
|
|
56
|
-
return REST("/images/find").query(params).get().catch(function() {
|
|
57
|
-
return [];
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function getImage(imageId, region, credentials) {
|
|
61
|
-
return REST("/images").path(credentials, region, imageId).query({ provider: "oracle" }).get().then(function(results) {
|
|
62
|
-
return results && results.length ? results[0] : null;
|
|
63
|
-
}, function() {
|
|
64
|
-
return null;
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
findImages,
|
|
69
|
-
getImage
|
|
70
|
-
};
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
const ORACLE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER = "spinnaker.oracle.instance.details.controller";
|
|
74
|
-
module(ORACLE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [UIROUTER_ANGULARJS]).controller("oracleInstanceDetailsCtrl", [
|
|
75
|
-
"$scope",
|
|
76
|
-
"$q",
|
|
77
|
-
"app",
|
|
78
|
-
"instance",
|
|
79
|
-
function($scope, $q, app, instance) {
|
|
80
|
-
$scope.application = app;
|
|
81
|
-
const initialize = app.isStandalone ? retrieveInstance() : $q.all([app.serverGroups.ready()]).then(retrieveInstance);
|
|
82
|
-
initialize.then(() => {
|
|
83
|
-
if (!$scope.$$destroyed && !app.isStandalone) {
|
|
84
|
-
app.serverGroups.onRefresh($scope, retrieveInstance);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
function retrieveInstance() {
|
|
88
|
-
let instanceSummary, account, region;
|
|
89
|
-
if (!$scope.application.serverGroups) {
|
|
90
|
-
instanceSummary = {};
|
|
91
|
-
account = instance.account;
|
|
92
|
-
region = instance.region;
|
|
93
|
-
} else {
|
|
94
|
-
$scope.application.serverGroups.data.some((serverGroup) => {
|
|
95
|
-
return serverGroup.instances.some((possibleInstance) => {
|
|
96
|
-
if (possibleInstance.id === instance.instanceId || possibleInstance.name === instance.instanceId) {
|
|
97
|
-
instanceSummary = possibleInstance;
|
|
98
|
-
account = serverGroup.account;
|
|
99
|
-
region = serverGroup.region;
|
|
100
|
-
return true;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
$scope.instance = instanceSummary;
|
|
106
|
-
InstanceReader.getInstanceDetails(account, region, instance.instanceId).then((instanceDetails) => {
|
|
107
|
-
Object.assign($scope.instance, instanceDetails);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
]);
|
|
112
|
-
|
|
113
|
-
var LoadBalancingPolicy;
|
|
114
|
-
(function(LoadBalancingPolicy2) {
|
|
115
|
-
LoadBalancingPolicy2["ROUND_ROBIN"] = "ROUND_ROBIN";
|
|
116
|
-
LoadBalancingPolicy2["IP_HASH"] = "IP_HASH";
|
|
117
|
-
LoadBalancingPolicy2["LEAST_CONNECTIONS"] = "LEAST_CONNECTIONS";
|
|
118
|
-
})(LoadBalancingPolicy || (LoadBalancingPolicy = {}));
|
|
119
|
-
|
|
120
|
-
const OracleProviderSettings = SETTINGS.providers.oracle || { defaults: {} };
|
|
121
|
-
if (OracleProviderSettings) {
|
|
122
|
-
OracleProviderSettings.resetToOriginal = SETTINGS.resetProvider("oracle");
|
|
123
|
-
}
|
|
124
|
-
const OracleDefaultProviderSettings = {
|
|
125
|
-
defaults: { account: "DEFAULT", bakeryRegions: "us-phoenix-1", region: "us-phoenix-1" }
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
class OracleLoadBalancerTransformer {
|
|
129
|
-
normalizeLoadBalancer(loadBalancer) {
|
|
130
|
-
return $q.resolve(loadBalancer);
|
|
131
|
-
}
|
|
132
|
-
convertLoadBalancerForEditing(loadBalancer) {
|
|
133
|
-
if (loadBalancer.listeners) {
|
|
134
|
-
Object.keys(loadBalancer.listeners).forEach((key) => {
|
|
135
|
-
const lis = loadBalancer.listeners[key];
|
|
136
|
-
lis.isSsl = !!lis.sslConfiguration;
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
const toEdit = {
|
|
140
|
-
name: loadBalancer.name,
|
|
141
|
-
cloudProvider: loadBalancer.cloudProvider,
|
|
142
|
-
credentials: loadBalancer.account,
|
|
143
|
-
region: loadBalancer.region,
|
|
144
|
-
shape: loadBalancer.shape,
|
|
145
|
-
isPrivate: loadBalancer.isPrivate,
|
|
146
|
-
subnetIds: loadBalancer.subnets.map((subnet) => subnet.id),
|
|
147
|
-
certificates: loadBalancer.certificates,
|
|
148
|
-
listeners: loadBalancer.listeners,
|
|
149
|
-
hostnames: loadBalancer.hostnames,
|
|
150
|
-
backendSets: loadBalancer.backendSets,
|
|
151
|
-
freeformTags: loadBalancer.freeformTags,
|
|
152
|
-
loadBalancerType: loadBalancer.type,
|
|
153
|
-
securityGroups: loadBalancer.securityGroups,
|
|
154
|
-
vpcId: loadBalancer.vpcId,
|
|
155
|
-
subnetTypeMap: loadBalancer.subnetTypeMap
|
|
156
|
-
};
|
|
157
|
-
return toEdit;
|
|
158
|
-
}
|
|
159
|
-
constructNewLoadBalancerTemplate(application) {
|
|
160
|
-
const defaultCredentials = application.defaultCredentials.oracle || (OracleProviderSettings.defaults ? OracleProviderSettings.defaults.account : OracleDefaultProviderSettings.defaults.account);
|
|
161
|
-
const defaultRegion = application.defaultRegions.oracle || (OracleProviderSettings.defaults ? OracleProviderSettings.defaults.region : OracleDefaultProviderSettings.defaults.region);
|
|
162
|
-
return {
|
|
163
|
-
name: void 0,
|
|
164
|
-
cloudProvider: "oracle",
|
|
165
|
-
credentials: defaultCredentials,
|
|
166
|
-
region: defaultRegion,
|
|
167
|
-
shape: null,
|
|
168
|
-
isPrivate: false,
|
|
169
|
-
subnetIds: [],
|
|
170
|
-
listeners: {},
|
|
171
|
-
hostnames: [],
|
|
172
|
-
backendSets: {},
|
|
173
|
-
freeformTags: {},
|
|
174
|
-
loadBalancerType: null,
|
|
175
|
-
securityGroups: [],
|
|
176
|
-
vpcId: null,
|
|
177
|
-
subnetTypeMap: {}
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
constructNewListenerTemplate() {
|
|
181
|
-
return {
|
|
182
|
-
name: "HTTP_80",
|
|
183
|
-
port: 80,
|
|
184
|
-
protocol: "HTTP",
|
|
185
|
-
defaultBackendSetName: void 0,
|
|
186
|
-
isSsl: false
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
constructNewBackendSetTemplate(name) {
|
|
190
|
-
return {
|
|
191
|
-
name,
|
|
192
|
-
policy: LoadBalancingPolicy.ROUND_ROBIN,
|
|
193
|
-
healthChecker: { protocol: "HTTP", port: 80, urlPath: "/" },
|
|
194
|
-
backends: [],
|
|
195
|
-
isNew: true
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
constructNewSSLConfiguration() {
|
|
199
|
-
return {
|
|
200
|
-
certificateName: "",
|
|
201
|
-
verifyDepth: 0,
|
|
202
|
-
verifyPeerCertificates: false
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
constructNewCertificateTemplate(name) {
|
|
206
|
-
return {
|
|
207
|
-
certificateName: name,
|
|
208
|
-
publicCertificate: void 0,
|
|
209
|
-
caCertificate: void 0,
|
|
210
|
-
privateKey: void 0,
|
|
211
|
-
passphrase: void 0,
|
|
212
|
-
isNew: true
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
const ORACLE_LOAD_BALANCER_TRANSFORMER = "spinnaker.oracle.loadBalancer.transformer";
|
|
217
|
-
module(ORACLE_LOAD_BALANCER_TRANSFORMER, []).service("oracleLoadBalancerTransformer", OracleLoadBalancerTransformer);
|
|
218
|
-
|
|
219
|
-
class OracleLoadBalancerController {
|
|
220
|
-
constructor($scope, $uibModalInstance, $state, oracleLoadBalancerTransformer, application, loadBalancer, isNew) {
|
|
221
|
-
this.$scope = $scope;
|
|
222
|
-
this.$uibModalInstance = $uibModalInstance;
|
|
223
|
-
this.$state = $state;
|
|
224
|
-
this.oracleLoadBalancerTransformer = oracleLoadBalancerTransformer;
|
|
225
|
-
this.application = application;
|
|
226
|
-
this.loadBalancer = loadBalancer;
|
|
227
|
-
this.isNew = isNew;
|
|
228
|
-
this.oracle = "oracle";
|
|
229
|
-
this.shapes = ["100Mbps", "400Mbps", "8000Mbps"];
|
|
230
|
-
this.loadBalancingPolicies = Object.keys(LoadBalancingPolicy).map((k) => LoadBalancingPolicy[k]);
|
|
231
|
-
this.pages = {
|
|
232
|
-
properties: "oracle/src/loadBalancer/configure/createLoadBalancerProperties.html",
|
|
233
|
-
listeners: "oracle/src/loadBalancer/configure/listeners.html",
|
|
234
|
-
backendSets: "oracle/src/loadBalancer/configure/backendSets.html",
|
|
235
|
-
certificates: "oracle/src/loadBalancer/configure/certificates.html"
|
|
236
|
-
};
|
|
237
|
-
this.state = {
|
|
238
|
-
accountsLoaded: false,
|
|
239
|
-
submitting: false
|
|
240
|
-
};
|
|
241
|
-
this.numSubnetsAllowed = 1;
|
|
242
|
-
this.listeners = [];
|
|
243
|
-
this.backendSets = [];
|
|
244
|
-
this.certificates = [];
|
|
245
|
-
this.initializeController();
|
|
246
|
-
}
|
|
247
|
-
onApplicationRefresh() {
|
|
248
|
-
if (this.$scope.$$destroyed) {
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
this.$uibModalInstance.close();
|
|
252
|
-
const newStateParams = {
|
|
253
|
-
name: this.loadBalancer.name,
|
|
254
|
-
accountId: this.loadBalancer.account,
|
|
255
|
-
region: this.loadBalancer.region,
|
|
256
|
-
provider: "oracle"
|
|
257
|
-
};
|
|
258
|
-
if (!this.$state.includes("**.loadBalancerDetails")) {
|
|
259
|
-
this.$state.go(".loadBalancerDetails", newStateParams);
|
|
260
|
-
} else {
|
|
261
|
-
this.$state.go("^.loadBalancerDetails", newStateParams);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
onTaskComplete() {
|
|
265
|
-
this.application.loadBalancers.refresh();
|
|
266
|
-
this.application.loadBalancers.onNextRefresh(this.$scope, this.onApplicationRefresh);
|
|
267
|
-
}
|
|
268
|
-
initializeCreateMode() {
|
|
269
|
-
AccountService.listAccounts(this.oracle).then((accounts) => {
|
|
270
|
-
this.$scope.accounts = accounts;
|
|
271
|
-
this.state.accountsLoaded = true;
|
|
272
|
-
this.$scope.state = this.state;
|
|
273
|
-
this.accountUpdated();
|
|
274
|
-
});
|
|
275
|
-
this.loadVnets();
|
|
276
|
-
this.loadSubnets();
|
|
277
|
-
}
|
|
278
|
-
initControllerFromLoadBalancerCmd() {
|
|
279
|
-
this.numSubnetsAllowed = this.calcNumSubnetsAllowed();
|
|
280
|
-
if (this.$scope.loadBalancerCmd.listeners) {
|
|
281
|
-
Object.keys(this.$scope.loadBalancerCmd.listeners).forEach((lis) => {
|
|
282
|
-
this.listeners.push(this.$scope.loadBalancerCmd.listeners[lis]);
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
if (this.$scope.loadBalancerCmd.backendSets) {
|
|
286
|
-
Object.keys(this.$scope.loadBalancerCmd.backendSets).forEach((b) => {
|
|
287
|
-
this.backendSets.push(this.$scope.loadBalancerCmd.backendSets[b]);
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
if (this.$scope.loadBalancerCmd.certificates) {
|
|
291
|
-
Object.keys(this.$scope.loadBalancerCmd.certificates).forEach((b) => {
|
|
292
|
-
this.certificates.push(this.$scope.loadBalancerCmd.certificates[b]);
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
initializeController() {
|
|
297
|
-
if (this.loadBalancer) {
|
|
298
|
-
this.$scope.loadBalancerCmd = this.oracleLoadBalancerTransformer.convertLoadBalancerForEditing(this.loadBalancer);
|
|
299
|
-
this.initControllerFromLoadBalancerCmd();
|
|
300
|
-
if (this.isNew) {
|
|
301
|
-
const nameParts = NameUtils.parseLoadBalancerName(this.loadBalancer.name);
|
|
302
|
-
this.$scope.loadBalancerCmd.stack = nameParts.stack;
|
|
303
|
-
this.$scope.loadBalancerCmd.detail = nameParts.freeFormDetails;
|
|
304
|
-
delete this.$scope.loadBalancerCmd.name;
|
|
305
|
-
}
|
|
306
|
-
} else {
|
|
307
|
-
this.$scope.loadBalancerCmd = this.oracleLoadBalancerTransformer.constructNewLoadBalancerTemplate(this.application);
|
|
308
|
-
}
|
|
309
|
-
this.$scope.prevBackendSetNames = [];
|
|
310
|
-
this.$scope.prevCertNames = [];
|
|
311
|
-
if (this.isNew) {
|
|
312
|
-
this.updateName();
|
|
313
|
-
this.updateLoadBalancerNames();
|
|
314
|
-
this.initializeCreateMode();
|
|
315
|
-
}
|
|
316
|
-
this.$scope.taskMonitor = new TaskMonitor({
|
|
317
|
-
application: this.application,
|
|
318
|
-
title: (this.isNew ? "Creating " : "Updating ") + "your load balancer",
|
|
319
|
-
modalInstance: this.$uibModalInstance,
|
|
320
|
-
onTaskComplete: this.onTaskComplete
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
updateLoadBalancerNames() {
|
|
324
|
-
const account = this.$scope.loadBalancerCmd.credentials;
|
|
325
|
-
const region = this.$scope.loadBalancerCmd.region;
|
|
326
|
-
const accountLoadBalancerNamesByRegion = {};
|
|
327
|
-
this.application.getDataSource("loadBalancers").refresh(true).then(() => {
|
|
328
|
-
const loadBalancers = this.application.loadBalancers.data;
|
|
329
|
-
loadBalancers.forEach((loadBalancer) => {
|
|
330
|
-
if (loadBalancer.account === account) {
|
|
331
|
-
accountLoadBalancerNamesByRegion[loadBalancer.region] = accountLoadBalancerNamesByRegion[loadBalancer.region] || [];
|
|
332
|
-
accountLoadBalancerNamesByRegion[loadBalancer.region].push(loadBalancer.name);
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
this.$scope.existingLoadBalancerNames = accountLoadBalancerNamesByRegion[region] || [];
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
validateBeforeSubmit() {
|
|
339
|
-
return this.propertiesValid() && this.listenersValid();
|
|
340
|
-
}
|
|
341
|
-
listenersValid() {
|
|
342
|
-
return this.listenersUniqueProtocolPort() && this.listenersBackendSetsExist() && this.listenersCertificatesExist();
|
|
343
|
-
}
|
|
344
|
-
propertiesValid() {
|
|
345
|
-
return this.selectedSubnets && this.selectedSubnets.length === this.calcNumSubnetsAllowed();
|
|
346
|
-
}
|
|
347
|
-
listenersUniqueProtocolPort() {
|
|
348
|
-
const countsMap = {};
|
|
349
|
-
this.listeners.reduce((counts, listener) => {
|
|
350
|
-
const protocolPort = listener.protocol + "_" + listener.port;
|
|
351
|
-
counts[protocolPort] = counts[protocolPort] ? counts[protocolPort] + 1 : 1;
|
|
352
|
-
return counts;
|
|
353
|
-
}, countsMap);
|
|
354
|
-
return Object.keys(countsMap).filter((key) => {
|
|
355
|
-
return countsMap[key] > 1;
|
|
356
|
-
}).length === 0;
|
|
357
|
-
}
|
|
358
|
-
listenersBackendSetsExist() {
|
|
359
|
-
const listenersWithNonExistentBackendSet = this.listeners.filter((listener) => !this.backendSets.find((backendSet) => backendSet.name === listener.defaultBackendSetName));
|
|
360
|
-
return listenersWithNonExistentBackendSet.length === 0;
|
|
361
|
-
}
|
|
362
|
-
listenersCertificatesExist() {
|
|
363
|
-
const listenersWithNonExistentCertificate = this.listeners.filter((listener) => listener.sslConfiguration && !this.certificates.find((cert) => cert.certificateName === listener.sslConfiguration.certificateName));
|
|
364
|
-
return listenersWithNonExistentCertificate.length === 0;
|
|
365
|
-
}
|
|
366
|
-
updateName() {
|
|
367
|
-
this.$scope.loadBalancerCmd.name = this.getName();
|
|
368
|
-
}
|
|
369
|
-
getName() {
|
|
370
|
-
const lb = this.$scope.loadBalancerCmd;
|
|
371
|
-
const lbName = [this.application.name, lb.stack || "", lb.detail || ""].join("-");
|
|
372
|
-
return trimEnd(lbName, "-");
|
|
373
|
-
}
|
|
374
|
-
accountUpdated() {
|
|
375
|
-
this.loadRegionsForAccount();
|
|
376
|
-
}
|
|
377
|
-
regionUpdated() {
|
|
378
|
-
this.updateLoadBalancerNames();
|
|
379
|
-
this.updateVnets();
|
|
380
|
-
}
|
|
381
|
-
loadRegionsForAccount() {
|
|
382
|
-
AccountService.getRegionsForAccount(this.$scope.loadBalancerCmd.credentials).then((regions) => {
|
|
383
|
-
this.$scope.regions = regions;
|
|
384
|
-
if (regions.length === 1) {
|
|
385
|
-
this.$scope.loadBalancerCmd.region = regions[0].name;
|
|
386
|
-
this.regionUpdated();
|
|
387
|
-
}
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
loadVnets() {
|
|
391
|
-
NetworkReader.listNetworksByProvider(this.oracle).then((vnets) => {
|
|
392
|
-
this.allVnets = vnets || [];
|
|
393
|
-
if (this.$scope.loadBalancerCmd.region) {
|
|
394
|
-
this.updateVnets();
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
loadSubnets() {
|
|
399
|
-
SubnetReader.listSubnetsByProvider(this.oracle).then((subnets) => {
|
|
400
|
-
this.allSubnets = subnets || [];
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
updateVnets() {
|
|
404
|
-
const account = this.$scope.loadBalancerCmd.credentials;
|
|
405
|
-
const region = this.$scope.loadBalancerCmd.region;
|
|
406
|
-
this.filteredVnets = this.allVnets.filter((vnet) => {
|
|
407
|
-
return vnet.account === account && vnet.region === region;
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
updateSubnets(network) {
|
|
411
|
-
this.selectedSubnets = [];
|
|
412
|
-
this.$scope.loadBalancerCmd.subnetIds = [];
|
|
413
|
-
this.filteredSubnets = this.allSubnets.filter((subnet) => {
|
|
414
|
-
return subnet.vcnId === network.id;
|
|
415
|
-
});
|
|
416
|
-
this.filteredSubnetsByType = cloneDeep(this.filteredSubnets);
|
|
417
|
-
}
|
|
418
|
-
selectedVnetChanged(network) {
|
|
419
|
-
this.selectedVnet = network;
|
|
420
|
-
this.$scope.loadBalancerCmd.vpcId = network.id;
|
|
421
|
-
this.updateSubnets(network);
|
|
422
|
-
}
|
|
423
|
-
selectedSubnetsChanged(selectedSubnet) {
|
|
424
|
-
if (selectedSubnet.availabilityDomain) {
|
|
425
|
-
this.filteredSubnetsByType = this.filteredSubnets.filter((subnet) => {
|
|
426
|
-
return !!subnet.availabilityDomain;
|
|
427
|
-
});
|
|
428
|
-
} else {
|
|
429
|
-
this.filteredSubnetsByType = [];
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
selectedSubnetRemoved() {
|
|
433
|
-
if (this.selectedSubnets.length === 0) {
|
|
434
|
-
this.filteredSubnetsByType = cloneDeep(this.filteredSubnets);
|
|
435
|
-
}
|
|
436
|
-
if (this.selectedSubnets.length === 1 && this.selectedSubnets[0].availabilityDomain) {
|
|
437
|
-
this.filteredSubnetsByType = this.filteredSubnets.filter((subnet) => {
|
|
438
|
-
return !!subnet.availabilityDomain;
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
isPrivateChanged() {
|
|
443
|
-
this.numSubnetsAllowed = this.calcNumSubnetsAllowed();
|
|
444
|
-
}
|
|
445
|
-
listenerIsSslChanged(listener) {
|
|
446
|
-
if (listener.isSsl) {
|
|
447
|
-
listener.sslConfiguration = this.oracleLoadBalancerTransformer.constructNewSSLConfiguration();
|
|
448
|
-
} else {
|
|
449
|
-
listener.sslConfiguration = void 0;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
calcNumSubnetsAllowed() {
|
|
453
|
-
if (this.$scope.loadBalancerCmd.isPrivate) {
|
|
454
|
-
return 1;
|
|
455
|
-
}
|
|
456
|
-
if (this.selectedSubnets && this.selectedSubnets.length === 1 && !this.selectedSubnets[0].availabilityDomain) {
|
|
457
|
-
return 1;
|
|
458
|
-
}
|
|
459
|
-
return 2;
|
|
460
|
-
}
|
|
461
|
-
getSubnetLimit() {
|
|
462
|
-
}
|
|
463
|
-
removeListener(idx) {
|
|
464
|
-
this.listeners.splice(idx, 1);
|
|
465
|
-
}
|
|
466
|
-
addListener() {
|
|
467
|
-
this.listeners.push(this.oracleLoadBalancerTransformer.constructNewListenerTemplate());
|
|
468
|
-
}
|
|
469
|
-
removeBackendSet(idx) {
|
|
470
|
-
const backendSet = this.backendSets[idx];
|
|
471
|
-
this.backendSets.splice(idx, 1);
|
|
472
|
-
this.$scope.prevBackendSetNames.splice(idx, 1);
|
|
473
|
-
this.listeners.forEach((lis) => {
|
|
474
|
-
if (lis.defaultBackendSetName === backendSet.name) {
|
|
475
|
-
lis.defaultBackendSetName = void 0;
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
isBackendSetRemovable(idx) {
|
|
480
|
-
const backendSet = this.backendSets[idx];
|
|
481
|
-
if (backendSet && backendSet.backends && backendSet.backends.length > 0) {
|
|
482
|
-
return false;
|
|
483
|
-
}
|
|
484
|
-
let hasListener = false;
|
|
485
|
-
this.listeners.forEach((lis) => {
|
|
486
|
-
if (lis.defaultBackendSetName === backendSet.name) {
|
|
487
|
-
hasListener = true;
|
|
488
|
-
}
|
|
489
|
-
});
|
|
490
|
-
return !hasListener;
|
|
491
|
-
}
|
|
492
|
-
addBackendSet() {
|
|
493
|
-
const nameSuffix = this.backendSets.length + 1;
|
|
494
|
-
const name = "backendSet" + nameSuffix;
|
|
495
|
-
this.$scope.prevBackendSetNames.push(name);
|
|
496
|
-
this.backendSets.push(this.oracleLoadBalancerTransformer.constructNewBackendSetTemplate(name));
|
|
497
|
-
}
|
|
498
|
-
backendSetNameChanged(idx) {
|
|
499
|
-
const prevName = this.$scope.prevBackendSetNames && this.$scope.prevBackendSetNames[idx];
|
|
500
|
-
if (prevName && prevName !== this.backendSets[idx].name) {
|
|
501
|
-
this.listeners.filter((lis) => lis.defaultBackendSetName === prevName).forEach((lis) => {
|
|
502
|
-
lis.defaultBackendSetName = this.backendSets[idx].name;
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
isCertRemovable(idx) {
|
|
507
|
-
const cert = this.certificates[idx];
|
|
508
|
-
let hasListener = false;
|
|
509
|
-
this.listeners.forEach((lis) => {
|
|
510
|
-
if (lis.isSsl && lis.sslConfiguration && lis.sslConfiguration.certificateName === cert.certificateName) {
|
|
511
|
-
hasListener = true;
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
return !hasListener;
|
|
515
|
-
}
|
|
516
|
-
removeCert(idx) {
|
|
517
|
-
const cert = this.certificates[idx];
|
|
518
|
-
this.certificates.splice(idx, 1);
|
|
519
|
-
this.$scope.prevCertNames.splice(idx, 1);
|
|
520
|
-
this.listeners.forEach((lis) => {
|
|
521
|
-
if (lis.sslConfiguration && lis.sslConfiguration.certificateName === cert.certificateName) {
|
|
522
|
-
lis.sslConfiguration.certificateName = void 0;
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
}
|
|
526
|
-
addCert() {
|
|
527
|
-
const nameSuffix = this.certificates.length + 1;
|
|
528
|
-
const name = "certificate" + nameSuffix;
|
|
529
|
-
this.$scope.prevCertNames.push(name);
|
|
530
|
-
this.certificates.push(this.oracleLoadBalancerTransformer.constructNewCertificateTemplate(name));
|
|
531
|
-
}
|
|
532
|
-
certNameChanged(idx) {
|
|
533
|
-
const prevName = this.$scope.prevCertNames && this.$scope.prevCertNames[idx];
|
|
534
|
-
if (prevName && prevName !== this.certificates[idx].certificateName) {
|
|
535
|
-
this.listeners.filter((lis) => lis.sslConfiguration && lis.sslConfiguration.certificateName === prevName).forEach((lis) => {
|
|
536
|
-
lis.sslConfiguration.certificateName = this.certificates[idx].certificateName;
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
submit() {
|
|
541
|
-
const descriptor = this.isNew ? "Create" : "Update";
|
|
542
|
-
this.$scope.taskMonitor.submit(() => {
|
|
543
|
-
const params = {
|
|
544
|
-
cloudProvider: "oracle",
|
|
545
|
-
application: this.application.name,
|
|
546
|
-
clusterName: this.$scope.loadBalancerCmd.clusterName,
|
|
547
|
-
resourceGroupName: this.$scope.loadBalancerCmd.clusterName,
|
|
548
|
-
loadBalancerName: this.$scope.loadBalancerCmd.name,
|
|
549
|
-
loadBalancerId: null
|
|
550
|
-
};
|
|
551
|
-
if (this.loadBalancer && this.loadBalancer.id) {
|
|
552
|
-
params.loadBalancerId = this.loadBalancer.id;
|
|
553
|
-
}
|
|
554
|
-
if (this.selectedVnet) {
|
|
555
|
-
this.$scope.loadBalancerCmd.vpcId = this.selectedVnet.id;
|
|
556
|
-
}
|
|
557
|
-
if (this.selectedSubnets && this.selectedSubnets.length > 0) {
|
|
558
|
-
this.$scope.loadBalancerCmd.subnetIds = this.selectedSubnets.map((subnet) => {
|
|
559
|
-
return subnet.id;
|
|
560
|
-
});
|
|
561
|
-
for (const subnet of this.selectedSubnets) {
|
|
562
|
-
if (!this.$scope.loadBalancerCmd.subnetTypeMap) {
|
|
563
|
-
this.$scope.loadBalancerCmd.subnetTypeMap = {
|
|
564
|
-
[subnet.id]: !subnet.availabilityDomain ? "Regional" : "AD"
|
|
565
|
-
};
|
|
566
|
-
} else {
|
|
567
|
-
this.$scope.loadBalancerCmd.subnetTypeMap[subnet.id] = !subnet.availabilityDomain ? "Regional" : "AD";
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
if (this.backendSets) {
|
|
572
|
-
this.$scope.loadBalancerCmd.backendSets = this.backendSets.reduce((backendSetsMap, backendSet) => {
|
|
573
|
-
backendSetsMap[backendSet.name] = backendSet;
|
|
574
|
-
return backendSetsMap;
|
|
575
|
-
}, {});
|
|
576
|
-
}
|
|
577
|
-
if (this.listeners) {
|
|
578
|
-
this.$scope.loadBalancerCmd.listeners = this.listeners.reduce((listenersMap, listener) => {
|
|
579
|
-
listener.name = listener.protocol + "_" + listener.port;
|
|
580
|
-
listenersMap[listener.name] = listener;
|
|
581
|
-
return listenersMap;
|
|
582
|
-
}, {});
|
|
583
|
-
}
|
|
584
|
-
if (this.certificates) {
|
|
585
|
-
this.$scope.loadBalancerCmd.certificates = this.certificates.reduce((certMap, cert) => {
|
|
586
|
-
certMap[cert.certificateName] = cert;
|
|
587
|
-
if (!cert.isNew) {
|
|
588
|
-
certMap[cert.certificateName].publicCertificate = null;
|
|
589
|
-
}
|
|
590
|
-
return certMap;
|
|
591
|
-
}, {});
|
|
592
|
-
}
|
|
593
|
-
this.$scope.loadBalancerCmd.type = "upsertLoadBalancer";
|
|
594
|
-
if (!this.$scope.loadBalancerCmd.vnet && !this.$scope.loadBalancerCmd.subnetType) {
|
|
595
|
-
this.$scope.loadBalancerCmd.securityGroups = null;
|
|
596
|
-
}
|
|
597
|
-
return LoadBalancerWriter.upsertLoadBalancer(this.$scope.loadBalancerCmd, this.application, descriptor, params);
|
|
598
|
-
});
|
|
599
|
-
}
|
|
600
|
-
cancel() {
|
|
601
|
-
this.$uibModalInstance.dismiss();
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
OracleLoadBalancerController.$inject = [
|
|
605
|
-
"$scope",
|
|
606
|
-
"$uibModalInstance",
|
|
607
|
-
"$state",
|
|
608
|
-
"oracleLoadBalancerTransformer",
|
|
609
|
-
"application",
|
|
610
|
-
"loadBalancer",
|
|
611
|
-
"isNew"
|
|
612
|
-
];
|
|
613
|
-
const ORACLE_LOAD_BALANCER_CREATE_CONTROLLER = "spinnaker.oracle.loadBalancer.create.controller";
|
|
614
|
-
module(ORACLE_LOAD_BALANCER_CREATE_CONTROLLER, [
|
|
615
|
-
ANGULAR_UI_BOOTSTRAP,
|
|
616
|
-
UIROUTER_ANGULARJS,
|
|
617
|
-
ORACLE_LOAD_BALANCER_TRANSFORMER
|
|
618
|
-
]).controller("oracleCreateLoadBalancerCtrl", OracleLoadBalancerController);
|
|
619
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
620
|
-
templateCache.put("oracle/src/loadBalancer/configure/createLoadBalancerProperties.html", `<div>
|
|
621
|
-
<div ng-if="!state.accountsLoaded" style="height: 200px" class="horizontal center middle">
|
|
622
|
-
<loading-spinner size="'small'"></loading-spinner>
|
|
623
|
-
</div>
|
|
624
|
-
<div class="modal-body" ng-if="state.accountsLoaded">
|
|
625
|
-
<div class="form-group">
|
|
626
|
-
<div
|
|
627
|
-
class="col-md-12 well"
|
|
628
|
-
ng-class="{'alert-danger': form.loadBalancerName.$error.validateUnique, 'alert-info': !form.loadBalancerName.$error.validateUnique}"
|
|
629
|
-
>
|
|
630
|
-
<strong>Your load balancer will be named:</strong>
|
|
631
|
-
<span>{{loadBalancerCmd.name}}</span>
|
|
632
|
-
<!-- Angular does not seem to run length validation on hidden inputs, hence the text + display:none -->
|
|
633
|
-
<input
|
|
634
|
-
type="text"
|
|
635
|
-
style="display: none"
|
|
636
|
-
ng-maxlength="32"
|
|
637
|
-
class="form-control input-sm"
|
|
638
|
-
ng-model="loadBalancerCmd.name"
|
|
639
|
-
validate-unique="existingLoadBalancerNames"
|
|
640
|
-
validate-ignore-case="true"
|
|
641
|
-
name="loadBalancerName"
|
|
642
|
-
/>
|
|
643
|
-
<validation-error
|
|
644
|
-
ng-if="form.loadBalancerName.$error.validateUnique"
|
|
645
|
-
message="There is already a load balancer in {{loadBalancerCmd.credentials}}:{{loadBalancerCmd.region}} with that name."
|
|
646
|
-
></validation-error>
|
|
647
|
-
</div>
|
|
648
|
-
</div>
|
|
649
|
-
<div class="form-group">
|
|
650
|
-
<div class="col-md-3 sm-label-right">Shape</div>
|
|
651
|
-
<div class="col-md-7">
|
|
652
|
-
<ui-select class="form-control input-sm" required ng-model="loadBalancerCmd.shape">
|
|
653
|
-
<ui-select-match placeholder="Select Shape">{{$select.selected}}</ui-select-match>
|
|
654
|
-
<ui-select-choices repeat="shape in ctrl.shapes | filter: $select.search">
|
|
655
|
-
<span ng-bind-html="shape | highlight: $select.search"></span>
|
|
656
|
-
</ui-select-choices>
|
|
657
|
-
</ui-select>
|
|
658
|
-
<!-- <select class="form-control input-sm" ng-model="loadBalancer.shape" required ng-options="shape for shapes in shapes"></select> -->
|
|
659
|
-
</div>
|
|
660
|
-
</div>
|
|
661
|
-
<div class="form-group">
|
|
662
|
-
<div class="col-md-3 sm-label-right">Private Load Balancer</div>
|
|
663
|
-
<div class="col-md-7 checkbox">
|
|
664
|
-
<label>
|
|
665
|
-
<input
|
|
666
|
-
type="checkbox"
|
|
667
|
-
name="isPrivate"
|
|
668
|
-
ng-model="loadBalancerCmd.isPrivate"
|
|
669
|
-
on-change="ctrl.isPrivateChanged()"
|
|
670
|
-
/>
|
|
671
|
-
</label>
|
|
672
|
-
</div>
|
|
673
|
-
</div>
|
|
674
|
-
<div class="form-group">
|
|
675
|
-
<div class="col-md-3 sm-label-right">Account</div>
|
|
676
|
-
<div class="col-md-7">
|
|
677
|
-
<account-select-field
|
|
678
|
-
required
|
|
679
|
-
component="loadBalancerCmd"
|
|
680
|
-
field="credentials"
|
|
681
|
-
accounts="accounts"
|
|
682
|
-
provider="'oracle'"
|
|
683
|
-
on-change="ctrl.accountUpdated()"
|
|
684
|
-
></account-select-field>
|
|
685
|
-
</div>
|
|
686
|
-
</div>
|
|
687
|
-
<region-select-field
|
|
688
|
-
required
|
|
689
|
-
label-columns="3"
|
|
690
|
-
component="loadBalancerCmd"
|
|
691
|
-
field="region"
|
|
692
|
-
account="loadBalancerCmd.credentials"
|
|
693
|
-
provider="'oracle'"
|
|
694
|
-
on-change="ctrl.regionUpdated()"
|
|
695
|
-
regions="regions"
|
|
696
|
-
></region-select-field>
|
|
697
|
-
|
|
698
|
-
<div class="form-group">
|
|
699
|
-
<div class="col-md-3 sm-label-right">Virtual Network</div>
|
|
700
|
-
<div class="col-md-7">
|
|
701
|
-
<ui-select
|
|
702
|
-
class="form-control input-sm"
|
|
703
|
-
required
|
|
704
|
-
ng-model="ctrl.selectedVnet"
|
|
705
|
-
on-select="ctrl.selectedVnetChanged($item)"
|
|
706
|
-
>
|
|
707
|
-
<ui-select-match placeholder="Select from existing virtual networks"
|
|
708
|
-
>{{$select.selected.name}}</ui-select-match
|
|
709
|
-
>
|
|
710
|
-
<ui-select-choices repeat="vnet in ctrl.filteredVnets | filter: $select.search">
|
|
711
|
-
<span ng-bind-html="vnet.name | highlight: $select.search"></span>
|
|
712
|
-
</ui-select-choices>
|
|
713
|
-
</ui-select>
|
|
714
|
-
</div>
|
|
715
|
-
</div>
|
|
716
|
-
|
|
717
|
-
<div class="form-group">
|
|
718
|
-
<div class="col-md-3 sm-label-right">Subnets</div>
|
|
719
|
-
<div class="col-md-7">
|
|
720
|
-
<ui-select
|
|
721
|
-
multiple
|
|
722
|
-
required
|
|
723
|
-
limit="2"
|
|
724
|
-
name="subnets"
|
|
725
|
-
class="form-control input-sm"
|
|
726
|
-
ng-model="ctrl.selectedSubnets"
|
|
727
|
-
on-select="ctrl.selectedSubnetsChanged($item)"
|
|
728
|
-
on-remove="ctrl.selectedSubnetRemoved()"
|
|
729
|
-
>
|
|
730
|
-
<ui-select-match placeholder="Select from existing subnets">{{$item.name}}</ui-select-match>
|
|
731
|
-
<ui-select-choices repeat="subnet in ctrl.filteredSubnetsByType | filter: $select.search">
|
|
732
|
-
<span ng-bind-html="subnet.name | highlight: $select.search"></span>
|
|
733
|
-
</ui-select-choices>
|
|
734
|
-
</ui-select>
|
|
735
|
-
</div>
|
|
736
|
-
</div>
|
|
737
|
-
<div ng-if="ctrl.filteredSubnetsByType.length > 0">
|
|
738
|
-
<div class="col-md-7 col-md-offset-3" ng-if="loadBalancerCmd.isPrivate && ctrl.selectedSubnets.length != 1">
|
|
739
|
-
<validation-error message="Exactly one subnet must be selected for a private load balancer."></validation-error>
|
|
740
|
-
</div>
|
|
741
|
-
<div
|
|
742
|
-
class="col-md-7 col-md-offset-3"
|
|
743
|
-
ng-if="!loadBalancerCmd.isPrivate && ctrl.selectedSubnets.length === 1 && ctrl.selectedSubnets[0].availabilityDomain"
|
|
744
|
-
>
|
|
745
|
-
<validation-error
|
|
746
|
-
message="Exactly 2 Availability Domain-specific subnets must be selected for a public load balancer."
|
|
747
|
-
></validation-error>
|
|
748
|
-
</div>
|
|
749
|
-
</div>
|
|
750
|
-
<div class="form-group">
|
|
751
|
-
<div class="col-md-3 sm-label-right">Stack <help-field key="oracle.loadBalancer.stack"></help-field></div>
|
|
752
|
-
<div class="col-md-3">
|
|
753
|
-
<input
|
|
754
|
-
type="text"
|
|
755
|
-
class="form-control input-sm"
|
|
756
|
-
ng-model="loadBalancerCmd.stack"
|
|
757
|
-
name="stackName"
|
|
758
|
-
ng-change="ctrl.updateName()"
|
|
759
|
-
ng-pattern="/^[a-zA-Z0-9]*$/"
|
|
760
|
-
/>
|
|
761
|
-
</div>
|
|
762
|
-
<div class="col-md-6 form-inline">
|
|
763
|
-
<label class="sm-label-right"> Detail <help-field key="oracle.loadBalancer.detail"></help-field> </label>
|
|
764
|
-
<input
|
|
765
|
-
type="text"
|
|
766
|
-
class="form-control input-sm"
|
|
767
|
-
ng-model="loadBalancerCmd.detail"
|
|
768
|
-
name="detailName"
|
|
769
|
-
ng-change="ctrl.updateName()"
|
|
770
|
-
ng-pattern="/^[a-zA-Z0-9-]*$/"
|
|
771
|
-
/>
|
|
772
|
-
</div>
|
|
773
|
-
<div class="col-md-7 col-md-offset-3" ng-if="form.stackName.$error.pattern">
|
|
774
|
-
<validation-error message="Stack can only contain letters and numbers."></validation-error>
|
|
775
|
-
</div>
|
|
776
|
-
<div class="col-md-7 col-md-offset-3" ng-if="form.detailName.$error.pattern">
|
|
777
|
-
<validation-error message="Detail can only contain letters, numbers, and dashes."></validation-error>
|
|
778
|
-
</div>
|
|
779
|
-
</div>
|
|
780
|
-
<div class="form-group">
|
|
781
|
-
<div class="col-md-9 col-md-offset-3" ng-if="form.loadBalancerName.$error.maxlength">
|
|
782
|
-
<validation-error message="Load Balancer name can only be 32 characters."></validation-error>
|
|
783
|
-
</div>
|
|
784
|
-
</div>
|
|
785
|
-
</div>
|
|
786
|
-
</div>
|
|
787
|
-
`);
|
|
788
|
-
}]);
|
|
789
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
790
|
-
templateCache.put("oracle/src/loadBalancer/configure/listeners.html", `<div class="container-fluid form-horizontal">
|
|
791
|
-
<div class="form-group">
|
|
792
|
-
<div class="col-md-12">
|
|
793
|
-
<table class="table table-condensed packed">
|
|
794
|
-
<thead>
|
|
795
|
-
<tr>
|
|
796
|
-
<th>SSL</th>
|
|
797
|
-
<th>SSL Certificate Name</th>
|
|
798
|
-
<th>Protocol</th>
|
|
799
|
-
<th>Listening Port</th>
|
|
800
|
-
<th>Default Backend Set Name</th>
|
|
801
|
-
<!-- TODO <th>SSL config</th>
|
|
802
|
-
<th>Hostnames</th> -->
|
|
803
|
-
</tr>
|
|
804
|
-
</thead>
|
|
805
|
-
<tbody>
|
|
806
|
-
<tr ng-repeat="listener in ctrl.listeners">
|
|
807
|
-
<td>
|
|
808
|
-
<input
|
|
809
|
-
type="checkbox"
|
|
810
|
-
name="isSsl"
|
|
811
|
-
ng-model="listener.isSsl"
|
|
812
|
-
on-change="ctrl.listenerIsSslChanged(listener)"
|
|
813
|
-
/>
|
|
814
|
-
</td>
|
|
815
|
-
<td>
|
|
816
|
-
<ui-select
|
|
817
|
-
ng-if="listener.isSsl"
|
|
818
|
-
class="form-control input-sm"
|
|
819
|
-
required
|
|
820
|
-
ng-model="listener.sslConfiguration.certificateName"
|
|
821
|
-
>
|
|
822
|
-
<ui-select-match placeholder="Select certificate name"
|
|
823
|
-
>{{$select.selected.certificateName}}</ui-select-match
|
|
824
|
-
>
|
|
825
|
-
<ui-select-choices repeat="cert.certificateName as cert in ctrl.certificates | filter: $select.search">
|
|
826
|
-
<span ng-bind-html="cert.certificateName | highlight: $select.search"></span>
|
|
827
|
-
</ui-select-choices>
|
|
828
|
-
</ui-select>
|
|
829
|
-
<div ng-if="!listener.isSsl">N/A</div>
|
|
830
|
-
</td>
|
|
831
|
-
<td>
|
|
832
|
-
<select
|
|
833
|
-
class="form-control input-sm"
|
|
834
|
-
ng-model="listener.protocol"
|
|
835
|
-
ng-options="protocol for protocol in ['HTTP', 'TCP']"
|
|
836
|
-
></select>
|
|
837
|
-
</td>
|
|
838
|
-
<td>
|
|
839
|
-
<input class="form-control input-sm" type="number" ng-model="listener.port" required />
|
|
840
|
-
</td>
|
|
841
|
-
<td>
|
|
842
|
-
<ui-select class="form-control input-sm" required ng-model="listener.defaultBackendSetName">
|
|
843
|
-
<ui-select-match placeholder="Select default backend set name"
|
|
844
|
-
>{{$select.selected.name}}</ui-select-match
|
|
845
|
-
>
|
|
846
|
-
<ui-select-choices repeat="backendSet.name as backendSet in ctrl.backendSets | filter: $select.search">
|
|
847
|
-
<span ng-bind-html="backendSet.name | highlight: $select.search"></span>
|
|
848
|
-
</ui-select-choices>
|
|
849
|
-
</ui-select>
|
|
850
|
-
<!-- <select class="form-control input-sm" required ng-model="listener.defaultBackendSetName" ng-options="backendSetName as backendSet.name for backendSet in loadBalancerCmd.backendSets"></select> -->
|
|
851
|
-
</td>
|
|
852
|
-
<td>
|
|
853
|
-
<a href class="sm-label" ng-click="ctrl.removeListener($index)"
|
|
854
|
-
><span class="glyphicon glyphicon-trash"></span
|
|
855
|
-
></a>
|
|
856
|
-
</td>
|
|
857
|
-
</tr>
|
|
858
|
-
<tr ng-if="!ctrl.listenersUniqueProtocolPort()">
|
|
859
|
-
<td colspan="3">
|
|
860
|
-
<validation-error message="Listeners must have unique protocol and port"></validation-error>
|
|
861
|
-
</td>
|
|
862
|
-
</tr>
|
|
863
|
-
</tbody>
|
|
864
|
-
<tfoot>
|
|
865
|
-
<tr>
|
|
866
|
-
<td colspan="5">
|
|
867
|
-
<button class="add-new col-md-12" ng-click="ctrl.addListener()">
|
|
868
|
-
<span class="glyphicon glyphicon-plus-sign"></span>
|
|
869
|
-
Add Listener
|
|
870
|
-
</button>
|
|
871
|
-
</td>
|
|
872
|
-
</tr>
|
|
873
|
-
</tfoot>
|
|
874
|
-
</table>
|
|
875
|
-
</div>
|
|
876
|
-
</div>
|
|
877
|
-
</div>
|
|
878
|
-
`);
|
|
879
|
-
}]);
|
|
880
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
881
|
-
templateCache.put("oracle/src/loadBalancer/configure/backendSets.html", `<div class="container-fluid form-horizontal">
|
|
882
|
-
<div class="form-group">
|
|
883
|
-
<div class="col-md-12">
|
|
884
|
-
<table class="table table-condensed packed">
|
|
885
|
-
<thead>
|
|
886
|
-
<tr>
|
|
887
|
-
<th>Name</th>
|
|
888
|
-
<th>Policy</th>
|
|
889
|
-
<th>Health Check Protocol</th>
|
|
890
|
-
<th>Health Check Port</th>
|
|
891
|
-
<th>Health Check Path</th>
|
|
892
|
-
<!-- TODO other nonrequired health check fields - do we need another popup for health check? -->
|
|
893
|
-
</tr>
|
|
894
|
-
</thead>
|
|
895
|
-
<tbody>
|
|
896
|
-
<tr ng-repeat="backendSet in ctrl.backendSets">
|
|
897
|
-
<td ng-if="backendSet.isNew">
|
|
898
|
-
<input
|
|
899
|
-
class="form-control input-sm"
|
|
900
|
-
ng-model="backendSet.name"
|
|
901
|
-
required
|
|
902
|
-
ng-focus="prevBackendSetNames[$index] = backendSet.name"
|
|
903
|
-
ng-blur="ctrl.backendSetNameChanged($index)"
|
|
904
|
-
/>
|
|
905
|
-
</td>
|
|
906
|
-
<td ng-if="!backendSet.isNew">{{backendSet.name}}</td>
|
|
907
|
-
<td>
|
|
908
|
-
<select
|
|
909
|
-
class="form-control input-sm"
|
|
910
|
-
ng-model="backendSet.policy"
|
|
911
|
-
ng-options="policy for policy in ctrl.loadBalancingPolicies"
|
|
912
|
-
></select>
|
|
913
|
-
</td>
|
|
914
|
-
<td>
|
|
915
|
-
<input class="form-control input-sm" ng-model="backendSet.healthChecker.protocol" required />
|
|
916
|
-
</td>
|
|
917
|
-
<td>
|
|
918
|
-
<input class="form-control input-sm" ng-model="backendSet.healthChecker.port" required />
|
|
919
|
-
</td>
|
|
920
|
-
<td>
|
|
921
|
-
<input class="form-control input-sm" ng-model="backendSet.healthChecker.urlPath" required />
|
|
922
|
-
</td>
|
|
923
|
-
<td>
|
|
924
|
-
<a
|
|
925
|
-
href
|
|
926
|
-
class="sm-label"
|
|
927
|
-
ng-if="ctrl.isBackendSetRemovable($index)"
|
|
928
|
-
ng-click="ctrl.removeBackendSet($index)"
|
|
929
|
-
><span class="glyphicon glyphicon-trash"></span
|
|
930
|
-
></a>
|
|
931
|
-
</td>
|
|
932
|
-
</tr>
|
|
933
|
-
</tbody>
|
|
934
|
-
<tfoot>
|
|
935
|
-
<tr>
|
|
936
|
-
<td colspan="5">
|
|
937
|
-
<button class="add-new col-md-12" ng-click="ctrl.addBackendSet()">
|
|
938
|
-
<span class="glyphicon glyphicon-plus-sign"></span>
|
|
939
|
-
Add Backend Set
|
|
940
|
-
</button>
|
|
941
|
-
</td>
|
|
942
|
-
</tr>
|
|
943
|
-
</tfoot>
|
|
944
|
-
</table>
|
|
945
|
-
</div>
|
|
946
|
-
</div>
|
|
947
|
-
</div>
|
|
948
|
-
`);
|
|
949
|
-
}]);
|
|
950
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
951
|
-
templateCache.put("oracle/src/loadBalancer/configure/certificates.html", `<div class="container-fluid form-horizontal">
|
|
952
|
-
<div class="form-group">
|
|
953
|
-
<div class="col-md-12">
|
|
954
|
-
<table class="table table-condensed packed">
|
|
955
|
-
<thead>
|
|
956
|
-
<tr>
|
|
957
|
-
<th>Name</th>
|
|
958
|
-
<th>Certificate</th>
|
|
959
|
-
<th>CA Cert</th>
|
|
960
|
-
<th>Private Key</th>
|
|
961
|
-
<th>Passphrase</th>
|
|
962
|
-
</tr>
|
|
963
|
-
</thead>
|
|
964
|
-
<tbody>
|
|
965
|
-
<tr ng-repeat="cert in ctrl.certificates">
|
|
966
|
-
<td ng-if="!cert.isNew">{{cert.certificateName}}</td>
|
|
967
|
-
<td ng-if="cert.isNew">
|
|
968
|
-
<input
|
|
969
|
-
class="form-control input-sm"
|
|
970
|
-
ng-model="cert.certificateName"
|
|
971
|
-
required
|
|
972
|
-
ng-focus="prevCertNames[$index] = cert.name"
|
|
973
|
-
ng-blur="ctrl.certNameChanged($index)"
|
|
974
|
-
/>
|
|
975
|
-
</td>
|
|
976
|
-
<td>
|
|
977
|
-
<textarea
|
|
978
|
-
ng-if="cert.isNew"
|
|
979
|
-
ng-model="cert.publicCertificate"
|
|
980
|
-
required
|
|
981
|
-
class="form-control input-sm"
|
|
982
|
-
></textarea>
|
|
983
|
-
</td>
|
|
984
|
-
<td>
|
|
985
|
-
<textarea ng-if="cert.isNew" ng-model="cert.caCertificate" class="form-control input-sm"></textarea>
|
|
986
|
-
</td>
|
|
987
|
-
<td>
|
|
988
|
-
<textarea ng-if="cert.isNew" ng-model="cert.privateKey" required class="form-control input-sm"></textarea>
|
|
989
|
-
</td>
|
|
990
|
-
<td>
|
|
991
|
-
<textarea ng-if="cert.isNew" ng-model="cert.passphrase" class="form-control input-sm"></textarea>
|
|
992
|
-
</td>
|
|
993
|
-
<td>
|
|
994
|
-
<a href class="sm-label" ng-if="ctrl.isCertRemovable($index)" ng-click="ctrl.removeCert($index)"
|
|
995
|
-
><span class="glyphicon glyphicon-trash"></span>
|
|
996
|
-
</a>
|
|
997
|
-
</td>
|
|
998
|
-
</tr>
|
|
999
|
-
</tbody>
|
|
1000
|
-
<tfoot>
|
|
1001
|
-
<tr>
|
|
1002
|
-
<td colspan="5">
|
|
1003
|
-
<button class="add-new col-md-12" ng-click="ctrl.addCert()">
|
|
1004
|
-
<span class="glyphicon glyphicon-plus-sign"></span>
|
|
1005
|
-
Add Certificate
|
|
1006
|
-
</button>
|
|
1007
|
-
</td>
|
|
1008
|
-
</tr>
|
|
1009
|
-
</tfoot>
|
|
1010
|
-
</table>
|
|
1011
|
-
</div>
|
|
1012
|
-
</div>
|
|
1013
|
-
</div>
|
|
1014
|
-
`);
|
|
1015
|
-
}]);
|
|
1016
|
-
|
|
1017
|
-
class OracleLoadBalancerDetailController {
|
|
1018
|
-
constructor($scope, $state, $uibModal, loadBalancer, app, securityGroupReader, loadBalancerReader, $q) {
|
|
1019
|
-
this.$scope = $scope;
|
|
1020
|
-
this.$state = $state;
|
|
1021
|
-
this.$uibModal = $uibModal;
|
|
1022
|
-
this.loadBalancer = loadBalancer;
|
|
1023
|
-
this.app = app;
|
|
1024
|
-
this.securityGroupReader = securityGroupReader;
|
|
1025
|
-
this.loadBalancerReader = loadBalancerReader;
|
|
1026
|
-
this.$q = $q;
|
|
1027
|
-
$scope.state = {
|
|
1028
|
-
loading: true
|
|
1029
|
-
};
|
|
1030
|
-
$scope.firewallsLabel = FirewallLabels.get("Firewalls");
|
|
1031
|
-
const extractLoadBalancer = () => {
|
|
1032
|
-
$scope.loadBalancer = app.loadBalancers.data.filter((test) => {
|
|
1033
|
-
return test.name === loadBalancer.name && test.region === loadBalancer.region && test.account === loadBalancer.accountId;
|
|
1034
|
-
})[0];
|
|
1035
|
-
if ($scope.loadBalancer) {
|
|
1036
|
-
const detailsLoader = this.loadBalancerReader.getLoadBalancerDetails($scope.loadBalancer.cloudProvider, loadBalancer.accountId, loadBalancer.region, loadBalancer.name);
|
|
1037
|
-
return detailsLoader.then((details) => {
|
|
1038
|
-
$scope.state.loading = false;
|
|
1039
|
-
const securityGroups = [];
|
|
1040
|
-
const filtered = details.filter((test) => {
|
|
1041
|
-
return test.name === loadBalancer.name;
|
|
1042
|
-
});
|
|
1043
|
-
if (filtered.length) {
|
|
1044
|
-
$scope.loadBalancer.elb = filtered[0];
|
|
1045
|
-
$scope.loadBalancer.account = loadBalancer.accountId;
|
|
1046
|
-
if ($scope.loadBalancer.elb.securityGroups) {
|
|
1047
|
-
$scope.loadBalancer.elb.securityGroups.forEach((securityGroupId) => {
|
|
1048
|
-
const match = this.securityGroupReader.getApplicationSecurityGroup(this.app, loadBalancer.accountId, loadBalancer.region, securityGroupId);
|
|
1049
|
-
if (match) {
|
|
1050
|
-
securityGroups.push(match);
|
|
1051
|
-
}
|
|
1052
|
-
});
|
|
1053
|
-
this.$scope.securityGroups = sortBy(securityGroups, "name");
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
});
|
|
1057
|
-
}
|
|
1058
|
-
if (!this.$scope.loadBalancer) {
|
|
1059
|
-
this.$state.go("^");
|
|
1060
|
-
}
|
|
1061
|
-
return this.$q.when(null);
|
|
1062
|
-
};
|
|
1063
|
-
this.app.ready().then(extractLoadBalancer).then(() => {
|
|
1064
|
-
if (!this.$scope.$$destroyed) {
|
|
1065
|
-
this.app.onRefresh($scope, extractLoadBalancer);
|
|
1066
|
-
}
|
|
1067
|
-
});
|
|
1068
|
-
}
|
|
1069
|
-
editLoadBalancer() {
|
|
1070
|
-
this.$uibModal.open({
|
|
1071
|
-
templateUrl: "oracle/src/loadBalancer/configure/editLoadBalancer.html",
|
|
1072
|
-
controller: OracleLoadBalancerController,
|
|
1073
|
-
controllerAs: "ctrl",
|
|
1074
|
-
size: "lg",
|
|
1075
|
-
resolve: {
|
|
1076
|
-
application: () => {
|
|
1077
|
-
return this.app;
|
|
1078
|
-
},
|
|
1079
|
-
loadBalancer: () => {
|
|
1080
|
-
return angular__default.copy(this.$scope.loadBalancer);
|
|
1081
|
-
},
|
|
1082
|
-
isNew: () => {
|
|
1083
|
-
return false;
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
});
|
|
1087
|
-
}
|
|
1088
|
-
deleteLoadBalancer() {
|
|
1089
|
-
if (this.$scope.loadBalancer.instances && this.$scope.loadBalancer.instances.length) {
|
|
1090
|
-
return;
|
|
1091
|
-
}
|
|
1092
|
-
const taskMonitor = {
|
|
1093
|
-
application: this.app,
|
|
1094
|
-
title: "Deleting " + this.loadBalancer.name
|
|
1095
|
-
};
|
|
1096
|
-
const command = {
|
|
1097
|
-
cloudProvider: "oracle",
|
|
1098
|
-
loadBalancerName: this.$scope.loadBalancer.name,
|
|
1099
|
-
credentials: this.$scope.loadBalancer.account,
|
|
1100
|
-
region: this.loadBalancer.region,
|
|
1101
|
-
application: this.app.name,
|
|
1102
|
-
loadBalancerId: this.$scope.loadBalancer.id
|
|
1103
|
-
};
|
|
1104
|
-
const submitMethod = () => LoadBalancerWriter.deleteLoadBalancer(command, this.app);
|
|
1105
|
-
ConfirmationModalService.confirm({
|
|
1106
|
-
header: "Really delete " + this.loadBalancer.name + "?",
|
|
1107
|
-
buttonText: "Delete " + this.loadBalancer.name,
|
|
1108
|
-
account: this.loadBalancer.accountId,
|
|
1109
|
-
taskMonitorConfig: taskMonitor,
|
|
1110
|
-
submitMethod
|
|
1111
|
-
});
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
OracleLoadBalancerDetailController.$inject = [
|
|
1115
|
-
"$scope",
|
|
1116
|
-
"$state",
|
|
1117
|
-
"$uibModal",
|
|
1118
|
-
"loadBalancer",
|
|
1119
|
-
"app",
|
|
1120
|
-
"securityGroupReader",
|
|
1121
|
-
"loadBalancerReader",
|
|
1122
|
-
"$q"
|
|
1123
|
-
];
|
|
1124
|
-
const ORACLE_LOAD_BALANCER_DETAIL_CONTROLLER = "spinnaker.oracle.loadBalancerDetail.controller";
|
|
1125
|
-
module(ORACLE_LOAD_BALANCER_DETAIL_CONTROLLER, [UIROUTER_ANGULARJS, ANGULAR_UI_BOOTSTRAP]).controller("oracleLoadBalancerDetailCtrl", OracleLoadBalancerDetailController);
|
|
1126
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1127
|
-
templateCache.put("oracle/src/loadBalancer/configure/editLoadBalancer.html", `<form name="form" class="form-horizontal" novalidate validate-on-submit>
|
|
1128
|
-
<v2-modal-wizard
|
|
1129
|
-
heading="Edit Load Balancer {{ctrl.loadBalancer.name}}"
|
|
1130
|
-
task-monitor="taskMonitor"
|
|
1131
|
-
dismiss="$dismiss()"
|
|
1132
|
-
>
|
|
1133
|
-
<v2-wizard-page key="Certificates" label="SSL Certificates" done="true">
|
|
1134
|
-
<ng-include src="ctrl.pages.certificates"></ng-include>
|
|
1135
|
-
</v2-wizard-page>
|
|
1136
|
-
<v2-wizard-page key="Backend Sets" label="Backend Sets" done="true">
|
|
1137
|
-
<ng-include src="ctrl.pages.backendSets"></ng-include>
|
|
1138
|
-
</v2-wizard-page>
|
|
1139
|
-
<v2-wizard-page key="Listeners" label="Listeners" done="true">
|
|
1140
|
-
<ng-include src="ctrl.pages.listeners"></ng-include>
|
|
1141
|
-
</v2-wizard-page>
|
|
1142
|
-
</v2-modal-wizard>
|
|
1143
|
-
<div class="modal-footer">
|
|
1144
|
-
<button ng-disabled="taskMonitor.submitting" class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>
|
|
1145
|
-
<submit-button
|
|
1146
|
-
is-disabled="taskMonitor.submitting"
|
|
1147
|
-
submitting="taskMonitor.submitting"
|
|
1148
|
-
on-click="form.$valid && ctrl.submit()"
|
|
1149
|
-
is-new="isNew"
|
|
1150
|
-
></submit-button>
|
|
1151
|
-
</div>
|
|
1152
|
-
</form>
|
|
1153
|
-
`);
|
|
1154
|
-
}]);
|
|
1155
|
-
|
|
1156
|
-
const ORACLE_PIPELINE_STAGES_BAKE_BAKEEXECUTIONDETAILS_CONTROLLER = "spinnaker.oracle.pipeline.stage.bake.executionDetails.controller";
|
|
1157
|
-
module(ORACLE_PIPELINE_STAGES_BAKE_BAKEEXECUTIONDETAILS_CONTROLLER, [
|
|
1158
|
-
EXECUTION_DETAILS_SECTION_SERVICE,
|
|
1159
|
-
UIROUTER_ANGULARJS
|
|
1160
|
-
]).controller("oracleBakeExecutionDetailsCtrl", [
|
|
1161
|
-
"$log",
|
|
1162
|
-
"$scope",
|
|
1163
|
-
"$stateParams",
|
|
1164
|
-
"executionDetailsSectionService",
|
|
1165
|
-
"$interpolate",
|
|
1166
|
-
function($log, $scope, $stateParams, executionDetailsSectionService, $interpolate) {
|
|
1167
|
-
$scope.configSections = ["bakeConfig", "taskStatus"];
|
|
1168
|
-
const initialized = () => {
|
|
1169
|
-
$scope.detailsSection = $stateParams.details;
|
|
1170
|
-
$scope.provider = $scope.stage.context.cloudProviderType || "oracle";
|
|
1171
|
-
$scope.roscoMode = SETTINGS.feature.roscoMode;
|
|
1172
|
-
$scope.bakeryDetailUrl = $interpolate($scope.roscoMode && SETTINGS.roscoDetailUrl ? SETTINGS.roscoDetailUrl : SETTINGS.bakeryDetailUrl);
|
|
1173
|
-
};
|
|
1174
|
-
const initialize = () => executionDetailsSectionService.synchronizeSection($scope.configSections, initialized);
|
|
1175
|
-
initialize();
|
|
1176
|
-
$scope.$on("$stateChangeSuccess", initialize);
|
|
1177
|
-
}
|
|
1178
|
-
]);
|
|
1179
|
-
|
|
1180
|
-
const ORACLE_PIPELINE_STAGES_BAKE_OCIBAKESTAGE = "spinnaker.oracle.pipeline.stage.bakeStage";
|
|
1181
|
-
module(ORACLE_PIPELINE_STAGES_BAKE_OCIBAKESTAGE, [ORACLE_PIPELINE_STAGES_BAKE_BAKEEXECUTIONDETAILS_CONTROLLER]).config(function() {
|
|
1182
|
-
Registry.pipeline.registerStage({
|
|
1183
|
-
provides: "bake",
|
|
1184
|
-
cloudProvider: "oracle",
|
|
1185
|
-
label: "Bake",
|
|
1186
|
-
description: "Bakes an image",
|
|
1187
|
-
templateUrl: "oracle/src/pipeline/stages/bake/bakeStage.html",
|
|
1188
|
-
executionDetailsUrl: "oracle/src/pipeline/stages/bake/bakeExecutionDetails.html",
|
|
1189
|
-
executionLabelComponent: BakeExecutionLabel,
|
|
1190
|
-
supportsCustomTimeout: true,
|
|
1191
|
-
validators: [
|
|
1192
|
-
{ type: "requiredField", fieldName: "accountName" },
|
|
1193
|
-
{ type: "requiredField", fieldName: "region" },
|
|
1194
|
-
{ type: "requiredField", fieldName: "baseOs" },
|
|
1195
|
-
{ type: "requiredField", fieldName: "upgrade" },
|
|
1196
|
-
{ type: "requiredField", fieldName: "cloudProviderType" },
|
|
1197
|
-
{ type: "requiredField", fieldName: "amiName", fieldLabel: "Image Name" }
|
|
1198
|
-
],
|
|
1199
|
-
restartable: true
|
|
1200
|
-
});
|
|
1201
|
-
}).controller("oracleBakeStageCtrl", [
|
|
1202
|
-
"$scope",
|
|
1203
|
-
"$q",
|
|
1204
|
-
"$uibModal",
|
|
1205
|
-
function($scope, $q, $uibModal) {
|
|
1206
|
-
const provider = "oracle";
|
|
1207
|
-
if (!$scope.stage.cloudProvider) {
|
|
1208
|
-
$scope.stage.cloudProvider = provider;
|
|
1209
|
-
}
|
|
1210
|
-
if (!$scope.stage) {
|
|
1211
|
-
$scope.stage = {};
|
|
1212
|
-
}
|
|
1213
|
-
$scope.stage.extendedAttributes = $scope.stage.extendedAttributes || {};
|
|
1214
|
-
if (!$scope.stage.user) {
|
|
1215
|
-
$scope.stage.user = AuthenticationService.getAuthenticatedUser().name;
|
|
1216
|
-
}
|
|
1217
|
-
function initialize() {
|
|
1218
|
-
$scope.viewState.providerSelected = true;
|
|
1219
|
-
$q.all([BakeryReader.getBaseOsOptions(provider), AccountService.listAccounts(provider)]).then(([baseOsOptions, accounts]) => {
|
|
1220
|
-
if (baseOsOptions.baseImages.length > 0) {
|
|
1221
|
-
$scope.baseOsOptions = baseOsOptions;
|
|
1222
|
-
if (!$scope.stage.baseOs) {
|
|
1223
|
-
$scope.stage.baseOs = $scope.baseOsOptions.baseImages[0].id;
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
if (!$scope.stage.user) {
|
|
1227
|
-
$scope.stage.user = AuthenticationService.getAuthenticatedUser().name;
|
|
1228
|
-
}
|
|
1229
|
-
if (!$scope.stage.upgrade) {
|
|
1230
|
-
$scope.stage.upgrade = true;
|
|
1231
|
-
}
|
|
1232
|
-
$scope.accounts = accounts;
|
|
1233
|
-
if ($scope.stage.accountName) {
|
|
1234
|
-
AccountService.getRegionsForAccount($scope.stage.accountName).then(function(regions) {
|
|
1235
|
-
if (Array.isArray(regions) && regions.length != 0) {
|
|
1236
|
-
$scope.stage.region = regions[0].name;
|
|
1237
|
-
}
|
|
1238
|
-
});
|
|
1239
|
-
}
|
|
1240
|
-
$scope.viewState.loading = false;
|
|
1241
|
-
});
|
|
1242
|
-
}
|
|
1243
|
-
this.getBaseOsDescription = function(baseOsOption) {
|
|
1244
|
-
return baseOsOption.id + (baseOsOption.shortDescription ? " (" + baseOsOption.shortDescription + ")" : "");
|
|
1245
|
-
};
|
|
1246
|
-
this.accountUpdated = function() {
|
|
1247
|
-
AccountService.getRegionsForAccount($scope.stage.accountName).then(function(regions) {
|
|
1248
|
-
if (Array.isArray(regions) && regions.length != 0) {
|
|
1249
|
-
$scope.stage.region = regions[0].name;
|
|
1250
|
-
}
|
|
1251
|
-
});
|
|
1252
|
-
};
|
|
1253
|
-
this.addExtendedAttribute = function() {
|
|
1254
|
-
if (!$scope.stage.extendedAttributes) {
|
|
1255
|
-
$scope.stage.extendedAttributes = {};
|
|
1256
|
-
}
|
|
1257
|
-
$uibModal.open({
|
|
1258
|
-
templateUrl: PipelineTemplates.addExtendedAttributes,
|
|
1259
|
-
controller: "bakeStageAddExtendedAttributeController",
|
|
1260
|
-
controllerAs: "addExtendedAttribute",
|
|
1261
|
-
resolve: {
|
|
1262
|
-
extendedAttribute: function() {
|
|
1263
|
-
return {
|
|
1264
|
-
key: "",
|
|
1265
|
-
value: ""
|
|
1266
|
-
};
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
}).result.then(function(extendedAttribute) {
|
|
1270
|
-
$scope.stage.extendedAttributes[extendedAttribute.key] = extendedAttribute.value;
|
|
1271
|
-
}).catch(() => {
|
|
1272
|
-
});
|
|
1273
|
-
};
|
|
1274
|
-
this.removeExtendedAttribute = function(key) {
|
|
1275
|
-
delete $scope.stage.extendedAttributes[key];
|
|
1276
|
-
};
|
|
1277
|
-
this.showExtendedAttributes = function() {
|
|
1278
|
-
return $scope.viewState.roscoMode || $scope.stage.extendedAttributes && size($scope.stage.extendedAttributes) > 0;
|
|
1279
|
-
};
|
|
1280
|
-
$scope.$watch("stage.accountName", $scope.accountUpdated);
|
|
1281
|
-
initialize();
|
|
1282
|
-
}
|
|
1283
|
-
]);
|
|
1284
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1285
|
-
templateCache.put("oracle/src/pipeline/stages/bake/bakeStage.html", `<div ng-controller="oracleBakeStageCtrl as bakeStageCtrl">
|
|
1286
|
-
<div ng-if="viewState.loading" class="horizontal center middle">
|
|
1287
|
-
<loading-spinner size="'small'"></loading-spinner>
|
|
1288
|
-
</div>
|
|
1289
|
-
|
|
1290
|
-
<stage-config-field label="Oracle Account" help-key="oracle.pipeline.config.bake.account_name">
|
|
1291
|
-
<account-select-field
|
|
1292
|
-
component="stage"
|
|
1293
|
-
field="accountName"
|
|
1294
|
-
accounts="accounts"
|
|
1295
|
-
on-change="bakeStageCtrl.accountUpdated()"
|
|
1296
|
-
provider="'oracle'"
|
|
1297
|
-
>
|
|
1298
|
-
</account-select-field>
|
|
1299
|
-
</stage-config-field>
|
|
1300
|
-
|
|
1301
|
-
<stage-config-field label="Region" help-key="oracle.pipeline.config.bake.regions">
|
|
1302
|
-
<input type="text" class="form-control input-sm" ng-readonly="true" ng-model="stage.region" />
|
|
1303
|
-
</stage-config-field>
|
|
1304
|
-
|
|
1305
|
-
<stage-config-field label="Base Image" , help-key="oracle.pipeline.config.bake.baseOsOption">
|
|
1306
|
-
<div class="radio" ng-repeat="baseImage in baseOsOptions.baseImages">
|
|
1307
|
-
<label>
|
|
1308
|
-
<input type="radio" ng-model="stage.baseOs" ng-value="baseImage.id" />
|
|
1309
|
-
{{bakeStageCtrl.getBaseOsDescription(baseImage)}}
|
|
1310
|
-
<help-field content="{{baseImage.detailedDescription}}"></help-field>
|
|
1311
|
-
</label>
|
|
1312
|
-
</div>
|
|
1313
|
-
</stage-config-field>
|
|
1314
|
-
|
|
1315
|
-
<stage-config-field label="Image Name" help-key="oracle.pipeline.config.bake.image_name">
|
|
1316
|
-
<input type="text" class="form-control input-sm" ng-model="stage.amiName" />
|
|
1317
|
-
</stage-config-field>
|
|
1318
|
-
|
|
1319
|
-
<stage-config-field label="Package" help-key="oracle.pipeline.config.bake.package">
|
|
1320
|
-
<input type="text" class="form-control input-sm" ng-model="stage.package" />
|
|
1321
|
-
</stage-config-field>
|
|
1322
|
-
|
|
1323
|
-
<stage-config-field label="Rebake" help-key="execution.forceRebake">
|
|
1324
|
-
<div class="checkbox" style="margin-bottom: 0">
|
|
1325
|
-
<label>
|
|
1326
|
-
<input type="checkbox" ng-model="stage.rebake" />
|
|
1327
|
-
Rebake image without regard to the status of any existing bake
|
|
1328
|
-
</label>
|
|
1329
|
-
</div>
|
|
1330
|
-
</stage-config-field>
|
|
1331
|
-
<div class="form-group">
|
|
1332
|
-
<div class="col-md-9 col-md-offset-1">
|
|
1333
|
-
<div class="checkbox">
|
|
1334
|
-
<label>
|
|
1335
|
-
<input type="checkbox" ng-model="stage.showAdvancedOptions" />
|
|
1336
|
-
<strong>Show Advanced Options</strong>
|
|
1337
|
-
</label>
|
|
1338
|
-
</div>
|
|
1339
|
-
</div>
|
|
1340
|
-
</div>
|
|
1341
|
-
<div ng-class="{collapse: stage.showAdvancedOptions !== true, 'collapse.in': stage.showAdvancedOptions === true}">
|
|
1342
|
-
<stage-config-field label="Template File Name" help-key="pipeline.config.bake.templateFileName">
|
|
1343
|
-
<input type="text" class="form-control input-sm" ng-model="stage.templateFileName" />
|
|
1344
|
-
</stage-config-field>
|
|
1345
|
-
<stage-config-field label="Var File Name" help-key="pipeline.config.bake.varFileName">
|
|
1346
|
-
<input type="text" class="form-control input-sm" ng-model="stage.varFileName" />
|
|
1347
|
-
</stage-config-field>
|
|
1348
|
-
<stage-config-field label="Extended Attributes" help-key="pipeline.config.bake.extendedAttributes">
|
|
1349
|
-
<table class="table table-condensed packed">
|
|
1350
|
-
<thead>
|
|
1351
|
-
<tr>
|
|
1352
|
-
<th style="width: 40%">Key</th>
|
|
1353
|
-
<th style="width: 60%">Value</th>
|
|
1354
|
-
<th class="text-right">Actions</th>
|
|
1355
|
-
</tr>
|
|
1356
|
-
</thead>
|
|
1357
|
-
<tbody>
|
|
1358
|
-
<tr ng-repeat="(key,value) in stage.extendedAttributes">
|
|
1359
|
-
<td>
|
|
1360
|
-
<strong class="small">{{key}}</strong>
|
|
1361
|
-
</td>
|
|
1362
|
-
<td>
|
|
1363
|
-
<input
|
|
1364
|
-
type="text"
|
|
1365
|
-
ng-model="stage.extendedAttributes[key]"
|
|
1366
|
-
value="{{value}}"
|
|
1367
|
-
class="form-control input-sm"
|
|
1368
|
-
/>
|
|
1369
|
-
</td>
|
|
1370
|
-
<td class="text-right">
|
|
1371
|
-
<a class="small" href ng-click="bakeStageCtrl.removeExtendedAttribute(key)">Remove</a>
|
|
1372
|
-
</td>
|
|
1373
|
-
</tr>
|
|
1374
|
-
</tbody>
|
|
1375
|
-
<tfoot>
|
|
1376
|
-
<tr>
|
|
1377
|
-
<td colspan="7">
|
|
1378
|
-
<button class="btn btn-block btn-sm add-new" ng-click="bakeStageCtrl.addExtendedAttribute()">
|
|
1379
|
-
<span class="glyphicon glyphicon-plus-sign"></span> Add Extended Attribute
|
|
1380
|
-
</button>
|
|
1381
|
-
</td>
|
|
1382
|
-
</tr>
|
|
1383
|
-
</tfoot>
|
|
1384
|
-
</table>
|
|
1385
|
-
</stage-config-field>
|
|
1386
|
-
<stage-config-field label="Upgrade" help-key="oracle.pipeline.config.bake.upgrade">
|
|
1387
|
-
<label class="checkbox-inline">
|
|
1388
|
-
<input type="checkbox" ng-model="stage.upgrade" />
|
|
1389
|
-
Perform a package manager upgrade before proceeding with the package installation
|
|
1390
|
-
</label>
|
|
1391
|
-
</stage-config-field>
|
|
1392
|
-
</div>
|
|
1393
|
-
</div>
|
|
1394
|
-
`);
|
|
1395
|
-
}]);
|
|
1396
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1397
|
-
templateCache.put("oracle/src/pipeline/stages/bake/bakeExecutionDetails.html", `<div ng-controller="oracleBakeExecutionDetailsCtrl">
|
|
1398
|
-
<execution-details-section-nav sections="configSections"></execution-details-section-nav>
|
|
1399
|
-
<div class="step-section-details" ng-if="detailsSection === 'bakeConfig'">
|
|
1400
|
-
<div class="row">
|
|
1401
|
-
<div class="col-md-6">
|
|
1402
|
-
<dl class="dl-narrow dl-horizontal">
|
|
1403
|
-
<dt>Provider</dt>
|
|
1404
|
-
<dd>oracle</dd>
|
|
1405
|
-
<dt>Image Name</dt>
|
|
1406
|
-
<dd>{{stage.context.amiName}}</dd>
|
|
1407
|
-
<dt ng-if="stage.context.package">Package</dt>
|
|
1408
|
-
<dd ng-if="stage.context.package">{{stage.context.package}}</dd>
|
|
1409
|
-
<dt ng-if="stage.context.accountName">Account</dt>
|
|
1410
|
-
<dd ng-if="stage.context.accountName">{{stage.context.accountName}}</dd>
|
|
1411
|
-
</dl>
|
|
1412
|
-
</div>
|
|
1413
|
-
<div class="col-md-6">
|
|
1414
|
-
<dl class="dl-narrow dl-horizontal">
|
|
1415
|
-
<dt>Base Image</dt>
|
|
1416
|
-
<dd>{{stage.context.baseOs}}</dd>
|
|
1417
|
-
<dt ng-if="roscoMode || execution.trigger.rebake || stage.context.rebake">Rebake</dt>
|
|
1418
|
-
<dd ng-if="roscoMode || execution.trigger.rebake || stage.context.rebake">
|
|
1419
|
-
{{execution.trigger.rebake || stage.context.rebake || false}}
|
|
1420
|
-
</dd>
|
|
1421
|
-
<dt ng-if="stage.context.templateFileName">Template</dt>
|
|
1422
|
-
<dd ng-if="stage.context.templateFileName">{{stage.context.templateFileName}}</dd>
|
|
1423
|
-
<dt ng-if="stage.context.varFileName">Var File</dt>
|
|
1424
|
-
<dd ng-if="stage.context.varFileName">{{stage.context.varFileName}}</dd>
|
|
1425
|
-
</dl>
|
|
1426
|
-
</div>
|
|
1427
|
-
</div>
|
|
1428
|
-
<stage-failure-message stage="stage" message="stage.failureMessage"></stage-failure-message>
|
|
1429
|
-
|
|
1430
|
-
<div class="row" ng-if="stage.context.region && stage.context.status.resourceId">
|
|
1431
|
-
<div class="col-md-12">
|
|
1432
|
-
<div class="alert alert-{{stage.isFailed ? 'danger' : 'info'}}">
|
|
1433
|
-
<div ng-if="stage.context.previouslyBaked">No changes detected; reused existing bake</div>
|
|
1434
|
-
<div ng-if="stage.context.imageName">
|
|
1435
|
-
<strong>Image:</strong>
|
|
1436
|
-
<div select-on-dbl-click>{{stage.context.imageName}}</div>
|
|
1437
|
-
</div>
|
|
1438
|
-
<a target="_blank" href="{{ bakeryDetailUrl(stage) }}"> View Bakery Details </a>
|
|
1439
|
-
</div>
|
|
1440
|
-
</div>
|
|
1441
|
-
</div>
|
|
1442
|
-
</div>
|
|
1443
|
-
<div class="step-section-details" ng-if="detailsSection === 'taskStatus'">
|
|
1444
|
-
<div class="row">
|
|
1445
|
-
<execution-step-details item="stage"></execution-step-details>
|
|
1446
|
-
</div>
|
|
1447
|
-
</div>
|
|
1448
|
-
</div>
|
|
1449
|
-
`);
|
|
1450
|
-
}]);
|
|
1451
|
-
|
|
1452
|
-
const ORACLE_PIPELINE_STAGES_DESTROYASG_DESTROYASGSTAGE = "spinnaker.oracle.pipeline.stage.destroyAsgStage";
|
|
1453
|
-
module(ORACLE_PIPELINE_STAGES_DESTROYASG_DESTROYASGSTAGE, []).config(function() {
|
|
1454
|
-
Registry.pipeline.registerStage({
|
|
1455
|
-
provides: "destroyServerGroup",
|
|
1456
|
-
cloudProvider: "oracle",
|
|
1457
|
-
templateUrl: "oracle/src/pipeline/stages/destroyAsg/destroyAsgStage.html",
|
|
1458
|
-
executionStepLabelUrl: "oracle/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html",
|
|
1459
|
-
validators: [
|
|
1460
|
-
{
|
|
1461
|
-
type: "targetImpedance",
|
|
1462
|
-
message: "This pipeline will attempt to destroy a server group without deploying a new version into the same cluster."
|
|
1463
|
-
},
|
|
1464
|
-
{ type: "requiredField", fieldName: "cluster" },
|
|
1465
|
-
{ type: "requiredField", fieldName: "target" },
|
|
1466
|
-
{ type: "requiredField", fieldName: "regions" },
|
|
1467
|
-
{ type: "requiredField", fieldName: "credentials", fieldLabel: "account" }
|
|
1468
|
-
]
|
|
1469
|
-
});
|
|
1470
|
-
}).controller("oracleDestroyAsgStageCtrl", [
|
|
1471
|
-
"$scope",
|
|
1472
|
-
function($scope) {
|
|
1473
|
-
const stage = $scope.stage;
|
|
1474
|
-
const provider = "oracle";
|
|
1475
|
-
$scope.targets = StageConstants.TARGET_LIST;
|
|
1476
|
-
stage.regions = stage.regions || [];
|
|
1477
|
-
stage.cloudProvider = provider;
|
|
1478
|
-
$scope.state = {
|
|
1479
|
-
accounts: false,
|
|
1480
|
-
regionsLoaded: false
|
|
1481
|
-
};
|
|
1482
|
-
init();
|
|
1483
|
-
function init() {
|
|
1484
|
-
AccountService.listAccounts(provider).then((accounts) => {
|
|
1485
|
-
$scope.accounts = accounts;
|
|
1486
|
-
$scope.state.accounts = true;
|
|
1487
|
-
});
|
|
1488
|
-
if (!stage.credentials && $scope.application.defaultCredentials.oracle) {
|
|
1489
|
-
stage.credentials = $scope.application.defaultCredentials.oracle;
|
|
1490
|
-
}
|
|
1491
|
-
if (!stage.regions.length && $scope.application.defaultRegions.oracle) {
|
|
1492
|
-
stage.regions.push($scope.application.defaultRegions.oracle);
|
|
1493
|
-
}
|
|
1494
|
-
if (!stage.target) {
|
|
1495
|
-
stage.target = $scope.targets[0].val;
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
]);
|
|
1500
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1501
|
-
templateCache.put("oracle/src/pipeline/stages/destroyAsg/destroyAsgStage.html", `<div ng-controller="oracleDestroyAsgStageCtrl as destroyAsgStageCtrl" class="form-horizontal">
|
|
1502
|
-
<div ng-if="!pipeline.strategy">
|
|
1503
|
-
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
1504
|
-
</account-region-cluster-selector>
|
|
1505
|
-
</div>
|
|
1506
|
-
<stage-config-field label="Target">
|
|
1507
|
-
<target-select model="stage" options="targets"></target-select>
|
|
1508
|
-
</stage-config-field>
|
|
1509
|
-
</div>
|
|
1510
|
-
`);
|
|
1511
|
-
}]);
|
|
1512
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1513
|
-
templateCache.put("oracle/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html", `<span class="task-label"> Destroy Server Group: {{step.context.serverGroupName}} ({{step.context.region}}) </span>
|
|
1514
|
-
`);
|
|
1515
|
-
}]);
|
|
1516
|
-
|
|
1517
|
-
const ORACLE_PIPELINE_STAGES_DISABLEASG_DISABLEASGSTAGE = "spinnaker.oracle.pipeline.stage.disableAsgStage";
|
|
1518
|
-
module(ORACLE_PIPELINE_STAGES_DISABLEASG_DISABLEASGSTAGE, []).config(function() {
|
|
1519
|
-
Registry.pipeline.registerStage({
|
|
1520
|
-
provides: "disableServerGroup",
|
|
1521
|
-
cloudProvider: "oracle",
|
|
1522
|
-
templateUrl: "oracle/src/pipeline/stages/disableAsg/disableAsgStage.html",
|
|
1523
|
-
executionStepLabelUrl: "oracle/src/pipeline/stages/disableAsg/disableAsgStepLabel.html",
|
|
1524
|
-
validators: [
|
|
1525
|
-
{
|
|
1526
|
-
type: "targetImpedance",
|
|
1527
|
-
message: "This pipeline will attempt to disable a server group without deploying a new version into the same cluster."
|
|
1528
|
-
},
|
|
1529
|
-
{ type: "requiredField", fieldName: "cluster" },
|
|
1530
|
-
{ type: "requiredField", fieldName: "target" },
|
|
1531
|
-
{ type: "requiredField", fieldName: "regions" },
|
|
1532
|
-
{ type: "requiredField", fieldName: "credentials", fieldLabel: "account" }
|
|
1533
|
-
]
|
|
1534
|
-
});
|
|
1535
|
-
}).controller("oracleDisableAsgStageCtrl", [
|
|
1536
|
-
"$scope",
|
|
1537
|
-
function($scope) {
|
|
1538
|
-
const stage = $scope.stage;
|
|
1539
|
-
const provider = "oracle";
|
|
1540
|
-
$scope.state = {
|
|
1541
|
-
accounts: false,
|
|
1542
|
-
regionsLoaded: false
|
|
1543
|
-
};
|
|
1544
|
-
AccountService.listAccounts(provider).then((accounts) => {
|
|
1545
|
-
$scope.accounts = accounts;
|
|
1546
|
-
$scope.state.accounts = true;
|
|
1547
|
-
});
|
|
1548
|
-
$scope.targets = StageConstants.TARGET_LIST;
|
|
1549
|
-
stage.regions = stage.regions || [];
|
|
1550
|
-
stage.cloudProvider = provider;
|
|
1551
|
-
if (!stage.credentials && $scope.application.defaultCredentials.oracle) {
|
|
1552
|
-
stage.credentials = $scope.application.defaultCredentials.oracle;
|
|
1553
|
-
}
|
|
1554
|
-
if (!stage.regions.length && $scope.application.defaultRegions.gce) {
|
|
1555
|
-
stage.regions.push($scope.application.defaultRegions.oracle);
|
|
1556
|
-
}
|
|
1557
|
-
if (!stage.target) {
|
|
1558
|
-
stage.target = $scope.targets[0].val;
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
]);
|
|
1562
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1563
|
-
templateCache.put("oracle/src/pipeline/stages/disableAsg/disableAsgStage.html", `<div ng-controller="oracleDisableAsgStageCtrl as disableAsgStageCtrl" class="form-horizontal">
|
|
1564
|
-
<div ng-if="!pipeline.strategy">
|
|
1565
|
-
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
1566
|
-
</account-region-cluster-selector>
|
|
1567
|
-
</div>
|
|
1568
|
-
<stage-config-field label="Target">
|
|
1569
|
-
<target-select model="stage" options="targets"></target-select>
|
|
1570
|
-
</stage-config-field>
|
|
1571
|
-
<stage-platform-health-override application="application" stage="stage" platform-health-type="'Oracle'">
|
|
1572
|
-
</stage-platform-health-override>
|
|
1573
|
-
</div>
|
|
1574
|
-
`);
|
|
1575
|
-
}]);
|
|
1576
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1577
|
-
templateCache.put("oracle/src/pipeline/stages/disableAsg/disableAsgStepLabel.html", `<span class="task-label"> Disable Server Group: {{step.context.serverGroupName}} ({{step.context.region}}) </span>
|
|
1578
|
-
`);
|
|
1579
|
-
}]);
|
|
1580
|
-
|
|
1581
|
-
const ORACLE_PIPELINE_STAGES_FINDAMI_FINDAMISTAGE = "spinnaker.oracle.pipeline.stage.findAmiStage";
|
|
1582
|
-
angular.module(ORACLE_PIPELINE_STAGES_FINDAMI_FINDAMISTAGE, []).config(function() {
|
|
1583
|
-
Registry.pipeline.registerStage({
|
|
1584
|
-
provides: "findImage",
|
|
1585
|
-
cloudProvider: "oracle",
|
|
1586
|
-
templateUrl: "oracle/src/pipeline/stages/findAmi/findAmiStage.html",
|
|
1587
|
-
validators: [
|
|
1588
|
-
{ type: "requiredField", fieldName: "cluster" },
|
|
1589
|
-
{ type: "requiredField", fieldName: "selectionStrategy", fieldLabel: "Server Group Selection" },
|
|
1590
|
-
{ type: "requiredField", fieldName: "regions" },
|
|
1591
|
-
{ type: "requiredField", fieldName: "credentials" }
|
|
1592
|
-
]
|
|
1593
|
-
});
|
|
1594
|
-
}).controller("oracleFindAmiStageCtrl", [
|
|
1595
|
-
"$scope",
|
|
1596
|
-
($scope) => {
|
|
1597
|
-
const provider = "oracle";
|
|
1598
|
-
const stage = $scope.stage;
|
|
1599
|
-
$scope.state = {
|
|
1600
|
-
accounts: false,
|
|
1601
|
-
regionsLoaded: false
|
|
1602
|
-
};
|
|
1603
|
-
AccountService.listAccounts(provider).then((accounts) => {
|
|
1604
|
-
$scope.accounts = accounts;
|
|
1605
|
-
$scope.state.accounts = true;
|
|
1606
|
-
});
|
|
1607
|
-
$scope.selectionStrategies = [
|
|
1608
|
-
{
|
|
1609
|
-
label: "Largest",
|
|
1610
|
-
val: "LARGEST",
|
|
1611
|
-
description: "When multiple server groups exist, prefer the server group with the most instances"
|
|
1612
|
-
},
|
|
1613
|
-
{
|
|
1614
|
-
label: "Newest",
|
|
1615
|
-
val: "NEWEST",
|
|
1616
|
-
description: "When multiple server groups exist, prefer the newest"
|
|
1617
|
-
},
|
|
1618
|
-
{
|
|
1619
|
-
label: "Oldest",
|
|
1620
|
-
val: "OLDEST",
|
|
1621
|
-
description: "When multiple server groups exist, prefer the oldest"
|
|
1622
|
-
},
|
|
1623
|
-
{
|
|
1624
|
-
label: "Fail",
|
|
1625
|
-
val: "FAIL",
|
|
1626
|
-
description: "When multiple server groups exist, fail"
|
|
1627
|
-
}
|
|
1628
|
-
];
|
|
1629
|
-
stage.regions = stage.regions || [];
|
|
1630
|
-
stage.cloudProvider = provider;
|
|
1631
|
-
stage.selectionStrategy = stage.selectionStrategy || $scope.selectionStrategies[0].val;
|
|
1632
|
-
if (angular.isUndefined(stage.onlyEnabled)) {
|
|
1633
|
-
stage.onlyEnabled = true;
|
|
1634
|
-
}
|
|
1635
|
-
if (!stage.credentials && $scope.application.defaultCredentials.oracle) {
|
|
1636
|
-
stage.credentials = $scope.application.defaultCredentials.oracle;
|
|
1637
|
-
}
|
|
1638
|
-
if (!stage.regions.length && $scope.application.defaultRegions.oracle) {
|
|
1639
|
-
stage.regions.push($scope.application.defaultRegions.oracle);
|
|
1640
|
-
}
|
|
1641
|
-
$scope.$watch("stage.credentials", $scope.accountUpdated);
|
|
1642
|
-
}
|
|
1643
|
-
]);
|
|
1644
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1645
|
-
templateCache.put("oracle/src/pipeline/stages/findAmi/findAmiStage.html", `<div ng-controller="oracleFindAmiStageCtrl as findAmiCtrl" class="form-horizontal">
|
|
1646
|
-
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
1647
|
-
</account-region-cluster-selector>
|
|
1648
|
-
|
|
1649
|
-
<stage-config-field label="Server Group Selection">
|
|
1650
|
-
<ui-select ng-model="stage.selectionStrategy" class="form-control input-sm">
|
|
1651
|
-
<ui-select-match placeholder="None">{{$select.selected.label}}</ui-select-match>
|
|
1652
|
-
<ui-select-choices repeat="strategy.val as strategy in selectionStrategies | filter: $select.search">
|
|
1653
|
-
<strong ng-bind-html="strategy.label | highlight: $select.search"></strong>
|
|
1654
|
-
<div ng-bind-html="strategy.description"></div>
|
|
1655
|
-
</ui-select-choices>
|
|
1656
|
-
</ui-select>
|
|
1657
|
-
</stage-config-field>
|
|
1658
|
-
<stage-config-field label="Server Group Filters">
|
|
1659
|
-
<label class="checkbox-inline">
|
|
1660
|
-
<input type="checkbox" ng-model="stage.onlyEnabled" />
|
|
1661
|
-
Only consider enabled Server Groups
|
|
1662
|
-
</label>
|
|
1663
|
-
</stage-config-field>
|
|
1664
|
-
</div>
|
|
1665
|
-
`);
|
|
1666
|
-
}]);
|
|
1667
|
-
|
|
1668
|
-
const ORACLE_PIPELINE_STAGES_FINDIMAGEFROMTAGS_ORACLEFINDIMAGEFROMTAGSSTAGE = "spinnaker.oracle.pipeline.stage.findImageFromTagsStage";
|
|
1669
|
-
module(ORACLE_PIPELINE_STAGES_FINDIMAGEFROMTAGS_ORACLEFINDIMAGEFROMTAGSSTAGE, []).config(function() {
|
|
1670
|
-
Registry.pipeline.registerStage({
|
|
1671
|
-
provides: "findImageFromTags",
|
|
1672
|
-
cloudProvider: "oracle",
|
|
1673
|
-
templateUrl: "oracle/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html",
|
|
1674
|
-
executionDetailsUrl: "oracle/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html",
|
|
1675
|
-
executionConfigSections: ["findImageConfig", "taskStatus"],
|
|
1676
|
-
validators: [
|
|
1677
|
-
{ type: "requiredField", fieldName: "regions" },
|
|
1678
|
-
{ type: "requiredField", fieldName: "packageName" }
|
|
1679
|
-
]
|
|
1680
|
-
});
|
|
1681
|
-
}).controller("oracleFindImageFromTagsStageCtrl", [
|
|
1682
|
-
"$scope",
|
|
1683
|
-
function($scope) {
|
|
1684
|
-
$scope.stage.packageName = $scope.stage.packageName || "*";
|
|
1685
|
-
$scope.stage.tags = $scope.stage.tags || {};
|
|
1686
|
-
$scope.stage.regions = $scope.stage.regions || [];
|
|
1687
|
-
$scope.stage.cloudProvider = $scope.stage.cloudProvider || "oracle";
|
|
1688
|
-
BakeryReader.getRegions("oracle").then(function(regions) {
|
|
1689
|
-
$scope.regions = regions;
|
|
1690
|
-
});
|
|
1691
|
-
}
|
|
1692
|
-
]);
|
|
1693
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1694
|
-
templateCache.put("oracle/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html", `<div ng-controller="oracleFindImageFromTagsStageCtrl as findImageFromTagsCtrl" class="form-horizontal">
|
|
1695
|
-
<stage-config-field label="Regions">
|
|
1696
|
-
<checklist items="regions" model="stage.regions" inline="true" include-select-all-button="true"></checklist>
|
|
1697
|
-
</stage-config-field>
|
|
1698
|
-
<stage-config-field label="Pattern">
|
|
1699
|
-
<map-editor model="stage.packageName" allow-empty="true"></map-editor>
|
|
1700
|
-
</stage-config-field>
|
|
1701
|
-
<stage-config-field label="Tags">
|
|
1702
|
-
<map-editor model="stage.tags" allow-empty="true"></map-editor>
|
|
1703
|
-
</stage-config-field>
|
|
1704
|
-
</div>
|
|
1705
|
-
`);
|
|
1706
|
-
}]);
|
|
1707
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1708
|
-
templateCache.put("oracle/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html", `<div ng-controller="BaseExecutionDetailsCtrl">
|
|
1709
|
-
<execution-details-section-nav sections="configSections"></execution-details-section-nav>
|
|
1710
|
-
<div class="step-section-details" ng-if="detailsSection === 'findImageConfig'">
|
|
1711
|
-
<div class="row">
|
|
1712
|
-
<div class="col-md-12">
|
|
1713
|
-
<dl class="dl-narrow dl-horizontal">
|
|
1714
|
-
<dt if-multiple-providers>Provider</dt>
|
|
1715
|
-
<dd if-multiple-providers>Oracle</dd>
|
|
1716
|
-
<dt>Regions</dt>
|
|
1717
|
-
<dd>{{stage.context.regions.join(', ')}}</dd>
|
|
1718
|
-
<dt>Name</dt>
|
|
1719
|
-
<dd>{{stage.context.packageName}}</dd>
|
|
1720
|
-
<dt>Tags</dt>
|
|
1721
|
-
<dd>
|
|
1722
|
-
<span ng-repeat="(key, val) in stage.context.tags"> {{key}}:{{val}}{{$last ? '' : ', '}} </span>
|
|
1723
|
-
</dd>
|
|
1724
|
-
</dl>
|
|
1725
|
-
</div>
|
|
1726
|
-
</div>
|
|
1727
|
-
<stage-failure-message stage="stage" message="stage.failureMessage"></stage-failure-message>
|
|
1728
|
-
|
|
1729
|
-
<div class="row" ng-if="stage.context.amiDetails">
|
|
1730
|
-
<div class="col-md-12">
|
|
1731
|
-
<div class="well alert alert-info">
|
|
1732
|
-
<h4>Results</h4>
|
|
1733
|
-
<dl ng-repeat="image in stage.context.amiDetails" class="dl-narrow dl-horizontal">
|
|
1734
|
-
<dt>Region</dt>
|
|
1735
|
-
<dd>{{image.region}}</dd>
|
|
1736
|
-
<dt>Image ID</dt>
|
|
1737
|
-
<dd>{{image.imageId}}</dd>
|
|
1738
|
-
<dt>Name</dt>
|
|
1739
|
-
<dd>{{image.imageName}}</dd>
|
|
1740
|
-
</dl>
|
|
1741
|
-
</div>
|
|
1742
|
-
</div>
|
|
1743
|
-
</div>
|
|
1744
|
-
</div>
|
|
1745
|
-
|
|
1746
|
-
<div class="step-section-details" ng-if="detailsSection === 'taskStatus'">
|
|
1747
|
-
<div class="row">
|
|
1748
|
-
<execution-step-details item="stage"></execution-step-details>
|
|
1749
|
-
</div>
|
|
1750
|
-
</div>
|
|
1751
|
-
</div>
|
|
1752
|
-
`);
|
|
1753
|
-
}]);
|
|
1754
|
-
|
|
1755
|
-
const ORACLE_PIPELINE_STAGES_RESIZEASG_RESIZEASGSTAGE = "spinnaker.oracle.pipeline.stage.resizeAsgStage";
|
|
1756
|
-
module(ORACLE_PIPELINE_STAGES_RESIZEASG_RESIZEASGSTAGE, []).config(function() {
|
|
1757
|
-
Registry.pipeline.registerStage({
|
|
1758
|
-
provides: "resizeServerGroup",
|
|
1759
|
-
cloudProvider: "oracle",
|
|
1760
|
-
templateUrl: "oracle/src/pipeline/stages/resizeAsg/resizeAsgStage.html",
|
|
1761
|
-
executionStepLabelUrl: "oracle/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html",
|
|
1762
|
-
validators: [
|
|
1763
|
-
{
|
|
1764
|
-
type: "targetImpedance",
|
|
1765
|
-
message: "This pipeline will attempt to resize a server group without deploying a new version into the same cluster."
|
|
1766
|
-
},
|
|
1767
|
-
{ type: "requiredField", fieldName: "cluster" },
|
|
1768
|
-
{ type: "requiredField", fieldName: "target" },
|
|
1769
|
-
{ type: "requiredField", fieldName: "action" },
|
|
1770
|
-
{ type: "requiredField", fieldName: "regions" },
|
|
1771
|
-
{ type: "requiredField", fieldName: "credentials", fieldLabel: "account" }
|
|
1772
|
-
]
|
|
1773
|
-
});
|
|
1774
|
-
}).controller("oracleResizeAsgStageCtrl", [
|
|
1775
|
-
"$scope",
|
|
1776
|
-
function($scope) {
|
|
1777
|
-
const ctrl = this;
|
|
1778
|
-
const provider = "oracle";
|
|
1779
|
-
const stage = $scope.stage;
|
|
1780
|
-
$scope.viewState = {
|
|
1781
|
-
accountsLoaded: false,
|
|
1782
|
-
regionsLoaded: false
|
|
1783
|
-
};
|
|
1784
|
-
AccountService.listAccounts(provider).then(function(accounts) {
|
|
1785
|
-
$scope.accounts = accounts;
|
|
1786
|
-
$scope.viewState.accountsLoaded = true;
|
|
1787
|
-
});
|
|
1788
|
-
$scope.resizeTargets = StageConstants.TARGET_LIST;
|
|
1789
|
-
$scope.scaleActions = [
|
|
1790
|
-
{ label: "Scale Up", val: "scale_up" },
|
|
1791
|
-
{ label: "Scale Down", val: "scale_down" },
|
|
1792
|
-
{ label: "Scale to Cluster Size", val: "scale_to_cluster" },
|
|
1793
|
-
{ label: "Scale to Exact Size", val: "scale_exact" }
|
|
1794
|
-
];
|
|
1795
|
-
$scope.resizeTypes = [
|
|
1796
|
-
{ label: "Percentage", val: "pct" },
|
|
1797
|
-
{ label: "Incremental", val: "incr" }
|
|
1798
|
-
];
|
|
1799
|
-
stage.capacity = stage.capacity || {};
|
|
1800
|
-
stage.regions = stage.regions || [];
|
|
1801
|
-
stage.target = stage.target || $scope.resizeTargets[0].val;
|
|
1802
|
-
stage.action = stage.action || $scope.scaleActions[0].val;
|
|
1803
|
-
stage.resizeType = stage.resizeType || $scope.resizeTypes[0].val;
|
|
1804
|
-
if (!stage.action && stage.resizeType === "exact") {
|
|
1805
|
-
stage.action = "scale_exact";
|
|
1806
|
-
}
|
|
1807
|
-
stage.cloudProvider = provider;
|
|
1808
|
-
stage.cloudProviderType = provider;
|
|
1809
|
-
if (!stage.credentials && $scope.application.defaultCredentials.gce) {
|
|
1810
|
-
stage.credentials = $scope.application.defaultCredentials.gce;
|
|
1811
|
-
}
|
|
1812
|
-
if (!stage.regions.length && $scope.application.defaultRegions.gce) {
|
|
1813
|
-
stage.regions.push($scope.application.defaultRegions.gce);
|
|
1814
|
-
}
|
|
1815
|
-
ctrl.updateResizeType = function() {
|
|
1816
|
-
if (stage.action === "scale_exact") {
|
|
1817
|
-
stage.resizeType = "exact";
|
|
1818
|
-
delete stage.scalePct;
|
|
1819
|
-
delete stage.scaleNum;
|
|
1820
|
-
} else {
|
|
1821
|
-
stage.capacity = {};
|
|
1822
|
-
if (stage.resizeType === "pct") {
|
|
1823
|
-
delete stage.scaleNum;
|
|
1824
|
-
} else {
|
|
1825
|
-
stage.resizeType = "incr";
|
|
1826
|
-
delete stage.scalePct;
|
|
1827
|
-
stage.scaleNum = stage.scaleNum || 0;
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
};
|
|
1831
|
-
}
|
|
1832
|
-
]);
|
|
1833
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1834
|
-
templateCache.put("oracle/src/pipeline/stages/resizeAsg/resizeAsgStage.html", `<div ng-controller="oracleResizeAsgStageCtrl as resizeAsgStageCtrl">
|
|
1835
|
-
<div ng-if="!pipeline.strategy">
|
|
1836
|
-
<div ng-if="viewState.loading" class="horizontal center middle">
|
|
1837
|
-
<loading-spinner size="'small'"></loading-spinner>
|
|
1838
|
-
</div>
|
|
1839
|
-
<div ng-if="!viewState.loading">
|
|
1840
|
-
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
1841
|
-
</account-region-cluster-selector>
|
|
1842
|
-
</div>
|
|
1843
|
-
</div>
|
|
1844
|
-
<stage-config-field label="Target">
|
|
1845
|
-
<target-select model="stage" options="resizeTargets"></target-select>
|
|
1846
|
-
</stage-config-field>
|
|
1847
|
-
<stage-config-field label="Action" help-key="pipeline.config.resizeAsg.action">
|
|
1848
|
-
<select
|
|
1849
|
-
class="form-control input-sm"
|
|
1850
|
-
required
|
|
1851
|
-
ng-model="stage.action"
|
|
1852
|
-
ng-change="resizeAsgStageCtrl.updateResizeType()"
|
|
1853
|
-
ng-options="a.val as a.label for a in scaleActions"
|
|
1854
|
-
>
|
|
1855
|
-
<option>Select an action...</option>
|
|
1856
|
-
</select>
|
|
1857
|
-
</stage-config-field>
|
|
1858
|
-
<div ng-if="stage.action !== 'scale_exact'">
|
|
1859
|
-
<stage-config-field label="{{stage.action === 'scale_to_cluster' ? 'Additional Capacity' : 'Type'}}">
|
|
1860
|
-
<select
|
|
1861
|
-
class="form-control input-sm"
|
|
1862
|
-
required
|
|
1863
|
-
ng-model="stage.resizeType"
|
|
1864
|
-
ng-change="resizeAsgStageCtrl.updateResizeType()"
|
|
1865
|
-
ng-options="t.val as t.label for t in resizeTypes"
|
|
1866
|
-
>
|
|
1867
|
-
<option>Select an action...</option>
|
|
1868
|
-
</select>
|
|
1869
|
-
</stage-config-field>
|
|
1870
|
-
<div class="form-group" ng-if="stage.resizeType === 'pct'">
|
|
1871
|
-
<div class="col-md-9 col-md-offset-3">
|
|
1872
|
-
<label class="col-md-2 sm-label-right" style="margin-left: 0; padding-left: 0">Resize Percentage</label>
|
|
1873
|
-
<div class="col-md-2">
|
|
1874
|
-
<input type="number" min="0" ng-model="stage.scalePct" class="form-control input-sm" />
|
|
1875
|
-
</div>
|
|
1876
|
-
</div>
|
|
1877
|
-
<div class="col-md-9 col-md-offset-3">
|
|
1878
|
-
<em class="subinput-note"
|
|
1879
|
-
>This is the percentage by which the target server group's capacity will be increased</em
|
|
1880
|
-
>
|
|
1881
|
-
</div>
|
|
1882
|
-
</div>
|
|
1883
|
-
<div class="form-group" ng-if="stage.resizeType === 'incr'">
|
|
1884
|
-
<div class="col-md-9 col-md-offset-3">
|
|
1885
|
-
<label class="col-md-2 sm-label-right" style="margin-left: 0; padding-left: 0">Resize-by Amount</label>
|
|
1886
|
-
<div class="col-md-2">
|
|
1887
|
-
<input type="number" min="0" ng-model="stage.scaleNum" class="form-control input-sm" />
|
|
1888
|
-
</div>
|
|
1889
|
-
</div>
|
|
1890
|
-
<div class="col-md-9 col-md-offset-3">
|
|
1891
|
-
<em class="subinput-note"
|
|
1892
|
-
>This is the exact amount by which the target server group's capacity will be increased</em
|
|
1893
|
-
>
|
|
1894
|
-
</div>
|
|
1895
|
-
</div>
|
|
1896
|
-
</div>
|
|
1897
|
-
<div class="form-group" ng-if="stage.action === 'scale_exact'">
|
|
1898
|
-
<div class="col-md-9 col-md-offset-3 small">
|
|
1899
|
-
<div class="col-md-9">
|
|
1900
|
-
<div class="col-md-3 col-md-offset-3">Min</div>
|
|
1901
|
-
<div class="col-md-3">Max</div>
|
|
1902
|
-
<div class="col-md-3">Desired</div>
|
|
1903
|
-
</div>
|
|
1904
|
-
</div>
|
|
1905
|
-
<div class="col-md-9 col-md-offset-3">
|
|
1906
|
-
<label class="col-md-2 sm-label-right small" style="margin-left: 0; padding-left: 0">Match Capacity</label>
|
|
1907
|
-
<div class="col-md-9">
|
|
1908
|
-
<div class="col-md-3">
|
|
1909
|
-
<input type="number" ng-model="stage.capacity.min" class="form-control input-sm" />
|
|
1910
|
-
</div>
|
|
1911
|
-
<div class="col-md-3">
|
|
1912
|
-
<input type="number" ng-model="stage.capacity.max" class="form-control input-sm" />
|
|
1913
|
-
</div>
|
|
1914
|
-
<div class="col-md-3">
|
|
1915
|
-
<input type="number" ng-model="stage.capacity.desired" class="form-control input-sm" />
|
|
1916
|
-
</div>
|
|
1917
|
-
</div>
|
|
1918
|
-
</div>
|
|
1919
|
-
</div>
|
|
1920
|
-
<stage-platform-health-override application="application" stage="stage" platform-health-type="'Oracle'">
|
|
1921
|
-
</stage-platform-health-override>
|
|
1922
|
-
</div>
|
|
1923
|
-
`);
|
|
1924
|
-
}]);
|
|
1925
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1926
|
-
templateCache.put("oracle/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html", `<span class="task-label"> Resize Server Group: {{step.context.serverGroupName}} ({{step.context.region}}) </span>
|
|
1927
|
-
`);
|
|
1928
|
-
}]);
|
|
1929
|
-
|
|
1930
|
-
const ORACLE_PIPELINE_STAGES_SCALEDOWNCLUSTER_SCALEDOWNCLUSTERSTAGE = "spinnaker.oracle.pipeline.stage.scaleDownClusterStage";
|
|
1931
|
-
module(ORACLE_PIPELINE_STAGES_SCALEDOWNCLUSTER_SCALEDOWNCLUSTERSTAGE, []).config(function() {
|
|
1932
|
-
Registry.pipeline.registerStage({
|
|
1933
|
-
provides: "scaleDownCluster",
|
|
1934
|
-
cloudProvider: "oracle",
|
|
1935
|
-
templateUrl: "oracle/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html",
|
|
1936
|
-
validators: [
|
|
1937
|
-
{ type: "requiredField", fieldName: "cluster" },
|
|
1938
|
-
{
|
|
1939
|
-
type: "requiredField",
|
|
1940
|
-
fieldName: "remainingFullSizeServerGroups",
|
|
1941
|
-
fieldLabel: "Keep [X] full size Server Groups"
|
|
1942
|
-
},
|
|
1943
|
-
{ type: "requiredField", fieldName: "regions" },
|
|
1944
|
-
{ type: "requiredField", fieldName: "credentials", fieldLabel: "account" }
|
|
1945
|
-
],
|
|
1946
|
-
strategy: true
|
|
1947
|
-
});
|
|
1948
|
-
}).controller("oracleScaleDownClusterStageCtrl", [
|
|
1949
|
-
"$scope",
|
|
1950
|
-
function($scope) {
|
|
1951
|
-
const stage = $scope.stage;
|
|
1952
|
-
const provider = "oracle";
|
|
1953
|
-
$scope.state = {
|
|
1954
|
-
accounts: false,
|
|
1955
|
-
regionsLoaded: false
|
|
1956
|
-
};
|
|
1957
|
-
AccountService.listAccounts(provider).then(function(accounts) {
|
|
1958
|
-
$scope.accounts = accounts;
|
|
1959
|
-
$scope.state.accounts = true;
|
|
1960
|
-
});
|
|
1961
|
-
stage.regions = stage.regions || [];
|
|
1962
|
-
stage.cloudProvider = provider;
|
|
1963
|
-
if (!stage.credentials && $scope.application.defaultCredentials.gce) {
|
|
1964
|
-
stage.credentials = $scope.application.defaultCredentials.gce;
|
|
1965
|
-
}
|
|
1966
|
-
if (!stage.regions.length && $scope.application.defaultRegions.gce) {
|
|
1967
|
-
stage.regions.push($scope.application.defaultRegions.gce);
|
|
1968
|
-
}
|
|
1969
|
-
if (stage.remainingFullSizeServerGroups === void 0) {
|
|
1970
|
-
stage.remainingFullSizeServerGroups = 1;
|
|
1971
|
-
}
|
|
1972
|
-
if (stage.allowScaleDownActive === void 0) {
|
|
1973
|
-
stage.allowScaleDownActive = false;
|
|
1974
|
-
}
|
|
1975
|
-
if (stage.preferLargerOverNewer === void 0) {
|
|
1976
|
-
stage.preferLargerOverNewer = "false";
|
|
1977
|
-
}
|
|
1978
|
-
this.pluralize = function(str, val) {
|
|
1979
|
-
return val === 1 ? str : str + "s";
|
|
1980
|
-
};
|
|
1981
|
-
stage.preferLargerOverNewer = stage.preferLargerOverNewer.toString();
|
|
1982
|
-
}
|
|
1983
|
-
]);
|
|
1984
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
1985
|
-
templateCache.put("oracle/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html", `<div ng-controller="oracleScaleDownClusterStageCtrl as scaleDownClusterStageCtrl" class="form-horizontal">
|
|
1986
|
-
<div ng-if="!pipeline.strategy">
|
|
1987
|
-
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
1988
|
-
</account-region-cluster-selector>
|
|
1989
|
-
</div>
|
|
1990
|
-
<stage-config-field label="Scale Down Options">
|
|
1991
|
-
<div class="form-inline">
|
|
1992
|
-
<p>
|
|
1993
|
-
Keep the
|
|
1994
|
-
<input
|
|
1995
|
-
type="number"
|
|
1996
|
-
min="0"
|
|
1997
|
-
required
|
|
1998
|
-
ng-model="stage.remainingFullSizeServerGroups"
|
|
1999
|
-
class="form-control input-sm"
|
|
2000
|
-
style="width: 50px"
|
|
2001
|
-
/>
|
|
2002
|
-
<select class="form-control input-sm" ng-model="stage.preferLargerOverNewer" style="width: 100px">
|
|
2003
|
-
<option value="true">largest</option>
|
|
2004
|
-
<option value="false">newest</option>
|
|
2005
|
-
</select>
|
|
2006
|
-
{{scaleDownClusterStageCtrl.pluralize('server group', stage.remainingFullSizeServerGroups)}} at current size.
|
|
2007
|
-
</p>
|
|
2008
|
-
<p>The remaining server groups will be scaled down to zero instances.</p>
|
|
2009
|
-
</div>
|
|
2010
|
-
</stage-config-field>
|
|
2011
|
-
<div class="form-group">
|
|
2012
|
-
<div class="col-md-offset-3 col-md-6 checkbox">
|
|
2013
|
-
<label>
|
|
2014
|
-
<input type="checkbox" ng-model="stage.allowScaleDownActive" />
|
|
2015
|
-
Allow scale down of active server groups
|
|
2016
|
-
</label>
|
|
2017
|
-
</div>
|
|
2018
|
-
</div>
|
|
2019
|
-
</div>
|
|
2020
|
-
`);
|
|
2021
|
-
}]);
|
|
2022
|
-
|
|
2023
|
-
const ORACLE_PIPELINE_STAGES_SHRINKCLUSTER_SHRINKCLUSTERSTAGE = "spinnaker.core.pipeline.stage.oracle.shrinkClusterStage";
|
|
2024
|
-
module(ORACLE_PIPELINE_STAGES_SHRINKCLUSTER_SHRINKCLUSTERSTAGE, []).config(function() {
|
|
2025
|
-
Registry.pipeline.registerStage({
|
|
2026
|
-
provides: "shrinkCluster",
|
|
2027
|
-
cloudProvider: "oracle",
|
|
2028
|
-
templateUrl: "oracle/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html",
|
|
2029
|
-
validators: [
|
|
2030
|
-
{ type: "requiredField", fieldName: "cluster" },
|
|
2031
|
-
{ type: "requiredField", fieldName: "shrinkToSize", fieldLabel: "shrink to [X] Server Groups" },
|
|
2032
|
-
{ type: "requiredField", fieldName: "regions" },
|
|
2033
|
-
{ type: "requiredField", fieldName: "credentials", fieldLabel: "account" }
|
|
2034
|
-
]
|
|
2035
|
-
});
|
|
2036
|
-
}).controller("oracleShrinkClusterStageCtrl", [
|
|
2037
|
-
"$scope",
|
|
2038
|
-
function($scope) {
|
|
2039
|
-
const ctrl = this;
|
|
2040
|
-
const stage = $scope.stage;
|
|
2041
|
-
$scope.state = {
|
|
2042
|
-
accounts: false,
|
|
2043
|
-
regionsLoaded: false
|
|
2044
|
-
};
|
|
2045
|
-
AccountService.listAccounts("oracle").then(function(accounts) {
|
|
2046
|
-
$scope.accounts = accounts;
|
|
2047
|
-
$scope.state.accounts = true;
|
|
2048
|
-
});
|
|
2049
|
-
stage.regions = stage.regions || [];
|
|
2050
|
-
stage.cloudProvider = "oracle";
|
|
2051
|
-
if (!stage.credentials && $scope.application.defaultCredentials.oracle) {
|
|
2052
|
-
stage.credentials = $scope.application.defaultCredentials.oracle;
|
|
2053
|
-
}
|
|
2054
|
-
if (!stage.regions.length && $scope.application.defaultRegions.oracle) {
|
|
2055
|
-
stage.regions.push($scope.application.defaultRegions.oracle);
|
|
2056
|
-
}
|
|
2057
|
-
if (stage.shrinkToSize === void 0) {
|
|
2058
|
-
stage.shrinkToSize = 1;
|
|
2059
|
-
}
|
|
2060
|
-
if (stage.allowDeleteActive === void 0) {
|
|
2061
|
-
stage.allowDeleteActive = false;
|
|
2062
|
-
}
|
|
2063
|
-
ctrl.pluralize = function(str, val) {
|
|
2064
|
-
return val === 1 ? str : str + "s";
|
|
2065
|
-
};
|
|
2066
|
-
if (stage.retainLargerOverNewer === void 0) {
|
|
2067
|
-
stage.retainLargerOverNewer = "false";
|
|
2068
|
-
}
|
|
2069
|
-
stage.retainLargerOverNewer = stage.retainLargerOverNewer.toString();
|
|
2070
|
-
}
|
|
2071
|
-
]);
|
|
2072
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2073
|
-
templateCache.put("oracle/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html", `<div ng-controller="oracleShrinkClusterStageCtrl as shrinkClusterStageCtrl" class="form-horizontal">
|
|
2074
|
-
<div ng-if="!pipeline.strategy">
|
|
2075
|
-
<account-region-cluster-selector application="application" component="stage" accounts="accounts">
|
|
2076
|
-
</account-region-cluster-selector>
|
|
2077
|
-
</div>
|
|
2078
|
-
<stage-config-field label="Shrink Options">
|
|
2079
|
-
<div class="form-inline">
|
|
2080
|
-
Shrink to
|
|
2081
|
-
<input
|
|
2082
|
-
type="number"
|
|
2083
|
-
min="0"
|
|
2084
|
-
required
|
|
2085
|
-
ng-model="stage.shrinkToSize"
|
|
2086
|
-
class="form-control input-sm"
|
|
2087
|
-
style="width: 50px"
|
|
2088
|
-
/>
|
|
2089
|
-
{{shrinkClusterStageCtrl.pluralize('server group', stage.shrinkToSize)}}, keeping the
|
|
2090
|
-
<select class="form-control input-sm" ng-model="stage.retainLargerOverNewer">
|
|
2091
|
-
<option value="true">largest</option>
|
|
2092
|
-
<option value="false">newest</option>
|
|
2093
|
-
</select>
|
|
2094
|
-
</div>
|
|
2095
|
-
</stage-config-field>
|
|
2096
|
-
<div class="form-group">
|
|
2097
|
-
<div class="col-md-offset-3 col-md-6 checkbox">
|
|
2098
|
-
<label>
|
|
2099
|
-
<input type="checkbox" ng-model="stage.allowDeleteActive" />
|
|
2100
|
-
Allow deletion of active server groups
|
|
2101
|
-
</label>
|
|
2102
|
-
</div>
|
|
2103
|
-
</div>
|
|
2104
|
-
<stage-platform-health-override application="application" stage="stage" platform-health-type="'Google'">
|
|
2105
|
-
</stage-platform-health-override>
|
|
2106
|
-
</div>
|
|
2107
|
-
`);
|
|
2108
|
-
}]);
|
|
2109
|
-
|
|
2110
|
-
const ORACLE_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUP_CONTROLLER = "spinnaker.oracle.securityGroup.create.controller";
|
|
2111
|
-
module(ORACLE_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUP_CONTROLLER, []).controller("oracleCreateSecurityGroupCtrl", [
|
|
2112
|
-
"$scope",
|
|
2113
|
-
"$uibModalInstance",
|
|
2114
|
-
function($scope, $uibModalInstance) {
|
|
2115
|
-
this.cancel = () => {
|
|
2116
|
-
$uibModalInstance.dismiss();
|
|
2117
|
-
};
|
|
2118
|
-
$scope.firewallLabel = FirewallLabels.get("Firewall");
|
|
2119
|
-
}
|
|
2120
|
-
]);
|
|
2121
|
-
|
|
2122
|
-
const ORACLE_SECURITYGROUP_SECURITYGROUP_READER = "spinnaker.oracle.securityGroup.reader";
|
|
2123
|
-
module(ORACLE_SECURITYGROUP_SECURITYGROUP_READER, []).factory("oracleSecurityGroupReader", function() {
|
|
2124
|
-
function resolveIndexedSecurityGroup(indexedSecurityGroups, container, securityGroupId) {
|
|
2125
|
-
return indexedSecurityGroups[container.account][container.region][securityGroupId];
|
|
2126
|
-
}
|
|
2127
|
-
return {
|
|
2128
|
-
resolveIndexedSecurityGroup
|
|
2129
|
-
};
|
|
2130
|
-
});
|
|
2131
|
-
|
|
2132
|
-
const ORACLE_SECURITYGROUP_SECURITYGROUP_TRANSFORMER = "spinnaker.oracle.securityGroup.transformer";
|
|
2133
|
-
module(ORACLE_SECURITYGROUP_SECURITYGROUP_TRANSFORMER, []).factory("oracleSecurityGroupTransformer", function() {
|
|
2134
|
-
const provider = "oracle";
|
|
2135
|
-
function normalizeSecurityGroup(securityGroup) {
|
|
2136
|
-
return NetworkReader.listNetworksByProvider(provider).then(_$1.partial(addVcnNameToSecurityGroup, securityGroup));
|
|
2137
|
-
}
|
|
2138
|
-
function addVcnNameToSecurityGroup(securityGroup, vcns) {
|
|
2139
|
-
const matches = vcns.find((vcn) => vcn.id === securityGroup.network);
|
|
2140
|
-
securityGroup.vpcName = matches.length ? matches[0].name : "";
|
|
2141
|
-
}
|
|
2142
|
-
return {
|
|
2143
|
-
normalizeSecurityGroup
|
|
2144
|
-
};
|
|
2145
|
-
});
|
|
2146
|
-
|
|
2147
|
-
const ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCONFIGURATION_SERVICE = "spinnaker.oracle.serverGroup.configure.configuration.service";
|
|
2148
|
-
module(ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCONFIGURATION_SERVICE, [SECURITY_GROUP_READER]).factory("oracleServerGroupConfigurationService", [
|
|
2149
|
-
"$q",
|
|
2150
|
-
"oracleImageReader",
|
|
2151
|
-
"securityGroupReader",
|
|
2152
|
-
function($q, oracleImageReader, securityGroupReader) {
|
|
2153
|
-
const oracle = "oracle";
|
|
2154
|
-
const getShapes = (image) => {
|
|
2155
|
-
if (!image || !image.compatibleShapes) {
|
|
2156
|
-
return [];
|
|
2157
|
-
}
|
|
2158
|
-
return image.compatibleShapes.map((shape) => {
|
|
2159
|
-
return { name: shape };
|
|
2160
|
-
});
|
|
2161
|
-
};
|
|
2162
|
-
const loadAndSelectRegions = (command, backingData) => {
|
|
2163
|
-
if (command.account) {
|
|
2164
|
-
const selectedAccountDetails = backingData.credentialsKeyedByAccount[command.account];
|
|
2165
|
-
if (!selectedAccountDetails) {
|
|
2166
|
-
return;
|
|
2167
|
-
}
|
|
2168
|
-
backingData.filtered.regions = _$1.map(selectedAccountDetails.regions, (region) => {
|
|
2169
|
-
return { name: region.name };
|
|
2170
|
-
});
|
|
2171
|
-
if (selectedAccountDetails) {
|
|
2172
|
-
command.region = selectedAccountDetails.region;
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
|
-
};
|
|
2176
|
-
const loadAvailabilityDomains = (command) => {
|
|
2177
|
-
if (command.account && command.region) {
|
|
2178
|
-
AccountService.getAvailabilityZonesForAccountAndRegion(oracle, command.account, command.region).then((availDoms) => {
|
|
2179
|
-
if (availDoms) {
|
|
2180
|
-
command.backingData.filtered.availabilityDomains = availDoms.map((av) => {
|
|
2181
|
-
return { name: av };
|
|
2182
|
-
});
|
|
2183
|
-
} else {
|
|
2184
|
-
command.backingData.filtered.availabilityDomains = [];
|
|
2185
|
-
command.availabilityDomain = null;
|
|
2186
|
-
}
|
|
2187
|
-
});
|
|
2188
|
-
}
|
|
2189
|
-
};
|
|
2190
|
-
const loadLoadBalancers = (command) => {
|
|
2191
|
-
if (command.account && command.region) {
|
|
2192
|
-
command.backingData.filtered.loadBalancers = command.backingData.loadBalancers.filter(function(lb) {
|
|
2193
|
-
return lb.region === command.region && lb.account === command.account;
|
|
2194
|
-
});
|
|
2195
|
-
}
|
|
2196
|
-
};
|
|
2197
|
-
function configureCommand(application, command) {
|
|
2198
|
-
const defaults = command || {};
|
|
2199
|
-
const defaultCredentials = defaults.account || application.defaultCredentials.oracle || OracleProviderSettings.defaults.account;
|
|
2200
|
-
const defaultRegion = defaults.region || application.defaultRegions.oracle || OracleProviderSettings.defaults.region;
|
|
2201
|
-
return $q.all([
|
|
2202
|
-
AccountService.getCredentialsKeyedByAccount(oracle),
|
|
2203
|
-
NetworkReader.listNetworksByProvider(oracle),
|
|
2204
|
-
SubnetReader.listSubnetsByProvider(oracle),
|
|
2205
|
-
securityGroupReader.getAllSecurityGroups(),
|
|
2206
|
-
loadImages(),
|
|
2207
|
-
AccountService.getAvailabilityZonesForAccountAndRegion(oracle, defaultCredentials, defaultRegion)
|
|
2208
|
-
]).then(function([credentialsKeyedByAccount, networks, subnets, securityGroups, images, availDomains]) {
|
|
2209
|
-
const backingData = {
|
|
2210
|
-
credentialsKeyedByAccount,
|
|
2211
|
-
networks,
|
|
2212
|
-
subnets,
|
|
2213
|
-
securityGroups,
|
|
2214
|
-
images,
|
|
2215
|
-
availDomains
|
|
2216
|
-
};
|
|
2217
|
-
backingData.accounts = _$1.keys(backingData.credentialsKeyedByAccount);
|
|
2218
|
-
backingData.filtered = {};
|
|
2219
|
-
loadAndSelectRegions(command, backingData);
|
|
2220
|
-
backingData.filtered.availabilityDomains = _$1.map(backingData.availDomains, function(zone) {
|
|
2221
|
-
return { name: zone };
|
|
2222
|
-
});
|
|
2223
|
-
backingData.filterSubnets = function() {
|
|
2224
|
-
if (command.vpcId && command.availabilityDomain) {
|
|
2225
|
-
return _$1.filter(backingData.subnets, {
|
|
2226
|
-
vcnId: command.vpcId,
|
|
2227
|
-
availabilityDomain: command.availabilityDomain
|
|
2228
|
-
});
|
|
2229
|
-
}
|
|
2230
|
-
return backingData.subnets;
|
|
2231
|
-
};
|
|
2232
|
-
backingData.loadBalancers = application.loadBalancers.data;
|
|
2233
|
-
backingData.accountOnChange = function() {
|
|
2234
|
-
loadAndSelectRegions(command, command.backingData);
|
|
2235
|
-
loadAvailabilityDomains(command);
|
|
2236
|
-
loadLoadBalancers(command);
|
|
2237
|
-
};
|
|
2238
|
-
backingData.regionOnChange = function() {
|
|
2239
|
-
loadAvailabilityDomains(command);
|
|
2240
|
-
loadLoadBalancers(command);
|
|
2241
|
-
};
|
|
2242
|
-
backingData.availabilityDomainOnChange = function() {
|
|
2243
|
-
command.subnetId = null;
|
|
2244
|
-
backingData.seclists = null;
|
|
2245
|
-
};
|
|
2246
|
-
backingData.vpcOnChange = function() {
|
|
2247
|
-
command.subnetId = null;
|
|
2248
|
-
backingData.seclists = null;
|
|
2249
|
-
};
|
|
2250
|
-
backingData.subnetOnChange = function() {
|
|
2251
|
-
const subnet = _$1.find(backingData.subnets, { id: command.subnetId });
|
|
2252
|
-
const mySecGroups = backingData.securityGroups[command.account][oracle][command.region];
|
|
2253
|
-
const secLists = [];
|
|
2254
|
-
_$1.forEach(subnet.securityListIds, function(sid) {
|
|
2255
|
-
const sgRef = _$1.find(mySecGroups, { id: sid });
|
|
2256
|
-
securityGroupReader.getSecurityGroupDetails(command.application, command.account, oracle, command.region, command.vpcId, sgRef.name).then(function(sgd) {
|
|
2257
|
-
secLists.push(sgd);
|
|
2258
|
-
backingData.seclists = secLists;
|
|
2259
|
-
});
|
|
2260
|
-
});
|
|
2261
|
-
};
|
|
2262
|
-
backingData.findBackendSetsByLoadBalancerId = (loadBalancerId) => {
|
|
2263
|
-
const lb = backingData.filtered.loadBalancers.find((lb2) => lb2.id === loadBalancerId);
|
|
2264
|
-
if (lb && lb.backendSets) {
|
|
2265
|
-
const bsetArray = [];
|
|
2266
|
-
Object.keys(lb.backendSets).reduce((arr, bsetName) => {
|
|
2267
|
-
const bset = lb.backendSets[bsetName];
|
|
2268
|
-
bset["name"] = bsetName;
|
|
2269
|
-
arr.push(bset);
|
|
2270
|
-
return arr;
|
|
2271
|
-
}, bsetArray);
|
|
2272
|
-
return bsetArray;
|
|
2273
|
-
} else {
|
|
2274
|
-
return [];
|
|
2275
|
-
}
|
|
2276
|
-
};
|
|
2277
|
-
backingData.findLoadBalListenersByBackendSetName = (loadBalancerId, backendSetName) => {
|
|
2278
|
-
const lb = backingData.filtered.loadBalancers.find((lb2) => lb2.id === loadBalancerId);
|
|
2279
|
-
if (lb && lb.listeners) {
|
|
2280
|
-
return Object.keys(lb.listeners).filter((lisName) => lb.listeners[lisName].defaultBackendSetName === backendSetName).map((lisName) => lb.listeners[lisName]);
|
|
2281
|
-
} else {
|
|
2282
|
-
return [];
|
|
2283
|
-
}
|
|
2284
|
-
};
|
|
2285
|
-
backingData.loadBalancerOnChange = () => {
|
|
2286
|
-
if (command.loadBalancerId) {
|
|
2287
|
-
backingData.filtered.backendSets = backingData.findBackendSetsByLoadBalancerId(command.loadBalancerId);
|
|
2288
|
-
} else {
|
|
2289
|
-
command.backendSetName = void 0;
|
|
2290
|
-
backingData.backendSetOnChange();
|
|
2291
|
-
backingData.filtered.backendSets = [];
|
|
2292
|
-
}
|
|
2293
|
-
};
|
|
2294
|
-
backingData.backendSetOnChange = () => {
|
|
2295
|
-
backingData.filtered.listeners = command.loadBalancerId && command.backendSetName ? backingData.findLoadBalListenersByBackendSetName(command.loadBalancerId, command.backendSetName) : [];
|
|
2296
|
-
};
|
|
2297
|
-
backingData.filtered.images = backingData.images;
|
|
2298
|
-
const shapesMap = {};
|
|
2299
|
-
_$1.forEach(backingData.filtered.images, (image) => {
|
|
2300
|
-
shapesMap[image.id] = getShapes(image);
|
|
2301
|
-
});
|
|
2302
|
-
backingData.filtered.shapes = shapesMap;
|
|
2303
|
-
backingData.filtered.allShapes = _$1.uniqBy(_$1.flatten(_$1.values(shapesMap)), "name");
|
|
2304
|
-
command.backingData = backingData;
|
|
2305
|
-
if (command.account) {
|
|
2306
|
-
loadLoadBalancers(command);
|
|
2307
|
-
backingData.loadBalancerOnChange();
|
|
2308
|
-
backingData.backendSetOnChange();
|
|
2309
|
-
}
|
|
2310
|
-
});
|
|
2311
|
-
}
|
|
2312
|
-
function loadImages() {
|
|
2313
|
-
return oracleImageReader.findImages({ provider: oracle });
|
|
2314
|
-
}
|
|
2315
|
-
return {
|
|
2316
|
-
configureCommand
|
|
2317
|
-
};
|
|
2318
|
-
}
|
|
2319
|
-
]);
|
|
2320
|
-
|
|
2321
|
-
const ORACLE_SERVERGROUP_CONFIGURE_WIZARD_BASICSETTINGS_BASICSETTINGS_CONTROLLER = "spinnaker.oracle.serverGroup.configure.wizard.basicSettings.controller";
|
|
2322
|
-
angular.module(ORACLE_SERVERGROUP_CONFIGURE_WIZARD_BASICSETTINGS_BASICSETTINGS_CONTROLLER, [
|
|
2323
|
-
UIROUTER_ANGULARJS,
|
|
2324
|
-
ANGULAR_UI_BOOTSTRAP,
|
|
2325
|
-
IMAGE_READER
|
|
2326
|
-
]).controller("oracleServerGroupBasicSettingsCtrl", [
|
|
2327
|
-
"$scope",
|
|
2328
|
-
"$state",
|
|
2329
|
-
"$uibModalStack",
|
|
2330
|
-
"$controller",
|
|
2331
|
-
"imageReader",
|
|
2332
|
-
function($scope, $state, $uibModalStack, $controller, imageReader) {
|
|
2333
|
-
angular.extend(this, $controller("BasicSettingsMixin", {
|
|
2334
|
-
$scope,
|
|
2335
|
-
imageReader,
|
|
2336
|
-
$uibModalStack,
|
|
2337
|
-
$state
|
|
2338
|
-
}));
|
|
2339
|
-
}
|
|
2340
|
-
]);
|
|
2341
|
-
|
|
2342
|
-
const ORACLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_CAPACITYSELECTOR_COMPONENT = "spinnaker.oracle.serverGroup.configure.wizard.capacity.selector.component";
|
|
2343
|
-
angular.module(ORACLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_CAPACITYSELECTOR_COMPONENT, []).component("oracleServerGroupCapacitySelector", {
|
|
2344
|
-
templateUrl: "oracle/src/serverGroup/configure/wizard/capacity/capacitySelector.component.html",
|
|
2345
|
-
bindings: {
|
|
2346
|
-
command: "="
|
|
2347
|
-
},
|
|
2348
|
-
controllerAs: "vm",
|
|
2349
|
-
controller: angular.noop
|
|
2350
|
-
});
|
|
2351
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2352
|
-
templateCache.put("oracle/src/serverGroup/configure/wizard/capacity/capacitySelector.component.html", `<div>
|
|
2353
|
-
<div class="form-group">
|
|
2354
|
-
<div class="col-md-12">
|
|
2355
|
-
<p>Select the number of instances</p>
|
|
2356
|
-
</div>
|
|
2357
|
-
</div>
|
|
2358
|
-
<div class="form-group">
|
|
2359
|
-
<div class="col-md-3 sm-label-right">Number of Instances</div>
|
|
2360
|
-
<div class="col-md-2">
|
|
2361
|
-
<input type="number" class="form-control input-sm" ng-model="vm.command.capacity.desired" min="1" required />
|
|
2362
|
-
</div>
|
|
2363
|
-
</div>
|
|
2364
|
-
</div>
|
|
2365
|
-
`);
|
|
2366
|
-
}]);
|
|
2367
|
-
|
|
2368
|
-
const ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUP_CONFIGURE_MODULE = "spinnaker.oracle.serverGroup.configure";
|
|
2369
|
-
module(ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUP_CONFIGURE_MODULE, [
|
|
2370
|
-
ORACLE_SERVERGROUP_CONFIGURE_WIZARD_BASICSETTINGS_BASICSETTINGS_CONTROLLER,
|
|
2371
|
-
ORACLE_SERVERGROUP_CONFIGURE_WIZARD_CAPACITY_CAPACITYSELECTOR_COMPONENT,
|
|
2372
|
-
ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCONFIGURATION_SERVICE
|
|
2373
|
-
]);
|
|
2374
|
-
|
|
2375
|
-
const ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER_SERVICE = "spinnaker.oracle.serverGroupCommandBuilder.service";
|
|
2376
|
-
angular.module(ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER_SERVICE, []).factory("oracleServerGroupCommandBuilder", [
|
|
2377
|
-
"$q",
|
|
2378
|
-
function($q) {
|
|
2379
|
-
const oracle = "oracle";
|
|
2380
|
-
function buildNewServerGroupCommand(application, defaults) {
|
|
2381
|
-
defaults = defaults || {};
|
|
2382
|
-
const defaultAccount = defaults.account || OracleProviderSettings.defaults.account;
|
|
2383
|
-
const defaultRegion = defaults.region || OracleProviderSettings.defaults.region;
|
|
2384
|
-
const command = {
|
|
2385
|
-
account: defaultAccount,
|
|
2386
|
-
application: application.name,
|
|
2387
|
-
capacity: {
|
|
2388
|
-
desired: 1
|
|
2389
|
-
},
|
|
2390
|
-
region: defaultRegion,
|
|
2391
|
-
selectedProvider: oracle,
|
|
2392
|
-
viewState: {
|
|
2393
|
-
mode: defaults.mode || "create",
|
|
2394
|
-
disableStrategySelection: true
|
|
2395
|
-
}
|
|
2396
|
-
};
|
|
2397
|
-
return $q.when(command);
|
|
2398
|
-
}
|
|
2399
|
-
function buildServerGroupCommandFromExisting(application, serverGroup, mode) {
|
|
2400
|
-
mode = mode || "clone";
|
|
2401
|
-
const serverGroupName = NameUtils.parseServerGroupName(serverGroup.name);
|
|
2402
|
-
const command = {
|
|
2403
|
-
account: serverGroup.account,
|
|
2404
|
-
application: application.name,
|
|
2405
|
-
shape: serverGroup.launchConfig.shape,
|
|
2406
|
-
strategy: "",
|
|
2407
|
-
stack: serverGroupName.stack,
|
|
2408
|
-
vpcId: serverGroup.launchConfig.vpcId,
|
|
2409
|
-
subnetId: serverGroup.launchConfig.subnetId,
|
|
2410
|
-
region: serverGroup.region,
|
|
2411
|
-
availabilityDomain: serverGroup.launchConfig.availabilityDomain,
|
|
2412
|
-
sshAuthorizedKeys: serverGroup.launchConfig.sshAuthorizedKeys,
|
|
2413
|
-
selectedProvider: oracle,
|
|
2414
|
-
capacity: {
|
|
2415
|
-
desired: serverGroup.capacity.desired
|
|
2416
|
-
},
|
|
2417
|
-
viewState: {
|
|
2418
|
-
mode,
|
|
2419
|
-
disableStrategySelection: true
|
|
2420
|
-
}
|
|
2421
|
-
};
|
|
2422
|
-
return $q.when(command);
|
|
2423
|
-
}
|
|
2424
|
-
function buildServerGroupCommandFromPipeline(application, originalCluster) {
|
|
2425
|
-
const pipelineCluster = _$1.cloneDeep(originalCluster);
|
|
2426
|
-
const commandDefaults = { account: pipelineCluster.account, region: pipelineCluster.region };
|
|
2427
|
-
return buildNewServerGroupCommand(application, commandDefaults).then((command) => {
|
|
2428
|
-
const viewState = {
|
|
2429
|
-
disableImageSelection: true,
|
|
2430
|
-
mode: "editPipeline",
|
|
2431
|
-
submitButtonLabel: "Done",
|
|
2432
|
-
templatingEnabled: true
|
|
2433
|
-
};
|
|
2434
|
-
const viewOverrides = {
|
|
2435
|
-
viewState
|
|
2436
|
-
};
|
|
2437
|
-
pipelineCluster.strategy = pipelineCluster.strategy || "";
|
|
2438
|
-
return angular.extend({}, command, pipelineCluster, viewOverrides);
|
|
2439
|
-
});
|
|
2440
|
-
}
|
|
2441
|
-
function buildNewServerGroupCommandForPipeline() {
|
|
2442
|
-
return $q.when({
|
|
2443
|
-
viewState: {
|
|
2444
|
-
requiresTemplateSelection: true
|
|
2445
|
-
}
|
|
2446
|
-
});
|
|
2447
|
-
}
|
|
2448
|
-
return {
|
|
2449
|
-
buildNewServerGroupCommand,
|
|
2450
|
-
buildServerGroupCommandFromExisting,
|
|
2451
|
-
buildNewServerGroupCommandForPipeline,
|
|
2452
|
-
buildServerGroupCommandFromPipeline
|
|
2453
|
-
};
|
|
2454
|
-
}
|
|
2455
|
-
]);
|
|
2456
|
-
|
|
2457
|
-
const ORACLE_SERVERGROUP_CONFIGURE_WIZARD_CLONESERVERGROUP_CONTROLLER = "spinnaker.oracle.serverGroup.configure.cloneServerGroup";
|
|
2458
|
-
module(ORACLE_SERVERGROUP_CONFIGURE_WIZARD_CLONESERVERGROUP_CONTROLLER, [UIROUTER_ANGULARJS]).controller("oracleCloneServerGroupCtrl", [
|
|
2459
|
-
"$scope",
|
|
2460
|
-
"$uibModalInstance",
|
|
2461
|
-
"$q",
|
|
2462
|
-
"application",
|
|
2463
|
-
"serverGroupWriter",
|
|
2464
|
-
"serverGroupCommand",
|
|
2465
|
-
"oracleServerGroupConfigurationService",
|
|
2466
|
-
"title",
|
|
2467
|
-
function($scope, $uibModalInstance, $q, application, serverGroupWriter, serverGroupCommand, oracleServerGroupConfigurationService, title) {
|
|
2468
|
-
$scope.title = title;
|
|
2469
|
-
$scope.state = {
|
|
2470
|
-
loaded: false,
|
|
2471
|
-
requiresTemplateSelection: !!serverGroupCommand.viewState.requiresTemplateSelection
|
|
2472
|
-
};
|
|
2473
|
-
$scope.command = serverGroupCommand;
|
|
2474
|
-
$scope.application = application;
|
|
2475
|
-
$scope.pages = {
|
|
2476
|
-
basicSettings: "oracle/src/serverGroup/configure/wizard/basicSettings/basicSettings.html",
|
|
2477
|
-
instanceType: "oracle/src/serverGroup/configure/wizard/instanceType/instanceType.html",
|
|
2478
|
-
capacity: "oracle/src/serverGroup/configure/wizard/capacity/capacity.html",
|
|
2479
|
-
loadBalancers: "oracle/src/serverGroup/configure/wizard/loadBalancers/loadBalancers.html",
|
|
2480
|
-
networkSettings: "oracle/src/serverGroup/configure/wizard/network/networkSettings.html",
|
|
2481
|
-
templateSelection: "oracle/src/serverGroup/configure/wizard/templateSelection/templateSelection.html"
|
|
2482
|
-
};
|
|
2483
|
-
this.templateSelectionText = {
|
|
2484
|
-
copied: [
|
|
2485
|
-
"account, region, subnet, cluster name (stack, details)",
|
|
2486
|
-
"load balancers",
|
|
2487
|
-
FirewallLabels.get("firewalls"),
|
|
2488
|
-
"instance type",
|
|
2489
|
-
"all fields on the Advanced Settings page"
|
|
2490
|
-
],
|
|
2491
|
-
notCopied: []
|
|
2492
|
-
};
|
|
2493
|
-
if (!$scope.command.viewState.disableStrategySelection) {
|
|
2494
|
-
this.templateSelectionText.notCopied.push("the deployment strategy (if any) used to deploy the most recent server group");
|
|
2495
|
-
}
|
|
2496
|
-
$scope.taskMonitor = new TaskMonitor({
|
|
2497
|
-
application,
|
|
2498
|
-
title: "Creating your server group",
|
|
2499
|
-
modalInstance: $uibModalInstance
|
|
2500
|
-
});
|
|
2501
|
-
function configureCommand() {
|
|
2502
|
-
oracleServerGroupConfigurationService.configureCommand(application, serverGroupCommand).then(function() {
|
|
2503
|
-
$scope.state.loaded = true;
|
|
2504
|
-
});
|
|
2505
|
-
}
|
|
2506
|
-
this.isValid = function() {
|
|
2507
|
-
return $scope.command && $scope.form.$valid && ModalWizard.isComplete();
|
|
2508
|
-
};
|
|
2509
|
-
this.showSubmitButton = function() {
|
|
2510
|
-
return ModalWizard.allPagesVisited();
|
|
2511
|
-
};
|
|
2512
|
-
this.cancel = function() {
|
|
2513
|
-
$uibModalInstance.dismiss();
|
|
2514
|
-
};
|
|
2515
|
-
this.submit = function() {
|
|
2516
|
-
if ($scope.command.viewState.mode === "editPipeline" || $scope.command.viewState.mode === "createPipeline") {
|
|
2517
|
-
return $uibModalInstance.close($scope.command);
|
|
2518
|
-
}
|
|
2519
|
-
$scope.taskMonitor.submit(function() {
|
|
2520
|
-
return serverGroupWriter.cloneServerGroup($scope.command, application);
|
|
2521
|
-
});
|
|
2522
|
-
};
|
|
2523
|
-
configureCommand();
|
|
2524
|
-
this.templateSelected = () => {
|
|
2525
|
-
$scope.state.requiresTemplateSelection = false;
|
|
2526
|
-
configureCommand();
|
|
2527
|
-
};
|
|
2528
|
-
}
|
|
2529
|
-
]);
|
|
2530
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2531
|
-
templateCache.put("oracle/src/serverGroup/configure/wizard/basicSettings/basicSettings.html", `<div class="container-fluid form-horizontal" ng-controller="oracleServerGroupBasicSettingsCtrl as basicSettingsCtrl">
|
|
2532
|
-
<div class="modal-body">
|
|
2533
|
-
<div class="form-group">
|
|
2534
|
-
<div class="col-md-3 sm-label-right">Account</div>
|
|
2535
|
-
<div class="col-md-7">
|
|
2536
|
-
<account-select-field
|
|
2537
|
-
required
|
|
2538
|
-
read-only="command.viewState.readOnlyFields.credentials"
|
|
2539
|
-
component="command"
|
|
2540
|
-
field="account"
|
|
2541
|
-
accounts="command.backingData.accounts"
|
|
2542
|
-
provider="'oracle'"
|
|
2543
|
-
on-change="command.backingData.accountOnChange()"
|
|
2544
|
-
></account-select-field>
|
|
2545
|
-
</div>
|
|
2546
|
-
</div>
|
|
2547
|
-
<region-select-field
|
|
2548
|
-
label-columns="3"
|
|
2549
|
-
component="command"
|
|
2550
|
-
field="region"
|
|
2551
|
-
account="command.account"
|
|
2552
|
-
provider="'oracle'"
|
|
2553
|
-
regions="command.backingData.filtered.regions"
|
|
2554
|
-
on-change="command.backingData.regionOnChange()"
|
|
2555
|
-
></region-select-field>
|
|
2556
|
-
<!-- VCN Selection (which will then filter subnets) -->
|
|
2557
|
-
<div class="form-group">
|
|
2558
|
-
<div class="col-md-3 sm-label-right">VCN</div>
|
|
2559
|
-
<div class="col-md-9">
|
|
2560
|
-
<ui-select
|
|
2561
|
-
class="form-control input-sm"
|
|
2562
|
-
required
|
|
2563
|
-
ng-model="command.vpcId"
|
|
2564
|
-
ng-change="command.backingData.vpcOnChange()"
|
|
2565
|
-
>
|
|
2566
|
-
<ui-select-match placeholder="Select VCN">{{$select.selected.name}}</ui-select-match>
|
|
2567
|
-
<ui-select-choices repeat="network.id as network in command.backingData.networks">
|
|
2568
|
-
<span ng-bind-html="network.name | highlight: $select.search"></span>
|
|
2569
|
-
</ui-select-choices>
|
|
2570
|
-
</ui-select>
|
|
2571
|
-
</div>
|
|
2572
|
-
</div>
|
|
2573
|
-
|
|
2574
|
-
<div class="form-group" ng-show="command.vpcId">
|
|
2575
|
-
<div class="col-md-3 sm-label-right">Availability Domain</div>
|
|
2576
|
-
<div class="col-md-7">
|
|
2577
|
-
<ui-select
|
|
2578
|
-
class="form-control input-sm"
|
|
2579
|
-
required
|
|
2580
|
-
ng-model="command.availabilityDomain"
|
|
2581
|
-
ng-change="command.backingData.availabilityDomainOnChange()"
|
|
2582
|
-
>
|
|
2583
|
-
<ui-select-match placeholder="Select AD">{{$select.selected.name}}</ui-select-match>
|
|
2584
|
-
<ui-select-choices
|
|
2585
|
-
repeat="availabilityDomain.name as availabilityDomain in command.backingData.filtered.availabilityDomains"
|
|
2586
|
-
>
|
|
2587
|
-
<span ng-bind-html="availabilityDomain.name"></span>
|
|
2588
|
-
</ui-select-choices>
|
|
2589
|
-
</ui-select>
|
|
2590
|
-
</div>
|
|
2591
|
-
</div>
|
|
2592
|
-
|
|
2593
|
-
<!-- Subnet selection -->
|
|
2594
|
-
<div class="form-group" ng-show="command.availabilityDomain">
|
|
2595
|
-
<div class="col-md-3 sm-label-right">Subnet</div>
|
|
2596
|
-
<div class="col-md-9">
|
|
2597
|
-
<ui-select
|
|
2598
|
-
class="form-control input-sm"
|
|
2599
|
-
required
|
|
2600
|
-
ng-model="command.subnetId"
|
|
2601
|
-
ng-change="command.backingData.subnetOnChange()"
|
|
2602
|
-
>
|
|
2603
|
-
<ui-select-match placeholder="Select subnet">{{$select.selected.name}}</ui-select-match>
|
|
2604
|
-
<ui-select-choices repeat="subnet.id as subnet in command.backingData.filterSubnets()">
|
|
2605
|
-
<span ng-bind-html="subnet.name | highlight: $select.search"></span>
|
|
2606
|
-
</ui-select-choices>
|
|
2607
|
-
</ui-select>
|
|
2608
|
-
</div>
|
|
2609
|
-
</div>
|
|
2610
|
-
|
|
2611
|
-
<div class="form-group small" style="margin-top: 20px" ng-show="command.backingData.seclists">
|
|
2612
|
-
<div class="col-md-3 sm-label-right">Effective Security Lists</div>
|
|
2613
|
-
<div class="col-md-9">
|
|
2614
|
-
<p>Security Lists attached to selected subnet:</p>
|
|
2615
|
-
<ul ng-repeat="seclist in command.backingData.seclists">
|
|
2616
|
-
<div class="sm-label-left">{{seclist.name}}</div>
|
|
2617
|
-
<div ng-repeat="rule in seclist.inboundRules">
|
|
2618
|
-
<li ng-repeat="range in rule.portRanges">{{rule.protocol}}: {{range.startPort}} -> {{range.endPort}}</li>
|
|
2619
|
-
</div>
|
|
2620
|
-
</ul>
|
|
2621
|
-
</div>
|
|
2622
|
-
</div>
|
|
2623
|
-
|
|
2624
|
-
<div class="form-group">
|
|
2625
|
-
<div class="col-md-3 sm-label-right">
|
|
2626
|
-
Stack
|
|
2627
|
-
<help-field key="oracle.serverGroup.stack"></help-field>
|
|
2628
|
-
</div>
|
|
2629
|
-
<div class="col-md-7">
|
|
2630
|
-
<input
|
|
2631
|
-
type="text"
|
|
2632
|
-
class="form-control input-sm"
|
|
2633
|
-
ng-pattern="basicSettingsCtrl.stackPattern"
|
|
2634
|
-
name="stack"
|
|
2635
|
-
ng-model="command.stack"
|
|
2636
|
-
/>
|
|
2637
|
-
</div>
|
|
2638
|
-
</div>
|
|
2639
|
-
<div class="form-group row slide-in" ng-if="basicSettings.stack.$error.pattern">
|
|
2640
|
-
<div class="col-sm-9 col-sm-offset-2 error-message">
|
|
2641
|
-
<span>Only dot(.) and underscore(_) special characters are allowed in the Stack field.</span>
|
|
2642
|
-
</div>
|
|
2643
|
-
</div>
|
|
2644
|
-
<div class="form-group">
|
|
2645
|
-
<div class="col-md-3 sm-label-right">
|
|
2646
|
-
Detail
|
|
2647
|
-
<help-field key="oracle.serverGroup.detail"></help-field>
|
|
2648
|
-
</div>
|
|
2649
|
-
<div class="col-md-7">
|
|
2650
|
-
<input
|
|
2651
|
-
type="text"
|
|
2652
|
-
class="form-control input-sm"
|
|
2653
|
-
ng-pattern="basicSettingsCtrl.detailPattern"
|
|
2654
|
-
name="details"
|
|
2655
|
-
ng-model="command.freeFormDetails"
|
|
2656
|
-
/>
|
|
2657
|
-
</div>
|
|
2658
|
-
</div>
|
|
2659
|
-
<deployment-strategy-selector
|
|
2660
|
-
ng-if="!command.viewState.disableStrategySelection && command.selectedProvider"
|
|
2661
|
-
command="command"
|
|
2662
|
-
></deployment-strategy-selector>
|
|
2663
|
-
</div>
|
|
2664
|
-
</div>
|
|
2665
|
-
`);
|
|
2666
|
-
}]);
|
|
2667
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2668
|
-
templateCache.put("oracle/src/serverGroup/configure/wizard/instanceType/instanceType.html", `<!-- Image selection -->
|
|
2669
|
-
<div class="form-group" ng-if="!command.viewState.disableImageSelection">
|
|
2670
|
-
<div class="col-md-3 sm-label-right">Image</div>
|
|
2671
|
-
<div class="col-md-9">
|
|
2672
|
-
<ui-select class="form-control input-sm" required ng-model="command.imageId">
|
|
2673
|
-
<ui-select-match placeholder="Select an image">{{$select.selected.name}}</ui-select-match>
|
|
2674
|
-
<ui-select-choices repeat="image.id as image in command.backingData.filtered.images">
|
|
2675
|
-
<span ng-bind-html="image.name | highlight: $select.search"></span>
|
|
2676
|
-
</ui-select-choices>
|
|
2677
|
-
</ui-select>
|
|
2678
|
-
</div>
|
|
2679
|
-
</div>
|
|
2680
|
-
|
|
2681
|
-
<!-- Shape selection -->
|
|
2682
|
-
<div class="form-group">
|
|
2683
|
-
<div class="col-md-3 sm-label-right">Shape</div>
|
|
2684
|
-
<div class="col-md-9">
|
|
2685
|
-
<ui-select class="form-control input-sm" required ng-model="command.shape">
|
|
2686
|
-
<ui-select-match placeholder="Select compatible shape">{{$select.selected.name}}</ui-select-match>
|
|
2687
|
-
<ui-select-choices
|
|
2688
|
-
repeat="shape.name as shape in (!command.viewState.disableImageSelection
|
|
2689
|
-
? command.backingData.filtered.shapes[command.imageId]
|
|
2690
|
-
: command.backingData.filtered.allShapes)"
|
|
2691
|
-
>
|
|
2692
|
-
<span ng-bind-html="shape.name"></span>
|
|
2693
|
-
</ui-select-choices>
|
|
2694
|
-
</ui-select>
|
|
2695
|
-
</div>
|
|
2696
|
-
</div>
|
|
2697
|
-
`);
|
|
2698
|
-
}]);
|
|
2699
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2700
|
-
templateCache.put("oracle/src/serverGroup/configure/wizard/capacity/capacity.html", `<div class="clearfix">
|
|
2701
|
-
<div class="row">
|
|
2702
|
-
<div class="col-md-12">
|
|
2703
|
-
<oracle-server-group-capacity-selector command="command"></oracle-server-group-capacity-selector>
|
|
2704
|
-
</div>
|
|
2705
|
-
</div>
|
|
2706
|
-
</div>
|
|
2707
|
-
`);
|
|
2708
|
-
}]);
|
|
2709
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2710
|
-
templateCache.put("oracle/src/serverGroup/configure/wizard/loadBalancers/loadBalancers.html", `<!-- Load Balancer selection -->
|
|
2711
|
-
<div class="form-group">
|
|
2712
|
-
<div class="col-md-3 sm-label-right">Load Balancer</div>
|
|
2713
|
-
<div class="col-md-9">
|
|
2714
|
-
<ui-select
|
|
2715
|
-
class="form-control input-sm"
|
|
2716
|
-
ng-model="command.loadBalancerId"
|
|
2717
|
-
ng-change="command.backingData.loadBalancerOnChange()"
|
|
2718
|
-
>
|
|
2719
|
-
<ui-select-match allow-clear="true" placeholder="Select Load Balancer">{{$select.selected.name}}</ui-select-match>
|
|
2720
|
-
<ui-select-choices repeat="loadBalancer.id as loadBalancer in command.backingData.filtered.loadBalancers">
|
|
2721
|
-
<span ng-bind-html="loadBalancer.name | highlight: $select.search"></span>
|
|
2722
|
-
</ui-select-choices>
|
|
2723
|
-
</ui-select>
|
|
2724
|
-
</div>
|
|
2725
|
-
</div>
|
|
2726
|
-
|
|
2727
|
-
<!-- Backend set selection -->
|
|
2728
|
-
<div class="form-group" ng-if="command.loadBalancerId">
|
|
2729
|
-
<div class="col-md-3 sm-label-right">Backend Set</div>
|
|
2730
|
-
<div class="col-md-9">
|
|
2731
|
-
<ui-select
|
|
2732
|
-
class="form-control input-sm"
|
|
2733
|
-
ng-required="command.loadBalancerId"
|
|
2734
|
-
ng-model="command.backendSetName"
|
|
2735
|
-
ng-change="command.backingData.backendSetOnChange()"
|
|
2736
|
-
>
|
|
2737
|
-
<ui-select-match placeholder="Select Backend Set">{{$select.selected.name}}</ui-select-match>
|
|
2738
|
-
<ui-select-choices repeat="backendSet.name as backendSet in command.backingData.filtered.backendSets">
|
|
2739
|
-
<span ng-bind-html="backendSet.name"></span>
|
|
2740
|
-
</ui-select-choices>
|
|
2741
|
-
</ui-select>
|
|
2742
|
-
</div>
|
|
2743
|
-
</div>
|
|
2744
|
-
|
|
2745
|
-
<!-- Show listeners associated with selected backend set -->
|
|
2746
|
-
<div class="form-group" ng-if="command.loadBalancerId && command.backendSetName">
|
|
2747
|
-
<div class="col-md-3 sm-label-right">Listeners for {{command.backendSetName}}</div>
|
|
2748
|
-
<div class="col-md-9">
|
|
2749
|
-
<ul ng-repeat="(lisName, listener) in command.backingData.filtered.listeners">
|
|
2750
|
-
<li>{{listener.protocol}}:{{listener.port}}</li>
|
|
2751
|
-
</ul>
|
|
2752
|
-
</div>
|
|
2753
|
-
</div>
|
|
2754
|
-
`);
|
|
2755
|
-
}]);
|
|
2756
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2757
|
-
templateCache.put("oracle/src/serverGroup/configure/wizard/network/networkSettings.html", `<!-- SSH Key -->
|
|
2758
|
-
<div class="form-group">
|
|
2759
|
-
<div class="col-md-3 sm-label-right">
|
|
2760
|
-
SSH Key
|
|
2761
|
-
<help-field key="oracle.serverGroup.sshAuthorizedKeys"></help-field>
|
|
2762
|
-
</div>
|
|
2763
|
-
<div class="col-md-9">
|
|
2764
|
-
<textarea
|
|
2765
|
-
class="form-control input-sm"
|
|
2766
|
-
name="sshAuthorizedKeys"
|
|
2767
|
-
placeholder="Enter the public SSH key for the default user on the instance."
|
|
2768
|
-
ng-model="command.sshAuthorizedKeys"
|
|
2769
|
-
></textarea>
|
|
2770
|
-
</div>
|
|
2771
|
-
</div>
|
|
2772
|
-
`);
|
|
2773
|
-
}]);
|
|
2774
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2775
|
-
templateCache.put("oracle/src/serverGroup/configure/wizard/templateSelection/templateSelection.html", `<deploy-initializer
|
|
2776
|
-
cloud-provider="oracle"
|
|
2777
|
-
command="command"
|
|
2778
|
-
application="application"
|
|
2779
|
-
parent-state="state"
|
|
2780
|
-
dismiss="ctrl.cancel()"
|
|
2781
|
-
template-selection-text="ctrl.templateSelectionText"
|
|
2782
|
-
on-template-selected="ctrl.templateSelected()"
|
|
2783
|
-
></deploy-initializer>
|
|
2784
|
-
`);
|
|
2785
|
-
}]);
|
|
2786
|
-
|
|
2787
|
-
const ORACLE_COMMON_FOOTER_COMPONENT = "spinnaker.oracle.footer.component";
|
|
2788
|
-
angular.module(ORACLE_COMMON_FOOTER_COMPONENT, []).component("oracleFooter", {
|
|
2789
|
-
templateUrl: "oracle/src/common/footer.component.html",
|
|
2790
|
-
bindings: {
|
|
2791
|
-
action: "&",
|
|
2792
|
-
isValid: "&",
|
|
2793
|
-
cancel: "&",
|
|
2794
|
-
account: "=?",
|
|
2795
|
-
verification: "=?"
|
|
2796
|
-
},
|
|
2797
|
-
controllerAs: "vm",
|
|
2798
|
-
controller: angular.noop
|
|
2799
|
-
});
|
|
2800
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2801
|
-
templateCache.put("oracle/src/common/footer.component.html", `<div class="modal-footer">
|
|
2802
|
-
<user-verification account="vm.account" verification="vm.verification"></user-verification>
|
|
2803
|
-
<button type="submit" ng-click="vm.action()" style="display: none"></button>
|
|
2804
|
-
<!-- Allows form submission via enter keypress-->
|
|
2805
|
-
<button class="btn btn-default" ng-click="vm.cancel()">Cancel</button>
|
|
2806
|
-
<button type="submit" class="btn btn-primary" ng-click="vm.action()" ng-disabled="!vm.isValid()">Submit</button>
|
|
2807
|
-
</div>
|
|
2808
|
-
`);
|
|
2809
|
-
}]);
|
|
2810
|
-
|
|
2811
|
-
const ORACLE_SERVERGROUP_DETAILS_RESIZE_RESIZECAPACITY_COMPONENT = "spinnaker.oracle.serverGroup.details.resize.capacity.component";
|
|
2812
|
-
angular.module(ORACLE_SERVERGROUP_DETAILS_RESIZE_RESIZECAPACITY_COMPONENT, [SERVER_GROUP_WRITER]).component("oracleResizeCapacity", {
|
|
2813
|
-
bindings: {
|
|
2814
|
-
command: "=",
|
|
2815
|
-
application: "=",
|
|
2816
|
-
serverGroup: "=",
|
|
2817
|
-
formMethods: "="
|
|
2818
|
-
},
|
|
2819
|
-
templateUrl: "oracle/src/serverGroup/details/resize/resizeCapacity.component.html",
|
|
2820
|
-
controller: [
|
|
2821
|
-
"$scope",
|
|
2822
|
-
"serverGroupWriter",
|
|
2823
|
-
function($scope, serverGroupWriter) {
|
|
2824
|
-
this.command.newSize = null;
|
|
2825
|
-
angular.extend(this.formMethods, {
|
|
2826
|
-
formIsValid: () => _$1.every([this.command.newSize !== null, $scope.resizeCapacityForm.$valid]),
|
|
2827
|
-
submitMethod: () => {
|
|
2828
|
-
return serverGroupWriter.resizeServerGroup(this.serverGroup, this.application, {
|
|
2829
|
-
capacity: { min: this.command.newSize, max: this.command.newSize, desired: this.command.newSize },
|
|
2830
|
-
serverGroupName: this.serverGroup.name,
|
|
2831
|
-
targetSize: this.command.newSize,
|
|
2832
|
-
region: this.serverGroup.region,
|
|
2833
|
-
interestingHealthProviderNames: this.command.interestingHealthProviderNames,
|
|
2834
|
-
reason: this.command.reason
|
|
2835
|
-
});
|
|
2836
|
-
}
|
|
2837
|
-
});
|
|
2838
|
-
}
|
|
2839
|
-
]
|
|
2840
|
-
});
|
|
2841
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
2842
|
-
templateCache.put("oracle/src/serverGroup/details/resize/resizeCapacity.component.html", `<ng-form name="resizeCapacityForm">
|
|
2843
|
-
<div>
|
|
2844
|
-
<div class="form-group">
|
|
2845
|
-
<div class="col-md-12">
|
|
2846
|
-
<p>Sets desired instance count for this server group.</p>
|
|
2847
|
-
</div>
|
|
2848
|
-
</div>
|
|
2849
|
-
<div class="form-group form-inline">
|
|
2850
|
-
<div class="col-md-3 sm-label-right">Current size</div>
|
|
2851
|
-
<div class="col-md-6">
|
|
2852
|
-
<input
|
|
2853
|
-
type="number"
|
|
2854
|
-
class="form-control input-sm"
|
|
2855
|
-
ng-model="$ctrl.serverGroup.capacity.desired"
|
|
2856
|
-
style="width: 60px"
|
|
2857
|
-
readonly
|
|
2858
|
-
/>
|
|
2859
|
-
instance<span ng-if="$ctrl.currentSize.desired > 1">s</span>
|
|
2860
|
-
</div>
|
|
2861
|
-
</div>
|
|
2862
|
-
<div class="form-group form-inline">
|
|
2863
|
-
<div class="col-md-3 sm-label-right">Resize to</div>
|
|
2864
|
-
<div class="col-md-6">
|
|
2865
|
-
<input
|
|
2866
|
-
type="number"
|
|
2867
|
-
class="form-control input-sm highlight-pristine"
|
|
2868
|
-
ng-model="$ctrl.command.newSize"
|
|
2869
|
-
min="0"
|
|
2870
|
-
required
|
|
2871
|
-
style="width: 60px"
|
|
2872
|
-
/>
|
|
2873
|
-
instance<span ng-if="$ctrl.currentSize.desired > 1">s</span>
|
|
2874
|
-
</div>
|
|
2875
|
-
</div>
|
|
2876
|
-
</div>
|
|
2877
|
-
</ng-form>
|
|
2878
|
-
`);
|
|
2879
|
-
}]);
|
|
2880
|
-
|
|
2881
|
-
const ORACLE_SERVERGROUP_DETAILS_RESIZE_RESIZESERVERGROUP_CONTROLLER = "spinnaker.oracle.serverGroup.details.resize.controller";
|
|
2882
|
-
module(ORACLE_SERVERGROUP_DETAILS_RESIZE_RESIZESERVERGROUP_CONTROLLER, [
|
|
2883
|
-
ORACLE_SERVERGROUP_DETAILS_RESIZE_RESIZECAPACITY_COMPONENT,
|
|
2884
|
-
ORACLE_COMMON_FOOTER_COMPONENT
|
|
2885
|
-
]).controller("oracleResizeServerGroupCtrl", [
|
|
2886
|
-
"$scope",
|
|
2887
|
-
"$uibModalInstance",
|
|
2888
|
-
"application",
|
|
2889
|
-
"serverGroup",
|
|
2890
|
-
function($scope, $uibModalInstance, application, serverGroup) {
|
|
2891
|
-
$scope.serverGroup = serverGroup;
|
|
2892
|
-
$scope.application = application;
|
|
2893
|
-
$scope.verification = {};
|
|
2894
|
-
$scope.command = {};
|
|
2895
|
-
$scope.formMethods = {};
|
|
2896
|
-
if (application && application.attributes) {
|
|
2897
|
-
if (application.attributes.platformHealthOnlyShowOverride && application.attributes.platformHealthOnly) {
|
|
2898
|
-
$scope.command.interestingHealthProviderNames = ["Oracle"];
|
|
2899
|
-
}
|
|
2900
|
-
$scope.command.platformHealthOnlyShowOverride = application.attributes.platformHealthOnlyShowOverride;
|
|
2901
|
-
}
|
|
2902
|
-
this.isValid = function() {
|
|
2903
|
-
if (!$scope.verification.verified) {
|
|
2904
|
-
return false;
|
|
2905
|
-
}
|
|
2906
|
-
return $scope.formMethods.formIsValid();
|
|
2907
|
-
};
|
|
2908
|
-
$scope.taskMonitor = new TaskMonitor({
|
|
2909
|
-
application,
|
|
2910
|
-
title: "Resizing " + serverGroup.name,
|
|
2911
|
-
modalInstance: $uibModalInstance
|
|
2912
|
-
});
|
|
2913
|
-
this.resize = function() {
|
|
2914
|
-
this.submitting = true;
|
|
2915
|
-
if (!this.isValid()) {
|
|
2916
|
-
return;
|
|
2917
|
-
}
|
|
2918
|
-
$scope.taskMonitor.submit($scope.formMethods.submitMethod);
|
|
2919
|
-
};
|
|
2920
|
-
this.cancel = function() {
|
|
2921
|
-
$uibModalInstance.dismiss();
|
|
2922
|
-
};
|
|
2923
|
-
}
|
|
2924
|
-
]);
|
|
2925
|
-
|
|
2926
|
-
const ORACLE_SERVERGROUP_DETAILS_ROLLBACK_ROLLBACKSERVERGROUP_CONTROLLER = "spinnaker.oracle.serverGroup.details.rollback.controller";
|
|
2927
|
-
module(ORACLE_SERVERGROUP_DETAILS_ROLLBACK_ROLLBACKSERVERGROUP_CONTROLLER, [
|
|
2928
|
-
SERVER_GROUP_WRITER,
|
|
2929
|
-
ORACLE_COMMON_FOOTER_COMPONENT
|
|
2930
|
-
]).controller("oracleRollbackServerGroupCtrl", [
|
|
2931
|
-
"$scope",
|
|
2932
|
-
"$uibModalInstance",
|
|
2933
|
-
"serverGroupWriter",
|
|
2934
|
-
"application",
|
|
2935
|
-
"serverGroup",
|
|
2936
|
-
"disabledServerGroups",
|
|
2937
|
-
function($scope, $uibModalInstance, serverGroupWriter, application, serverGroup, disabledServerGroups) {
|
|
2938
|
-
$scope.serverGroup = serverGroup;
|
|
2939
|
-
$scope.disabledServerGroups = disabledServerGroups.sort((a, b) => b.name.localeCompare(a.name));
|
|
2940
|
-
$scope.verification = {};
|
|
2941
|
-
$scope.command = {
|
|
2942
|
-
rollbackType: "EXPLICIT",
|
|
2943
|
-
rollbackContext: {
|
|
2944
|
-
rollbackServerGroupName: serverGroup.name
|
|
2945
|
-
}
|
|
2946
|
-
};
|
|
2947
|
-
if (application && application.attributes) {
|
|
2948
|
-
if (application.attributes.platformHealthOnlyShowOverride && application.attributes.platformHealthOnly) {
|
|
2949
|
-
$scope.command.interestingHealthProviderNames = ["Oracle"];
|
|
2950
|
-
}
|
|
2951
|
-
$scope.command.platformHealthOnlyShowOverride = application.attributes.platformHealthOnlyShowOverride;
|
|
2952
|
-
}
|
|
2953
|
-
this.isValid = function() {
|
|
2954
|
-
const command = $scope.command;
|
|
2955
|
-
if (!$scope.verification.verified) {
|
|
2956
|
-
return false;
|
|
2957
|
-
}
|
|
2958
|
-
return command.rollbackContext.restoreServerGroupName !== void 0;
|
|
2959
|
-
};
|
|
2960
|
-
$scope.taskMonitor = new TaskMonitor({
|
|
2961
|
-
application,
|
|
2962
|
-
title: "Rollback " + serverGroup.name,
|
|
2963
|
-
modalInstance: $uibModalInstance
|
|
2964
|
-
});
|
|
2965
|
-
this.rollback = function() {
|
|
2966
|
-
this.submitting = true;
|
|
2967
|
-
if (!this.isValid()) {
|
|
2968
|
-
return;
|
|
2969
|
-
}
|
|
2970
|
-
const submitMethod = function() {
|
|
2971
|
-
return serverGroupWriter.rollbackServerGroup(serverGroup, application, $scope.command);
|
|
2972
|
-
};
|
|
2973
|
-
$scope.taskMonitor.submit(submitMethod);
|
|
2974
|
-
};
|
|
2975
|
-
this.cancel = function() {
|
|
2976
|
-
$uibModalInstance.dismiss();
|
|
2977
|
-
};
|
|
2978
|
-
}
|
|
2979
|
-
]);
|
|
2980
|
-
|
|
2981
|
-
const ORACLE_SERVERGROUP_DETAILS_SERVERGROUPDETAILS_CONTROLLER = "spinnaker.oracle.serverGroup.details.controller";
|
|
2982
|
-
module(ORACLE_SERVERGROUP_DETAILS_SERVERGROUPDETAILS_CONTROLLER, [
|
|
2983
|
-
UIROUTER_ANGULARJS,
|
|
2984
|
-
SERVER_GROUP_WRITER,
|
|
2985
|
-
ORACLE_IMAGE_IMAGE_READER,
|
|
2986
|
-
ORACLE_SERVERGROUP_DETAILS_RESIZE_RESIZESERVERGROUP_CONTROLLER,
|
|
2987
|
-
ORACLE_SERVERGROUP_DETAILS_ROLLBACK_ROLLBACKSERVERGROUP_CONTROLLER
|
|
2988
|
-
]).controller("oracleServerGroupDetailsCtrl", [
|
|
2989
|
-
"$scope",
|
|
2990
|
-
"$state",
|
|
2991
|
-
"$uibModal",
|
|
2992
|
-
"app",
|
|
2993
|
-
"serverGroup",
|
|
2994
|
-
"serverGroupWriter",
|
|
2995
|
-
"oracleImageReader",
|
|
2996
|
-
function($scope, $state, $uibModal, app, serverGroup, serverGroupWriter, oracleImageReader) {
|
|
2997
|
-
const provider = "oracle";
|
|
2998
|
-
this.application = app;
|
|
2999
|
-
this.serverGroup = serverGroup;
|
|
3000
|
-
this.state = {
|
|
3001
|
-
loading: true
|
|
3002
|
-
};
|
|
3003
|
-
const retrieveServerGroup = () => {
|
|
3004
|
-
return ServerGroupReader.getServerGroup(app.name, serverGroup.accountId, serverGroup.region, serverGroup.name).then((details) => {
|
|
3005
|
-
cancelLoader();
|
|
3006
|
-
details.account = serverGroup.accountId;
|
|
3007
|
-
this.serverGroup = details;
|
|
3008
|
-
retrieveNetwork();
|
|
3009
|
-
retrieveSubnet();
|
|
3010
|
-
retrieveImage();
|
|
3011
|
-
});
|
|
3012
|
-
};
|
|
3013
|
-
const retrieveNetwork = () => {
|
|
3014
|
-
NetworkReader.listNetworksByProvider(provider).then((networks) => {
|
|
3015
|
-
this.serverGroup.network = _.chain(networks).filter({ account: this.serverGroup.account, id: this.serverGroup.launchConfig.vpcId }).head().value();
|
|
3016
|
-
});
|
|
3017
|
-
};
|
|
3018
|
-
const retrieveSubnet = () => {
|
|
3019
|
-
SubnetReader.getSubnetByIdAndProvider(this.serverGroup.launchConfig.subnetId, provider).then((subnet) => {
|
|
3020
|
-
this.serverGroup.subnet = subnet;
|
|
3021
|
-
});
|
|
3022
|
-
};
|
|
3023
|
-
const retrieveImage = () => {
|
|
3024
|
-
oracleImageReader.getImage(this.serverGroup.launchConfig.imageId, this.serverGroup.region, this.serverGroup.account).then((image) => {
|
|
3025
|
-
if (!image) {
|
|
3026
|
-
image = { id: this.serverGroup.launchConfig.imageId, name: this.serverGroup.launchConfig.imageId };
|
|
3027
|
-
}
|
|
3028
|
-
this.serverGroup.image = image;
|
|
3029
|
-
});
|
|
3030
|
-
};
|
|
3031
|
-
this.destroyServerGroup = function destroyServerGroup() {
|
|
3032
|
-
const serverGroup2 = this.serverGroup;
|
|
3033
|
-
const taskMonitor = {
|
|
3034
|
-
application: app,
|
|
3035
|
-
title: "Destroying " + serverGroup2.name,
|
|
3036
|
-
onTaskComplete: function() {
|
|
3037
|
-
if ($state.includes("**.serverGroup", stateParams)) {
|
|
3038
|
-
$state.go("^");
|
|
3039
|
-
}
|
|
3040
|
-
}
|
|
3041
|
-
};
|
|
3042
|
-
const submitMethod = function() {
|
|
3043
|
-
return serverGroupWriter.destroyServerGroup(serverGroup2, app);
|
|
3044
|
-
};
|
|
3045
|
-
const stateParams = {
|
|
3046
|
-
name: serverGroup2.name,
|
|
3047
|
-
account: serverGroup2.account,
|
|
3048
|
-
region: serverGroup2.region
|
|
3049
|
-
};
|
|
3050
|
-
ConfirmationModalService.confirm({
|
|
3051
|
-
header: "Really destroy " + serverGroup2.name + "?",
|
|
3052
|
-
buttonText: "Destroy " + serverGroup2.name,
|
|
3053
|
-
account: serverGroup2.account,
|
|
3054
|
-
taskMonitorConfig: taskMonitor,
|
|
3055
|
-
submitMethod
|
|
3056
|
-
});
|
|
3057
|
-
};
|
|
3058
|
-
this.resizeServerGroup = () => {
|
|
3059
|
-
$uibModal.open({
|
|
3060
|
-
templateUrl: "oracle/src/serverGroup/details/resize/resizeServerGroup.html",
|
|
3061
|
-
controller: "oracleResizeServerGroupCtrl as ctrl",
|
|
3062
|
-
resolve: {
|
|
3063
|
-
serverGroup: () => {
|
|
3064
|
-
return this.serverGroup;
|
|
3065
|
-
},
|
|
3066
|
-
application: () => {
|
|
3067
|
-
return app;
|
|
3068
|
-
}
|
|
3069
|
-
}
|
|
3070
|
-
});
|
|
3071
|
-
};
|
|
3072
|
-
this.rollbackServerGroup = () => {
|
|
3073
|
-
$uibModal.open({
|
|
3074
|
-
templateUrl: "oracle/src/serverGroup/details/rollback/rollbackServerGroup.html",
|
|
3075
|
-
controller: "oracleRollbackServerGroupCtrl as ctrl",
|
|
3076
|
-
resolve: {
|
|
3077
|
-
serverGroup: () => this.serverGroup,
|
|
3078
|
-
disabledServerGroups: () => {
|
|
3079
|
-
const sgSummary = _.find(app.serverGroups.data, {
|
|
3080
|
-
name: this.serverGroup.name,
|
|
3081
|
-
account: this.serverGroup.account,
|
|
3082
|
-
region: this.serverGroup.region
|
|
3083
|
-
});
|
|
3084
|
-
const cluster = _.find(app.clusters, { name: sgSummary.cluster, account: this.serverGroup.account });
|
|
3085
|
-
return _.filter(cluster.serverGroups, { isDisabled: true, region: this.serverGroup.region });
|
|
3086
|
-
},
|
|
3087
|
-
application: () => app
|
|
3088
|
-
}
|
|
3089
|
-
});
|
|
3090
|
-
};
|
|
3091
|
-
this.disableServerGroup = () => {
|
|
3092
|
-
const serverGroup2 = this.serverGroup;
|
|
3093
|
-
const taskMonitor = {
|
|
3094
|
-
application: app,
|
|
3095
|
-
title: "Disabling " + serverGroup2.name
|
|
3096
|
-
};
|
|
3097
|
-
const submitMethod = (params) => serverGroupWriter.disableServerGroup(serverGroup2, app, params);
|
|
3098
|
-
const confirmationModalParams = {
|
|
3099
|
-
header: "Really disable " + serverGroup2.name + "?",
|
|
3100
|
-
buttonText: "Disable " + serverGroup2.name,
|
|
3101
|
-
account: serverGroup2.account,
|
|
3102
|
-
taskMonitorConfig: taskMonitor,
|
|
3103
|
-
platformHealthOnlyShowOverride: app.attributes.platformHealthOnlyShowOverride,
|
|
3104
|
-
platformHealthType: "Oracle",
|
|
3105
|
-
submitMethod,
|
|
3106
|
-
askForReason: true
|
|
3107
|
-
};
|
|
3108
|
-
ServerGroupWarningMessageService.addDisableWarningMessage(app, serverGroup2, confirmationModalParams);
|
|
3109
|
-
if (app.attributes.platformHealthOnlyShowOverride && app.attributes.platformHealthOnly) {
|
|
3110
|
-
confirmationModalParams.interestingHealthProviderNames = ["Oracle"];
|
|
3111
|
-
}
|
|
3112
|
-
ConfirmationModalService.confirm(confirmationModalParams);
|
|
3113
|
-
};
|
|
3114
|
-
this.enableServerGroup = () => {
|
|
3115
|
-
const serverGroup2 = this.serverGroup;
|
|
3116
|
-
const taskMonitor = {
|
|
3117
|
-
application: app,
|
|
3118
|
-
title: "Enabling " + serverGroup2.name
|
|
3119
|
-
};
|
|
3120
|
-
const submitMethod = (params) => serverGroupWriter.enableServerGroup(serverGroup2, app, params);
|
|
3121
|
-
const confirmationModalParams = {
|
|
3122
|
-
header: "Really enable " + serverGroup2.name + "?",
|
|
3123
|
-
buttonText: "Enable " + serverGroup2.name,
|
|
3124
|
-
account: serverGroup2.account,
|
|
3125
|
-
taskMonitorConfig: taskMonitor,
|
|
3126
|
-
platformHealthOnlyShowOverride: app.attributes.platformHealthOnlyShowOverride,
|
|
3127
|
-
platformHealthType: "Oracle",
|
|
3128
|
-
submitMethod,
|
|
3129
|
-
askForReason: true
|
|
3130
|
-
};
|
|
3131
|
-
if (app.attributes.platformHealthOnlyShowOverride && app.attributes.platformHealthOnly) {
|
|
3132
|
-
confirmationModalParams.interestingHealthProviderNames = ["Oracle"];
|
|
3133
|
-
}
|
|
3134
|
-
ConfirmationModalService.confirm(confirmationModalParams);
|
|
3135
|
-
};
|
|
3136
|
-
const cancelLoader = () => {
|
|
3137
|
-
this.state.loading = false;
|
|
3138
|
-
};
|
|
3139
|
-
retrieveServerGroup().then(() => {
|
|
3140
|
-
if (!$scope.$$destroyed) {
|
|
3141
|
-
app.serverGroups.onRefresh($scope, retrieveServerGroup);
|
|
3142
|
-
}
|
|
3143
|
-
});
|
|
3144
|
-
}
|
|
3145
|
-
]);
|
|
3146
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
3147
|
-
templateCache.put("oracle/src/serverGroup/details/resize/resizeServerGroup.html", `<div modal-page class="confirmation-modal">
|
|
3148
|
-
<task-monitor monitor="taskMonitor"></task-monitor>
|
|
3149
|
-
<form role="form" ng-if="!ctrl.submitting">
|
|
3150
|
-
<modal-close dismiss="$dismiss()"></modal-close>
|
|
3151
|
-
<div class="modal-header">
|
|
3152
|
-
<h4 class="modal-title">Resize {{serverGroup.name}}</h4>
|
|
3153
|
-
</div>
|
|
3154
|
-
<div class="modal-body confirmation-modal">
|
|
3155
|
-
<div class="form-horizontal">
|
|
3156
|
-
<oracle-resize-capacity
|
|
3157
|
-
server-group="serverGroup"
|
|
3158
|
-
form-methods="formMethods"
|
|
3159
|
-
application="application"
|
|
3160
|
-
command="command"
|
|
3161
|
-
></oracle-resize-capacity>
|
|
3162
|
-
</div>
|
|
3163
|
-
<div class="row" ng-if="command.platformHealthOnlyShowOverride">
|
|
3164
|
-
<div class="col-sm-10 col-sm-offset-1">
|
|
3165
|
-
<platform-health-override command="command" platform-health-type="'Oracle'" show-help-details="true">
|
|
3166
|
-
</platform-health-override>
|
|
3167
|
-
</div>
|
|
3168
|
-
</div>
|
|
3169
|
-
<task-reason command="command"></task-reason>
|
|
3170
|
-
</div>
|
|
3171
|
-
<oracle-footer
|
|
3172
|
-
action="ctrl.resize()"
|
|
3173
|
-
cancel="ctrl.cancel()"
|
|
3174
|
-
is-valid="ctrl.isValid()"
|
|
3175
|
-
account="serverGroup.account"
|
|
3176
|
-
verification="verification"
|
|
3177
|
-
></oracle-footer>
|
|
3178
|
-
</form>
|
|
3179
|
-
</div>
|
|
3180
|
-
`);
|
|
3181
|
-
}]);
|
|
3182
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
3183
|
-
templateCache.put("oracle/src/serverGroup/details/rollback/rollbackServerGroup.html", `<div modal-page class="confirmation-modal">
|
|
3184
|
-
<task-monitor monitor="taskMonitor"></task-monitor>
|
|
3185
|
-
<form role="form" ng-if="!ctrl.submitting">
|
|
3186
|
-
<modal-close dismiss="$dismiss()"></modal-close>
|
|
3187
|
-
<div class="modal-header">
|
|
3188
|
-
<h4 class="modal-title">Rollback {{serverGroup.name}}</h4>
|
|
3189
|
-
</div>
|
|
3190
|
-
<div class="modal-body confirmation-modal">
|
|
3191
|
-
<div class="row">
|
|
3192
|
-
<div class="col-sm-3 sm-label-right">Restore to</div>
|
|
3193
|
-
<div class="col-sm-6">
|
|
3194
|
-
<ui-select ng-model="command.rollbackContext.restoreServerGroupName" class="form-control input-sm">
|
|
3195
|
-
<ui-select-match placeholder="Select...">{{$select.selected.name}}</ui-select-match>
|
|
3196
|
-
<ui-select-choices repeat="serverGroup.name as serverGroup in disabledServerGroups">
|
|
3197
|
-
<span ng-bind-html="serverGroup.name"></span>
|
|
3198
|
-
</ui-select-choices>
|
|
3199
|
-
</ui-select>
|
|
3200
|
-
</div>
|
|
3201
|
-
</div>
|
|
3202
|
-
<div class="row" ng-if="command.platformHealthOnlyShowOverride">
|
|
3203
|
-
<div class="col-sm-10 col-sm-offset-1">
|
|
3204
|
-
<platform-health-override
|
|
3205
|
-
command="command"
|
|
3206
|
-
platform-health-type="'Oracle'"
|
|
3207
|
-
show-help-details="true"
|
|
3208
|
-
field-columns="12"
|
|
3209
|
-
>
|
|
3210
|
-
</platform-health-override>
|
|
3211
|
-
</div>
|
|
3212
|
-
</div>
|
|
3213
|
-
<task-reason command="command"></task-reason>
|
|
3214
|
-
</div>
|
|
3215
|
-
<gce-footer
|
|
3216
|
-
action="ctrl.rollback()"
|
|
3217
|
-
cancel="ctrl.cancel()"
|
|
3218
|
-
is-valid="ctrl.isValid()"
|
|
3219
|
-
account="serverGroup.account"
|
|
3220
|
-
verification="verification"
|
|
3221
|
-
></gce-footer>
|
|
3222
|
-
</form>
|
|
3223
|
-
</div>
|
|
3224
|
-
`);
|
|
3225
|
-
}]);
|
|
3226
|
-
|
|
3227
|
-
const ORACLE_SERVERGROUP_SERVERGROUP_TRANSFORMER = "spinnaker.oracle.serverGroup.transformer";
|
|
3228
|
-
module(ORACLE_SERVERGROUP_SERVERGROUP_TRANSFORMER, []).factory("oracleServerGroupTransformer", [
|
|
3229
|
-
"$q",
|
|
3230
|
-
function($q) {
|
|
3231
|
-
const PROVIDER = "oracle";
|
|
3232
|
-
function normalizeServerGroup(serverGroup) {
|
|
3233
|
-
return $q.when(serverGroup);
|
|
3234
|
-
}
|
|
3235
|
-
function convertServerGroupCommandToDeployConfiguration(base) {
|
|
3236
|
-
const command = _$1.defaults({ backingData: [], viewState: [] }, base);
|
|
3237
|
-
command.cloudProvider = PROVIDER;
|
|
3238
|
-
return command;
|
|
3239
|
-
}
|
|
3240
|
-
return {
|
|
3241
|
-
convertServerGroupCommandToDeployConfiguration,
|
|
3242
|
-
normalizeServerGroup
|
|
3243
|
-
};
|
|
3244
|
-
}
|
|
3245
|
-
]);
|
|
3246
|
-
|
|
3247
|
-
const ORACLE_MODULE = "spinnaker.oracle";
|
|
3248
|
-
module(ORACLE_MODULE, [
|
|
3249
|
-
ORACLE_PIPELINE_STAGES_BAKE_OCIBAKESTAGE,
|
|
3250
|
-
ORACLE_PIPELINE_STAGES_DESTROYASG_DESTROYASGSTAGE,
|
|
3251
|
-
ORACLE_PIPELINE_STAGES_DISABLEASG_DISABLEASGSTAGE,
|
|
3252
|
-
ORACLE_PIPELINE_STAGES_FINDAMI_FINDAMISTAGE,
|
|
3253
|
-
ORACLE_PIPELINE_STAGES_FINDIMAGEFROMTAGS_ORACLEFINDIMAGEFROMTAGSSTAGE,
|
|
3254
|
-
ORACLE_PIPELINE_STAGES_RESIZEASG_RESIZEASGSTAGE,
|
|
3255
|
-
ORACLE_PIPELINE_STAGES_SCALEDOWNCLUSTER_SCALEDOWNCLUSTERSTAGE,
|
|
3256
|
-
ORACLE_PIPELINE_STAGES_SHRINKCLUSTER_SHRINKCLUSTERSTAGE,
|
|
3257
|
-
ORACLE_LOAD_BALANCER_TRANSFORMER,
|
|
3258
|
-
ORACLE_LOAD_BALANCER_DETAIL_CONTROLLER,
|
|
3259
|
-
ORACLE_LOAD_BALANCER_CREATE_CONTROLLER,
|
|
3260
|
-
ORACLE_SERVERGROUP_SERVERGROUP_TRANSFORMER,
|
|
3261
|
-
ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUP_CONFIGURE_MODULE,
|
|
3262
|
-
ORACLE_SERVERGROUP_DETAILS_SERVERGROUPDETAILS_CONTROLLER,
|
|
3263
|
-
ORACLE_SERVERGROUP_CONFIGURE_SERVERGROUPCOMMANDBUILDER_SERVICE,
|
|
3264
|
-
ORACLE_SERVERGROUP_CONFIGURE_WIZARD_CLONESERVERGROUP_CONTROLLER,
|
|
3265
|
-
ORACLE_IMAGE_IMAGE_READER,
|
|
3266
|
-
ORACLE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER,
|
|
3267
|
-
ORACLE_SECURITYGROUP_SECURITYGROUP_READER,
|
|
3268
|
-
ORACLE_SECURITYGROUP_SECURITYGROUP_TRANSFORMER,
|
|
3269
|
-
ORACLE_SECURITYGROUP_CONFIGURE_CREATESECURITYGROUP_CONTROLLER
|
|
3270
|
-
]).config(function() {
|
|
3271
|
-
CloudProviderRegistry.registerProvider("oracle", {
|
|
3272
|
-
name: "Oracle",
|
|
3273
|
-
image: {
|
|
3274
|
-
reader: "oracleImageReader"
|
|
3275
|
-
},
|
|
3276
|
-
loadBalancer: {
|
|
3277
|
-
transformer: "oracleLoadBalancerTransformer",
|
|
3278
|
-
detailsTemplateUrl: "oracle/src/loadBalancer/details/loadBalancerDetail.html",
|
|
3279
|
-
detailsController: "oracleLoadBalancerDetailCtrl",
|
|
3280
|
-
createLoadBalancerTemplateUrl: "oracle/src/loadBalancer/configure/createLoadBalancer.html",
|
|
3281
|
-
createLoadBalancerController: "oracleCreateLoadBalancerCtrl"
|
|
3282
|
-
},
|
|
3283
|
-
serverGroup: {
|
|
3284
|
-
transformer: "oracleServerGroupTransformer",
|
|
3285
|
-
detailsTemplateUrl: "oracle/src/serverGroup/details/serverGroupDetails.html",
|
|
3286
|
-
detailsController: "oracleServerGroupDetailsCtrl",
|
|
3287
|
-
commandBuilder: "oracleServerGroupCommandBuilder",
|
|
3288
|
-
cloneServerGroupController: "oracleCloneServerGroupCtrl",
|
|
3289
|
-
cloneServerGroupTemplateUrl: "oracle/src/serverGroup/configure/wizard/serverGroupWizard.html",
|
|
3290
|
-
configurationService: "oracleServerGroupConfigurationService"
|
|
3291
|
-
},
|
|
3292
|
-
instance: {
|
|
3293
|
-
detailsController: "oracleInstanceDetailsCtrl",
|
|
3294
|
-
detailsTemplateUrl: "oracle/src/instance/details/instanceDetails.html"
|
|
3295
|
-
},
|
|
3296
|
-
securityGroup: {
|
|
3297
|
-
reader: "oracleSecurityGroupReader",
|
|
3298
|
-
transformer: "oracleSecurityGroupTransformer",
|
|
3299
|
-
createSecurityGroupTemplateUrl: "oracle/src/securityGroup/configure/createSecurityGroup.html",
|
|
3300
|
-
createSecurityGroupController: "oracleCreateSecurityGroupCtrl"
|
|
3301
|
-
}
|
|
3302
|
-
});
|
|
3303
|
-
});
|
|
3304
|
-
DeploymentStrategyRegistry.registerProvider("oracle", []);
|
|
3305
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
3306
|
-
templateCache.put("oracle/src/loadBalancer/details/loadBalancerDetail.html", `<div class="details-panel">
|
|
3307
|
-
<div ng-if="state.loading" class="header">
|
|
3308
|
-
<div class="close-button">
|
|
3309
|
-
<a class="btn btn-link" ui-sref="^">
|
|
3310
|
-
<span class="glyphicon glyphicon-remove"></span>
|
|
3311
|
-
</a>
|
|
3312
|
-
</div>
|
|
3313
|
-
<div class="horizontal center middle">
|
|
3314
|
-
<loading-spinner size="'small'"></loading-spinner>
|
|
3315
|
-
</div>
|
|
3316
|
-
</div>
|
|
3317
|
-
|
|
3318
|
-
<div ng-if="!state.loading" class="header">
|
|
3319
|
-
<div class="close-button">
|
|
3320
|
-
<a class="btn btn-link" ui-sref="^">
|
|
3321
|
-
<span class="glyphicon glyphicon-remove"></span>
|
|
3322
|
-
</a>
|
|
3323
|
-
</div>
|
|
3324
|
-
<div class="header-text horizontal middle">
|
|
3325
|
-
<i class="fa icon-sitemap"></i>
|
|
3326
|
-
<h3 class="horizontal middle space-between flex-1" select-on-dbl-click>{{loadBalancer.name}}</h3>
|
|
3327
|
-
</div>
|
|
3328
|
-
<div>
|
|
3329
|
-
<div class="actions">
|
|
3330
|
-
<div class="dropdown" uib-dropdown dropdown-append-to-body>
|
|
3331
|
-
<button type="button" class="btn btn-sm btn-primary dropdown-toggle" uib-dropdown-toggle>
|
|
3332
|
-
Load Balancer Actions <span class="caret"></span>
|
|
3333
|
-
</button>
|
|
3334
|
-
<ul class="dropdown-menu" uib-dropdown-menu role="menu">
|
|
3335
|
-
<li><a href ng-click="ctrl.editLoadBalancer()">Edit Load Balancer</a></li>
|
|
3336
|
-
<li ng-if="!loadBalancer.serverGroups.length">
|
|
3337
|
-
<a href ng-click="ctrl.deleteLoadBalancer()">Delete Load Balancer</a>
|
|
3338
|
-
</li>
|
|
3339
|
-
<li
|
|
3340
|
-
ng-if="loadBalancer.serverGroups.length"
|
|
3341
|
-
class="disabled"
|
|
3342
|
-
tooltip="You must detach all server groups before you can delete this load balancer."
|
|
3343
|
-
>
|
|
3344
|
-
<a href ng-click="return">Delete Load Balancer</a>
|
|
3345
|
-
</li>
|
|
3346
|
-
</ul>
|
|
3347
|
-
</div>
|
|
3348
|
-
</div>
|
|
3349
|
-
</div>
|
|
3350
|
-
</div>
|
|
3351
|
-
<div ng-if="!state.loading" class="content">
|
|
3352
|
-
<collapsible-section heading="Load Balancer Details" expanded="true">
|
|
3353
|
-
<dl class="dl-horizontal dl-narrow">
|
|
3354
|
-
<dt>Created</dt>
|
|
3355
|
-
<dd>{{loadBalancer.timeCreated}}</dd>
|
|
3356
|
-
<dt>In</dt>
|
|
3357
|
-
<dd>
|
|
3358
|
-
<account-tag account="loadBalancer.account" pad="right" provider="loadBalancer.type"></account-tag>
|
|
3359
|
-
{{loadBalancer.region}}
|
|
3360
|
-
</dd>
|
|
3361
|
-
<dt>Subnets</dt>
|
|
3362
|
-
<dd ng-repeat="subnet in loadBalancer.subnets">{{subnet.name}}</dd>
|
|
3363
|
-
<dt>Public IP</dt>
|
|
3364
|
-
<dd ng-repeat="ip in loadBalancer.ipAddresses">{{ip.ipAddress}}</dd>
|
|
3365
|
-
</dl>
|
|
3366
|
-
<dl class="horizontal-when-filters-collapsed">
|
|
3367
|
-
<dt ng-if="loadBalancer.serverGroups">Server Groups</dt>
|
|
3368
|
-
<dd ng-if="loadBalancer.serverGroups">
|
|
3369
|
-
<ul class="collapse-margin-on-filter-collapse">
|
|
3370
|
-
<li ng-repeat="serverGroup in loadBalancer.serverGroups | orderBy: ['isDisabled', '-name']">
|
|
3371
|
-
<a
|
|
3372
|
-
ui-sref="^.serverGroup({region: serverGroup.region,
|
|
3373
|
-
accountId: serverGroup.account,
|
|
3374
|
-
serverGroup: serverGroup.name,
|
|
3375
|
-
provider: 'oracle'})"
|
|
3376
|
-
>
|
|
3377
|
-
{{serverGroup.name}}
|
|
3378
|
-
</a>
|
|
3379
|
-
</li>
|
|
3380
|
-
</ul>
|
|
3381
|
-
</dd>
|
|
3382
|
-
</dl>
|
|
3383
|
-
</collapsible-section>
|
|
3384
|
-
<!-- <collapsible-section heading="Status" expanded="true">
|
|
3385
|
-
<health-counts class="pull-left" container="loadBalancer.instanceCounts"></health-counts>
|
|
3386
|
-
</collapsible-section> -->
|
|
3387
|
-
<collapsible-section heading="Backend Sets">
|
|
3388
|
-
<dd ng-repeat="backendSet in loadBalancer.backendSets">
|
|
3389
|
-
<dl>
|
|
3390
|
-
<dt>{{backendSet.name}}</dt>
|
|
3391
|
-
<dd>{{backendSet.policy}}</dd>
|
|
3392
|
-
<dd>Health Check: {{backendSet.healthChecker.urlPath}}</dd>
|
|
3393
|
-
</dl>
|
|
3394
|
-
</dd>
|
|
3395
|
-
</collapsible-section>
|
|
3396
|
-
<collapsible-section heading="Listeners">
|
|
3397
|
-
<dl>
|
|
3398
|
-
<dt>Listener → Backend Set</dt>
|
|
3399
|
-
<dd ng-repeat="listener in loadBalancer.listeners">
|
|
3400
|
-
{{listener.protocol}}:{{listener.port}} → {{listener.defaultBackendSetName}}
|
|
3401
|
-
</dd>
|
|
3402
|
-
</dl>
|
|
3403
|
-
</collapsible-section>
|
|
3404
|
-
</div>
|
|
3405
|
-
</div>
|
|
3406
|
-
`);
|
|
3407
|
-
}]);
|
|
3408
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
3409
|
-
templateCache.put("oracle/src/loadBalancer/configure/createLoadBalancer.html", `<form name="form" class="form-horizontal" novalidate validate-on-submit>
|
|
3410
|
-
<v2-modal-wizard heading="Create New Oracle Load Balancer" task-monitor="taskMonitor" dismiss="$dismiss()">
|
|
3411
|
-
<v2-wizard-page key="Properties" label="Properties">
|
|
3412
|
-
<ng-include src="ctrl.pages.properties"></ng-include>
|
|
3413
|
-
</v2-wizard-page>
|
|
3414
|
-
<v2-wizard-page key="Certificates" label="SSL Certificates" done="true">
|
|
3415
|
-
<ng-include src="ctrl.pages.certificates"></ng-include>
|
|
3416
|
-
</v2-wizard-page>
|
|
3417
|
-
<v2-wizard-page key="Backend Sets" label="Backend Sets" done="true" hide-subheading="true">
|
|
3418
|
-
<ng-include src="ctrl.pages.backendSets"></ng-include>
|
|
3419
|
-
</v2-wizard-page>
|
|
3420
|
-
<v2-wizard-page key="Listeners" label="Listeners" done="true">
|
|
3421
|
-
<ng-include src="ctrl.pages.listeners"></ng-include>
|
|
3422
|
-
</v2-wizard-page>
|
|
3423
|
-
</v2-modal-wizard>
|
|
3424
|
-
<div class="modal-footer">
|
|
3425
|
-
<button ng-disabled="ctrl.taskMonitor.submitting" class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>
|
|
3426
|
-
<submit-button
|
|
3427
|
-
is-disabled="!state.accountsLoaded || !form.$valid || !ctrl.validateBeforeSubmit() || ctrl.taskMonitor.submitting"
|
|
3428
|
-
submitting="ctrl.taskMonitor.submitting"
|
|
3429
|
-
on-click="form.$valid && ctrl.validateBeforeSubmit() && ctrl.submit()"
|
|
3430
|
-
is-new="ctrl.isNew"
|
|
3431
|
-
></submit-button>
|
|
3432
|
-
</div>
|
|
3433
|
-
</form>
|
|
3434
|
-
`);
|
|
3435
|
-
}]);
|
|
3436
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
3437
|
-
templateCache.put("oracle/src/serverGroup/details/serverGroupDetails.html", `<div class="details-panel" ng-class="{ disabled: ctrl.serverGroup.isDisabled }">
|
|
3438
|
-
<div class="header" ng-if="ctrl.state.loading">
|
|
3439
|
-
<div class="close-button">
|
|
3440
|
-
<a class="btn btn-link" ui-sref="^">
|
|
3441
|
-
<span class="glyphicon glyphicon-remove"></span>
|
|
3442
|
-
</a>
|
|
3443
|
-
</div>
|
|
3444
|
-
<div class="horizontal center spinner-container">
|
|
3445
|
-
<loading-spinner size="'small'"></loading-spinner>
|
|
3446
|
-
</div>
|
|
3447
|
-
</div>
|
|
3448
|
-
<div class="header" ng-if="!ctrl.state.loading">
|
|
3449
|
-
<div class="close-button">
|
|
3450
|
-
<a class="btn btn-link" ui-sref="^">
|
|
3451
|
-
<span class="glyphicon glyphicon-remove"></span>
|
|
3452
|
-
</a>
|
|
3453
|
-
</div>
|
|
3454
|
-
<div class="header-text horizontal middle">
|
|
3455
|
-
<h3 class="horizontal middle space-between flex-1" select-on-dbl-click>{{ctrl.serverGroup.name}}</h3>
|
|
3456
|
-
</div>
|
|
3457
|
-
<div>
|
|
3458
|
-
<div class="actions" ng-class="{ insights: ctrl.serverGroup.insightActions.length > 0 }">
|
|
3459
|
-
<div class="dropdown" uib-dropdown dropdown-append-to-body>
|
|
3460
|
-
<button type="button" class="btn btn-sm btn-primary dropdown-toggle" uib-dropdown-toggle>
|
|
3461
|
-
Server Group Actions <span class="caret"></span>
|
|
3462
|
-
</button>
|
|
3463
|
-
<ul class="dropdown-menu" uib-dropdown-menu role="menu">
|
|
3464
|
-
<li><a href ng-if="!ctrl.serverGroup.disabled" ng-click="ctrl.disableServerGroup()">Disable</a></li>
|
|
3465
|
-
<li><a href ng-if="ctrl.serverGroup.disabled" ng-click="ctrl.enableServerGroup()">Enable</a></li>
|
|
3466
|
-
<li><a href ng-click="ctrl.destroyServerGroup()">Destroy</a></li>
|
|
3467
|
-
<li><a href ng-click="ctrl.resizeServerGroup()">Resize</a></li>
|
|
3468
|
-
<li><a href ng-click="ctrl.rollbackServerGroup()">Rollback</a></li>
|
|
3469
|
-
</ul>
|
|
3470
|
-
</div>
|
|
3471
|
-
<div class="dropdown" ng-if="ctrl.serverGroup.insightActions.length > 0" uib-dropdown dropdown-append-to-body>
|
|
3472
|
-
<button type="button" class="btn btn-sm btn-default dropdown-toggle" uib-dropdown-toggle>
|
|
3473
|
-
Insight <span class="caret"></span>
|
|
3474
|
-
</button>
|
|
3475
|
-
<ul class="dropdown-menu" uib-dropdown-menu role="menu">
|
|
3476
|
-
<li ng-repeat="action in ctrl.serverGroup.insightActions">
|
|
3477
|
-
<a target="_blank" href="{{action.url}}">{{action.label}}</a>
|
|
3478
|
-
</li>
|
|
3479
|
-
</ul>
|
|
3480
|
-
</div>
|
|
3481
|
-
<div class="clearfix"></div>
|
|
3482
|
-
</div>
|
|
3483
|
-
</div>
|
|
3484
|
-
</div>
|
|
3485
|
-
<div class="content" ng-if="!ctrl.state.loading">
|
|
3486
|
-
<h4 class="text-center" ng-if="ctrl.serverGroup.isDisabled">[SERVER GROUP IS DISABLED]</h4>
|
|
3487
|
-
<server-group-running-tasks-details server-group="ctrl.serverGroup"></server-group-running-tasks-details>
|
|
3488
|
-
<collapsible-section heading="Server Group Information" expanded="true">
|
|
3489
|
-
<dl class="dl-horizontal dl-narrow">
|
|
3490
|
-
<dt>Created</dt>
|
|
3491
|
-
<dd>{{ctrl.serverGroup.createdTime | timestamp}}</dd>
|
|
3492
|
-
<dt>In</dt>
|
|
3493
|
-
<dd>
|
|
3494
|
-
<account-tag account="ctrl.serverGroup.account" pad="right"></account-tag>
|
|
3495
|
-
{{ctrl.serverGroup.region}}
|
|
3496
|
-
</dd>
|
|
3497
|
-
<dt>VCN</dt>
|
|
3498
|
-
<dd>{{ctrl.serverGroup.network.name}}</dd>
|
|
3499
|
-
<dt>Subnet</dt>
|
|
3500
|
-
<dd>{{ctrl.serverGroup.subnet.name}}</dd>
|
|
3501
|
-
<dt>Avail Domain</dt>
|
|
3502
|
-
<dd>{{ctrl.serverGroup.zone}}</dd>
|
|
3503
|
-
</dl>
|
|
3504
|
-
</collapsible-section>
|
|
3505
|
-
<collapsible-section heading="Size" expanded="true">
|
|
3506
|
-
<dl class="dl-horizontal dl-narrow">
|
|
3507
|
-
<dt>Desired</dt>
|
|
3508
|
-
<dd>{{ctrl.serverGroup.capacity.desired}}</dd>
|
|
3509
|
-
<dt>Current</dt>
|
|
3510
|
-
<dd>{{ctrl.serverGroup.instances.length}}</dd>
|
|
3511
|
-
</dl>
|
|
3512
|
-
</collapsible-section>
|
|
3513
|
-
<collapsible-section heading="Launch Configuration">
|
|
3514
|
-
<dl class="dl-horizontal dl-narrow">
|
|
3515
|
-
<dt>Name</dt>
|
|
3516
|
-
<dd>{{ctrl.serverGroup.name}}</dd>
|
|
3517
|
-
<dt>Image</dt>
|
|
3518
|
-
<dd>{{ctrl.serverGroup.image.name}}</dd>
|
|
3519
|
-
<dt>Instance Type</dt>
|
|
3520
|
-
<dd>{{ctrl.serverGroup.launchConfig.shape}}</dd>
|
|
3521
|
-
<dt>VCN</dt>
|
|
3522
|
-
<dd>{{ctrl.serverGroup.network.name}}</dd>
|
|
3523
|
-
<dt>Subnet</dt>
|
|
3524
|
-
<dd>{{ctrl.serverGroup.subnet.name}}</dd>
|
|
3525
|
-
<dt>SSH Key</dt>
|
|
3526
|
-
<dd>{{ctrl.serverGroup.launchConfig.sshAuthorizedKeys}}</dd>
|
|
3527
|
-
</dl>
|
|
3528
|
-
</collapsible-section>
|
|
3529
|
-
</div>
|
|
3530
|
-
</div>
|
|
3531
|
-
`);
|
|
3532
|
-
}]);
|
|
3533
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
3534
|
-
templateCache.put("oracle/src/serverGroup/configure/wizard/serverGroupWizard.html", `<form name="form" class="form-horizontal" novalidate>
|
|
3535
|
-
<div ng-if="state.requiresTemplateSelection">
|
|
3536
|
-
<ng-include src="pages.templateSelection"></ng-include>
|
|
3537
|
-
</div>
|
|
3538
|
-
<div ng-if="!state.loaded" style="height: 200px" class="horizontal center middle">
|
|
3539
|
-
<loading-spinner size="'small'"></loading-spinner>
|
|
3540
|
-
</div>
|
|
3541
|
-
<div ng-if="!state.requiresTemplateSelection">
|
|
3542
|
-
<v2-modal-wizard ng-show="state.loaded" heading="{{title}}" task-monitor="taskMonitor" dismiss="$dismiss()">
|
|
3543
|
-
<v2-wizard-page key="location" label="Basic Settings" mark-complete-on-view="false">
|
|
3544
|
-
<ng-include src="pages.basicSettings"></ng-include>
|
|
3545
|
-
</v2-wizard-page>
|
|
3546
|
-
<v2-wizard-page key="instance-type" label="Instance Type" mark-complete-on-view="false">
|
|
3547
|
-
<ng-include src="pages.instanceType"></ng-include>
|
|
3548
|
-
</v2-wizard-page>
|
|
3549
|
-
<v2-wizard-page key="capacity" label="Capacity" done="true">
|
|
3550
|
-
<ng-include src="pages.capacity"></ng-include>
|
|
3551
|
-
</v2-wizard-page>
|
|
3552
|
-
<v2-wizard-page key="loadBalancers" label="Load Balancers" done="true">
|
|
3553
|
-
<ng-include src="pages.loadBalancers"></ng-include>
|
|
3554
|
-
</v2-wizard-page>
|
|
3555
|
-
<v2-wizard-page key="network" label="Network Settings" done="true">
|
|
3556
|
-
<ng-include src="pages.networkSettings"></ng-include>
|
|
3557
|
-
</v2-wizard-page>
|
|
3558
|
-
</v2-modal-wizard>
|
|
3559
|
-
<div class="modal-footer" ng-if="state.loaded">
|
|
3560
|
-
<button ng-disabled="taskMonitor.submitting" class="btn btn-default btn-cancel" ng-click="ctrl.cancel()">
|
|
3561
|
-
Cancel
|
|
3562
|
-
</button>
|
|
3563
|
-
<submit-button
|
|
3564
|
-
ng-if="ctrl.showSubmitButton()"
|
|
3565
|
-
is-disabled="!ctrl.isValid() || taskMonitor.submitting"
|
|
3566
|
-
label="command.viewState.submitButtonLabel"
|
|
3567
|
-
submitting="taskMonitor.submitting"
|
|
3568
|
-
on-click="ctrl.submit()"
|
|
3569
|
-
is-new="true"
|
|
3570
|
-
></submit-button>
|
|
3571
|
-
</div>
|
|
3572
|
-
</div>
|
|
3573
|
-
</form>
|
|
3574
|
-
`);
|
|
3575
|
-
}]);
|
|
3576
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
3577
|
-
templateCache.put("oracle/src/instance/details/instanceDetails.html", `<div class="details-panel">
|
|
3578
|
-
<div class="header" ng-if="!state.loading">
|
|
3579
|
-
<instance-details-header
|
|
3580
|
-
health-state="instance.healthState"
|
|
3581
|
-
instance-id="instance.name || instance.id || instance.instanceId"
|
|
3582
|
-
loading="state.loading"
|
|
3583
|
-
standalone="state.standalone"
|
|
3584
|
-
></instance-details-header>
|
|
3585
|
-
<div class="content" ng-if="!state.loading">
|
|
3586
|
-
<collapsible-section heading="Instance Information" expanded="true">
|
|
3587
|
-
<dl class="dl-horizontal dl-narrow">
|
|
3588
|
-
<dt>Launched</dt>
|
|
3589
|
-
<dd ng-if="instance.launchTime">{{instance.launchTime | timestamp}}</dd>
|
|
3590
|
-
<dd ng-if="!instance.launchTime">(Unknown)</dd>
|
|
3591
|
-
|
|
3592
|
-
<dt ng-if="instance.availabilityZone">In</dt>
|
|
3593
|
-
<dd ng-if="instance.availabilityZone">{{instance.availabilityZone}}</dd>
|
|
3594
|
-
|
|
3595
|
-
<dt ng-if="instance.instanceType">Type</dt>
|
|
3596
|
-
<dd ng-if="instance.instanceType">{{instance.instanceType | customInstanceFilter}}</dd>
|
|
3597
|
-
|
|
3598
|
-
<dt ng-if="instance.serverGroup">Server Group</dt>
|
|
3599
|
-
<dd ng-if="instance.serverGroup">{{instance.serverGroup}}</dd>
|
|
3600
|
-
|
|
3601
|
-
<dt ng-if="instance.network">Network</dt>
|
|
3602
|
-
<dd ng-if="instance.network">{{instance.network}}</dd>
|
|
3603
|
-
</dl>
|
|
3604
|
-
</collapsible-section>
|
|
3605
|
-
</div>
|
|
3606
|
-
</div>
|
|
3607
|
-
</div>
|
|
3608
|
-
`);
|
|
3609
|
-
}]);
|
|
3610
|
-
window.angular.module("ng").run(["$templateCache", function(templateCache) {
|
|
3611
|
-
templateCache.put("oracle/src/securityGroup/configure/createSecurityGroup.html", `<ng-form role="form" name="form" novalidate>
|
|
3612
|
-
<v2-modal-wizard heading="Create New Oracle {{firewallLabel}}" dismiss="$dismiss()"> </v2-modal-wizard>
|
|
3613
|
-
<div class="container-fluid">
|
|
3614
|
-
<div class="col-md-12 well">
|
|
3615
|
-
<h4>Notice</h4>
|
|
3616
|
-
<p>
|
|
3617
|
-
We don't currently support the ability to create <firewall-label label="firewalls"></firewall-label> for Oracle
|
|
3618
|
-
Cloud from Spinnaker.
|
|
3619
|
-
</p>
|
|
3620
|
-
<p>
|
|
3621
|
-
You can use the Oracle Cloud console to create and manage Security Lists to provide a virtual
|
|
3622
|
-
<firewall-label label="firewall"></firewall-label> for an instance.
|
|
3623
|
-
</p>
|
|
3624
|
-
</div>
|
|
3625
|
-
</div>
|
|
3626
|
-
<div class="modal-footer">
|
|
3627
|
-
<button class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>
|
|
3628
|
-
</div>
|
|
3629
|
-
</ng-form>
|
|
3630
|
-
`);
|
|
3631
|
-
}]);
|
|
3632
|
-
|
|
3633
|
-
export { ORACLE_MODULE };
|
|
1
|
+
import*as e from"angular";import n,{module as t}from"angular";import{HelpContentsRegistry as a,REST as i,InstanceReader as r,SETTINGS as l,AccountService as s,NameUtils as o,TaskMonitor as c,NetworkReader as d,SubnetReader as u,LoadBalancerWriter as p,FirewallLabels as m,ConfirmationModalService as g,EXECUTION_DETAILS_SECTION_SERVICE as h,Registry as f,BakeExecutionLabel as v,AuthenticationService as b,PipelineTemplates as S,BakeryReader as y,StageConstants as k,SECURITY_GROUP_READER as w,IMAGE_READER as C,ModalWizard as B,SERVER_GROUP_WRITER as G,ServerGroupWarningMessageService as N,ServerGroupReader as $,CloudProviderRegistry as x,DeploymentStrategyRegistry as z}from"@spinnaker/core";import A from"@uirouter/angularjs";import T from"angular-ui-bootstrap";import D,{trimEnd as I,cloneDeep as L,sortBy as O,size as P}from"lodash";import{$q as R}from"ngimport";[{key:"oracle.serverGroup.stack",value:"(Optional) <b>Stack</b> Stack name"},{key:"oracle.serverGroup.detail",value:"(Optional) <b>Detail</b> is a naming component to help distinguish specifics of the server group."},{key:"oracle.pipeline.config.bake.baseOsOption",value:"<p>The base image from which the image will be created.</p>"},{key:"oracle.pipeline.config.bake.image_name",value:"<p>The base name of the image that will be created.</p>"},{key:"oracle.pipeline.config.bake.package",value:"<p>The name of the package you want installed (without any version identifiers).</p><p>If there are multiple packages (space separated), then they will be installed in the order they are entered.</p>"},{key:"oracle.pipeline.config.bake.upgrade",value:"<p>Perform a package manager upgrade before proceeding with the package installation.</p><p>For example: <i>yum update</i>.</p>"},{key:"oracle.pipeline.config.bake.regions",value:"<p>The region in which the new image will be created.</p><p>NB: <i>Currently baked images are restricted to a single region</i>.</p>"},{key:"oracle.pipeline.config.bake.user",value:"<p>The name of Oracle <i>user</i> that will be used during the baking process.</p>"},{key:"oracle.pipeline.config.bake.account_name",value:"<p>The name of Oracle <i>account</i> that will be used during the baking process.</p>"},{key:"oracle.serverGroup.sshAuthorizedKeys",value:"<p>The public SSH key for the default user on the instance.</p>"}].forEach((e=>a.register(e.key,e.value)));const F="spinnaker.oracle.image.reader";t(F,[]).factory("oracleImageReader",(function(){return{findImages:function(e){return i("/images/find").query(e).get().catch((function(){return[]}))},getImage:function(e,n,t){return i("/images").path(t,n,e).query({provider:"oracle"}).get().then((function(e){return e&&e.length?e[0]:null}),(function(){return null}))}}}));const q="spinnaker.oracle.instance.details.controller";var M,E;t(q,[A]).controller("oracleInstanceDetailsCtrl",["$scope","$q","app","instance",function(e,n,t,a){e.application=t;function i(){let n,t,i;e.application.serverGroups?e.application.serverGroups.data.some((e=>e.instances.some((r=>{if(r.id===a.instanceId||r.name===a.instanceId)return n=r,t=e.account,i=e.region,!0})))):(n={},t=a.account,i=a.region),e.instance=n,r.getInstanceDetails(t,i,a.instanceId).then((n=>{Object.assign(e.instance,n)}))}(t.isStandalone?i():n.all([t.serverGroups.ready()]).then(i)).then((()=>{e.$$destroyed||t.isStandalone||t.serverGroups.onRefresh(e,i)}))}]),(E=M||(M={})).ROUND_ROBIN="ROUND_ROBIN",E.IP_HASH="IP_HASH",E.LEAST_CONNECTIONS="LEAST_CONNECTIONS";const U=l.providers.oracle||{defaults:{}};U&&(U.resetToOriginal=l.resetProvider("oracle"));const H={account:"DEFAULT",bakeryRegions:"us-phoenix-1",region:"us-phoenix-1"};const V="spinnaker.oracle.loadBalancer.transformer";t(V,[]).service("oracleLoadBalancerTransformer",class{normalizeLoadBalancer(e){return R.resolve(e)}convertLoadBalancerForEditing(e){e.listeners&&Object.keys(e.listeners).forEach((n=>{const t=e.listeners[n];t.isSsl=!!t.sslConfiguration}));return{name:e.name,cloudProvider:e.cloudProvider,credentials:e.account,region:e.region,shape:e.shape,isPrivate:e.isPrivate,subnetIds:e.subnets.map((e=>e.id)),certificates:e.certificates,listeners:e.listeners,hostnames:e.hostnames,backendSets:e.backendSets,freeformTags:e.freeformTags,loadBalancerType:e.type,securityGroups:e.securityGroups,vpcId:e.vpcId,subnetTypeMap:e.subnetTypeMap}}constructNewLoadBalancerTemplate(e){return{name:void 0,cloudProvider:"oracle",credentials:e.defaultCredentials.oracle||(U.defaults?U.defaults.account:H.account),region:e.defaultRegions.oracle||(U.defaults?U.defaults.region:H.region),shape:null,isPrivate:!1,subnetIds:[],listeners:{},hostnames:[],backendSets:{},freeformTags:{},loadBalancerType:null,securityGroups:[],vpcId:null,subnetTypeMap:{}}}constructNewListenerTemplate(){return{name:"HTTP_80",port:80,protocol:"HTTP",defaultBackendSetName:void 0,isSsl:!1}}constructNewBackendSetTemplate(e){return{name:e,policy:M.ROUND_ROBIN,healthChecker:{protocol:"HTTP",port:80,urlPath:"/"},backends:[],isNew:!0}}constructNewSSLConfiguration(){return{certificateName:"",verifyDepth:0,verifyPeerCertificates:!1}}constructNewCertificateTemplate(e){return{certificateName:e,publicCertificate:void 0,caCertificate:void 0,privateKey:void 0,passphrase:void 0,isNew:!0}}});class K{constructor(e,n,t,a,i,r,l){this.$scope=e,this.$uibModalInstance=n,this.$state=t,this.oracleLoadBalancerTransformer=a,this.application=i,this.loadBalancer=r,this.isNew=l,this.oracle="oracle",this.shapes=["100Mbps","400Mbps","8000Mbps"],this.loadBalancingPolicies=Object.keys(M).map((e=>M[e])),this.pages={properties:"oracle/src/loadBalancer/configure/createLoadBalancerProperties.html",listeners:"oracle/src/loadBalancer/configure/listeners.html",backendSets:"oracle/src/loadBalancer/configure/backendSets.html",certificates:"oracle/src/loadBalancer/configure/certificates.html"},this.state={accountsLoaded:!1,submitting:!1},this.numSubnetsAllowed=1,this.listeners=[],this.backendSets=[],this.certificates=[],this.initializeController()}onApplicationRefresh(){if(this.$scope.$$destroyed)return;this.$uibModalInstance.close();const e={name:this.loadBalancer.name,accountId:this.loadBalancer.account,region:this.loadBalancer.region,provider:"oracle"};this.$state.includes("**.loadBalancerDetails")?this.$state.go("^.loadBalancerDetails",e):this.$state.go(".loadBalancerDetails",e)}onTaskComplete(){this.application.loadBalancers.refresh(),this.application.loadBalancers.onNextRefresh(this.$scope,this.onApplicationRefresh)}initializeCreateMode(){s.listAccounts(this.oracle).then((e=>{this.$scope.accounts=e,this.state.accountsLoaded=!0,this.$scope.state=this.state,this.accountUpdated()})),this.loadVnets(),this.loadSubnets()}initControllerFromLoadBalancerCmd(){this.numSubnetsAllowed=this.calcNumSubnetsAllowed(),this.$scope.loadBalancerCmd.listeners&&Object.keys(this.$scope.loadBalancerCmd.listeners).forEach((e=>{this.listeners.push(this.$scope.loadBalancerCmd.listeners[e])})),this.$scope.loadBalancerCmd.backendSets&&Object.keys(this.$scope.loadBalancerCmd.backendSets).forEach((e=>{this.backendSets.push(this.$scope.loadBalancerCmd.backendSets[e])})),this.$scope.loadBalancerCmd.certificates&&Object.keys(this.$scope.loadBalancerCmd.certificates).forEach((e=>{this.certificates.push(this.$scope.loadBalancerCmd.certificates[e])}))}initializeController(){if(this.loadBalancer){if(this.$scope.loadBalancerCmd=this.oracleLoadBalancerTransformer.convertLoadBalancerForEditing(this.loadBalancer),this.initControllerFromLoadBalancerCmd(),this.isNew){const e=o.parseLoadBalancerName(this.loadBalancer.name);this.$scope.loadBalancerCmd.stack=e.stack,this.$scope.loadBalancerCmd.detail=e.freeFormDetails,delete this.$scope.loadBalancerCmd.name}}else this.$scope.loadBalancerCmd=this.oracleLoadBalancerTransformer.constructNewLoadBalancerTemplate(this.application);this.$scope.prevBackendSetNames=[],this.$scope.prevCertNames=[],this.isNew&&(this.updateName(),this.updateLoadBalancerNames(),this.initializeCreateMode()),this.$scope.taskMonitor=new c({application:this.application,title:(this.isNew?"Creating ":"Updating ")+"your load balancer",modalInstance:this.$uibModalInstance,onTaskComplete:this.onTaskComplete})}updateLoadBalancerNames(){const e=this.$scope.loadBalancerCmd.credentials,n=this.$scope.loadBalancerCmd.region,t={};this.application.getDataSource("loadBalancers").refresh(!0).then((()=>{this.application.loadBalancers.data.forEach((n=>{n.account===e&&(t[n.region]=t[n.region]||[],t[n.region].push(n.name))})),this.$scope.existingLoadBalancerNames=t[n]||[]}))}validateBeforeSubmit(){return this.propertiesValid()&&this.listenersValid()}listenersValid(){return this.listenersUniqueProtocolPort()&&this.listenersBackendSetsExist()&&this.listenersCertificatesExist()}propertiesValid(){return this.selectedSubnets&&this.selectedSubnets.length===this.calcNumSubnetsAllowed()}listenersUniqueProtocolPort(){const e={};return this.listeners.reduce(((e,n)=>{const t=n.protocol+"_"+n.port;return e[t]=e[t]?e[t]+1:1,e}),e),0===Object.keys(e).filter((n=>e[n]>1)).length}listenersBackendSetsExist(){return 0===this.listeners.filter((e=>!this.backendSets.find((n=>n.name===e.defaultBackendSetName)))).length}listenersCertificatesExist(){return 0===this.listeners.filter((e=>e.sslConfiguration&&!this.certificates.find((n=>n.certificateName===e.sslConfiguration.certificateName)))).length}updateName(){this.$scope.loadBalancerCmd.name=this.getName()}getName(){const e=this.$scope.loadBalancerCmd,n=[this.application.name,e.stack||"",e.detail||""].join("-");return I(n,"-")}accountUpdated(){this.loadRegionsForAccount()}regionUpdated(){this.updateLoadBalancerNames(),this.updateVnets()}loadRegionsForAccount(){s.getRegionsForAccount(this.$scope.loadBalancerCmd.credentials).then((e=>{this.$scope.regions=e,1===e.length&&(this.$scope.loadBalancerCmd.region=e[0].name,this.regionUpdated())}))}loadVnets(){d.listNetworksByProvider(this.oracle).then((e=>{this.allVnets=e||[],this.$scope.loadBalancerCmd.region&&this.updateVnets()}))}loadSubnets(){u.listSubnetsByProvider(this.oracle).then((e=>{this.allSubnets=e||[]}))}updateVnets(){const e=this.$scope.loadBalancerCmd.credentials,n=this.$scope.loadBalancerCmd.region;this.filteredVnets=this.allVnets.filter((t=>t.account===e&&t.region===n))}updateSubnets(e){this.selectedSubnets=[],this.$scope.loadBalancerCmd.subnetIds=[],this.filteredSubnets=this.allSubnets.filter((n=>n.vcnId===e.id)),this.filteredSubnetsByType=L(this.filteredSubnets)}selectedVnetChanged(e){this.selectedVnet=e,this.$scope.loadBalancerCmd.vpcId=e.id,this.updateSubnets(e)}selectedSubnetsChanged(e){e.availabilityDomain?this.filteredSubnetsByType=this.filteredSubnets.filter((e=>!!e.availabilityDomain)):this.filteredSubnetsByType=[]}selectedSubnetRemoved(){0===this.selectedSubnets.length&&(this.filteredSubnetsByType=L(this.filteredSubnets)),1===this.selectedSubnets.length&&this.selectedSubnets[0].availabilityDomain&&(this.filteredSubnetsByType=this.filteredSubnets.filter((e=>!!e.availabilityDomain)))}isPrivateChanged(){this.numSubnetsAllowed=this.calcNumSubnetsAllowed()}listenerIsSslChanged(e){e.isSsl?e.sslConfiguration=this.oracleLoadBalancerTransformer.constructNewSSLConfiguration():e.sslConfiguration=void 0}calcNumSubnetsAllowed(){return this.$scope.loadBalancerCmd.isPrivate||this.selectedSubnets&&1===this.selectedSubnets.length&&!this.selectedSubnets[0].availabilityDomain?1:2}getSubnetLimit(){}removeListener(e){this.listeners.splice(e,1)}addListener(){this.listeners.push(this.oracleLoadBalancerTransformer.constructNewListenerTemplate())}removeBackendSet(e){const n=this.backendSets[e];this.backendSets.splice(e,1),this.$scope.prevBackendSetNames.splice(e,1),this.listeners.forEach((e=>{e.defaultBackendSetName===n.name&&(e.defaultBackendSetName=void 0)}))}isBackendSetRemovable(e){const n=this.backendSets[e];if(n&&n.backends&&n.backends.length>0)return!1;let t=!1;return this.listeners.forEach((e=>{e.defaultBackendSetName===n.name&&(t=!0)})),!t}addBackendSet(){const e="backendSet"+(this.backendSets.length+1);this.$scope.prevBackendSetNames.push(e),this.backendSets.push(this.oracleLoadBalancerTransformer.constructNewBackendSetTemplate(e))}backendSetNameChanged(e){const n=this.$scope.prevBackendSetNames&&this.$scope.prevBackendSetNames[e];n&&n!==this.backendSets[e].name&&this.listeners.filter((e=>e.defaultBackendSetName===n)).forEach((n=>{n.defaultBackendSetName=this.backendSets[e].name}))}isCertRemovable(e){const n=this.certificates[e];let t=!1;return this.listeners.forEach((e=>{e.isSsl&&e.sslConfiguration&&e.sslConfiguration.certificateName===n.certificateName&&(t=!0)})),!t}removeCert(e){const n=this.certificates[e];this.certificates.splice(e,1),this.$scope.prevCertNames.splice(e,1),this.listeners.forEach((e=>{e.sslConfiguration&&e.sslConfiguration.certificateName===n.certificateName&&(e.sslConfiguration.certificateName=void 0)}))}addCert(){const e="certificate"+(this.certificates.length+1);this.$scope.prevCertNames.push(e),this.certificates.push(this.oracleLoadBalancerTransformer.constructNewCertificateTemplate(e))}certNameChanged(e){const n=this.$scope.prevCertNames&&this.$scope.prevCertNames[e];n&&n!==this.certificates[e].certificateName&&this.listeners.filter((e=>e.sslConfiguration&&e.sslConfiguration.certificateName===n)).forEach((n=>{n.sslConfiguration.certificateName=this.certificates[e].certificateName}))}submit(){const e=this.isNew?"Create":"Update";this.$scope.taskMonitor.submit((()=>{const n={cloudProvider:"oracle",application:this.application.name,clusterName:this.$scope.loadBalancerCmd.clusterName,resourceGroupName:this.$scope.loadBalancerCmd.clusterName,loadBalancerName:this.$scope.loadBalancerCmd.name,loadBalancerId:null};if(this.loadBalancer&&this.loadBalancer.id&&(n.loadBalancerId=this.loadBalancer.id),this.selectedVnet&&(this.$scope.loadBalancerCmd.vpcId=this.selectedVnet.id),this.selectedSubnets&&this.selectedSubnets.length>0){this.$scope.loadBalancerCmd.subnetIds=this.selectedSubnets.map((e=>e.id));for(const e of this.selectedSubnets)this.$scope.loadBalancerCmd.subnetTypeMap?this.$scope.loadBalancerCmd.subnetTypeMap[e.id]=e.availabilityDomain?"AD":"Regional":this.$scope.loadBalancerCmd.subnetTypeMap={[e.id]:e.availabilityDomain?"AD":"Regional"}}return this.backendSets&&(this.$scope.loadBalancerCmd.backendSets=this.backendSets.reduce(((e,n)=>(e[n.name]=n,e)),{})),this.listeners&&(this.$scope.loadBalancerCmd.listeners=this.listeners.reduce(((e,n)=>(n.name=n.protocol+"_"+n.port,e[n.name]=n,e)),{})),this.certificates&&(this.$scope.loadBalancerCmd.certificates=this.certificates.reduce(((e,n)=>(e[n.certificateName]=n,n.isNew||(e[n.certificateName].publicCertificate=null),e)),{})),this.$scope.loadBalancerCmd.type="upsertLoadBalancer",this.$scope.loadBalancerCmd.vnet||this.$scope.loadBalancerCmd.subnetType||(this.$scope.loadBalancerCmd.securityGroups=null),p.upsertLoadBalancer(this.$scope.loadBalancerCmd,this.application,e,n)}))}cancel(){this.$uibModalInstance.dismiss()}}K.$inject=["$scope","$uibModalInstance","$state","oracleLoadBalancerTransformer","application","loadBalancer","isNew"];const j="spinnaker.oracle.loadBalancer.create.controller";t(j,[T,A,V]).controller("oracleCreateLoadBalancerCtrl",K),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/loadBalancer/configure/createLoadBalancerProperties.html",'<div>\n <div ng-if="!state.accountsLoaded" style="height: 200px" class="horizontal center middle">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n <div class="modal-body" ng-if="state.accountsLoaded">\n <div class="form-group">\n <div\n class="col-md-12 well"\n ng-class="{\'alert-danger\': form.loadBalancerName.$error.validateUnique, \'alert-info\': !form.loadBalancerName.$error.validateUnique}"\n >\n <strong>Your load balancer will be named:</strong>\n <span>{{loadBalancerCmd.name}}</span>\n \x3c!-- Angular does not seem to run length validation on hidden inputs, hence the text + display:none --\x3e\n <input\n type="text"\n style="display: none"\n ng-maxlength="32"\n class="form-control input-sm"\n ng-model="loadBalancerCmd.name"\n validate-unique="existingLoadBalancerNames"\n validate-ignore-case="true"\n name="loadBalancerName"\n />\n <validation-error\n ng-if="form.loadBalancerName.$error.validateUnique"\n message="There is already a load balancer in {{loadBalancerCmd.credentials}}:{{loadBalancerCmd.region}} with that name."\n ></validation-error>\n </div>\n </div>\n <div class="form-group">\n <div class="col-md-3 sm-label-right">Shape</div>\n <div class="col-md-7">\n <ui-select class="form-control input-sm" required ng-model="loadBalancerCmd.shape">\n <ui-select-match placeholder="Select Shape">{{$select.selected}}</ui-select-match>\n <ui-select-choices repeat="shape in ctrl.shapes | filter: $select.search">\n <span ng-bind-html="shape | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n \x3c!-- <select class="form-control input-sm" ng-model="loadBalancer.shape" required ng-options="shape for shapes in shapes"></select> --\x3e\n </div>\n </div>\n <div class="form-group">\n <div class="col-md-3 sm-label-right">Private Load Balancer</div>\n <div class="col-md-7 checkbox">\n <label>\n <input\n type="checkbox"\n name="isPrivate"\n ng-model="loadBalancerCmd.isPrivate"\n on-change="ctrl.isPrivateChanged()"\n />\n </label>\n </div>\n </div>\n <div class="form-group">\n <div class="col-md-3 sm-label-right">Account</div>\n <div class="col-md-7">\n <account-select-field\n required\n component="loadBalancerCmd"\n field="credentials"\n accounts="accounts"\n provider="\'oracle\'"\n on-change="ctrl.accountUpdated()"\n ></account-select-field>\n </div>\n </div>\n <region-select-field\n required\n label-columns="3"\n component="loadBalancerCmd"\n field="region"\n account="loadBalancerCmd.credentials"\n provider="\'oracle\'"\n on-change="ctrl.regionUpdated()"\n regions="regions"\n ></region-select-field>\n\n <div class="form-group">\n <div class="col-md-3 sm-label-right">Virtual Network</div>\n <div class="col-md-7">\n <ui-select\n class="form-control input-sm"\n required\n ng-model="ctrl.selectedVnet"\n on-select="ctrl.selectedVnetChanged($item)"\n >\n <ui-select-match placeholder="Select from existing virtual networks"\n >{{$select.selected.name}}</ui-select-match\n >\n <ui-select-choices repeat="vnet in ctrl.filteredVnets | filter: $select.search">\n <span ng-bind-html="vnet.name | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n </div>\n\n <div class="form-group">\n <div class="col-md-3 sm-label-right">Subnets</div>\n <div class="col-md-7">\n <ui-select\n multiple\n required\n limit="2"\n name="subnets"\n class="form-control input-sm"\n ng-model="ctrl.selectedSubnets"\n on-select="ctrl.selectedSubnetsChanged($item)"\n on-remove="ctrl.selectedSubnetRemoved()"\n >\n <ui-select-match placeholder="Select from existing subnets">{{$item.name}}</ui-select-match>\n <ui-select-choices repeat="subnet in ctrl.filteredSubnetsByType | filter: $select.search">\n <span ng-bind-html="subnet.name | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n </div>\n <div ng-if="ctrl.filteredSubnetsByType.length > 0">\n <div class="col-md-7 col-md-offset-3" ng-if="loadBalancerCmd.isPrivate && ctrl.selectedSubnets.length != 1">\n <validation-error message="Exactly one subnet must be selected for a private load balancer."></validation-error>\n </div>\n <div\n class="col-md-7 col-md-offset-3"\n ng-if="!loadBalancerCmd.isPrivate && ctrl.selectedSubnets.length === 1 && ctrl.selectedSubnets[0].availabilityDomain"\n >\n <validation-error\n message="Exactly 2 Availability Domain-specific subnets must be selected for a public load balancer."\n ></validation-error>\n </div>\n </div>\n <div class="form-group">\n <div class="col-md-3 sm-label-right">Stack <help-field key="oracle.loadBalancer.stack"></help-field></div>\n <div class="col-md-3">\n <input\n type="text"\n class="form-control input-sm"\n ng-model="loadBalancerCmd.stack"\n name="stackName"\n ng-change="ctrl.updateName()"\n ng-pattern="/^[a-zA-Z0-9]*$/"\n />\n </div>\n <div class="col-md-6 form-inline">\n <label class="sm-label-right"> Detail <help-field key="oracle.loadBalancer.detail"></help-field> </label>\n <input\n type="text"\n class="form-control input-sm"\n ng-model="loadBalancerCmd.detail"\n name="detailName"\n ng-change="ctrl.updateName()"\n ng-pattern="/^[a-zA-Z0-9-]*$/"\n />\n </div>\n <div class="col-md-7 col-md-offset-3" ng-if="form.stackName.$error.pattern">\n <validation-error message="Stack can only contain letters and numbers."></validation-error>\n </div>\n <div class="col-md-7 col-md-offset-3" ng-if="form.detailName.$error.pattern">\n <validation-error message="Detail can only contain letters, numbers, and dashes."></validation-error>\n </div>\n </div>\n <div class="form-group">\n <div class="col-md-9 col-md-offset-3" ng-if="form.loadBalancerName.$error.maxlength">\n <validation-error message="Load Balancer name can only be 32 characters."></validation-error>\n </div>\n </div>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/loadBalancer/configure/listeners.html",'<div class="container-fluid form-horizontal">\n <div class="form-group">\n <div class="col-md-12">\n <table class="table table-condensed packed">\n <thead>\n <tr>\n <th>SSL</th>\n <th>SSL Certificate Name</th>\n <th>Protocol</th>\n <th>Listening Port</th>\n <th>Default Backend Set Name</th>\n \x3c!-- TODO <th>SSL config</th>\n <th>Hostnames</th> --\x3e\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="listener in ctrl.listeners">\n <td>\n <input\n type="checkbox"\n name="isSsl"\n ng-model="listener.isSsl"\n on-change="ctrl.listenerIsSslChanged(listener)"\n />\n </td>\n <td>\n <ui-select\n ng-if="listener.isSsl"\n class="form-control input-sm"\n required\n ng-model="listener.sslConfiguration.certificateName"\n >\n <ui-select-match placeholder="Select certificate name"\n >{{$select.selected.certificateName}}</ui-select-match\n >\n <ui-select-choices repeat="cert.certificateName as cert in ctrl.certificates | filter: $select.search">\n <span ng-bind-html="cert.certificateName | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n <div ng-if="!listener.isSsl">N/A</div>\n </td>\n <td>\n <select\n class="form-control input-sm"\n ng-model="listener.protocol"\n ng-options="protocol for protocol in [\'HTTP\', \'TCP\']"\n ></select>\n </td>\n <td>\n <input class="form-control input-sm" type="number" ng-model="listener.port" required />\n </td>\n <td>\n <ui-select class="form-control input-sm" required ng-model="listener.defaultBackendSetName">\n <ui-select-match placeholder="Select default backend set name"\n >{{$select.selected.name}}</ui-select-match\n >\n <ui-select-choices repeat="backendSet.name as backendSet in ctrl.backendSets | filter: $select.search">\n <span ng-bind-html="backendSet.name | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n \x3c!-- <select class="form-control input-sm" required ng-model="listener.defaultBackendSetName" ng-options="backendSetName as backendSet.name for backendSet in loadBalancerCmd.backendSets"></select> --\x3e\n </td>\n <td>\n <a href class="sm-label" ng-click="ctrl.removeListener($index)"\n ><span class="glyphicon glyphicon-trash"></span\n ></a>\n </td>\n </tr>\n <tr ng-if="!ctrl.listenersUniqueProtocolPort()">\n <td colspan="3">\n <validation-error message="Listeners must have unique protocol and port"></validation-error>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan="5">\n <button class="add-new col-md-12" ng-click="ctrl.addListener()">\n <span class="glyphicon glyphicon-plus-sign"></span>\n Add Listener\n </button>\n </td>\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/loadBalancer/configure/backendSets.html",'<div class="container-fluid form-horizontal">\n <div class="form-group">\n <div class="col-md-12">\n <table class="table table-condensed packed">\n <thead>\n <tr>\n <th>Name</th>\n <th>Policy</th>\n <th>Health Check Protocol</th>\n <th>Health Check Port</th>\n <th>Health Check Path</th>\n \x3c!-- TODO other nonrequired health check fields - do we need another popup for health check? --\x3e\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="backendSet in ctrl.backendSets">\n <td ng-if="backendSet.isNew">\n <input\n class="form-control input-sm"\n ng-model="backendSet.name"\n required\n ng-focus="prevBackendSetNames[$index] = backendSet.name"\n ng-blur="ctrl.backendSetNameChanged($index)"\n />\n </td>\n <td ng-if="!backendSet.isNew">{{backendSet.name}}</td>\n <td>\n <select\n class="form-control input-sm"\n ng-model="backendSet.policy"\n ng-options="policy for policy in ctrl.loadBalancingPolicies"\n ></select>\n </td>\n <td>\n <input class="form-control input-sm" ng-model="backendSet.healthChecker.protocol" required />\n </td>\n <td>\n <input class="form-control input-sm" ng-model="backendSet.healthChecker.port" required />\n </td>\n <td>\n <input class="form-control input-sm" ng-model="backendSet.healthChecker.urlPath" required />\n </td>\n <td>\n <a\n href\n class="sm-label"\n ng-if="ctrl.isBackendSetRemovable($index)"\n ng-click="ctrl.removeBackendSet($index)"\n ><span class="glyphicon glyphicon-trash"></span\n ></a>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan="5">\n <button class="add-new col-md-12" ng-click="ctrl.addBackendSet()">\n <span class="glyphicon glyphicon-plus-sign"></span>\n Add Backend Set\n </button>\n </td>\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/loadBalancer/configure/certificates.html",'<div class="container-fluid form-horizontal">\n <div class="form-group">\n <div class="col-md-12">\n <table class="table table-condensed packed">\n <thead>\n <tr>\n <th>Name</th>\n <th>Certificate</th>\n <th>CA Cert</th>\n <th>Private Key</th>\n <th>Passphrase</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="cert in ctrl.certificates">\n <td ng-if="!cert.isNew">{{cert.certificateName}}</td>\n <td ng-if="cert.isNew">\n <input\n class="form-control input-sm"\n ng-model="cert.certificateName"\n required\n ng-focus="prevCertNames[$index] = cert.name"\n ng-blur="ctrl.certNameChanged($index)"\n />\n </td>\n <td>\n <textarea\n ng-if="cert.isNew"\n ng-model="cert.publicCertificate"\n required\n class="form-control input-sm"\n ></textarea>\n </td>\n <td>\n <textarea ng-if="cert.isNew" ng-model="cert.caCertificate" class="form-control input-sm"></textarea>\n </td>\n <td>\n <textarea ng-if="cert.isNew" ng-model="cert.privateKey" required class="form-control input-sm"></textarea>\n </td>\n <td>\n <textarea ng-if="cert.isNew" ng-model="cert.passphrase" class="form-control input-sm"></textarea>\n </td>\n <td>\n <a href class="sm-label" ng-if="ctrl.isCertRemovable($index)" ng-click="ctrl.removeCert($index)"\n ><span class="glyphicon glyphicon-trash"></span>\n </a>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan="5">\n <button class="add-new col-md-12" ng-click="ctrl.addCert()">\n <span class="glyphicon glyphicon-plus-sign"></span>\n Add Certificate\n </button>\n </td>\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n</div>\n')}]);class W{constructor(e,n,t,a,i,r,l,s){this.$scope=e,this.$state=n,this.$uibModal=t,this.loadBalancer=a,this.app=i,this.securityGroupReader=r,this.loadBalancerReader=l,this.$q=s,e.state={loading:!0},e.firewallsLabel=m.get("Firewalls");const o=()=>{if(e.loadBalancer=i.loadBalancers.data.filter((e=>e.name===a.name&&e.region===a.region&&e.account===a.accountId))[0],e.loadBalancer){return this.loadBalancerReader.getLoadBalancerDetails(e.loadBalancer.cloudProvider,a.accountId,a.region,a.name).then((n=>{e.state.loading=!1;const t=[],i=n.filter((e=>e.name===a.name));i.length&&(e.loadBalancer.elb=i[0],e.loadBalancer.account=a.accountId,e.loadBalancer.elb.securityGroups&&(e.loadBalancer.elb.securityGroups.forEach((e=>{const n=this.securityGroupReader.getApplicationSecurityGroup(this.app,a.accountId,a.region,e);n&&t.push(n)})),this.$scope.securityGroups=O(t,"name")))}))}return this.$scope.loadBalancer||this.$state.go("^"),this.$q.when(null)};this.app.ready().then(o).then((()=>{this.$scope.$$destroyed||this.app.onRefresh(e,o)}))}editLoadBalancer(){this.$uibModal.open({templateUrl:"oracle/src/loadBalancer/configure/editLoadBalancer.html",controller:K,controllerAs:"ctrl",size:"lg",resolve:{application:()=>this.app,loadBalancer:()=>n.copy(this.$scope.loadBalancer),isNew:()=>!1}})}deleteLoadBalancer(){if(this.$scope.loadBalancer.instances&&this.$scope.loadBalancer.instances.length)return;const e={application:this.app,title:"Deleting "+this.loadBalancer.name},n={cloudProvider:"oracle",loadBalancerName:this.$scope.loadBalancer.name,credentials:this.$scope.loadBalancer.account,region:this.loadBalancer.region,application:this.app.name,loadBalancerId:this.$scope.loadBalancer.id};g.confirm({header:"Really delete "+this.loadBalancer.name+"?",buttonText:"Delete "+this.loadBalancer.name,account:this.loadBalancer.accountId,taskMonitorConfig:e,submitMethod:()=>p.deleteLoadBalancer(n,this.app)})}}W.$inject=["$scope","$state","$uibModal","loadBalancer","app","securityGroupReader","loadBalancerReader","$q"];const Z="spinnaker.oracle.loadBalancerDetail.controller";t(Z,[A,T]).controller("oracleLoadBalancerDetailCtrl",W),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/loadBalancer/configure/editLoadBalancer.html",'<form name="form" class="form-horizontal" novalidate validate-on-submit>\n <v2-modal-wizard\n heading="Edit Load Balancer {{ctrl.loadBalancer.name}}"\n task-monitor="taskMonitor"\n dismiss="$dismiss()"\n >\n <v2-wizard-page key="Certificates" label="SSL Certificates" done="true">\n <ng-include src="ctrl.pages.certificates"></ng-include>\n </v2-wizard-page>\n <v2-wizard-page key="Backend Sets" label="Backend Sets" done="true">\n <ng-include src="ctrl.pages.backendSets"></ng-include>\n </v2-wizard-page>\n <v2-wizard-page key="Listeners" label="Listeners" done="true">\n <ng-include src="ctrl.pages.listeners"></ng-include>\n </v2-wizard-page>\n </v2-modal-wizard>\n <div class="modal-footer">\n <button ng-disabled="taskMonitor.submitting" class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>\n <submit-button\n is-disabled="taskMonitor.submitting"\n submitting="taskMonitor.submitting"\n on-click="form.$valid && ctrl.submit()"\n is-new="isNew"\n ></submit-button>\n </div>\n</form>\n')}]);const X="spinnaker.oracle.pipeline.stage.bake.executionDetails.controller";t(X,[h,A]).controller("oracleBakeExecutionDetailsCtrl",["$log","$scope","$stateParams","executionDetailsSectionService","$interpolate",function(e,n,t,a,i){n.configSections=["bakeConfig","taskStatus"];const r=()=>{n.detailsSection=t.details,n.provider=n.stage.context.cloudProviderType||"oracle",n.roscoMode=l.feature.roscoMode,n.bakeryDetailUrl=i(n.roscoMode&&l.roscoDetailUrl?l.roscoDetailUrl:l.bakeryDetailUrl)},s=()=>a.synchronizeSection(n.configSections,r);s(),n.$on("$stateChangeSuccess",s)}]);const Y="spinnaker.oracle.pipeline.stage.bakeStage";t(Y,[X]).config((function(){f.pipeline.registerStage({provides:"bake",cloudProvider:"oracle",label:"Bake",description:"Bakes an image",templateUrl:"oracle/src/pipeline/stages/bake/bakeStage.html",executionDetailsUrl:"oracle/src/pipeline/stages/bake/bakeExecutionDetails.html",executionLabelComponent:v,supportsCustomTimeout:!0,validators:[{type:"requiredField",fieldName:"accountName"},{type:"requiredField",fieldName:"region"},{type:"requiredField",fieldName:"baseOs"},{type:"requiredField",fieldName:"upgrade"},{type:"requiredField",fieldName:"cloudProviderType"},{type:"requiredField",fieldName:"amiName",fieldLabel:"Image Name"}],restartable:!0})})).controller("oracleBakeStageCtrl",["$scope","$q","$uibModal",function(e,n,t){const a="oracle";e.stage.cloudProvider||(e.stage.cloudProvider=a),e.stage||(e.stage={}),e.stage.extendedAttributes=e.stage.extendedAttributes||{},e.stage.user||(e.stage.user=b.getAuthenticatedUser().name),this.getBaseOsDescription=function(e){return e.id+(e.shortDescription?" ("+e.shortDescription+")":"")},this.accountUpdated=function(){s.getRegionsForAccount(e.stage.accountName).then((function(n){Array.isArray(n)&&0!=n.length&&(e.stage.region=n[0].name)}))},this.addExtendedAttribute=function(){e.stage.extendedAttributes||(e.stage.extendedAttributes={}),t.open({templateUrl:S.addExtendedAttributes,controller:"bakeStageAddExtendedAttributeController",controllerAs:"addExtendedAttribute",resolve:{extendedAttribute:function(){return{key:"",value:""}}}}).result.then((function(n){e.stage.extendedAttributes[n.key]=n.value})).catch((()=>{}))},this.removeExtendedAttribute=function(n){delete e.stage.extendedAttributes[n]},this.showExtendedAttributes=function(){return e.viewState.roscoMode||e.stage.extendedAttributes&&P(e.stage.extendedAttributes)>0},e.$watch("stage.accountName",e.accountUpdated),e.viewState.providerSelected=!0,n.all([y.getBaseOsOptions(a),s.listAccounts(a)]).then((([n,t])=>{n.baseImages.length>0&&(e.baseOsOptions=n,e.stage.baseOs||(e.stage.baseOs=e.baseOsOptions.baseImages[0].id)),e.stage.user||(e.stage.user=b.getAuthenticatedUser().name),e.stage.upgrade||(e.stage.upgrade=!0),e.accounts=t,e.stage.accountName&&s.getRegionsForAccount(e.stage.accountName).then((function(n){Array.isArray(n)&&0!=n.length&&(e.stage.region=n[0].name)})),e.viewState.loading=!1}))}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/bake/bakeStage.html",'<div ng-controller="oracleBakeStageCtrl as bakeStageCtrl">\n <div ng-if="viewState.loading" class="horizontal center middle">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n\n <stage-config-field label="Oracle Account" help-key="oracle.pipeline.config.bake.account_name">\n <account-select-field\n component="stage"\n field="accountName"\n accounts="accounts"\n on-change="bakeStageCtrl.accountUpdated()"\n provider="\'oracle\'"\n >\n </account-select-field>\n </stage-config-field>\n\n <stage-config-field label="Region" help-key="oracle.pipeline.config.bake.regions">\n <input type="text" class="form-control input-sm" ng-readonly="true" ng-model="stage.region" />\n </stage-config-field>\n\n <stage-config-field label="Base Image" , help-key="oracle.pipeline.config.bake.baseOsOption">\n <div class="radio" ng-repeat="baseImage in baseOsOptions.baseImages">\n <label>\n <input type="radio" ng-model="stage.baseOs" ng-value="baseImage.id" />\n {{bakeStageCtrl.getBaseOsDescription(baseImage)}}\n <help-field content="{{baseImage.detailedDescription}}"></help-field>\n </label>\n </div>\n </stage-config-field>\n\n <stage-config-field label="Image Name" help-key="oracle.pipeline.config.bake.image_name">\n <input type="text" class="form-control input-sm" ng-model="stage.amiName" />\n </stage-config-field>\n\n <stage-config-field label="Package" help-key="oracle.pipeline.config.bake.package">\n <input type="text" class="form-control input-sm" ng-model="stage.package" />\n </stage-config-field>\n\n <stage-config-field label="Rebake" help-key="execution.forceRebake">\n <div class="checkbox" style="margin-bottom: 0">\n <label>\n <input type="checkbox" ng-model="stage.rebake" />\n Rebake image without regard to the status of any existing bake\n </label>\n </div>\n </stage-config-field>\n <div class="form-group">\n <div class="col-md-9 col-md-offset-1">\n <div class="checkbox">\n <label>\n <input type="checkbox" ng-model="stage.showAdvancedOptions" />\n <strong>Show Advanced Options</strong>\n </label>\n </div>\n </div>\n </div>\n <div ng-class="{collapse: stage.showAdvancedOptions !== true, \'collapse.in\': stage.showAdvancedOptions === true}">\n <stage-config-field label="Template File Name" help-key="pipeline.config.bake.templateFileName">\n <input type="text" class="form-control input-sm" ng-model="stage.templateFileName" />\n </stage-config-field>\n <stage-config-field label="Var File Name" help-key="pipeline.config.bake.varFileName">\n <input type="text" class="form-control input-sm" ng-model="stage.varFileName" />\n </stage-config-field>\n <stage-config-field label="Extended Attributes" help-key="pipeline.config.bake.extendedAttributes">\n <table class="table table-condensed packed">\n <thead>\n <tr>\n <th style="width: 40%">Key</th>\n <th style="width: 60%">Value</th>\n <th class="text-right">Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="(key,value) in stage.extendedAttributes">\n <td>\n <strong class="small">{{key}}</strong>\n </td>\n <td>\n <input\n type="text"\n ng-model="stage.extendedAttributes[key]"\n value="{{value}}"\n class="form-control input-sm"\n />\n </td>\n <td class="text-right">\n <a class="small" href ng-click="bakeStageCtrl.removeExtendedAttribute(key)">Remove</a>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan="7">\n <button class="btn btn-block btn-sm add-new" ng-click="bakeStageCtrl.addExtendedAttribute()">\n <span class="glyphicon glyphicon-plus-sign"></span> Add Extended Attribute\n </button>\n </td>\n </tr>\n </tfoot>\n </table>\n </stage-config-field>\n <stage-config-field label="Upgrade" help-key="oracle.pipeline.config.bake.upgrade">\n <label class="checkbox-inline">\n <input type="checkbox" ng-model="stage.upgrade" />\n Perform a package manager upgrade before proceeding with the package installation\n </label>\n </stage-config-field>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/bake/bakeExecutionDetails.html",'<div ng-controller="oracleBakeExecutionDetailsCtrl">\n <execution-details-section-nav sections="configSections"></execution-details-section-nav>\n <div class="step-section-details" ng-if="detailsSection === \'bakeConfig\'">\n <div class="row">\n <div class="col-md-6">\n <dl class="dl-narrow dl-horizontal">\n <dt>Provider</dt>\n <dd>oracle</dd>\n <dt>Image Name</dt>\n <dd>{{stage.context.amiName}}</dd>\n <dt ng-if="stage.context.package">Package</dt>\n <dd ng-if="stage.context.package">{{stage.context.package}}</dd>\n <dt ng-if="stage.context.accountName">Account</dt>\n <dd ng-if="stage.context.accountName">{{stage.context.accountName}}</dd>\n </dl>\n </div>\n <div class="col-md-6">\n <dl class="dl-narrow dl-horizontal">\n <dt>Base Image</dt>\n <dd>{{stage.context.baseOs}}</dd>\n <dt ng-if="roscoMode || execution.trigger.rebake || stage.context.rebake">Rebake</dt>\n <dd ng-if="roscoMode || execution.trigger.rebake || stage.context.rebake">\n {{execution.trigger.rebake || stage.context.rebake || false}}\n </dd>\n <dt ng-if="stage.context.templateFileName">Template</dt>\n <dd ng-if="stage.context.templateFileName">{{stage.context.templateFileName}}</dd>\n <dt ng-if="stage.context.varFileName">Var File</dt>\n <dd ng-if="stage.context.varFileName">{{stage.context.varFileName}}</dd>\n </dl>\n </div>\n </div>\n <stage-failure-message stage="stage" message="stage.failureMessage"></stage-failure-message>\n\n <div class="row" ng-if="stage.context.region && stage.context.status.resourceId">\n <div class="col-md-12">\n <div class="alert alert-{{stage.isFailed ? \'danger\' : \'info\'}}">\n <div ng-if="stage.context.previouslyBaked">No changes detected; reused existing bake</div>\n <div ng-if="stage.context.imageName">\n <strong>Image:</strong>\n <div select-on-dbl-click>{{stage.context.imageName}}</div>\n </div>\n <a target="_blank" href="{{ bakeryDetailUrl(stage) }}"> View Bakery Details </a>\n </div>\n </div>\n </div>\n </div>\n <div class="step-section-details" ng-if="detailsSection === \'taskStatus\'">\n <div class="row">\n <execution-step-details item="stage"></execution-step-details>\n </div>\n </div>\n</div>\n')}]);const J="spinnaker.oracle.pipeline.stage.destroyAsgStage";t(J,[]).config((function(){f.pipeline.registerStage({provides:"destroyServerGroup",cloudProvider:"oracle",templateUrl:"oracle/src/pipeline/stages/destroyAsg/destroyAsgStage.html",executionStepLabelUrl:"oracle/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html",validators:[{type:"targetImpedance",message:"This pipeline will attempt to destroy a server group without deploying a new version into the same cluster."},{type:"requiredField",fieldName:"cluster"},{type:"requiredField",fieldName:"target"},{type:"requiredField",fieldName:"regions"},{type:"requiredField",fieldName:"credentials",fieldLabel:"account"}]})})).controller("oracleDestroyAsgStageCtrl",["$scope",function(e){const n=e.stage,t="oracle";e.targets=k.TARGET_LIST,n.regions=n.regions||[],n.cloudProvider=t,e.state={accounts:!1,regionsLoaded:!1},function(){s.listAccounts(t).then((n=>{e.accounts=n,e.state.accounts=!0})),!n.credentials&&e.application.defaultCredentials.oracle&&(n.credentials=e.application.defaultCredentials.oracle);!n.regions.length&&e.application.defaultRegions.oracle&&n.regions.push(e.application.defaultRegions.oracle);n.target||(n.target=e.targets[0].val)}()}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/destroyAsg/destroyAsgStage.html",'<div ng-controller="oracleDestroyAsgStageCtrl as destroyAsgStageCtrl" class="form-horizontal">\n <div ng-if="!pipeline.strategy">\n <account-region-cluster-selector application="application" component="stage" accounts="accounts">\n </account-region-cluster-selector>\n </div>\n <stage-config-field label="Target">\n <target-select model="stage" options="targets"></target-select>\n </stage-config-field>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html",'<span class="task-label"> Destroy Server Group: {{step.context.serverGroupName}} ({{step.context.region}}) </span>\n')}]);const Q="spinnaker.oracle.pipeline.stage.disableAsgStage";t(Q,[]).config((function(){f.pipeline.registerStage({provides:"disableServerGroup",cloudProvider:"oracle",templateUrl:"oracle/src/pipeline/stages/disableAsg/disableAsgStage.html",executionStepLabelUrl:"oracle/src/pipeline/stages/disableAsg/disableAsgStepLabel.html",validators:[{type:"targetImpedance",message:"This pipeline will attempt to disable a server group without deploying a new version into the same cluster."},{type:"requiredField",fieldName:"cluster"},{type:"requiredField",fieldName:"target"},{type:"requiredField",fieldName:"regions"},{type:"requiredField",fieldName:"credentials",fieldLabel:"account"}]})})).controller("oracleDisableAsgStageCtrl",["$scope",function(e){const n=e.stage,t="oracle";e.state={accounts:!1,regionsLoaded:!1},s.listAccounts(t).then((n=>{e.accounts=n,e.state.accounts=!0})),e.targets=k.TARGET_LIST,n.regions=n.regions||[],n.cloudProvider=t,!n.credentials&&e.application.defaultCredentials.oracle&&(n.credentials=e.application.defaultCredentials.oracle),!n.regions.length&&e.application.defaultRegions.gce&&n.regions.push(e.application.defaultRegions.oracle),n.target||(n.target=e.targets[0].val)}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/disableAsg/disableAsgStage.html",'<div ng-controller="oracleDisableAsgStageCtrl as disableAsgStageCtrl" class="form-horizontal">\n <div ng-if="!pipeline.strategy">\n <account-region-cluster-selector application="application" component="stage" accounts="accounts">\n </account-region-cluster-selector>\n </div>\n <stage-config-field label="Target">\n <target-select model="stage" options="targets"></target-select>\n </stage-config-field>\n <stage-platform-health-override application="application" stage="stage" platform-health-type="\'Oracle\'">\n </stage-platform-health-override>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/disableAsg/disableAsgStepLabel.html",'<span class="task-label"> Disable Server Group: {{step.context.serverGroupName}} ({{step.context.region}}) </span>\n')}]);const ee="spinnaker.oracle.pipeline.stage.findAmiStage";e.module(ee,[]).config((function(){f.pipeline.registerStage({provides:"findImage",cloudProvider:"oracle",templateUrl:"oracle/src/pipeline/stages/findAmi/findAmiStage.html",validators:[{type:"requiredField",fieldName:"cluster"},{type:"requiredField",fieldName:"selectionStrategy",fieldLabel:"Server Group Selection"},{type:"requiredField",fieldName:"regions"},{type:"requiredField",fieldName:"credentials"}]})})).controller("oracleFindAmiStageCtrl",["$scope",n=>{const t="oracle",a=n.stage;n.state={accounts:!1,regionsLoaded:!1},s.listAccounts(t).then((e=>{n.accounts=e,n.state.accounts=!0})),n.selectionStrategies=[{label:"Largest",val:"LARGEST",description:"When multiple server groups exist, prefer the server group with the most instances"},{label:"Newest",val:"NEWEST",description:"When multiple server groups exist, prefer the newest"},{label:"Oldest",val:"OLDEST",description:"When multiple server groups exist, prefer the oldest"},{label:"Fail",val:"FAIL",description:"When multiple server groups exist, fail"}],a.regions=a.regions||[],a.cloudProvider=t,a.selectionStrategy=a.selectionStrategy||n.selectionStrategies[0].val,e.isUndefined(a.onlyEnabled)&&(a.onlyEnabled=!0),!a.credentials&&n.application.defaultCredentials.oracle&&(a.credentials=n.application.defaultCredentials.oracle),!a.regions.length&&n.application.defaultRegions.oracle&&a.regions.push(n.application.defaultRegions.oracle),n.$watch("stage.credentials",n.accountUpdated)}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/findAmi/findAmiStage.html",'<div ng-controller="oracleFindAmiStageCtrl as findAmiCtrl" class="form-horizontal">\n <account-region-cluster-selector application="application" component="stage" accounts="accounts">\n </account-region-cluster-selector>\n\n <stage-config-field label="Server Group Selection">\n <ui-select ng-model="stage.selectionStrategy" class="form-control input-sm">\n <ui-select-match placeholder="None">{{$select.selected.label}}</ui-select-match>\n <ui-select-choices repeat="strategy.val as strategy in selectionStrategies | filter: $select.search">\n <strong ng-bind-html="strategy.label | highlight: $select.search"></strong>\n <div ng-bind-html="strategy.description"></div>\n </ui-select-choices>\n </ui-select>\n </stage-config-field>\n <stage-config-field label="Server Group Filters">\n <label class="checkbox-inline">\n <input type="checkbox" ng-model="stage.onlyEnabled" />\n Only consider enabled Server Groups\n </label>\n </stage-config-field>\n</div>\n')}]);const ne="spinnaker.oracle.pipeline.stage.findImageFromTagsStage";t(ne,[]).config((function(){f.pipeline.registerStage({provides:"findImageFromTags",cloudProvider:"oracle",templateUrl:"oracle/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html",executionDetailsUrl:"oracle/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html",executionConfigSections:["findImageConfig","taskStatus"],validators:[{type:"requiredField",fieldName:"regions"},{type:"requiredField",fieldName:"packageName"}]})})).controller("oracleFindImageFromTagsStageCtrl",["$scope",function(e){e.stage.packageName=e.stage.packageName||"*",e.stage.tags=e.stage.tags||{},e.stage.regions=e.stage.regions||[],e.stage.cloudProvider=e.stage.cloudProvider||"oracle",y.getRegions("oracle").then((function(n){e.regions=n}))}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html",'<div ng-controller="oracleFindImageFromTagsStageCtrl as findImageFromTagsCtrl" class="form-horizontal">\n <stage-config-field label="Regions">\n <checklist items="regions" model="stage.regions" inline="true" include-select-all-button="true"></checklist>\n </stage-config-field>\n <stage-config-field label="Pattern">\n <map-editor model="stage.packageName" allow-empty="true"></map-editor>\n </stage-config-field>\n <stage-config-field label="Tags">\n <map-editor model="stage.tags" allow-empty="true"></map-editor>\n </stage-config-field>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html",'<div ng-controller="BaseExecutionDetailsCtrl">\n <execution-details-section-nav sections="configSections"></execution-details-section-nav>\n <div class="step-section-details" ng-if="detailsSection === \'findImageConfig\'">\n <div class="row">\n <div class="col-md-12">\n <dl class="dl-narrow dl-horizontal">\n <dt if-multiple-providers>Provider</dt>\n <dd if-multiple-providers>Oracle</dd>\n <dt>Regions</dt>\n <dd>{{stage.context.regions.join(\', \')}}</dd>\n <dt>Name</dt>\n <dd>{{stage.context.packageName}}</dd>\n <dt>Tags</dt>\n <dd>\n <span ng-repeat="(key, val) in stage.context.tags"> {{key}}:{{val}}{{$last ? \'\' : \', \'}} </span>\n </dd>\n </dl>\n </div>\n </div>\n <stage-failure-message stage="stage" message="stage.failureMessage"></stage-failure-message>\n\n <div class="row" ng-if="stage.context.amiDetails">\n <div class="col-md-12">\n <div class="well alert alert-info">\n <h4>Results</h4>\n <dl ng-repeat="image in stage.context.amiDetails" class="dl-narrow dl-horizontal">\n <dt>Region</dt>\n <dd>{{image.region}}</dd>\n <dt>Image ID</dt>\n <dd>{{image.imageId}}</dd>\n <dt>Name</dt>\n <dd>{{image.imageName}}</dd>\n </dl>\n </div>\n </div>\n </div>\n </div>\n\n <div class="step-section-details" ng-if="detailsSection === \'taskStatus\'">\n <div class="row">\n <execution-step-details item="stage"></execution-step-details>\n </div>\n </div>\n</div>\n')}]);const te="spinnaker.oracle.pipeline.stage.resizeAsgStage";t(te,[]).config((function(){f.pipeline.registerStage({provides:"resizeServerGroup",cloudProvider:"oracle",templateUrl:"oracle/src/pipeline/stages/resizeAsg/resizeAsgStage.html",executionStepLabelUrl:"oracle/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html",validators:[{type:"targetImpedance",message:"This pipeline will attempt to resize a server group without deploying a new version into the same cluster."},{type:"requiredField",fieldName:"cluster"},{type:"requiredField",fieldName:"target"},{type:"requiredField",fieldName:"action"},{type:"requiredField",fieldName:"regions"},{type:"requiredField",fieldName:"credentials",fieldLabel:"account"}]})})).controller("oracleResizeAsgStageCtrl",["$scope",function(e){const n="oracle",t=e.stage;e.viewState={accountsLoaded:!1,regionsLoaded:!1},s.listAccounts(n).then((function(n){e.accounts=n,e.viewState.accountsLoaded=!0})),e.resizeTargets=k.TARGET_LIST,e.scaleActions=[{label:"Scale Up",val:"scale_up"},{label:"Scale Down",val:"scale_down"},{label:"Scale to Cluster Size",val:"scale_to_cluster"},{label:"Scale to Exact Size",val:"scale_exact"}],e.resizeTypes=[{label:"Percentage",val:"pct"},{label:"Incremental",val:"incr"}],t.capacity=t.capacity||{},t.regions=t.regions||[],t.target=t.target||e.resizeTargets[0].val,t.action=t.action||e.scaleActions[0].val,t.resizeType=t.resizeType||e.resizeTypes[0].val,t.action||"exact"!==t.resizeType||(t.action="scale_exact"),t.cloudProvider=n,t.cloudProviderType=n,!t.credentials&&e.application.defaultCredentials.gce&&(t.credentials=e.application.defaultCredentials.gce),!t.regions.length&&e.application.defaultRegions.gce&&t.regions.push(e.application.defaultRegions.gce),this.updateResizeType=function(){"scale_exact"===t.action?(t.resizeType="exact",delete t.scalePct,delete t.scaleNum):(t.capacity={},"pct"===t.resizeType?delete t.scaleNum:(t.resizeType="incr",delete t.scalePct,t.scaleNum=t.scaleNum||0))}}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/resizeAsg/resizeAsgStage.html",'<div ng-controller="oracleResizeAsgStageCtrl as resizeAsgStageCtrl">\n <div ng-if="!pipeline.strategy">\n <div ng-if="viewState.loading" class="horizontal center middle">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n <div ng-if="!viewState.loading">\n <account-region-cluster-selector application="application" component="stage" accounts="accounts">\n </account-region-cluster-selector>\n </div>\n </div>\n <stage-config-field label="Target">\n <target-select model="stage" options="resizeTargets"></target-select>\n </stage-config-field>\n <stage-config-field label="Action" help-key="pipeline.config.resizeAsg.action">\n <select\n class="form-control input-sm"\n required\n ng-model="stage.action"\n ng-change="resizeAsgStageCtrl.updateResizeType()"\n ng-options="a.val as a.label for a in scaleActions"\n >\n <option>Select an action...</option>\n </select>\n </stage-config-field>\n <div ng-if="stage.action !== \'scale_exact\'">\n <stage-config-field label="{{stage.action === \'scale_to_cluster\' ? \'Additional Capacity\' : \'Type\'}}">\n <select\n class="form-control input-sm"\n required\n ng-model="stage.resizeType"\n ng-change="resizeAsgStageCtrl.updateResizeType()"\n ng-options="t.val as t.label for t in resizeTypes"\n >\n <option>Select an action...</option>\n </select>\n </stage-config-field>\n <div class="form-group" ng-if="stage.resizeType === \'pct\'">\n <div class="col-md-9 col-md-offset-3">\n <label class="col-md-2 sm-label-right" style="margin-left: 0; padding-left: 0">Resize Percentage</label>\n <div class="col-md-2">\n <input type="number" min="0" ng-model="stage.scalePct" class="form-control input-sm" />\n </div>\n </div>\n <div class="col-md-9 col-md-offset-3">\n <em class="subinput-note"\n >This is the percentage by which the target server group\'s capacity will be increased</em\n >\n </div>\n </div>\n <div class="form-group" ng-if="stage.resizeType === \'incr\'">\n <div class="col-md-9 col-md-offset-3">\n <label class="col-md-2 sm-label-right" style="margin-left: 0; padding-left: 0">Resize-by Amount</label>\n <div class="col-md-2">\n <input type="number" min="0" ng-model="stage.scaleNum" class="form-control input-sm" />\n </div>\n </div>\n <div class="col-md-9 col-md-offset-3">\n <em class="subinput-note"\n >This is the exact amount by which the target server group\'s capacity will be increased</em\n >\n </div>\n </div>\n </div>\n <div class="form-group" ng-if="stage.action === \'scale_exact\'">\n <div class="col-md-9 col-md-offset-3 small">\n <div class="col-md-9">\n <div class="col-md-3 col-md-offset-3">Min</div>\n <div class="col-md-3">Max</div>\n <div class="col-md-3">Desired</div>\n </div>\n </div>\n <div class="col-md-9 col-md-offset-3">\n <label class="col-md-2 sm-label-right small" style="margin-left: 0; padding-left: 0">Match Capacity</label>\n <div class="col-md-9">\n <div class="col-md-3">\n <input type="number" ng-model="stage.capacity.min" class="form-control input-sm" />\n </div>\n <div class="col-md-3">\n <input type="number" ng-model="stage.capacity.max" class="form-control input-sm" />\n </div>\n <div class="col-md-3">\n <input type="number" ng-model="stage.capacity.desired" class="form-control input-sm" />\n </div>\n </div>\n </div>\n </div>\n <stage-platform-health-override application="application" stage="stage" platform-health-type="\'Oracle\'">\n </stage-platform-health-override>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html",'<span class="task-label"> Resize Server Group: {{step.context.serverGroupName}} ({{step.context.region}}) </span>\n')}]);const ae="spinnaker.oracle.pipeline.stage.scaleDownClusterStage";t(ae,[]).config((function(){f.pipeline.registerStage({provides:"scaleDownCluster",cloudProvider:"oracle",templateUrl:"oracle/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html",validators:[{type:"requiredField",fieldName:"cluster"},{type:"requiredField",fieldName:"remainingFullSizeServerGroups",fieldLabel:"Keep [X] full size Server Groups"},{type:"requiredField",fieldName:"regions"},{type:"requiredField",fieldName:"credentials",fieldLabel:"account"}],strategy:!0})})).controller("oracleScaleDownClusterStageCtrl",["$scope",function(e){const n=e.stage,t="oracle";e.state={accounts:!1,regionsLoaded:!1},s.listAccounts(t).then((function(n){e.accounts=n,e.state.accounts=!0})),n.regions=n.regions||[],n.cloudProvider=t,!n.credentials&&e.application.defaultCredentials.gce&&(n.credentials=e.application.defaultCredentials.gce),!n.regions.length&&e.application.defaultRegions.gce&&n.regions.push(e.application.defaultRegions.gce),void 0===n.remainingFullSizeServerGroups&&(n.remainingFullSizeServerGroups=1),void 0===n.allowScaleDownActive&&(n.allowScaleDownActive=!1),void 0===n.preferLargerOverNewer&&(n.preferLargerOverNewer="false"),this.pluralize=function(e,n){return 1===n?e:e+"s"},n.preferLargerOverNewer=n.preferLargerOverNewer.toString()}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html",'<div ng-controller="oracleScaleDownClusterStageCtrl as scaleDownClusterStageCtrl" class="form-horizontal">\n <div ng-if="!pipeline.strategy">\n <account-region-cluster-selector application="application" component="stage" accounts="accounts">\n </account-region-cluster-selector>\n </div>\n <stage-config-field label="Scale Down Options">\n <div class="form-inline">\n <p>\n Keep the\n <input\n type="number"\n min="0"\n required\n ng-model="stage.remainingFullSizeServerGroups"\n class="form-control input-sm"\n style="width: 50px"\n />\n <select class="form-control input-sm" ng-model="stage.preferLargerOverNewer" style="width: 100px">\n <option value="true">largest</option>\n <option value="false">newest</option>\n </select>\n {{scaleDownClusterStageCtrl.pluralize(\'server group\', stage.remainingFullSizeServerGroups)}} at current size.\n </p>\n <p>The remaining server groups will be scaled down to zero instances.</p>\n </div>\n </stage-config-field>\n <div class="form-group">\n <div class="col-md-offset-3 col-md-6 checkbox">\n <label>\n <input type="checkbox" ng-model="stage.allowScaleDownActive" />\n Allow scale down of active server groups\n </label>\n </div>\n </div>\n</div>\n')}]);const ie="spinnaker.core.pipeline.stage.oracle.shrinkClusterStage";t(ie,[]).config((function(){f.pipeline.registerStage({provides:"shrinkCluster",cloudProvider:"oracle",templateUrl:"oracle/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html",validators:[{type:"requiredField",fieldName:"cluster"},{type:"requiredField",fieldName:"shrinkToSize",fieldLabel:"shrink to [X] Server Groups"},{type:"requiredField",fieldName:"regions"},{type:"requiredField",fieldName:"credentials",fieldLabel:"account"}]})})).controller("oracleShrinkClusterStageCtrl",["$scope",function(e){const n=e.stage;e.state={accounts:!1,regionsLoaded:!1},s.listAccounts("oracle").then((function(n){e.accounts=n,e.state.accounts=!0})),n.regions=n.regions||[],n.cloudProvider="oracle",!n.credentials&&e.application.defaultCredentials.oracle&&(n.credentials=e.application.defaultCredentials.oracle),!n.regions.length&&e.application.defaultRegions.oracle&&n.regions.push(e.application.defaultRegions.oracle),void 0===n.shrinkToSize&&(n.shrinkToSize=1),void 0===n.allowDeleteActive&&(n.allowDeleteActive=!1),this.pluralize=function(e,n){return 1===n?e:e+"s"},void 0===n.retainLargerOverNewer&&(n.retainLargerOverNewer="false"),n.retainLargerOverNewer=n.retainLargerOverNewer.toString()}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html",'<div ng-controller="oracleShrinkClusterStageCtrl as shrinkClusterStageCtrl" class="form-horizontal">\n <div ng-if="!pipeline.strategy">\n <account-region-cluster-selector application="application" component="stage" accounts="accounts">\n </account-region-cluster-selector>\n </div>\n <stage-config-field label="Shrink Options">\n <div class="form-inline">\n Shrink to\n <input\n type="number"\n min="0"\n required\n ng-model="stage.shrinkToSize"\n class="form-control input-sm"\n style="width: 50px"\n />\n {{shrinkClusterStageCtrl.pluralize(\'server group\', stage.shrinkToSize)}}, keeping the\n <select class="form-control input-sm" ng-model="stage.retainLargerOverNewer">\n <option value="true">largest</option>\n <option value="false">newest</option>\n </select>\n </div>\n </stage-config-field>\n <div class="form-group">\n <div class="col-md-offset-3 col-md-6 checkbox">\n <label>\n <input type="checkbox" ng-model="stage.allowDeleteActive" />\n Allow deletion of active server groups\n </label>\n </div>\n </div>\n <stage-platform-health-override application="application" stage="stage" platform-health-type="\'Google\'">\n </stage-platform-health-override>\n</div>\n')}]);const re="spinnaker.oracle.securityGroup.create.controller";t(re,[]).controller("oracleCreateSecurityGroupCtrl",["$scope","$uibModalInstance",function(e,n){this.cancel=()=>{n.dismiss()},e.firewallLabel=m.get("Firewall")}]);const le="spinnaker.oracle.securityGroup.reader";t(le,[]).factory("oracleSecurityGroupReader",(function(){return{resolveIndexedSecurityGroup:function(e,n,t){return e[n.account][n.region][t]}}}));const se="spinnaker.oracle.securityGroup.transformer";t(se,[]).factory("oracleSecurityGroupTransformer",(function(){function e(e,n){const t=n.find((n=>n.id===e.network));e.vpcName=t.length?t[0].name:""}return{normalizeSecurityGroup:function(n){return d.listNetworksByProvider("oracle").then(D.partial(e,n))}}}));const oe="spinnaker.oracle.serverGroup.configure.configuration.service";t(oe,[w]).factory("oracleServerGroupConfigurationService",["$q","oracleImageReader","securityGroupReader",function(e,n,t){const a="oracle",i=(e,n)=>{if(e.account){const t=n.credentialsKeyedByAccount[e.account];if(!t)return;n.filtered.regions=D.map(t.regions,(e=>({name:e.name}))),t&&(e.region=t.region)}},r=e=>{e.account&&e.region&&s.getAvailabilityZonesForAccountAndRegion(a,e.account,e.region).then((n=>{n?e.backingData.filtered.availabilityDomains=n.map((e=>({name:e}))):(e.backingData.filtered.availabilityDomains=[],e.availabilityDomain=null)}))},l=e=>{e.account&&e.region&&(e.backingData.filtered.loadBalancers=e.backingData.loadBalancers.filter((function(n){return n.region===e.region&&n.account===e.account})))};return{configureCommand:function(o,c){const p=c||{},m=p.account||o.defaultCredentials.oracle||U.defaults.account,g=p.region||o.defaultRegions.oracle||U.defaults.region;return e.all([s.getCredentialsKeyedByAccount(a),d.listNetworksByProvider(a),u.listSubnetsByProvider(a),t.getAllSecurityGroups(),n.findImages({provider:a}),s.getAvailabilityZonesForAccountAndRegion(a,m,g)]).then((function([e,n,s,d,u,p]){const m={credentialsKeyedByAccount:e,networks:n,subnets:s,securityGroups:d,images:u,availDomains:p};m.accounts=D.keys(m.credentialsKeyedByAccount),m.filtered={},i(c,m),m.filtered.availabilityDomains=D.map(m.availDomains,(function(e){return{name:e}})),m.filterSubnets=function(){return c.vpcId&&c.availabilityDomain?D.filter(m.subnets,{vcnId:c.vpcId,availabilityDomain:c.availabilityDomain}):m.subnets},m.loadBalancers=o.loadBalancers.data,m.accountOnChange=function(){i(c,c.backingData),r(c),l(c)},m.regionOnChange=function(){r(c),l(c)},m.availabilityDomainOnChange=function(){c.subnetId=null,m.seclists=null},m.vpcOnChange=function(){c.subnetId=null,m.seclists=null},m.subnetOnChange=function(){const e=D.find(m.subnets,{id:c.subnetId}),n=m.securityGroups[c.account][a][c.region],i=[];D.forEach(e.securityListIds,(function(e){const r=D.find(n,{id:e});t.getSecurityGroupDetails(c.application,c.account,a,c.region,c.vpcId,r.name).then((function(e){i.push(e),m.seclists=i}))}))},m.findBackendSetsByLoadBalancerId=e=>{const n=m.filtered.loadBalancers.find((n=>n.id===e));if(n&&n.backendSets){const e=[];return Object.keys(n.backendSets).reduce(((e,t)=>{const a=n.backendSets[t];return a.name=t,e.push(a),e}),e),e}return[]},m.findLoadBalListenersByBackendSetName=(e,n)=>{const t=m.filtered.loadBalancers.find((n=>n.id===e));return t&&t.listeners?Object.keys(t.listeners).filter((e=>t.listeners[e].defaultBackendSetName===n)).map((e=>t.listeners[e])):[]},m.loadBalancerOnChange=()=>{c.loadBalancerId?m.filtered.backendSets=m.findBackendSetsByLoadBalancerId(c.loadBalancerId):(c.backendSetName=void 0,m.backendSetOnChange(),m.filtered.backendSets=[])},m.backendSetOnChange=()=>{m.filtered.listeners=c.loadBalancerId&&c.backendSetName?m.findLoadBalListenersByBackendSetName(c.loadBalancerId,c.backendSetName):[]},m.filtered.images=m.images;const g={};D.forEach(m.filtered.images,(e=>{g[e.id]=(e=>e&&e.compatibleShapes?e.compatibleShapes.map((e=>({name:e}))):[])(e)})),m.filtered.shapes=g,m.filtered.allShapes=D.uniqBy(D.flatten(D.values(g)),"name"),c.backingData=m,c.account&&(l(c),m.loadBalancerOnChange(),m.backendSetOnChange())}))}}}]);const ce="spinnaker.oracle.serverGroup.configure.wizard.basicSettings.controller";e.module(ce,[A,T,C]).controller("oracleServerGroupBasicSettingsCtrl",["$scope","$state","$uibModalStack","$controller","imageReader",function(n,t,a,i,r){e.extend(this,i("BasicSettingsMixin",{$scope:n,imageReader:r,$uibModalStack:a,$state:t}))}]);const de="spinnaker.oracle.serverGroup.configure.wizard.capacity.selector.component";e.module(de,[]).component("oracleServerGroupCapacitySelector",{templateUrl:"oracle/src/serverGroup/configure/wizard/capacity/capacitySelector.component.html",bindings:{command:"="},controllerAs:"vm",controller:e.noop}),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/configure/wizard/capacity/capacitySelector.component.html",'<div>\n <div class="form-group">\n <div class="col-md-12">\n <p>Select the number of instances</p>\n </div>\n </div>\n <div class="form-group">\n <div class="col-md-3 sm-label-right">Number of Instances</div>\n <div class="col-md-2">\n <input type="number" class="form-control input-sm" ng-model="vm.command.capacity.desired" min="1" required />\n </div>\n </div>\n</div>\n')}]);const ue="spinnaker.oracle.serverGroup.configure";t(ue,[ce,de,oe]);const pe="spinnaker.oracle.serverGroupCommandBuilder.service";e.module(pe,[]).factory("oracleServerGroupCommandBuilder",["$q",function(n){const t="oracle";function a(e,a){const i=(a=a||{}).account||U.defaults.account,r=a.region||U.defaults.region,l={account:i,application:e.name,capacity:{desired:1},region:r,selectedProvider:t,viewState:{mode:a.mode||"create",disableStrategySelection:!0}};return n.when(l)}return{buildNewServerGroupCommand:a,buildServerGroupCommandFromExisting:function(e,a,i){i=i||"clone";const r=o.parseServerGroupName(a.name),l={account:a.account,application:e.name,shape:a.launchConfig.shape,strategy:"",stack:r.stack,vpcId:a.launchConfig.vpcId,subnetId:a.launchConfig.subnetId,region:a.region,availabilityDomain:a.launchConfig.availabilityDomain,sshAuthorizedKeys:a.launchConfig.sshAuthorizedKeys,selectedProvider:t,capacity:{desired:a.capacity.desired},viewState:{mode:i,disableStrategySelection:!0}};return n.when(l)},buildNewServerGroupCommandForPipeline:function(){return n.when({viewState:{requiresTemplateSelection:!0}})},buildServerGroupCommandFromPipeline:function(n,t){const i=D.cloneDeep(t);return a(n,{account:i.account,region:i.region}).then((n=>{const t={viewState:{disableImageSelection:!0,mode:"editPipeline",submitButtonLabel:"Done",templatingEnabled:!0}};return i.strategy=i.strategy||"",e.extend({},n,i,t)}))}}}]);const me="spinnaker.oracle.serverGroup.configure.cloneServerGroup";t(me,[A]).controller("oracleCloneServerGroupCtrl",["$scope","$uibModalInstance","$q","application","serverGroupWriter","serverGroupCommand","oracleServerGroupConfigurationService","title",function(e,n,t,a,i,r,l,s){function o(){l.configureCommand(a,r).then((function(){e.state.loaded=!0}))}e.title=s,e.state={loaded:!1,requiresTemplateSelection:!!r.viewState.requiresTemplateSelection},e.command=r,e.application=a,e.pages={basicSettings:"oracle/src/serverGroup/configure/wizard/basicSettings/basicSettings.html",instanceType:"oracle/src/serverGroup/configure/wizard/instanceType/instanceType.html",capacity:"oracle/src/serverGroup/configure/wizard/capacity/capacity.html",loadBalancers:"oracle/src/serverGroup/configure/wizard/loadBalancers/loadBalancers.html",networkSettings:"oracle/src/serverGroup/configure/wizard/network/networkSettings.html",templateSelection:"oracle/src/serverGroup/configure/wizard/templateSelection/templateSelection.html"},this.templateSelectionText={copied:["account, region, subnet, cluster name (stack, details)","load balancers",m.get("firewalls"),"instance type","all fields on the Advanced Settings page"],notCopied:[]},e.command.viewState.disableStrategySelection||this.templateSelectionText.notCopied.push("the deployment strategy (if any) used to deploy the most recent server group"),e.taskMonitor=new c({application:a,title:"Creating your server group",modalInstance:n}),this.isValid=function(){return e.command&&e.form.$valid&&B.isComplete()},this.showSubmitButton=function(){return B.allPagesVisited()},this.cancel=function(){n.dismiss()},this.submit=function(){if("editPipeline"===e.command.viewState.mode||"createPipeline"===e.command.viewState.mode)return n.close(e.command);e.taskMonitor.submit((function(){return i.cloneServerGroup(e.command,a)}))},o(),this.templateSelected=()=>{e.state.requiresTemplateSelection=!1,o()}}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/configure/wizard/basicSettings/basicSettings.html",'<div class="container-fluid form-horizontal" ng-controller="oracleServerGroupBasicSettingsCtrl as basicSettingsCtrl">\n <div class="modal-body">\n <div class="form-group">\n <div class="col-md-3 sm-label-right">Account</div>\n <div class="col-md-7">\n <account-select-field\n required\n read-only="command.viewState.readOnlyFields.credentials"\n component="command"\n field="account"\n accounts="command.backingData.accounts"\n provider="\'oracle\'"\n on-change="command.backingData.accountOnChange()"\n ></account-select-field>\n </div>\n </div>\n <region-select-field\n label-columns="3"\n component="command"\n field="region"\n account="command.account"\n provider="\'oracle\'"\n regions="command.backingData.filtered.regions"\n on-change="command.backingData.regionOnChange()"\n ></region-select-field>\n \x3c!-- VCN Selection (which will then filter subnets) --\x3e\n <div class="form-group">\n <div class="col-md-3 sm-label-right">VCN</div>\n <div class="col-md-9">\n <ui-select\n class="form-control input-sm"\n required\n ng-model="command.vpcId"\n ng-change="command.backingData.vpcOnChange()"\n >\n <ui-select-match placeholder="Select VCN">{{$select.selected.name}}</ui-select-match>\n <ui-select-choices repeat="network.id as network in command.backingData.networks">\n <span ng-bind-html="network.name | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n </div>\n\n <div class="form-group" ng-show="command.vpcId">\n <div class="col-md-3 sm-label-right">Availability Domain</div>\n <div class="col-md-7">\n <ui-select\n class="form-control input-sm"\n required\n ng-model="command.availabilityDomain"\n ng-change="command.backingData.availabilityDomainOnChange()"\n >\n <ui-select-match placeholder="Select AD">{{$select.selected.name}}</ui-select-match>\n <ui-select-choices\n repeat="availabilityDomain.name as availabilityDomain in command.backingData.filtered.availabilityDomains"\n >\n <span ng-bind-html="availabilityDomain.name"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n </div>\n\n \x3c!-- Subnet selection --\x3e\n <div class="form-group" ng-show="command.availabilityDomain">\n <div class="col-md-3 sm-label-right">Subnet</div>\n <div class="col-md-9">\n <ui-select\n class="form-control input-sm"\n required\n ng-model="command.subnetId"\n ng-change="command.backingData.subnetOnChange()"\n >\n <ui-select-match placeholder="Select subnet">{{$select.selected.name}}</ui-select-match>\n <ui-select-choices repeat="subnet.id as subnet in command.backingData.filterSubnets()">\n <span ng-bind-html="subnet.name | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n </div>\n\n <div class="form-group small" style="margin-top: 20px" ng-show="command.backingData.seclists">\n <div class="col-md-3 sm-label-right">Effective Security Lists</div>\n <div class="col-md-9">\n <p>Security Lists attached to selected subnet:</p>\n <ul ng-repeat="seclist in command.backingData.seclists">\n <div class="sm-label-left">{{seclist.name}}</div>\n <div ng-repeat="rule in seclist.inboundRules">\n <li ng-repeat="range in rule.portRanges">{{rule.protocol}}: {{range.startPort}} -> {{range.endPort}}</li>\n </div>\n </ul>\n </div>\n </div>\n\n <div class="form-group">\n <div class="col-md-3 sm-label-right">\n Stack\n <help-field key="oracle.serverGroup.stack"></help-field>\n </div>\n <div class="col-md-7">\n <input\n type="text"\n class="form-control input-sm"\n ng-pattern="basicSettingsCtrl.stackPattern"\n name="stack"\n ng-model="command.stack"\n />\n </div>\n </div>\n <div class="form-group row slide-in" ng-if="basicSettings.stack.$error.pattern">\n <div class="col-sm-9 col-sm-offset-2 error-message">\n <span>Only dot(.) and underscore(_) special characters are allowed in the Stack field.</span>\n </div>\n </div>\n <div class="form-group">\n <div class="col-md-3 sm-label-right">\n Detail\n <help-field key="oracle.serverGroup.detail"></help-field>\n </div>\n <div class="col-md-7">\n <input\n type="text"\n class="form-control input-sm"\n ng-pattern="basicSettingsCtrl.detailPattern"\n name="details"\n ng-model="command.freeFormDetails"\n />\n </div>\n </div>\n <deployment-strategy-selector\n ng-if="!command.viewState.disableStrategySelection && command.selectedProvider"\n command="command"\n ></deployment-strategy-selector>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/configure/wizard/instanceType/instanceType.html",'\x3c!-- Image selection --\x3e\n<div class="form-group" ng-if="!command.viewState.disableImageSelection">\n <div class="col-md-3 sm-label-right">Image</div>\n <div class="col-md-9">\n <ui-select class="form-control input-sm" required ng-model="command.imageId">\n <ui-select-match placeholder="Select an image">{{$select.selected.name}}</ui-select-match>\n <ui-select-choices repeat="image.id as image in command.backingData.filtered.images">\n <span ng-bind-html="image.name | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n\n\x3c!-- Shape selection --\x3e\n<div class="form-group">\n <div class="col-md-3 sm-label-right">Shape</div>\n <div class="col-md-9">\n <ui-select class="form-control input-sm" required ng-model="command.shape">\n <ui-select-match placeholder="Select compatible shape">{{$select.selected.name}}</ui-select-match>\n <ui-select-choices\n repeat="shape.name as shape in (!command.viewState.disableImageSelection\n ? command.backingData.filtered.shapes[command.imageId]\n : command.backingData.filtered.allShapes)"\n >\n <span ng-bind-html="shape.name"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/configure/wizard/capacity/capacity.html",'<div class="clearfix">\n <div class="row">\n <div class="col-md-12">\n <oracle-server-group-capacity-selector command="command"></oracle-server-group-capacity-selector>\n </div>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/configure/wizard/loadBalancers/loadBalancers.html",'\x3c!-- Load Balancer selection --\x3e\n<div class="form-group">\n <div class="col-md-3 sm-label-right">Load Balancer</div>\n <div class="col-md-9">\n <ui-select\n class="form-control input-sm"\n ng-model="command.loadBalancerId"\n ng-change="command.backingData.loadBalancerOnChange()"\n >\n <ui-select-match allow-clear="true" placeholder="Select Load Balancer">{{$select.selected.name}}</ui-select-match>\n <ui-select-choices repeat="loadBalancer.id as loadBalancer in command.backingData.filtered.loadBalancers">\n <span ng-bind-html="loadBalancer.name | highlight: $select.search"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n\n\x3c!-- Backend set selection --\x3e\n<div class="form-group" ng-if="command.loadBalancerId">\n <div class="col-md-3 sm-label-right">Backend Set</div>\n <div class="col-md-9">\n <ui-select\n class="form-control input-sm"\n ng-required="command.loadBalancerId"\n ng-model="command.backendSetName"\n ng-change="command.backingData.backendSetOnChange()"\n >\n <ui-select-match placeholder="Select Backend Set">{{$select.selected.name}}</ui-select-match>\n <ui-select-choices repeat="backendSet.name as backendSet in command.backingData.filtered.backendSets">\n <span ng-bind-html="backendSet.name"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n</div>\n\n\x3c!-- Show listeners associated with selected backend set --\x3e\n<div class="form-group" ng-if="command.loadBalancerId && command.backendSetName">\n <div class="col-md-3 sm-label-right">Listeners for {{command.backendSetName}}</div>\n <div class="col-md-9">\n <ul ng-repeat="(lisName, listener) in command.backingData.filtered.listeners">\n <li>{{listener.protocol}}:{{listener.port}}</li>\n </ul>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/configure/wizard/network/networkSettings.html",'\x3c!-- SSH Key --\x3e\n<div class="form-group">\n <div class="col-md-3 sm-label-right">\n SSH Key\n <help-field key="oracle.serverGroup.sshAuthorizedKeys"></help-field>\n </div>\n <div class="col-md-9">\n <textarea\n class="form-control input-sm"\n name="sshAuthorizedKeys"\n placeholder="Enter the public SSH key for the default user on the instance."\n ng-model="command.sshAuthorizedKeys"\n ></textarea>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/configure/wizard/templateSelection/templateSelection.html",'<deploy-initializer\n cloud-provider="oracle"\n command="command"\n application="application"\n parent-state="state"\n dismiss="ctrl.cancel()"\n template-selection-text="ctrl.templateSelectionText"\n on-template-selected="ctrl.templateSelected()"\n></deploy-initializer>\n')}]);const ge="spinnaker.oracle.footer.component";e.module(ge,[]).component("oracleFooter",{templateUrl:"oracle/src/common/footer.component.html",bindings:{action:"&",isValid:"&",cancel:"&",account:"=?",verification:"=?"},controllerAs:"vm",controller:e.noop}),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/common/footer.component.html",'<div class="modal-footer">\n <user-verification account="vm.account" verification="vm.verification"></user-verification>\n <button type="submit" ng-click="vm.action()" style="display: none"></button>\n \x3c!-- Allows form submission via enter keypress--\x3e\n <button class="btn btn-default" ng-click="vm.cancel()">Cancel</button>\n <button type="submit" class="btn btn-primary" ng-click="vm.action()" ng-disabled="!vm.isValid()">Submit</button>\n</div>\n')}]);const he="spinnaker.oracle.serverGroup.details.resize.capacity.component";e.module(he,[G]).component("oracleResizeCapacity",{bindings:{command:"=",application:"=",serverGroup:"=",formMethods:"="},templateUrl:"oracle/src/serverGroup/details/resize/resizeCapacity.component.html",controller:["$scope","serverGroupWriter",function(n,t){this.command.newSize=null,e.extend(this.formMethods,{formIsValid:()=>D.every([null!==this.command.newSize,n.resizeCapacityForm.$valid]),submitMethod:()=>t.resizeServerGroup(this.serverGroup,this.application,{capacity:{min:this.command.newSize,max:this.command.newSize,desired:this.command.newSize},serverGroupName:this.serverGroup.name,targetSize:this.command.newSize,region:this.serverGroup.region,interestingHealthProviderNames:this.command.interestingHealthProviderNames,reason:this.command.reason})})}]}),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/details/resize/resizeCapacity.component.html",'<ng-form name="resizeCapacityForm">\n <div>\n <div class="form-group">\n <div class="col-md-12">\n <p>Sets desired instance count for this server group.</p>\n </div>\n </div>\n <div class="form-group form-inline">\n <div class="col-md-3 sm-label-right">Current size</div>\n <div class="col-md-6">\n <input\n type="number"\n class="form-control input-sm"\n ng-model="$ctrl.serverGroup.capacity.desired"\n style="width: 60px"\n readonly\n />\n instance<span ng-if="$ctrl.currentSize.desired > 1">s</span>\n </div>\n </div>\n <div class="form-group form-inline">\n <div class="col-md-3 sm-label-right">Resize to</div>\n <div class="col-md-6">\n <input\n type="number"\n class="form-control input-sm highlight-pristine"\n ng-model="$ctrl.command.newSize"\n min="0"\n required\n style="width: 60px"\n />\n instance<span ng-if="$ctrl.currentSize.desired > 1">s</span>\n </div>\n </div>\n </div>\n</ng-form>\n')}]);const fe="spinnaker.oracle.serverGroup.details.resize.controller";t(fe,[he,ge]).controller("oracleResizeServerGroupCtrl",["$scope","$uibModalInstance","application","serverGroup",function(e,n,t,a){e.serverGroup=a,e.application=t,e.verification={},e.command={},e.formMethods={},t&&t.attributes&&(t.attributes.platformHealthOnlyShowOverride&&t.attributes.platformHealthOnly&&(e.command.interestingHealthProviderNames=["Oracle"]),e.command.platformHealthOnlyShowOverride=t.attributes.platformHealthOnlyShowOverride),this.isValid=function(){return!!e.verification.verified&&e.formMethods.formIsValid()},e.taskMonitor=new c({application:t,title:"Resizing "+a.name,modalInstance:n}),this.resize=function(){this.submitting=!0,this.isValid()&&e.taskMonitor.submit(e.formMethods.submitMethod)},this.cancel=function(){n.dismiss()}}]);const ve="spinnaker.oracle.serverGroup.details.rollback.controller";t(ve,[G,ge]).controller("oracleRollbackServerGroupCtrl",["$scope","$uibModalInstance","serverGroupWriter","application","serverGroup","disabledServerGroups",function(e,n,t,a,i,r){e.serverGroup=i,e.disabledServerGroups=r.sort(((e,n)=>n.name.localeCompare(e.name))),e.verification={},e.command={rollbackType:"EXPLICIT",rollbackContext:{rollbackServerGroupName:i.name}},a&&a.attributes&&(a.attributes.platformHealthOnlyShowOverride&&a.attributes.platformHealthOnly&&(e.command.interestingHealthProviderNames=["Oracle"]),e.command.platformHealthOnlyShowOverride=a.attributes.platformHealthOnlyShowOverride),this.isValid=function(){const n=e.command;return!!e.verification.verified&&void 0!==n.rollbackContext.restoreServerGroupName},e.taskMonitor=new c({application:a,title:"Rollback "+i.name,modalInstance:n}),this.rollback=function(){if(this.submitting=!0,!this.isValid())return;e.taskMonitor.submit((function(){return t.rollbackServerGroup(i,a,e.command)}))},this.cancel=function(){n.dismiss()}}]);const be="spinnaker.oracle.serverGroup.details.controller";t(be,[A,G,F,fe,ve]).controller("oracleServerGroupDetailsCtrl",["$scope","$state","$uibModal","app","serverGroup","serverGroupWriter","oracleImageReader",function(e,n,t,a,i,r,l){const s="oracle";this.application=a,this.serverGroup=i,this.state={loading:!0};const o=()=>$.getServerGroup(a.name,i.accountId,i.region,i.name).then((e=>{h(),e.account=i.accountId,this.serverGroup=e,c(),p(),m()})),c=()=>{d.listNetworksByProvider(s).then((e=>{this.serverGroup.network=_.chain(e).filter({account:this.serverGroup.account,id:this.serverGroup.launchConfig.vpcId}).head().value()}))},p=()=>{u.getSubnetByIdAndProvider(this.serverGroup.launchConfig.subnetId,s).then((e=>{this.serverGroup.subnet=e}))},m=()=>{l.getImage(this.serverGroup.launchConfig.imageId,this.serverGroup.region,this.serverGroup.account).then((e=>{e||(e={id:this.serverGroup.launchConfig.imageId,name:this.serverGroup.launchConfig.imageId}),this.serverGroup.image=e}))};this.destroyServerGroup=function(){const e=this.serverGroup,t={application:a,title:"Destroying "+e.name,onTaskComplete:function(){n.includes("**.serverGroup",i)&&n.go("^")}},i={name:e.name,account:e.account,region:e.region};g.confirm({header:"Really destroy "+e.name+"?",buttonText:"Destroy "+e.name,account:e.account,taskMonitorConfig:t,submitMethod:function(){return r.destroyServerGroup(e,a)}})},this.resizeServerGroup=()=>{t.open({templateUrl:"oracle/src/serverGroup/details/resize/resizeServerGroup.html",controller:"oracleResizeServerGroupCtrl as ctrl",resolve:{serverGroup:()=>this.serverGroup,application:()=>a}})},this.rollbackServerGroup=()=>{t.open({templateUrl:"oracle/src/serverGroup/details/rollback/rollbackServerGroup.html",controller:"oracleRollbackServerGroupCtrl as ctrl",resolve:{serverGroup:()=>this.serverGroup,disabledServerGroups:()=>{const e=_.find(a.serverGroups.data,{name:this.serverGroup.name,account:this.serverGroup.account,region:this.serverGroup.region}),n=_.find(a.clusters,{name:e.cluster,account:this.serverGroup.account});return _.filter(n.serverGroups,{isDisabled:!0,region:this.serverGroup.region})},application:()=>a}})},this.disableServerGroup=()=>{const e=this.serverGroup,n={application:a,title:"Disabling "+e.name},t={header:"Really disable "+e.name+"?",buttonText:"Disable "+e.name,account:e.account,taskMonitorConfig:n,platformHealthOnlyShowOverride:a.attributes.platformHealthOnlyShowOverride,platformHealthType:"Oracle",submitMethod:n=>r.disableServerGroup(e,a,n),askForReason:!0};N.addDisableWarningMessage(a,e,t),a.attributes.platformHealthOnlyShowOverride&&a.attributes.platformHealthOnly&&(t.interestingHealthProviderNames=["Oracle"]),g.confirm(t)},this.enableServerGroup=()=>{const e=this.serverGroup,n={application:a,title:"Enabling "+e.name},t={header:"Really enable "+e.name+"?",buttonText:"Enable "+e.name,account:e.account,taskMonitorConfig:n,platformHealthOnlyShowOverride:a.attributes.platformHealthOnlyShowOverride,platformHealthType:"Oracle",submitMethod:n=>r.enableServerGroup(e,a,n),askForReason:!0};a.attributes.platformHealthOnlyShowOverride&&a.attributes.platformHealthOnly&&(t.interestingHealthProviderNames=["Oracle"]),g.confirm(t)};const h=()=>{this.state.loading=!1};o().then((()=>{e.$$destroyed||a.serverGroups.onRefresh(e,o)}))}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/details/resize/resizeServerGroup.html",'<div modal-page class="confirmation-modal">\n <task-monitor monitor="taskMonitor"></task-monitor>\n <form role="form" ng-if="!ctrl.submitting">\n <modal-close dismiss="$dismiss()"></modal-close>\n <div class="modal-header">\n <h4 class="modal-title">Resize {{serverGroup.name}}</h4>\n </div>\n <div class="modal-body confirmation-modal">\n <div class="form-horizontal">\n <oracle-resize-capacity\n server-group="serverGroup"\n form-methods="formMethods"\n application="application"\n command="command"\n ></oracle-resize-capacity>\n </div>\n <div class="row" ng-if="command.platformHealthOnlyShowOverride">\n <div class="col-sm-10 col-sm-offset-1">\n <platform-health-override command="command" platform-health-type="\'Oracle\'" show-help-details="true">\n </platform-health-override>\n </div>\n </div>\n <task-reason command="command"></task-reason>\n </div>\n <oracle-footer\n action="ctrl.resize()"\n cancel="ctrl.cancel()"\n is-valid="ctrl.isValid()"\n account="serverGroup.account"\n verification="verification"\n ></oracle-footer>\n </form>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/details/rollback/rollbackServerGroup.html",'<div modal-page class="confirmation-modal">\n <task-monitor monitor="taskMonitor"></task-monitor>\n <form role="form" ng-if="!ctrl.submitting">\n <modal-close dismiss="$dismiss()"></modal-close>\n <div class="modal-header">\n <h4 class="modal-title">Rollback {{serverGroup.name}}</h4>\n </div>\n <div class="modal-body confirmation-modal">\n <div class="row">\n <div class="col-sm-3 sm-label-right">Restore to</div>\n <div class="col-sm-6">\n <ui-select ng-model="command.rollbackContext.restoreServerGroupName" class="form-control input-sm">\n <ui-select-match placeholder="Select...">{{$select.selected.name}}</ui-select-match>\n <ui-select-choices repeat="serverGroup.name as serverGroup in disabledServerGroups">\n <span ng-bind-html="serverGroup.name"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n </div>\n <div class="row" ng-if="command.platformHealthOnlyShowOverride">\n <div class="col-sm-10 col-sm-offset-1">\n <platform-health-override\n command="command"\n platform-health-type="\'Oracle\'"\n show-help-details="true"\n field-columns="12"\n >\n </platform-health-override>\n </div>\n </div>\n <task-reason command="command"></task-reason>\n </div>\n <gce-footer\n action="ctrl.rollback()"\n cancel="ctrl.cancel()"\n is-valid="ctrl.isValid()"\n account="serverGroup.account"\n verification="verification"\n ></gce-footer>\n </form>\n</div>\n')}]);const Se="spinnaker.oracle.serverGroup.transformer";t(Se,[]).factory("oracleServerGroupTransformer",["$q",function(e){return{convertServerGroupCommandToDeployConfiguration:function(e){const n=D.defaults({backingData:[],viewState:[]},e);return n.cloudProvider="oracle",n},normalizeServerGroup:function(n){return e.when(n)}}}]);const ye="spinnaker.oracle";t(ye,[Y,J,Q,ee,ne,te,ae,ie,V,Z,j,Se,ue,be,pe,me,F,q,le,se,re]).config((function(){x.registerProvider("oracle",{name:"Oracle",image:{reader:"oracleImageReader"},loadBalancer:{transformer:"oracleLoadBalancerTransformer",detailsTemplateUrl:"oracle/src/loadBalancer/details/loadBalancerDetail.html",detailsController:"oracleLoadBalancerDetailCtrl",createLoadBalancerTemplateUrl:"oracle/src/loadBalancer/configure/createLoadBalancer.html",createLoadBalancerController:"oracleCreateLoadBalancerCtrl"},serverGroup:{transformer:"oracleServerGroupTransformer",detailsTemplateUrl:"oracle/src/serverGroup/details/serverGroupDetails.html",detailsController:"oracleServerGroupDetailsCtrl",commandBuilder:"oracleServerGroupCommandBuilder",cloneServerGroupController:"oracleCloneServerGroupCtrl",cloneServerGroupTemplateUrl:"oracle/src/serverGroup/configure/wizard/serverGroupWizard.html",configurationService:"oracleServerGroupConfigurationService"},instance:{detailsController:"oracleInstanceDetailsCtrl",detailsTemplateUrl:"oracle/src/instance/details/instanceDetails.html"},securityGroup:{reader:"oracleSecurityGroupReader",transformer:"oracleSecurityGroupTransformer",createSecurityGroupTemplateUrl:"oracle/src/securityGroup/configure/createSecurityGroup.html",createSecurityGroupController:"oracleCreateSecurityGroupCtrl"}})})),z.registerProvider("oracle",[]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/loadBalancer/details/loadBalancerDetail.html",'<div class="details-panel">\n <div ng-if="state.loading" class="header">\n <div class="close-button">\n <a class="btn btn-link" ui-sref="^">\n <span class="glyphicon glyphicon-remove"></span>\n </a>\n </div>\n <div class="horizontal center middle">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n </div>\n\n <div ng-if="!state.loading" class="header">\n <div class="close-button">\n <a class="btn btn-link" ui-sref="^">\n <span class="glyphicon glyphicon-remove"></span>\n </a>\n </div>\n <div class="header-text horizontal middle">\n <i class="fa icon-sitemap"></i>\n <h3 class="horizontal middle space-between flex-1" select-on-dbl-click>{{loadBalancer.name}}</h3>\n </div>\n <div>\n <div class="actions">\n <div class="dropdown" uib-dropdown dropdown-append-to-body>\n <button type="button" class="btn btn-sm btn-primary dropdown-toggle" uib-dropdown-toggle>\n Load Balancer Actions <span class="caret"></span>\n </button>\n <ul class="dropdown-menu" uib-dropdown-menu role="menu">\n <li><a href ng-click="ctrl.editLoadBalancer()">Edit Load Balancer</a></li>\n <li ng-if="!loadBalancer.serverGroups.length">\n <a href ng-click="ctrl.deleteLoadBalancer()">Delete Load Balancer</a>\n </li>\n <li\n ng-if="loadBalancer.serverGroups.length"\n class="disabled"\n tooltip="You must detach all server groups before you can delete this load balancer."\n >\n <a href ng-click="return">Delete Load Balancer</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n <div ng-if="!state.loading" class="content">\n <collapsible-section heading="Load Balancer Details" expanded="true">\n <dl class="dl-horizontal dl-narrow">\n <dt>Created</dt>\n <dd>{{loadBalancer.timeCreated}}</dd>\n <dt>In</dt>\n <dd>\n <account-tag account="loadBalancer.account" pad="right" provider="loadBalancer.type"></account-tag>\n {{loadBalancer.region}}\n </dd>\n <dt>Subnets</dt>\n <dd ng-repeat="subnet in loadBalancer.subnets">{{subnet.name}}</dd>\n <dt>Public IP</dt>\n <dd ng-repeat="ip in loadBalancer.ipAddresses">{{ip.ipAddress}}</dd>\n </dl>\n <dl class="horizontal-when-filters-collapsed">\n <dt ng-if="loadBalancer.serverGroups">Server Groups</dt>\n <dd ng-if="loadBalancer.serverGroups">\n <ul class="collapse-margin-on-filter-collapse">\n <li ng-repeat="serverGroup in loadBalancer.serverGroups | orderBy: [\'isDisabled\', \'-name\']">\n <a\n ui-sref="^.serverGroup({region: serverGroup.region,\n accountId: serverGroup.account,\n serverGroup: serverGroup.name,\n provider: \'oracle\'})"\n >\n {{serverGroup.name}}\n </a>\n </li>\n </ul>\n </dd>\n </dl>\n </collapsible-section>\n \x3c!-- <collapsible-section heading="Status" expanded="true">\n <health-counts class="pull-left" container="loadBalancer.instanceCounts"></health-counts>\n </collapsible-section> --\x3e\n <collapsible-section heading="Backend Sets">\n <dd ng-repeat="backendSet in loadBalancer.backendSets">\n <dl>\n <dt>{{backendSet.name}}</dt>\n <dd>{{backendSet.policy}}</dd>\n <dd>Health Check: {{backendSet.healthChecker.urlPath}}</dd>\n </dl>\n </dd>\n </collapsible-section>\n <collapsible-section heading="Listeners">\n <dl>\n <dt>Listener → Backend Set</dt>\n <dd ng-repeat="listener in loadBalancer.listeners">\n {{listener.protocol}}:{{listener.port}} → {{listener.defaultBackendSetName}}\n </dd>\n </dl>\n </collapsible-section>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/loadBalancer/configure/createLoadBalancer.html",'<form name="form" class="form-horizontal" novalidate validate-on-submit>\n <v2-modal-wizard heading="Create New Oracle Load Balancer" task-monitor="taskMonitor" dismiss="$dismiss()">\n <v2-wizard-page key="Properties" label="Properties">\n <ng-include src="ctrl.pages.properties"></ng-include>\n </v2-wizard-page>\n <v2-wizard-page key="Certificates" label="SSL Certificates" done="true">\n <ng-include src="ctrl.pages.certificates"></ng-include>\n </v2-wizard-page>\n <v2-wizard-page key="Backend Sets" label="Backend Sets" done="true" hide-subheading="true">\n <ng-include src="ctrl.pages.backendSets"></ng-include>\n </v2-wizard-page>\n <v2-wizard-page key="Listeners" label="Listeners" done="true">\n <ng-include src="ctrl.pages.listeners"></ng-include>\n </v2-wizard-page>\n </v2-modal-wizard>\n <div class="modal-footer">\n <button ng-disabled="ctrl.taskMonitor.submitting" class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>\n <submit-button\n is-disabled="!state.accountsLoaded || !form.$valid || !ctrl.validateBeforeSubmit() || ctrl.taskMonitor.submitting"\n submitting="ctrl.taskMonitor.submitting"\n on-click="form.$valid && ctrl.validateBeforeSubmit() && ctrl.submit()"\n is-new="ctrl.isNew"\n ></submit-button>\n </div>\n</form>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/details/serverGroupDetails.html",'<div class="details-panel" ng-class="{ disabled: ctrl.serverGroup.isDisabled }">\n <div class="header" ng-if="ctrl.state.loading">\n <div class="close-button">\n <a class="btn btn-link" ui-sref="^">\n <span class="glyphicon glyphicon-remove"></span>\n </a>\n </div>\n <div class="horizontal center spinner-container">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n </div>\n <div class="header" ng-if="!ctrl.state.loading">\n <div class="close-button">\n <a class="btn btn-link" ui-sref="^">\n <span class="glyphicon glyphicon-remove"></span>\n </a>\n </div>\n <div class="header-text horizontal middle">\n <h3 class="horizontal middle space-between flex-1" select-on-dbl-click>{{ctrl.serverGroup.name}}</h3>\n </div>\n <div>\n <div class="actions" ng-class="{ insights: ctrl.serverGroup.insightActions.length > 0 }">\n <div class="dropdown" uib-dropdown dropdown-append-to-body>\n <button type="button" class="btn btn-sm btn-primary dropdown-toggle" uib-dropdown-toggle>\n Server Group Actions <span class="caret"></span>\n </button>\n <ul class="dropdown-menu" uib-dropdown-menu role="menu">\n <li><a href ng-if="!ctrl.serverGroup.disabled" ng-click="ctrl.disableServerGroup()">Disable</a></li>\n <li><a href ng-if="ctrl.serverGroup.disabled" ng-click="ctrl.enableServerGroup()">Enable</a></li>\n <li><a href ng-click="ctrl.destroyServerGroup()">Destroy</a></li>\n <li><a href ng-click="ctrl.resizeServerGroup()">Resize</a></li>\n <li><a href ng-click="ctrl.rollbackServerGroup()">Rollback</a></li>\n </ul>\n </div>\n <div class="dropdown" ng-if="ctrl.serverGroup.insightActions.length > 0" uib-dropdown dropdown-append-to-body>\n <button type="button" class="btn btn-sm btn-default dropdown-toggle" uib-dropdown-toggle>\n Insight <span class="caret"></span>\n </button>\n <ul class="dropdown-menu" uib-dropdown-menu role="menu">\n <li ng-repeat="action in ctrl.serverGroup.insightActions">\n <a target="_blank" href="{{action.url}}">{{action.label}}</a>\n </li>\n </ul>\n </div>\n <div class="clearfix"></div>\n </div>\n </div>\n </div>\n <div class="content" ng-if="!ctrl.state.loading">\n <h4 class="text-center" ng-if="ctrl.serverGroup.isDisabled">[SERVER GROUP IS DISABLED]</h4>\n <server-group-running-tasks-details server-group="ctrl.serverGroup"></server-group-running-tasks-details>\n <collapsible-section heading="Server Group Information" expanded="true">\n <dl class="dl-horizontal dl-narrow">\n <dt>Created</dt>\n <dd>{{ctrl.serverGroup.createdTime | timestamp}}</dd>\n <dt>In</dt>\n <dd>\n <account-tag account="ctrl.serverGroup.account" pad="right"></account-tag>\n {{ctrl.serverGroup.region}}\n </dd>\n <dt>VCN</dt>\n <dd>{{ctrl.serverGroup.network.name}}</dd>\n <dt>Subnet</dt>\n <dd>{{ctrl.serverGroup.subnet.name}}</dd>\n <dt>Avail Domain</dt>\n <dd>{{ctrl.serverGroup.zone}}</dd>\n </dl>\n </collapsible-section>\n <collapsible-section heading="Size" expanded="true">\n <dl class="dl-horizontal dl-narrow">\n <dt>Desired</dt>\n <dd>{{ctrl.serverGroup.capacity.desired}}</dd>\n <dt>Current</dt>\n <dd>{{ctrl.serverGroup.instances.length}}</dd>\n </dl>\n </collapsible-section>\n <collapsible-section heading="Launch Configuration">\n <dl class="dl-horizontal dl-narrow">\n <dt>Name</dt>\n <dd>{{ctrl.serverGroup.name}}</dd>\n <dt>Image</dt>\n <dd>{{ctrl.serverGroup.image.name}}</dd>\n <dt>Instance Type</dt>\n <dd>{{ctrl.serverGroup.launchConfig.shape}}</dd>\n <dt>VCN</dt>\n <dd>{{ctrl.serverGroup.network.name}}</dd>\n <dt>Subnet</dt>\n <dd>{{ctrl.serverGroup.subnet.name}}</dd>\n <dt>SSH Key</dt>\n <dd>{{ctrl.serverGroup.launchConfig.sshAuthorizedKeys}}</dd>\n </dl>\n </collapsible-section>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/serverGroup/configure/wizard/serverGroupWizard.html",'<form name="form" class="form-horizontal" novalidate>\n <div ng-if="state.requiresTemplateSelection">\n <ng-include src="pages.templateSelection"></ng-include>\n </div>\n <div ng-if="!state.loaded" style="height: 200px" class="horizontal center middle">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n <div ng-if="!state.requiresTemplateSelection">\n <v2-modal-wizard ng-show="state.loaded" heading="{{title}}" task-monitor="taskMonitor" dismiss="$dismiss()">\n <v2-wizard-page key="location" label="Basic Settings" mark-complete-on-view="false">\n <ng-include src="pages.basicSettings"></ng-include>\n </v2-wizard-page>\n <v2-wizard-page key="instance-type" label="Instance Type" mark-complete-on-view="false">\n <ng-include src="pages.instanceType"></ng-include>\n </v2-wizard-page>\n <v2-wizard-page key="capacity" label="Capacity" done="true">\n <ng-include src="pages.capacity"></ng-include>\n </v2-wizard-page>\n <v2-wizard-page key="loadBalancers" label="Load Balancers" done="true">\n <ng-include src="pages.loadBalancers"></ng-include>\n </v2-wizard-page>\n <v2-wizard-page key="network" label="Network Settings" done="true">\n <ng-include src="pages.networkSettings"></ng-include>\n </v2-wizard-page>\n </v2-modal-wizard>\n <div class="modal-footer" ng-if="state.loaded">\n <button ng-disabled="taskMonitor.submitting" class="btn btn-default btn-cancel" ng-click="ctrl.cancel()">\n Cancel\n </button>\n <submit-button\n ng-if="ctrl.showSubmitButton()"\n is-disabled="!ctrl.isValid() || taskMonitor.submitting"\n label="command.viewState.submitButtonLabel"\n submitting="taskMonitor.submitting"\n on-click="ctrl.submit()"\n is-new="true"\n ></submit-button>\n </div>\n </div>\n</form>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/instance/details/instanceDetails.html",'<div class="details-panel">\n <div class="header" ng-if="!state.loading">\n <instance-details-header\n health-state="instance.healthState"\n instance-id="instance.name || instance.id || instance.instanceId"\n loading="state.loading"\n standalone="state.standalone"\n ></instance-details-header>\n <div class="content" ng-if="!state.loading">\n <collapsible-section heading="Instance Information" expanded="true">\n <dl class="dl-horizontal dl-narrow">\n <dt>Launched</dt>\n <dd ng-if="instance.launchTime">{{instance.launchTime | timestamp}}</dd>\n <dd ng-if="!instance.launchTime">(Unknown)</dd>\n\n <dt ng-if="instance.availabilityZone">In</dt>\n <dd ng-if="instance.availabilityZone">{{instance.availabilityZone}}</dd>\n\n <dt ng-if="instance.instanceType">Type</dt>\n <dd ng-if="instance.instanceType">{{instance.instanceType | customInstanceFilter}}</dd>\n\n <dt ng-if="instance.serverGroup">Server Group</dt>\n <dd ng-if="instance.serverGroup">{{instance.serverGroup}}</dd>\n\n <dt ng-if="instance.network">Network</dt>\n <dd ng-if="instance.network">{{instance.network}}</dd>\n </dl>\n </collapsible-section>\n </div>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("oracle/src/securityGroup/configure/createSecurityGroup.html",'<ng-form role="form" name="form" novalidate>\n <v2-modal-wizard heading="Create New Oracle {{firewallLabel}}" dismiss="$dismiss()"> </v2-modal-wizard>\n <div class="container-fluid">\n <div class="col-md-12 well">\n <h4>Notice</h4>\n <p>\n We don\'t currently support the ability to create <firewall-label label="firewalls"></firewall-label> for Oracle\n Cloud from Spinnaker.\n </p>\n <p>\n You can use the Oracle Cloud console to create and manage Security Lists to provide a virtual\n <firewall-label label="firewall"></firewall-label> for an instance.\n </p>\n </div>\n </div>\n <div class="modal-footer">\n <button class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>\n </div>\n</ng-form>\n')}]);export{ye as ORACLE_MODULE};
|
|
3634
2
|
//# sourceMappingURL=index.js.map
|