nutcracker-web 0.0.17 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +5 -3
- data/lib/nutcracker/web/app.rb +10 -4
- data/lib/nutcracker/web/version.rb +1 -1
- metadata +3 -5
- data/public/assets/application.css +0 -7294
- data/public/assets/application.js +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e70d2a5e6a87730d2ad90905a8da57cf3269475dc85be6666306283fe5296df
|
4
|
+
data.tar.gz: a9f60bf120fa16a5ce1413d0c465044e75f9b1fcb157e932a1b6f7ec3b36c47e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8498dfc5396afc100f27b84ff3fe9a47d4384b0c60388bf8d85b2ae89fcc7719ca9a2b390813f4a1dc2294a032ac23d39dd18f21a4ac9e64d7926b5287585e3b
|
7
|
+
data.tar.gz: cfa689fb43a17c8de1b277beb4b3bf40881916257e5f6652cd1a38f6707ef39424a1827d906d26151959bef4074b569383183fa9a7d2c49ca138cbc2726e5295
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -6,7 +6,7 @@ GEM
|
|
6
6
|
execjs
|
7
7
|
coffee-script-source (1.12.2)
|
8
8
|
concurrent-ruby (1.0.5)
|
9
|
-
daemons (1.
|
9
|
+
daemons (1.4.1)
|
10
10
|
eco (1.0.0)
|
11
11
|
coffee-script
|
12
12
|
eco-source
|
@@ -14,6 +14,7 @@ GEM
|
|
14
14
|
eco-source (1.1.0.rc.1)
|
15
15
|
eventmachine (1.2.7)
|
16
16
|
execjs (2.7.0)
|
17
|
+
gem-release (2.2.2)
|
17
18
|
haml (5.0.4)
|
18
19
|
temple (>= 0.8.0)
|
19
20
|
tilt
|
@@ -34,7 +35,7 @@ GEM
|
|
34
35
|
concurrent-ruby (~> 1.0)
|
35
36
|
rack (> 1, < 3)
|
36
37
|
temple (0.8.0)
|
37
|
-
thin (1.
|
38
|
+
thin (1.8.1)
|
38
39
|
daemons (~> 1.0, >= 1.0.9)
|
39
40
|
eventmachine (~> 1.0, >= 1.0.4)
|
40
41
|
rack (>= 1, < 3)
|
@@ -48,6 +49,7 @@ PLATFORMS
|
|
48
49
|
DEPENDENCIES
|
49
50
|
coffee-script
|
50
51
|
eco
|
52
|
+
gem-release
|
51
53
|
haml
|
52
54
|
nutcracker (>= 0.4.1.20)
|
53
55
|
rack (>= 2.0.8)
|
@@ -58,4 +60,4 @@ DEPENDENCIES
|
|
58
60
|
uglifier
|
59
61
|
|
60
62
|
BUNDLED WITH
|
61
|
-
1.17.
|
63
|
+
1.17.3
|
data/lib/nutcracker/web/app.rb
CHANGED
@@ -25,15 +25,21 @@ module Nutcracker
|
|
25
25
|
end
|
26
26
|
|
27
27
|
get '/status' do
|
28
|
-
|
28
|
+
# return array of maps each map is {instance_ip => [unresposive_node_ports],instance_ip => [unresposive_node_ports]}
|
29
|
+
# exaple: [{"127.0.0.1"=>["6370", "6371", "6372", "6373"]}, {"192.168.1.114"=>["6370"]}]
|
30
|
+
unresponsive_ndoes = @nutcracker.
|
29
31
|
config.
|
30
32
|
values.
|
31
33
|
map {|x| x["servers"] + [x["listen"]]}.
|
32
34
|
flatten.
|
33
35
|
map {|x| x.split(":")}.
|
34
|
-
map {|host, port| Thread.new {TCPSocket.new(host,port).close.nil? rescue
|
35
|
-
|
36
|
-
|
36
|
+
map {|host, port| Thread.new {TCPSocket.new(host,port).close.nil? rescue {:host=>host,:port=>port} } }.
|
37
|
+
map(&:value).
|
38
|
+
group_by{|k| k[:host]}.
|
39
|
+
map {|k,v| [k=>v.map { |v| v[:port] }] }.
|
40
|
+
flatten
|
41
|
+
#if there are unresposive_node in the list return status 401, if empty return 200
|
42
|
+
status = unresponsive_ndoes.empty?.tap {|x| status(x ? 200 : 401)}
|
37
43
|
end
|
38
44
|
|
39
45
|
get '/overview.json' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nutcracker-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eran Barak Levi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -123,8 +123,6 @@ files:
|
|
123
123
|
- lib/nutcracker/web.rb
|
124
124
|
- lib/nutcracker/web/app.rb
|
125
125
|
- lib/nutcracker/web/version.rb
|
126
|
-
- public/assets/application.css
|
127
|
-
- public/assets/application.js
|
128
126
|
homepage: http://www.kontera.com
|
129
127
|
licenses: []
|
130
128
|
metadata: {}
|
@@ -143,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
141
|
- !ruby/object:Gem::Version
|
144
142
|
version: '0'
|
145
143
|
requirements: []
|
146
|
-
rubygems_version: 3.0.
|
144
|
+
rubygems_version: 3.0.9
|
147
145
|
signing_key:
|
148
146
|
specification_version: 4
|
149
147
|
summary: Nutcracker Web Interface
|