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 +4 -4
- data/CHANGELOG.md +2 -1
- data/lib/consul/async/version.rb +1 -1
- data/samples/consul-ui/js/timeline.js +9 -3
- data/samples/consul-ui/timeline.json.erb +7 -6
- 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: 33bd9f88f8464de03e31b13fd6695197482902be5903dc51c99276085953ded1
|
4
|
+
data.tar.gz: 64beb3ccd7976f8b9284086ba90f5a4b0e4e168afa45d1c40b4c05639e8b8304
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/consul/async/version.rb
CHANGED
@@ -351,9 +351,15 @@ class ServiceTimeline {
|
|
351
351
|
this.buildCell(row, 'td', 'lookup checks', checksCell);
|
352
352
|
}
|
353
353
|
{
|
354
|
-
|
355
|
-
|
356
|
-
|
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,
|
78
|
+
def diff(old, new_e)
|
79
79
|
diff = OpenStruct.new
|
80
|
-
diff.appeared =
|
81
|
-
diff.disappeared = old -
|
82
|
-
diff.stayed =
|
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
|
-
|
110
|
+
all_checks = Set.new(old_checks.keys + new_checks.keys)
|
110
111
|
checks = []
|
111
|
-
|
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.
|
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-
|
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
|