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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3980ae6dc358ca8afeed70b805ad50870f4d0249
4
- data.tar.gz: fdc6112e6912571fda379b8c5bc8a4a36c27eadb
3
+ metadata.gz: 696d61009ddd71002471a1ea73f2ae29cc852c83
4
+ data.tar.gz: 5a47b70c375793428efd086105b6a23cafff17bb
5
5
  SHA512:
6
- metadata.gz: a82521eaa89bc5d5d06bbd085b4f0fefde3a6fe9e05c3df41681368597ed738f4dcb5aed8d8b084bee66f382cb6278def6fe3371fea632abbc42282094b2d1b8
7
- data.tar.gz: 2d6ab2c653fbcdc65b0dd241390e5b631f376563ddae72926f3ad701e0b528dd94c0bb9b0e529e6e53c37e51ed530c5362b829870de57c322ab5319c963e0dea
6
+ metadata.gz: 3db49fea1e8d1bc172d2ef989624c299f06550a78689f5e074f5544c9e96677781f9299310040a87bf4835d94495916f7bb352ddd3a599a2d55fc1752c0862a2
7
+ data.tar.gz: d4c90394a44814599169f3d7e14f6734e7949b494ca14106320b56700475249f8fba17f35a0cfa18d18d9c287bed19f117e20d43273925d424224b2c7d9e15c4
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  Hieraviz Changelog
2
2
  ========================
3
3
 
4
+ ### v0.2.4 - 2016-04-29
5
+ - fix the dynamic changes of puppet directories
6
+
4
7
  ### v0.2.3 - 2016-04-06
5
8
  - fix the handling of ssl in the return link for gitlab auth
6
9
 
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.nodes_data(hieracles_config, base).each_with_object({}) do |(key, val), acc|
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.basepaths
83
- settings.basepaths.select do |file|
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
@@ -212,7 +212,7 @@ input {
212
212
  margin-left: 330px;
213
213
  position: relative;
214
214
  height: 100%;
215
- overflow-y: auto;
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 != '' and @base %>
9
- <% if settings.basepaths %>
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
- <% settings.basepaths.map { |p| File.basename(p) }.each do |e| %>
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>
@@ -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.basepaths %>
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
@@ -119,7 +119,7 @@ module HieravizApp
119
119
  end
120
120
 
121
121
  get '/' do
122
- if settings.basepaths
122
+ if settings.configdata['basepath_dir']
123
123
  redirect "/#{File.basename(settings.configdata['basepath'])}"
124
124
  else
125
125
  @username = username
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
2
 
3
3
  unless ENV['BUILD']
4
- require 'rubygems'
5
- require 'bundler'
4
+ #require 'rubygems'
5
+ #require 'bundler'
6
6
 
7
7
  if ENV['COV']
8
8
  require 'simplecov'
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.3
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-06 00:00:00.000000000 Z
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.5
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.5
110
+ version: 0.3.6
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: bundler
113
113
  requirement: !ruby/object:Gem::Requirement