@spinnaker/google 0.2.4 → 0.2.11
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 +62 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
- package/src/autoscalingPolicy/components/metricSettings/metricSettings.component.js +83 -81
- package/src/autoscalingPolicy/components/scalingSchedules/scalingSchedules.component.js +38 -36
- package/src/loadBalancer/configure/http/backendService/backendService.component.js +47 -45
- package/src/loadBalancer/configure/http/basicSettings/basicSettings.component.js +21 -19
- package/src/loadBalancer/configure/http/healthCheck/healthCheck.component.js +37 -35
- package/src/loadBalancer/configure/http/hostRule/hostRule.component.js +9 -7
- package/src/loadBalancer/configure/http/listeners/listener.component.js +46 -45
- package/src/loadBalancer/details/loadBalancerType/loadBalancerType.component.js +11 -9
|
@@ -20,61 +20,62 @@ module(GOOGLE_LOADBALANCER_CONFIGURE_HTTP_LISTENERS_LISTENER_COMPONENT, [GCE_ADD
|
|
|
20
20
|
},
|
|
21
21
|
templateUrl: require('./listener.component.html'),
|
|
22
22
|
controller: function () {
|
|
23
|
-
this
|
|
24
|
-
|
|
23
|
+
this.$onInit = () => {
|
|
24
|
+
this.certificates = this.command.backingData.certificates;
|
|
25
|
+
const loadBalancerMap = this.command.backingData.loadBalancerMap;
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
this.getName = (listener, applicationName) => {
|
|
28
|
+
const listenerName = [applicationName, listener.stack || '', listener.detail || ''].join('-');
|
|
29
|
+
return _.trimEnd(listenerName, '-');
|
|
30
|
+
};
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
this.getCertificates = () => {
|
|
33
|
+
return this.command.backingData.certificates
|
|
34
|
+
.filter((certificate) => certificate.account === this.command.loadBalancer.credentials)
|
|
35
|
+
.map((certificate) => certificate.name);
|
|
36
|
+
};
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
this.getSubnets = () => {
|
|
39
|
+
const ret = this.command.backingData.subnetMap[this.command.loadBalancer.network]
|
|
40
|
+
.filter((subnet) => subnet.region === this.command.loadBalancer.region)
|
|
41
|
+
.map((subnet) => subnet.name);
|
|
42
|
+
return _.uniq(ret);
|
|
43
|
+
};
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
};
|
|
45
|
+
this.getInternalAddresses = () => {
|
|
46
|
+
return this.command.backingData.addresses.filter(
|
|
47
|
+
(address) =>
|
|
48
|
+
address.addressType === 'INTERNAL' && address.subnetwork.split('/').pop() === this.listener.subnet,
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
this.updateName = (listener, appName) => {
|
|
53
|
+
listener.name = this.getName(listener, appName);
|
|
54
|
+
};
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
this.existingListenerNames = () => {
|
|
63
|
-
return _.get(loadBalancerMap, [this.command.loadBalancer.credentials, 'listeners']);
|
|
64
|
-
};
|
|
56
|
+
this.localListenerHasSameName = () => {
|
|
57
|
+
return (
|
|
58
|
+
this.command.loadBalancer.listeners.filter((listener) => listener.name === this.listener.name).length > 1
|
|
59
|
+
);
|
|
60
|
+
};
|
|
65
61
|
|
|
66
|
-
|
|
62
|
+
this.existingListenerNames = () => {
|
|
63
|
+
return _.get(loadBalancerMap, [this.command.loadBalancer.credentials, 'listeners']);
|
|
64
|
+
};
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
this.updateName(this.listener, this.application.name);
|
|
70
|
-
}
|
|
66
|
+
this.isHttps = (port) => port === 443 || port === '443';
|
|
71
67
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.listener.ipAddress = address.address;
|
|
75
|
-
} else {
|
|
76
|
-
this.listener.ipAddress = null;
|
|
68
|
+
if (!this.listener.name) {
|
|
69
|
+
this.updateName(this.listener, this.application.name);
|
|
77
70
|
}
|
|
71
|
+
|
|
72
|
+
this.onAddressSelect = (address) => {
|
|
73
|
+
if (address) {
|
|
74
|
+
this.listener.ipAddress = address.address;
|
|
75
|
+
} else {
|
|
76
|
+
this.listener.ipAddress = null;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
78
79
|
};
|
|
79
80
|
},
|
|
80
81
|
},
|
|
@@ -12,16 +12,18 @@ module(GOOGLE_LOADBALANCER_DETAILS_LOADBALANCERTYPE_LOADBALANCERTYPE_COMPONENT,
|
|
|
12
12
|
loadBalancer: '=',
|
|
13
13
|
},
|
|
14
14
|
controller: function () {
|
|
15
|
-
this
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
|
|
15
|
+
this.$onInit = () => {
|
|
16
|
+
this.type = (function (lb) {
|
|
17
|
+
if (lb.loadBalancerType === 'HTTP') {
|
|
18
|
+
if (_.isString(lb.certificate)) {
|
|
19
|
+
return 'HTTPS';
|
|
20
|
+
} else {
|
|
21
|
+
return 'HTTP';
|
|
22
|
+
}
|
|
19
23
|
} else {
|
|
20
|
-
return
|
|
24
|
+
return lb.loadBalancerType;
|
|
21
25
|
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
})(this.loadBalancer);
|
|
26
|
+
})(this.loadBalancer);
|
|
27
|
+
};
|
|
26
28
|
},
|
|
27
29
|
});
|