@spinnaker/oracle 0.0.0-main-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +868 -0
- package/LICENSE.txt +203 -0
- package/dist/common/footer.component.d.ts +2 -0
- package/dist/domain/IOracleLoadBalancer.d.ts +114 -0
- package/dist/helpContents/oracleHelpContents.d.ts +1 -0
- package/dist/image/image.reader.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3634 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/details/instance.details.controller.d.ts +2 -0
- package/dist/loadBalancer/configure/createLoadBalancer.controller.d.ts +87 -0
- package/dist/loadBalancer/details/loadBalancerDetail.controller.d.ts +21 -0
- package/dist/loadBalancer/loadBalancer.transformer.d.ts +12 -0
- package/dist/oracle.module.d.ts +2 -0
- package/dist/oracle.settings.d.ts +15 -0
- package/dist/pipeline/stages/bake/bakeExecutionDetails.controller.d.ts +2 -0
- package/dist/pipeline/stages/bake/ociBakeStage.d.ts +2 -0
- package/dist/pipeline/stages/destroyAsg/destroyAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/disableAsg/disableAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/findAmi/findAmiStage.d.ts +2 -0
- package/dist/pipeline/stages/findImageFromTags/oracleFindImageFromTagsStage.d.ts +2 -0
- package/dist/pipeline/stages/resizeAsg/resizeAsgStage.d.ts +2 -0
- package/dist/pipeline/stages/scaleDownCluster/scaleDownClusterStage.d.ts +2 -0
- package/dist/pipeline/stages/shrinkCluster/shrinkClusterStage.d.ts +2 -0
- package/dist/securityGroup/configure/createSecurityGroup.controller.d.ts +2 -0
- package/dist/securityGroup/securityGroup.reader.d.ts +2 -0
- package/dist/securityGroup/securityGroup.transformer.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroup.configure.module.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroupConfiguration.service.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/basicSettings/basicSettings.controller.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/capacity/capacitySelector.component.d.ts +2 -0
- package/dist/serverGroup/configure/wizard/cloneServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/resize/resizeCapacity.component.d.ts +2 -0
- package/dist/serverGroup/details/resize/resizeServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/rollback/rollbackServerGroup.controller.d.ts +2 -0
- package/dist/serverGroup/details/serverGroupDetails.controller.d.ts +2 -0
- package/dist/serverGroup/serverGroup.transformer.d.ts +2 -0
- package/package.json +38 -0
- package/src/common/footer.component.html +7 -0
- package/src/common/footer.component.js +18 -0
- package/src/common/ocid/ocid.component.js +15 -0
- package/src/common/ocid/ocid.template.html +10 -0
- package/src/common/ocid/truncateOcid.filter.js +14 -0
- package/src/domain/IOracleLoadBalancer.ts +110 -0
- package/src/helpContents/oracleHelpContents.ts +52 -0
- package/src/image/image.reader.js +38 -0
- package/src/index.ts +1 -0
- package/src/instance/details/instance.details.controller.js +56 -0
- package/src/instance/details/instanceDetails.html +31 -0
- package/src/loadBalancer/configure/backendSets.html +67 -0
- package/src/loadBalancer/configure/certificates.html +63 -0
- package/src/loadBalancer/configure/createLoadBalancer.controller.spec.ts +201 -0
- package/src/loadBalancer/configure/createLoadBalancer.controller.ts +540 -0
- package/src/loadBalancer/configure/createLoadBalancer.html +25 -0
- package/src/loadBalancer/configure/createLoadBalancerProperties.html +167 -0
- package/src/loadBalancer/configure/editLoadBalancer.html +26 -0
- package/src/loadBalancer/configure/listeners.html +88 -0
- package/src/loadBalancer/details/loadBalancerDetail.controller.spec.ts +62 -0
- package/src/loadBalancer/details/loadBalancerDetail.controller.ts +163 -0
- package/src/loadBalancer/details/loadBalancerDetail.html +100 -0
- package/src/loadBalancer/loadBalancer.transformer.ts +144 -0
- package/src/oracle.module.ts +94 -0
- package/src/oracle.settings.ts +19 -0
- package/src/pipeline/disableAsg/disableAsgStage.html +11 -0
- package/src/pipeline/disableAsg/disableAsgStage.js +62 -0
- package/src/pipeline/disableAsg/disableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.controller.js +38 -0
- package/src/pipeline/stages/bake/bakeExecutionDetails.html +52 -0
- package/src/pipeline/stages/bake/bakeStage.html +109 -0
- package/src/pipeline/stages/bake/ociBakeStage.js +147 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.html +9 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStage.js +64 -0
- package/src/pipeline/stages/destroyAsg/destroyAsgStepLabel.html +1 -0
- package/src/pipeline/stages/disableAsg/disableAsgStage.html +11 -0
- package/src/pipeline/stages/disableAsg/disableAsgStage.js +63 -0
- package/src/pipeline/stages/disableAsg/disableAsgStepLabel.html +1 -0
- package/src/pipeline/stages/findAmi/findAmiStage.html +20 -0
- package/src/pipeline/stages/findAmi/findAmiStage.js +82 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsExecutionDetails.html +44 -0
- package/src/pipeline/stages/findImageFromTags/findImageFromTagsStage.html +11 -0
- package/src/pipeline/stages/findImageFromTags/oracleFindImageFromTagsStage.js +36 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.html +89 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStage.js +101 -0
- package/src/pipeline/stages/resizeAsg/resizeAsgStepLabel.html +1 -0
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.html +35 -0
- package/src/pipeline/stages/scaleDownCluster/scaleDownClusterStage.js +75 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.html +34 -0
- package/src/pipeline/stages/shrinkCluster/shrinkClusterStage.js +71 -0
- package/src/securityGroup/configure/createSecurityGroup.controller.js +19 -0
- package/src/securityGroup/configure/createSecurityGroup.html +19 -0
- package/src/securityGroup/securityGroup.reader.js +15 -0
- package/src/securityGroup/securityGroup.transformer.js +25 -0
- package/src/serverGroup/configure/serverGroup.configure.module.js +15 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.js +105 -0
- package/src/serverGroup/configure/serverGroupConfiguration.service.js +229 -0
- package/src/serverGroup/configure/wizard/advancedSettings/advancedSettings.html +13 -0
- package/src/serverGroup/configure/wizard/basicSettings/basicSettings.controller.js +35 -0
- package/src/serverGroup/configure/wizard/basicSettings/basicSettings.html +134 -0
- package/src/serverGroup/configure/wizard/capacity/capacity.html +7 -0
- package/src/serverGroup/configure/wizard/capacity/capacitySelector.component.html +13 -0
- package/src/serverGroup/configure/wizard/capacity/capacitySelector.component.js +17 -0
- package/src/serverGroup/configure/wizard/cloneServerGroup.controller.js +109 -0
- package/src/serverGroup/configure/wizard/instanceType/instanceType.html +29 -0
- package/src/serverGroup/configure/wizard/loadBalancers/loadBalancers.html +44 -0
- package/src/serverGroup/configure/wizard/network/networkSettings.html +15 -0
- package/src/serverGroup/configure/wizard/serverGroupWizard.html +40 -0
- package/src/serverGroup/configure/wizard/templateSelection/templateSelection.html +9 -0
- package/src/serverGroup/details/resize/resizeCapacity.component.html +36 -0
- package/src/serverGroup/details/resize/resizeCapacity.component.js +42 -0
- package/src/serverGroup/details/resize/resizeServerGroup.controller.js +62 -0
- package/src/serverGroup/details/resize/resizeServerGroup.html +33 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.controller.js +73 -0
- package/src/serverGroup/details/rollback/rollbackServerGroup.html +41 -0
- package/src/serverGroup/details/serverGroupDetails.controller.js +230 -0
- package/src/serverGroup/details/serverGroupDetails.html +94 -0
- package/src/serverGroup/serverGroup.transformer.js +29 -0
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@spinnaker/oracle",
|
|
3
|
+
"license": "Apache-2.0",
|
|
4
|
+
"version": "0.0.0-main-2",
|
|
5
|
+
"module": "dist/index.js",
|
|
6
|
+
"typings": "dist/index.d.ts",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public",
|
|
9
|
+
"registry": "https://registry.npmjs.org"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"clean": "shx rm -rf dist",
|
|
13
|
+
"prepublishOnly": "npm run build",
|
|
14
|
+
"build": "npm run clean && spinnaker-scripts build",
|
|
15
|
+
"dev": "spinnaker-scripts start",
|
|
16
|
+
"dev:push": "spinnaker-scripts start --push",
|
|
17
|
+
"lib": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@spinnaker/core": "^0.29.1",
|
|
21
|
+
"@uirouter/angularjs": "1.0.26",
|
|
22
|
+
"@uirouter/core": "6.0.8",
|
|
23
|
+
"angular": "1.6.10",
|
|
24
|
+
"angular-ui-bootstrap": "2.5.0",
|
|
25
|
+
"lodash": "4.17.21",
|
|
26
|
+
"ngimport": "0.6.1"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@spinnaker/eslint-plugin": "^3.0.2",
|
|
30
|
+
"@spinnaker/scripts": "^0.4.0",
|
|
31
|
+
"@types/angular": "1.6.26",
|
|
32
|
+
"@types/angular-ui-bootstrap": "0.13.41",
|
|
33
|
+
"@types/lodash": "4.14.64",
|
|
34
|
+
"shx": "0.3.3",
|
|
35
|
+
"typescript": "4.3.5"
|
|
36
|
+
},
|
|
37
|
+
"gitHead": "41637c82dc23fbf1195173a93611a08000fc0e53"
|
|
38
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<div class="modal-footer">
|
|
2
|
+
<user-verification account="vm.account" verification="vm.verification"></user-verification>
|
|
3
|
+
<button type="submit" ng-click="vm.action()" style="display: none"></button>
|
|
4
|
+
<!-- Allows form submission via enter keypress-->
|
|
5
|
+
<button class="btn btn-default" ng-click="vm.cancel()">Cancel</button>
|
|
6
|
+
<button type="submit" class="btn btn-primary" ng-click="vm.action()" ng-disabled="!vm.isValid()">Submit</button>
|
|
7
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import * as angular from 'angular';
|
|
4
|
+
|
|
5
|
+
export const ORACLE_COMMON_FOOTER_COMPONENT = 'spinnaker.oracle.footer.component';
|
|
6
|
+
export const name = ORACLE_COMMON_FOOTER_COMPONENT; // for backwards compatibility
|
|
7
|
+
angular.module(ORACLE_COMMON_FOOTER_COMPONENT, []).component('oracleFooter', {
|
|
8
|
+
templateUrl: require('./footer.component.html'),
|
|
9
|
+
bindings: {
|
|
10
|
+
action: '&',
|
|
11
|
+
isValid: '&',
|
|
12
|
+
cancel: '&',
|
|
13
|
+
account: '=?',
|
|
14
|
+
verification: '=?',
|
|
15
|
+
},
|
|
16
|
+
controllerAs: 'vm',
|
|
17
|
+
controller: angular.noop,
|
|
18
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { module } from 'angular';
|
|
2
|
+
|
|
3
|
+
import { ORACLE_COMMON_OCID_TRUNCATEOCID_FILTER } from './truncateOcid.filter';
|
|
4
|
+
|
|
5
|
+
('use strict');
|
|
6
|
+
|
|
7
|
+
export const ORACLE_COMMON_OCID_OCID_COMPONENT = 'spinnaker.oracle.ocid.component';
|
|
8
|
+
export const name = ORACLE_COMMON_OCID_OCID_COMPONENT; // for backwards compatibility
|
|
9
|
+
module(ORACLE_COMMON_OCID_OCID_COMPONENT, [ORACLE_COMMON_OCID_TRUNCATEOCID_FILTER]).component('ocid', {
|
|
10
|
+
templateUrl: require('./ocid.template.html'),
|
|
11
|
+
bindings: {
|
|
12
|
+
ocid: '=',
|
|
13
|
+
showOcid: '@',
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
export const ORACLE_COMMON_OCID_TRUNCATEOCID_FILTER = 'spinnaker.oracle.truncateOcid.filter';
|
|
6
|
+
export const name = ORACLE_COMMON_OCID_TRUNCATEOCID_FILTER; // for backwards compatibility
|
|
7
|
+
module(ORACLE_COMMON_OCID_TRUNCATEOCID_FILTER, []).filter('truncateOcid', function () {
|
|
8
|
+
return function (ocid) {
|
|
9
|
+
if (ocid) {
|
|
10
|
+
return '...' + ocid.substr(ocid.length - 6);
|
|
11
|
+
}
|
|
12
|
+
return '';
|
|
13
|
+
};
|
|
14
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { ILoadBalancer, ILoadBalancerDeleteCommand, ILoadBalancerUpsertCommand, ISubnet } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
export type ListenerProtocol = 'HTTP' | 'HTTPS' | 'TCP' | 'SSL';
|
|
4
|
+
export enum LoadBalancingPolicy {
|
|
5
|
+
ROUND_ROBIN = 'ROUND_ROBIN',
|
|
6
|
+
IP_HASH = 'IP_HASH',
|
|
7
|
+
LEAST_CONNECTIONS = 'LEAST_CONNECTIONS',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IOracleSubnet extends ISubnet {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
availabilityDomain: string;
|
|
14
|
+
securityListIds: string[];
|
|
15
|
+
vcnId: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IOracleLoadBalancer extends ILoadBalancer {
|
|
19
|
+
shape: string; // required
|
|
20
|
+
isPrivate: boolean; // required
|
|
21
|
+
subnets: IOracleSubnet[]; // required 1 for private LB, 2 for public LB
|
|
22
|
+
certificates?: { [name: string]: IOracleListenerCertificate };
|
|
23
|
+
listeners?: { [name: string]: IOracleListener }; // not required to create LB, but useless without it
|
|
24
|
+
hostnames?: IOracleHostname[];
|
|
25
|
+
backendSets?: { [name: string]: IOracleBackEndSet }; // not required to create LB, but useless without it
|
|
26
|
+
freeformTags?: { [tagName: string]: string };
|
|
27
|
+
id?: string; // not required to create LB
|
|
28
|
+
subnetTypeMap?: { [id: string]: 'AD' | 'Regional' };
|
|
29
|
+
// TODO support path route sets
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// This is created from loadBalancer/loadBalancer.states.ts
|
|
33
|
+
export interface ILoadBalancerDetails {
|
|
34
|
+
name: string;
|
|
35
|
+
accountId: string;
|
|
36
|
+
region: string;
|
|
37
|
+
vpcId: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface IOracleListener {
|
|
41
|
+
name: string;
|
|
42
|
+
protocol: ListenerProtocol;
|
|
43
|
+
port: number;
|
|
44
|
+
defaultBackendSetName: string;
|
|
45
|
+
isSsl: boolean;
|
|
46
|
+
sslConfiguration?: IOracleListenerSSLConfiguration;
|
|
47
|
+
hostnames?: IOracleHostname[];
|
|
48
|
+
// TODO support pathRouteSets
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface IOracleListenerSSLConfiguration {
|
|
52
|
+
certificateName: string;
|
|
53
|
+
verifyDepth: number;
|
|
54
|
+
verifyPeerCertificates: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface IOracleHostname {
|
|
58
|
+
name: string;
|
|
59
|
+
hostname: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface IOracleBackEndSet {
|
|
63
|
+
name: string;
|
|
64
|
+
policy: LoadBalancingPolicy;
|
|
65
|
+
healthChecker: IOracleBackendSetHealthCheck;
|
|
66
|
+
// TODO desagar sessionPersistenceConfiguration?: IOracleLoadBalancerSessionPersistenceConfiguration;
|
|
67
|
+
backends: any[];
|
|
68
|
+
isNew: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface IOracleListenerCertificate {
|
|
72
|
+
certificateName: string;
|
|
73
|
+
publicCertificate: string;
|
|
74
|
+
caCertificate: string;
|
|
75
|
+
privateKey: string;
|
|
76
|
+
passphrase: string;
|
|
77
|
+
isNew: boolean;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface IOracleBackendSetHealthCheck {
|
|
81
|
+
urlPath: string; // required
|
|
82
|
+
protocol: 'HTTP' | 'TCP';
|
|
83
|
+
port: number;
|
|
84
|
+
intervalMillis?: number;
|
|
85
|
+
timeoutMillis?: number;
|
|
86
|
+
retries?: number;
|
|
87
|
+
returnCode?: number;
|
|
88
|
+
responseBodyRegex?: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* IOracleLoadBalancerUpsertCommand is nearly identical to IOracleLoadBalancer -
|
|
93
|
+
* Command objects are the shape of data sent to gate.
|
|
94
|
+
*/
|
|
95
|
+
export interface IOracleLoadBalancerUpsertCommand extends ILoadBalancerUpsertCommand {
|
|
96
|
+
shape: string; // required
|
|
97
|
+
isPrivate: boolean; // required
|
|
98
|
+
subnetIds: string[]; // required 1 for private LB, 2 for public LB
|
|
99
|
+
certificates?: { [name: string]: IOracleListenerCertificate };
|
|
100
|
+
listeners?: { [name: string]: IOracleListener }; // not required to create LB, but useless without it
|
|
101
|
+
hostnames?: IOracleHostname[];
|
|
102
|
+
backendSets?: { [name: string]: IOracleBackEndSet }; // not required to create LB, but useless without it
|
|
103
|
+
freeformTags?: { [tagName: string]: string };
|
|
104
|
+
vpcId: string;
|
|
105
|
+
subnetTypeMap?: { [id: string]: 'AD' | 'Regional' };
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface IOracleLoadBalancerDeleteCommand extends ILoadBalancerDeleteCommand {
|
|
109
|
+
loadBalancerId: string;
|
|
110
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { HelpContentsRegistry } from '@spinnaker/core';
|
|
2
|
+
|
|
3
|
+
const helpContents = [
|
|
4
|
+
{
|
|
5
|
+
key: 'oracle.serverGroup.stack',
|
|
6
|
+
value: '(Optional) <b>Stack</b> Stack name',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
key: 'oracle.serverGroup.detail',
|
|
10
|
+
value: '(Optional) <b>Detail</b> is a naming component to help distinguish specifics of the server group.',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
key: 'oracle.pipeline.config.bake.baseOsOption',
|
|
14
|
+
value: '<p>The base image from which the image will be created.</p>',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
key: 'oracle.pipeline.config.bake.image_name',
|
|
18
|
+
value: '<p>The base name of the image that will be created.</p>',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
key: 'oracle.pipeline.config.bake.package',
|
|
22
|
+
value:
|
|
23
|
+
'<p>The name of the package you want installed (without any version identifiers).</p>' +
|
|
24
|
+
'<p>If there are multiple packages (space separated), then they will be installed in the order they are entered.</p>',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: 'oracle.pipeline.config.bake.upgrade',
|
|
28
|
+
value:
|
|
29
|
+
'<p>Perform a package manager upgrade before proceeding with the package installation.</p>' +
|
|
30
|
+
'<p>For example: <i>yum update</i>.</p>',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: 'oracle.pipeline.config.bake.regions',
|
|
34
|
+
value:
|
|
35
|
+
'<p>The region in which the new image will be created.</p>' +
|
|
36
|
+
'<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
|
+
|
|
52
|
+
helpContents.forEach((entry) => HelpContentsRegistry.register(entry.key, entry.value));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import { module } from 'angular';
|
|
4
|
+
|
|
5
|
+
import { REST } from '@spinnaker/core';
|
|
6
|
+
|
|
7
|
+
export const ORACLE_IMAGE_IMAGE_READER = 'spinnaker.oracle.image.reader';
|
|
8
|
+
export const name = ORACLE_IMAGE_IMAGE_READER; // for backwards compatibility
|
|
9
|
+
module(ORACLE_IMAGE_IMAGE_READER, []).factory('oracleImageReader', function () {
|
|
10
|
+
function findImages(params) {
|
|
11
|
+
return REST('/images/find')
|
|
12
|
+
.query(params)
|
|
13
|
+
.get()
|
|
14
|
+
.catch(function () {
|
|
15
|
+
return [];
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getImage(imageId, region, credentials) {
|
|
20
|
+
return REST('/images')
|
|
21
|
+
.path(credentials, region, imageId)
|
|
22
|
+
.query({ provider: 'oracle' })
|
|
23
|
+
.get()
|
|
24
|
+
.then(
|
|
25
|
+
function (results) {
|
|
26
|
+
return results && results.length ? results[0] : null;
|
|
27
|
+
},
|
|
28
|
+
function () {
|
|
29
|
+
return null;
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
findImages,
|
|
36
|
+
getImage,
|
|
37
|
+
};
|
|
38
|
+
});
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ORACLE_MODULE } from './oracle.module';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import UIROUTER_ANGULARJS from '@uirouter/angularjs';
|
|
4
|
+
import { module } from 'angular';
|
|
5
|
+
|
|
6
|
+
import { InstanceReader } from '@spinnaker/core';
|
|
7
|
+
|
|
8
|
+
export const ORACLE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER = 'spinnaker.oracle.instance.details.controller';
|
|
9
|
+
export const name = ORACLE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER; // for backwards compatibility
|
|
10
|
+
module(ORACLE_INSTANCE_DETAILS_INSTANCE_DETAILS_CONTROLLER, [UIROUTER_ANGULARJS]).controller(
|
|
11
|
+
'oracleInstanceDetailsCtrl',
|
|
12
|
+
[
|
|
13
|
+
'$scope',
|
|
14
|
+
'$q',
|
|
15
|
+
'app',
|
|
16
|
+
'instance',
|
|
17
|
+
function ($scope, $q, app, instance) {
|
|
18
|
+
$scope.application = app;
|
|
19
|
+
|
|
20
|
+
const initialize = app.isStandalone
|
|
21
|
+
? retrieveInstance()
|
|
22
|
+
: $q.all([app.serverGroups.ready()]).then(retrieveInstance);
|
|
23
|
+
|
|
24
|
+
initialize.then(() => {
|
|
25
|
+
if (!$scope.$$destroyed && !app.isStandalone) {
|
|
26
|
+
app.serverGroups.onRefresh($scope, retrieveInstance);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
function retrieveInstance() {
|
|
31
|
+
let instanceSummary, account, region;
|
|
32
|
+
if (!$scope.application.serverGroups) {
|
|
33
|
+
instanceSummary = {};
|
|
34
|
+
account = instance.account;
|
|
35
|
+
region = instance.region;
|
|
36
|
+
} else {
|
|
37
|
+
$scope.application.serverGroups.data.some((serverGroup) => {
|
|
38
|
+
return serverGroup.instances.some((possibleInstance) => {
|
|
39
|
+
if (possibleInstance.id === instance.instanceId || possibleInstance.name === instance.instanceId) {
|
|
40
|
+
instanceSummary = possibleInstance;
|
|
41
|
+
account = serverGroup.account;
|
|
42
|
+
region = serverGroup.region;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$scope.instance = instanceSummary;
|
|
50
|
+
InstanceReader.getInstanceDetails(account, region, instance.instanceId).then((instanceDetails) => {
|
|
51
|
+
Object.assign($scope.instance, instanceDetails);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div class="details-panel">
|
|
2
|
+
<div class="header" ng-if="!state.loading">
|
|
3
|
+
<instance-details-header
|
|
4
|
+
health-state="instance.healthState"
|
|
5
|
+
instance-id="instance.name || instance.id || instance.instanceId"
|
|
6
|
+
loading="state.loading"
|
|
7
|
+
standalone="state.standalone"
|
|
8
|
+
></instance-details-header>
|
|
9
|
+
<div class="content" ng-if="!state.loading">
|
|
10
|
+
<collapsible-section heading="Instance Information" expanded="true">
|
|
11
|
+
<dl class="dl-horizontal dl-narrow">
|
|
12
|
+
<dt>Launched</dt>
|
|
13
|
+
<dd ng-if="instance.launchTime">{{instance.launchTime | timestamp}}</dd>
|
|
14
|
+
<dd ng-if="!instance.launchTime">(Unknown)</dd>
|
|
15
|
+
|
|
16
|
+
<dt ng-if="instance.availabilityZone">In</dt>
|
|
17
|
+
<dd ng-if="instance.availabilityZone">{{instance.availabilityZone}}</dd>
|
|
18
|
+
|
|
19
|
+
<dt ng-if="instance.instanceType">Type</dt>
|
|
20
|
+
<dd ng-if="instance.instanceType">{{instance.instanceType | customInstanceFilter}}</dd>
|
|
21
|
+
|
|
22
|
+
<dt ng-if="instance.serverGroup">Server Group</dt>
|
|
23
|
+
<dd ng-if="instance.serverGroup">{{instance.serverGroup}}</dd>
|
|
24
|
+
|
|
25
|
+
<dt ng-if="instance.network">Network</dt>
|
|
26
|
+
<dd ng-if="instance.network">{{instance.network}}</dd>
|
|
27
|
+
</dl>
|
|
28
|
+
</collapsible-section>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<div class="container-fluid form-horizontal">
|
|
2
|
+
<div class="form-group">
|
|
3
|
+
<div class="col-md-12">
|
|
4
|
+
<table class="table table-condensed packed">
|
|
5
|
+
<thead>
|
|
6
|
+
<tr>
|
|
7
|
+
<th>Name</th>
|
|
8
|
+
<th>Policy</th>
|
|
9
|
+
<th>Health Check Protocol</th>
|
|
10
|
+
<th>Health Check Port</th>
|
|
11
|
+
<th>Health Check Path</th>
|
|
12
|
+
<!-- TODO other nonrequired health check fields - do we need another popup for health check? -->
|
|
13
|
+
</tr>
|
|
14
|
+
</thead>
|
|
15
|
+
<tbody>
|
|
16
|
+
<tr ng-repeat="backendSet in ctrl.backendSets">
|
|
17
|
+
<td ng-if="backendSet.isNew">
|
|
18
|
+
<input
|
|
19
|
+
class="form-control input-sm"
|
|
20
|
+
ng-model="backendSet.name"
|
|
21
|
+
required
|
|
22
|
+
ng-focus="prevBackendSetNames[$index] = backendSet.name"
|
|
23
|
+
ng-blur="ctrl.backendSetNameChanged($index)"
|
|
24
|
+
/>
|
|
25
|
+
</td>
|
|
26
|
+
<td ng-if="!backendSet.isNew">{{backendSet.name}}</td>
|
|
27
|
+
<td>
|
|
28
|
+
<select
|
|
29
|
+
class="form-control input-sm"
|
|
30
|
+
ng-model="backendSet.policy"
|
|
31
|
+
ng-options="policy for policy in ctrl.loadBalancingPolicies"
|
|
32
|
+
></select>
|
|
33
|
+
</td>
|
|
34
|
+
<td>
|
|
35
|
+
<input class="form-control input-sm" ng-model="backendSet.healthChecker.protocol" required />
|
|
36
|
+
</td>
|
|
37
|
+
<td>
|
|
38
|
+
<input class="form-control input-sm" ng-model="backendSet.healthChecker.port" required />
|
|
39
|
+
</td>
|
|
40
|
+
<td>
|
|
41
|
+
<input class="form-control input-sm" ng-model="backendSet.healthChecker.urlPath" required />
|
|
42
|
+
</td>
|
|
43
|
+
<td>
|
|
44
|
+
<a
|
|
45
|
+
href
|
|
46
|
+
class="sm-label"
|
|
47
|
+
ng-if="ctrl.isBackendSetRemovable($index)"
|
|
48
|
+
ng-click="ctrl.removeBackendSet($index)"
|
|
49
|
+
><span class="glyphicon glyphicon-trash"></span
|
|
50
|
+
></a>
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
</tbody>
|
|
54
|
+
<tfoot>
|
|
55
|
+
<tr>
|
|
56
|
+
<td colspan="5">
|
|
57
|
+
<button class="add-new col-md-12" ng-click="ctrl.addBackendSet()">
|
|
58
|
+
<span class="glyphicon glyphicon-plus-sign"></span>
|
|
59
|
+
Add Backend Set
|
|
60
|
+
</button>
|
|
61
|
+
</td>
|
|
62
|
+
</tr>
|
|
63
|
+
</tfoot>
|
|
64
|
+
</table>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<div class="container-fluid form-horizontal">
|
|
2
|
+
<div class="form-group">
|
|
3
|
+
<div class="col-md-12">
|
|
4
|
+
<table class="table table-condensed packed">
|
|
5
|
+
<thead>
|
|
6
|
+
<tr>
|
|
7
|
+
<th>Name</th>
|
|
8
|
+
<th>Certificate</th>
|
|
9
|
+
<th>CA Cert</th>
|
|
10
|
+
<th>Private Key</th>
|
|
11
|
+
<th>Passphrase</th>
|
|
12
|
+
</tr>
|
|
13
|
+
</thead>
|
|
14
|
+
<tbody>
|
|
15
|
+
<tr ng-repeat="cert in ctrl.certificates">
|
|
16
|
+
<td ng-if="!cert.isNew">{{cert.certificateName}}</td>
|
|
17
|
+
<td ng-if="cert.isNew">
|
|
18
|
+
<input
|
|
19
|
+
class="form-control input-sm"
|
|
20
|
+
ng-model="cert.certificateName"
|
|
21
|
+
required
|
|
22
|
+
ng-focus="prevCertNames[$index] = cert.name"
|
|
23
|
+
ng-blur="ctrl.certNameChanged($index)"
|
|
24
|
+
/>
|
|
25
|
+
</td>
|
|
26
|
+
<td>
|
|
27
|
+
<textarea
|
|
28
|
+
ng-if="cert.isNew"
|
|
29
|
+
ng-model="cert.publicCertificate"
|
|
30
|
+
required
|
|
31
|
+
class="form-control input-sm"
|
|
32
|
+
></textarea>
|
|
33
|
+
</td>
|
|
34
|
+
<td>
|
|
35
|
+
<textarea ng-if="cert.isNew" ng-model="cert.caCertificate" class="form-control input-sm"></textarea>
|
|
36
|
+
</td>
|
|
37
|
+
<td>
|
|
38
|
+
<textarea ng-if="cert.isNew" ng-model="cert.privateKey" required class="form-control input-sm"></textarea>
|
|
39
|
+
</td>
|
|
40
|
+
<td>
|
|
41
|
+
<textarea ng-if="cert.isNew" ng-model="cert.passphrase" class="form-control input-sm"></textarea>
|
|
42
|
+
</td>
|
|
43
|
+
<td>
|
|
44
|
+
<a href class="sm-label" ng-if="ctrl.isCertRemovable($index)" ng-click="ctrl.removeCert($index)"
|
|
45
|
+
><span class="glyphicon glyphicon-trash"></span>
|
|
46
|
+
</a>
|
|
47
|
+
</td>
|
|
48
|
+
</tr>
|
|
49
|
+
</tbody>
|
|
50
|
+
<tfoot>
|
|
51
|
+
<tr>
|
|
52
|
+
<td colspan="5">
|
|
53
|
+
<button class="add-new col-md-12" ng-click="ctrl.addCert()">
|
|
54
|
+
<span class="glyphicon glyphicon-plus-sign"></span>
|
|
55
|
+
Add Certificate
|
|
56
|
+
</button>
|
|
57
|
+
</td>
|
|
58
|
+
</tr>
|
|
59
|
+
</tfoot>
|
|
60
|
+
</table>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|