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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a13955774e22748154d767161d2b240fbc7f47fcfa920f74e214d9e41ca2b52
4
- data.tar.gz: 00ff006308911a8aadba9367f85cc7ce7009681471a6c99e7fe4c088ae0478c9
3
+ metadata.gz: fbae8bd11b6dc743e577da583a6f47679c83fe9c1e5043ade563f90b044d5031
4
+ data.tar.gz: d112258989cf088ed7fe488119e088d51e9bf6be91952835f2a3af274dadb1e4
5
5
  SHA512:
6
- metadata.gz: 377bc047876586bd0ddadb8339b29ed6256398d5ffbd4d93503d6d712d0e197848066409769f5f4ce2ea02aade3cc3ad0e19e4662d81ac9cff8f688ec69f9455
7
- data.tar.gz: b745bd8859ed065da5bc16f19a7d501b878859af4bdced48564771c922e816ff6ba21bdd993042f940320364d1b16ba9f9eb790d6032ca4057eb1b0252ff13b9
6
+ metadata.gz: 1bc2a16ac0b6b933198db9bae94a3fd9e26b8045554b5de6c7dd06beb948f2036d1a069a3b12c61834e847dd48cb17d0698bb600b45cead5a6f7507c12e463e9
7
+ data.tar.gz: 59858e0a22f2a93cb866cdc0ea90289ed2dc2d8345dc22b97898815f025497843637f3c650025227b08211244770c241c501fb5409b904bec4b37d12cd377f6d
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## (UNRELEASED)
4
4
 
5
+ ## 1.21.3 (November 23, 2019)
6
+
7
+ * added serviceName information for all decorators of services
8
+
5
9
  ## 1.21.2 (November 22, 2019)
6
10
 
7
11
  * Added instance information into serviceMetaDecorator() calls to
@@ -1,5 +1,5 @@
1
1
  module Consul
2
2
  module Async
3
- VERSION = '1.21.2'.freeze
3
+ VERSION = '1.21.3'.freeze
4
4
  end
5
5
  end
@@ -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.2
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-22 00:00:00.000000000 Z
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