puppetdb_foreman 0.1.3 → 0.2.0

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: 43c606bf582d08e8291a8b683cef9646123cef58
4
- data.tar.gz: 56cecd8257e72267d52d04641f934d63573e236a
3
+ metadata.gz: bf740dafda9ec6838c44cb4d44bf8bf1d653fbe4
4
+ data.tar.gz: af83f76838e285c9d80e31a1ffc9b653c738c663
5
5
  SHA512:
6
- metadata.gz: 43b4d5fac5e312bacdab1719059b2391b689871fafe74e95fd55675c176fab1b8801067a3b893b2cd1e1ac54e3530691b2d2f029c934d50c16949e381ebf1e2f
7
- data.tar.gz: 227b396f7c800b06c9a7a3085d8501fc1b611720b6dda5c78203a5965099d5ca963f2017c20ebee5bd3782b2e5b0ae989c55942a7bb7240ea107d362549b9260
6
+ metadata.gz: 506c6af06c9f3c36a5a4ec0fb6dac4dcd7c0fef67be009fab2c173b62e747754b34230bc68121efe6c33501fb0afa7ed9dd9a1dfe999aed56c263902ed8ac6b9
7
+ data.tar.gz: c5a2cdc057f39fe9c88c68f7faec3d0f5f76bfadd905f47987bc65332ea095c65ec2251035a8e4db862b6b4365450dfcfcf28d2a7b1a3cf093ec6b8882f8549b
@@ -5,9 +5,9 @@ module PuppetdbForeman
5
5
  begin
6
6
  uri = URI.parse(Setting[:puppetdb_dashboard_address])
7
7
  puppetdb_url, layout = case params[:puppetdb]
8
- when 'd3.v2', 'charts' then ["#{uri.path}#{request.original_fullpath}", false]
9
- when 'v3' then [request.original_fullpath, false]
10
- else ["#{uri.path}/index.html", true]
8
+ when 'd3.v2', 'charts' then ["#{uri.path}#{request.original_fullpath}", false]
9
+ when 'v3', 'metrics', 'pdb/meta/v1/version', 'pdb/meta/v1/version/latest' then [request.original_fullpath, false]
10
+ else ["#{uri.path}/index.html", true]
11
11
  end
12
12
  result = Net::HTTP.get_response(uri.host, puppetdb_url, uri.port)
13
13
  render :text => result.body, :layout => layout
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  Rails.application.routes.draw do
2
- match ':puppetdb(/*puppetdb_url)', :to => 'puppetdb_foreman/puppetdb#index', :puppetdb => /d3\.v2|charts|v3|puppetdb/, :as => "puppetdb"
2
+ match ':puppetdb(/*puppetdb_url)', :to => 'puppetdb_foreman/puppetdb#index', :puppetdb => /d3\.v2|charts|v3|puppetdb|metrics|\/pdb\/meta\/v1\/version\/latest|pdb\/meta\/v1\/version/, :as => "puppetdb"
3
3
  end
@@ -0,0 +1,3 @@
1
+ module PuppetdbForeman
2
+ VERSION = '0.2.0'
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppetdb_foreman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
@@ -26,6 +26,7 @@ files:
26
26
  - config/routes.rb
27
27
  - lib/puppetdb_foreman.rb
28
28
  - lib/puppetdb_foreman/engine.rb
29
+ - lib/puppetdb_foreman/version.rb
29
30
  homepage: http://www.github.com/theforeman/puppetdb_foreman
30
31
  licenses:
31
32
  - GPL-3