hieraviz 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/app/apiv1.rb +3 -3
- data/app/common.rb +2 -3
- data/app/public/css/main.css +3 -1
- data/app/views/_head.erb +4 -4
- data/app/views/_layout.erb +1 -1
- data/app/web.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 696d61009ddd71002471a1ea73f2ae29cc852c83
|
4
|
+
data.tar.gz: 5a47b70c375793428efd086105b6a23cafff17bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3db49fea1e8d1bc172d2ef989624c299f06550a78689f5e074f5544c9e96677781f9299310040a87bf4835d94495916f7bb352ddd3a599a2d55fc1752c0862a2
|
7
|
+
data.tar.gz: d4c90394a44814599169f3d7e14f6734e7949b494ca14106320b56700475249f8fba17f35a0cfa18d18d9c287bed19f117e20d43273925d424224b2c7d9e15c4
|
data/CHANGELOG.md
CHANGED
data/app/apiv1.rb
CHANGED
@@ -31,7 +31,7 @@ module HieravizApp
|
|
31
31
|
|
32
32
|
helpers do
|
33
33
|
def check_authorization
|
34
|
-
logger.info session['access_token']
|
34
|
+
# logger.info session['access_token']
|
35
35
|
if !session['access_token'] && !request.env['HTTP_X_AUTH']
|
36
36
|
redirect '/v1/not_logged'
|
37
37
|
end
|
@@ -131,7 +131,7 @@ module HieravizApp
|
|
131
131
|
check_authorization
|
132
132
|
cross_origin
|
133
133
|
hieracles_config = prepare_config(base)
|
134
|
-
json Hieracles::Registry.farms_counted(hieracles_config, base)
|
134
|
+
json Hieracles::Registry.farms_counted(hieracles_config, base, true)
|
135
135
|
end
|
136
136
|
|
137
137
|
get %r{^/?([-_\.a-zA-Z0-9]+)?/vars} do |base|
|
@@ -162,7 +162,7 @@ module HieravizApp
|
|
162
162
|
# check_authorization
|
163
163
|
cross_origin
|
164
164
|
hieracles_config = prepare_config(base)
|
165
|
-
nodes = Hieracles::Registry.
|
165
|
+
nodes = Hieracles::Registry.nodes_parameters(hieracles_config, base).each_with_object({}) do |(key, val), acc|
|
166
166
|
acc[key] = val if val['farm'] == farm
|
167
167
|
end
|
168
168
|
params = request.env['rack.request.query_hash']
|
data/app/common.rb
CHANGED
@@ -7,7 +7,6 @@ module HieravizApp
|
|
7
7
|
configure do
|
8
8
|
set :app_name, 'HieraViz'
|
9
9
|
set :configdata, Hieraviz::Config.load
|
10
|
-
set :basepaths, Hieraviz::Config.basepaths
|
11
10
|
set :store, Hieraviz::Store.new(settings.configdata['tmpdir'])
|
12
11
|
enable :session
|
13
12
|
enable :logging
|
@@ -79,8 +78,8 @@ module HieravizApp
|
|
79
78
|
end
|
80
79
|
|
81
80
|
def get_path(path)
|
82
|
-
if settings.
|
83
|
-
|
81
|
+
if settings.configdata['basepath_dir']
|
82
|
+
Hieraviz::Config.basepaths.select do |file|
|
84
83
|
path == File.basename(file)
|
85
84
|
end
|
86
85
|
else
|
data/app/public/css/main.css
CHANGED
@@ -212,7 +212,7 @@ input {
|
|
212
212
|
margin-left: 330px;
|
213
213
|
position: relative;
|
214
214
|
height: 100%;
|
215
|
-
|
215
|
+
padding-bottom: 3.8em;
|
216
216
|
}
|
217
217
|
.meat.text {
|
218
218
|
padding: 1em 2em;
|
@@ -278,6 +278,8 @@ input {
|
|
278
278
|
.meat .rows {
|
279
279
|
margin-top: 3.8em;
|
280
280
|
margin-right: 330px;
|
281
|
+
height: 100%;
|
282
|
+
overflow: auto;
|
281
283
|
}
|
282
284
|
.meat .row {
|
283
285
|
word-wrap: break-word;
|
data/app/views/_head.erb
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
</div>
|
6
6
|
|
7
7
|
<div class="nav">
|
8
|
-
<% if session[:access_token] && @username != ''
|
9
|
-
<% if
|
8
|
+
<% if session[:access_token] && @username != '' and @base %>
|
9
|
+
<% if Hieraviz::Config.basepaths %>
|
10
10
|
<div class="base">
|
11
11
|
<span class="current"><%= @base_name %></span>
|
12
12
|
<div class="all">
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<input type="text" name="filter" />
|
16
16
|
</form>
|
17
17
|
|
18
|
-
<%
|
18
|
+
<% Hieraviz::Config.basepaths.map { |p| File.basename(p) }.each do |e| %>
|
19
19
|
<div class="select"><%= e %></div>
|
20
20
|
<% end %>
|
21
21
|
</div>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<% end %>
|
24
24
|
<% end %>
|
25
25
|
|
26
|
-
<% if session[:access_token] %>
|
26
|
+
<% if session[:access_token] && @username != '' and @base %>
|
27
27
|
<a href="<%= @base %>/nodes" class="nodes">Nodes</a>
|
28
28
|
<a href="<%= @base %>/farms" class="farms">Farms</a>
|
29
29
|
<a href="<%= @base %>/modules" class="modules">Modules</a>
|
data/app/views/_layout.erb
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<link href="/css/main.css" rel="stylesheet" type="text/css">
|
8
8
|
<script src="/js/fetch.js"></script>
|
9
9
|
<script src="/js/main.js"></script>
|
10
|
-
<% if settings.
|
10
|
+
<% if settings.configdata['basepath_dir'] %>
|
11
11
|
<script src="/js/base-switch.js"></script>
|
12
12
|
<% end %>
|
13
13
|
<% if session['access_token'] %>
|
data/app/web.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hieraviz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mose
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.3.
|
103
|
+
version: 0.3.6
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.3.
|
110
|
+
version: 0.3.6
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: bundler
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|