consul-templaterb 1.21.2 → 1.21.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/consul/async/version.rb +1 -1
- data/samples/consul-ui/decorators.js.erb +2 -2
- data/samples/consul-ui/js/service.js +5 -5
- data/samples/consul-ui/js/types.js +2 -2
- data/samples/consul-ui/js/utils.js +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbae8bd11b6dc743e577da583a6f47679c83fe9c1e5043ade563f90b044d5031
|
4
|
+
data.tar.gz: d112258989cf088ed7fe488119e088d51e9bf6be91952835f2a3af274dadb1e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bc2a16ac0b6b933198db9bae94a3fd9e26b8045554b5de6c7dd06beb948f2036d1a069a3b12c61834e847dd48cb17d0698bb600b45cead5a6f7507c12e463e9
|
7
|
+
data.tar.gz: 59858e0a22f2a93cb866cdc0ea90289ed2dc2d8345dc22b97898815f025497843637f3c650025227b08211244770c241c501fb5409b904bec4b37d12cd377f6d
|
data/CHANGELOG.md
CHANGED
data/lib/consul/async/version.rb
CHANGED
@@ -14,7 +14,7 @@ function url_decorator(key, value) {
|
|
14
14
|
/**
|
15
15
|
* serviceInstanceDecorator is called to decorate an instance.
|
16
16
|
*/
|
17
|
-
function serviceInstanceDecorator(instance, element) {
|
17
|
+
function serviceInstanceDecorator(instance, element, serviceName) {
|
18
18
|
return element;
|
19
19
|
}
|
20
20
|
|
@@ -22,7 +22,7 @@ function serviceInstanceDecorator(instance, element) {
|
|
22
22
|
* serviceMetaDecorator must return a HTML node to decorate a service instance meta.
|
23
23
|
* It should return the decorated element.
|
24
24
|
*/
|
25
|
-
function serviceMetaDecorator(instance, key, value) {
|
25
|
+
function serviceMetaDecorator(instance, key, value, serviceName) {
|
26
26
|
if (httpRegexp.test(value)) {
|
27
27
|
return url_decorator(key, value);
|
28
28
|
} else {
|
@@ -182,7 +182,7 @@ class ServiceSideSelector extends SideSelector {
|
|
182
182
|
|
183
183
|
selectItem(element, service) {
|
184
184
|
super.selectItem(element, service);
|
185
|
-
this.mainSelector.initSelector(this.data[service]);
|
185
|
+
this.mainSelector.initSelector(this.data[service], service);
|
186
186
|
}
|
187
187
|
}
|
188
188
|
|
@@ -246,7 +246,7 @@ class ServiceMainSelector extends MainSelector {
|
|
246
246
|
|
247
247
|
initSelector(service) {
|
248
248
|
if (service) {
|
249
|
-
super.initSelector(service.instances);
|
249
|
+
super.initSelector(service.instances, service.name);
|
250
250
|
this.generateTitle(service.name);
|
251
251
|
}
|
252
252
|
}
|
@@ -292,7 +292,7 @@ class ServiceMainSelector extends MainSelector {
|
|
292
292
|
resizeAll();
|
293
293
|
}
|
294
294
|
|
295
|
-
elementGenerator(instance) {
|
295
|
+
elementGenerator(instance, serviceName) {
|
296
296
|
var element = document.createElement("div");
|
297
297
|
element.setAttribute("class", "list-group-item service-instance");
|
298
298
|
var state = nodeState(instance.checks);
|
@@ -308,12 +308,12 @@ class ServiceMainSelector extends MainSelector {
|
|
308
308
|
element.appendChild(tagsGenerator(instance.tags));
|
309
309
|
element.appendChild(document.createElement("hr"));
|
310
310
|
}
|
311
|
-
element.appendChild(serviceMetaGenerator(instance));
|
311
|
+
element.appendChild(serviceMetaGenerator(instance, serviceName));
|
312
312
|
element.appendChild(connectGenerator(instance));
|
313
313
|
element.appendChild(checksStatusGenerator(instance, instance.name));
|
314
314
|
element.setAttribute("status", state);
|
315
315
|
|
316
|
-
return serviceInstanceDecorator(instance, element);
|
316
|
+
return serviceInstanceDecorator(instance, element, serviceName);
|
317
317
|
}
|
318
318
|
|
319
319
|
getStatus(instance) {
|
@@ -158,10 +158,10 @@ class MainSelector {
|
|
158
158
|
this.maxDisplayed = this.maxDisplayElement.val();
|
159
159
|
}
|
160
160
|
|
161
|
-
initSelector(data) {
|
161
|
+
initSelector(data, additionalInfo) {
|
162
162
|
this.data = data;
|
163
163
|
for (var key in this.data) {
|
164
|
-
this.data[key]["element"] = this.elementGenerator(this.data[key]);
|
164
|
+
this.data[key]["element"] = this.elementGenerator(this.data[key], additionalInfo);
|
165
165
|
}
|
166
166
|
this.refreshList();
|
167
167
|
}
|
@@ -175,7 +175,7 @@ function connectGenerator(instance) {
|
|
175
175
|
return connectItem
|
176
176
|
}
|
177
177
|
|
178
|
-
function serviceMetaGenerator(instance) {
|
178
|
+
function serviceMetaGenerator(instance, serviceName) {
|
179
179
|
var instanceMeta = instance.sMeta;
|
180
180
|
var top = document.createElement('div');
|
181
181
|
top.className = 'instance-meta';
|
@@ -190,7 +190,7 @@ function serviceMetaGenerator(instance) {
|
|
190
190
|
container.appendChild(metaH);
|
191
191
|
var metaVH = document.createElement('dd');
|
192
192
|
metaVH.className = 'col-sm-8 lookup';
|
193
|
-
metaVH.appendChild(serviceMetaDecorator(instance, meta, instanceMeta[meta]));
|
193
|
+
metaVH.appendChild(serviceMetaDecorator(instance, meta, instanceMeta[meta], serviceName));
|
194
194
|
container.appendChild(metaVH);
|
195
195
|
}
|
196
196
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consul-templaterb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.21.
|
4
|
+
version: 1.21.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SRE Core Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: em-http-request
|