consul-templaterb 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +9 -0
- data/CHANGELOG.md +12 -1
- data/lib/consul/async/consul_template.rb +1 -0
- data/lib/consul/async/version.rb +1 -1
- data/samples/consul-ui/consul-services-ui.html.erb +5 -0
- data/samples/consul-ui/consul_template.json.erb +1 -1
- data/samples/consul-ui/css/style.css +1 -1
- data/samples/consul-ui/js/service.js +12 -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: 9ecbf300312175e355f65232450dc9303db8bbb1d2d2af473480a2fde3997112
|
4
|
+
data.tar.gz: 08abe3b2ef2e812810e88d29db8a44c1191af395a3e5b94c91a9d2a54b0c5906
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8042decc8b615eff3080f06330347f6596f7fbdb5b8e732eaf9afc00b79a7b2ddffb161d3c9c63d986f7eed2d54a467cca0d39d9ee247af65edad71453fcbaf5
|
7
|
+
data.tar.gz: b88e62b6884d6dfc3e0dad669943124e6ec0c28af3da482c6a9614f2b23325bd9d57fe9afeb0ebd08c57808a62003ab3a4dd4cb4da1b008043ec865bf49e054f
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,18 @@
|
|
4
4
|
|
5
5
|
IMPROVEMENTS:
|
6
6
|
|
7
|
-
## 1.2.
|
7
|
+
## 1.2.1 (May 28, 2018)
|
8
|
+
|
9
|
+
BUG FIXES:
|
10
|
+
|
11
|
+
* cache for service was not properly taken into account
|
12
|
+
|
13
|
+
IMPROVEMENTS:
|
14
|
+
|
15
|
+
* consul-ui now shows the number of service filetered
|
16
|
+
* service.Meta is an object not an array when null (Consul < 1.1)
|
17
|
+
|
18
|
+
## 1.2.0 (May 25, 2018)
|
8
19
|
|
9
20
|
IMPROVEMENTS:
|
10
21
|
|
data/lib/consul/async/version.rb
CHANGED
@@ -11,7 +11,12 @@
|
|
11
11
|
Show Tags
|
12
12
|
</label>
|
13
13
|
</div>
|
14
|
+
<div class="input-group">
|
14
15
|
<input id="service-filter" type="text" placeholder="filter by name or tags" class="form-control" />
|
16
|
+
<div class="input-group-append">
|
17
|
+
<span class="input-group-text" id="service-counter"></span>
|
18
|
+
</div>
|
19
|
+
</div>
|
15
20
|
</div>
|
16
21
|
<div id="service-wrapper" >
|
17
22
|
<ul id="service-list" class="list-group">
|
@@ -81,7 +81,7 @@
|
|
81
81
|
server = { frontend_id: "backend_http__#{service_name}",
|
82
82
|
id: snode['Service']['ID'],
|
83
83
|
name: snode['Node']['Node'],
|
84
|
-
sMeta: meta ? meta :
|
84
|
+
sMeta: meta ? meta : {},
|
85
85
|
addr: snode.service_address,
|
86
86
|
port: snode['Service']['Port'],
|
87
87
|
tags: snode['Service']['Tags'],
|
@@ -7,6 +7,8 @@ class ConsulService {
|
|
7
7
|
this.serviceFilter.keyup(this.filterService);
|
8
8
|
this.refresh = parseInt(refresh);
|
9
9
|
this.filterStatus = null;
|
10
|
+
this.serviceFilterCounter = $("#service-counter");
|
11
|
+
this.serviceFilterCount = 0;
|
10
12
|
this.showTags($('#showTagsInList').checked)
|
11
13
|
}
|
12
14
|
|
@@ -47,6 +49,8 @@ class ConsulService {
|
|
47
49
|
}
|
48
50
|
|
49
51
|
reloadServiceList() {
|
52
|
+
this.serviceList.html('');
|
53
|
+
this.serviceFilterCount = 0;
|
50
54
|
for (var serviceName in this.data.services) {
|
51
55
|
var service = this.data.services[serviceName];
|
52
56
|
var serviceStatus = buildServiceStatus(service);
|
@@ -69,18 +73,24 @@ class ConsulService {
|
|
69
73
|
}
|
70
74
|
listItem += '</div>'
|
71
75
|
listItem += '</button>';
|
76
|
+
this.serviceFilterCount += 1;
|
72
77
|
this.serviceList.append(listItem);
|
73
78
|
}
|
79
|
+
this.serviceFilterCounter.html(this.serviceFilterCount);
|
74
80
|
resizeWrapper('service-wrapper', 'service-list');
|
81
|
+
this.filterService();
|
75
82
|
}
|
76
83
|
|
77
|
-
filterService(
|
78
|
-
var filter = new RegExp(
|
84
|
+
filterService() {
|
85
|
+
var filter = new RegExp(consulService.serviceFilter.val());
|
86
|
+
consulService.serviceFilterCount = 0;
|
79
87
|
consulService.serviceList.children('button').each(function (){
|
80
88
|
if($(this).html().match(filter)) {
|
81
89
|
var ui = $(this).closest( "button" )
|
82
90
|
ui.removeClass('d-none');
|
83
91
|
ui.addClass('d-block');
|
92
|
+
consulService.serviceFilterCount += 1;
|
93
|
+
consulService.serviceFilterCounter.html(consulService.serviceFilterCount);
|
84
94
|
} else {
|
85
95
|
var ui = $(this).closest( "button" )
|
86
96
|
ui.removeClass('d-block');
|
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.2.
|
4
|
+
version: 1.2.1
|
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-05-
|
11
|
+
date: 2018-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: em-http-request
|