consul-templaterb 1.8.6 → 1.8.7

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: 19a273b406bb2bc529957446c5555ffd0ec2792dffc05d6aeb89b26999f474a6
4
- data.tar.gz: d720a5cd38cc5ce993bd952690ac893ed011c661bbdffe7830d1ab15993710a5
3
+ metadata.gz: 33bd9f88f8464de03e31b13fd6695197482902be5903dc51c99276085953ded1
4
+ data.tar.gz: 64beb3ccd7976f8b9284086ba90f5a4b0e4e168afa45d1c40b4c05639e8b8304
5
5
  SHA512:
6
- metadata.gz: 056bcf7ee589aa4021ff6eaa83db44fa91fa9ef82f392165e42a06172e4a1502a23a9904cd3f46672b26ed20f707ae549fb86c51d226e90e51d8a052355509ed
7
- data.tar.gz: 2a62c016f97c615e8f77b400b8bfc5f60ad0a76b64b7c147f8e03fc6dd130de672b954b8c8378ccf9fb5a829b63735c13cee97df9cef84f7397b6bdbc058396c
6
+ metadata.gz: 6cc8a0221ab011099c12ed257947a4fb32ba6cdae6dc216d56f199e51d4f8c62bb3b9a0b497aee8c0f2684c3f0b37fe577ffb9ac8a1bb133cf575bcc521df009
7
+ data.tar.gz: 0a335c9014e3563775412d1bea5487c6b7d5cff33d230a23cc6f4726762a8bbbd5a9370ed1a14e79a7a2143022662d91f0b301aa6d65488db55c9313524446ee
data/CHANGELOG.md CHANGED
@@ -2,12 +2,13 @@
2
2
 
3
3
  ## (UNRELEASED)
4
4
 
5
- ## 1.8.6 (December 19, 2018)
5
+ ## 1.8.6 / 1.8.7 (December 19, 2018)
6
6
 
7
7
  OPTIMIZATIONS:
8
8
 
9
9
  * Full rewrite of filtering of consul-timeline to allow handling
10
10
  history of 100k+ records
11
+ * Various UI improvements
11
12
 
12
13
  ## 1.8.5 (December 18, 2018)
13
14
 
@@ -1,5 +1,5 @@
1
1
  module Consul
2
2
  module Async
3
- VERSION = '1.8.6'.freeze
3
+ VERSION = '1.8.7'.freeze
4
4
  end
5
5
  end
@@ -351,9 +351,15 @@ class ServiceTimeline {
351
351
  this.buildCell(row, 'td', 'lookup checks', checksCell);
352
352
  }
353
353
  {
354
- var td = this.buildCell(row, 'td', 'service-status', this.createBadge(e['old_state']));
355
- td.appendChild(document.createTextNode(''));
356
- td.appendChild(this.createBadge(e['new_state']));
354
+ if (e.new_state == e.old_state) {
355
+ var td = this.buildCell(row, 'td', 'service-status', this.createBadge(e['new_state']));
356
+ } else {
357
+ var old = e.old_state == null ? this.createBadge('new', 'primary') : this.createBadge(e.old_state);
358
+ var td = this.buildCell(row, 'td', 'service-status', old);
359
+ td.appendChild(document.createTextNode('→'));
360
+ var newState = (e.new_state == null) ? this.createBadge('removed', 'dark') : this.createBadge(e.new_state);
361
+ td.appendChild(newState);
362
+ }
357
363
  }
358
364
  {
359
365
  var nSuccess = e['stats']['passing'];
@@ -75,11 +75,12 @@ class RingBuffer < Array
75
75
  alias push <<
76
76
  end
77
77
 
78
- def diff(old, new)
78
+ def diff(old, new_e)
79
79
  diff = OpenStruct.new
80
- diff.appeared = new - old
81
- diff.disappeared = old - new
82
- diff.stayed = new & old
80
+ diff.appeared = new_e - old
81
+ diff.disappeared = old - new_e
82
+ diff.stayed = new_e & old
83
+ diff.all = new_e + old
83
84
  diff
84
85
  end
85
86
 
@@ -106,9 +107,9 @@ end
106
107
  def compute_checks(old_state, cur_state, service_name, instance_name)
107
108
  old_checks = old_state.dig(service_name, instance_name, 'checks') || {}
108
109
  new_checks = cur_state.dig(service_name, instance_name, 'checks') || {}
109
- check_diff = diff(old_checks.keys, new_checks.keys)
110
+ all_checks = Set.new(old_checks.keys + new_checks.keys)
110
111
  checks = []
111
- check_diff.stayed.each do |check_id|
112
+ all_checks.each do |check_id|
112
113
  old_status = old_state.dig(service_name, instance_name, 'checks', check_id, 'status')
113
114
  cur_status = cur_state.dig(service_name, instance_name, 'checks', check_id, 'status')
114
115
 
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.8.6
4
+ version: 1.8.7
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: 2018-12-19 00:00:00.000000000 Z
11
+ date: 2018-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: em-http-request