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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf740dafda9ec6838c44cb4d44bf8bf1d653fbe4
|
4
|
+
data.tar.gz: af83f76838e285c9d80e31a1ffc9b653c738c663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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'
|
9
|
-
when 'v3'
|
10
|
-
else
|
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
|
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.
|
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
|