kibana-rack 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +1 -1
- data/lib/kibana/rack/version.rb +1 -1
- data/lib/kibana/rack/web.rb +3 -3
- data/spec/unit/kibana/rack/web_spec.rb +4 -4
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8a77c4673874c623af6c587228a48f59400c531
|
4
|
+
data.tar.gz: 89f98d20b09d90e4972a84f8006bf8af42fcdc75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ead603df5f794c5d3d72f173b987a796d0602b6e5479cce9983a19b918b0993fd9dd69ceab77603c5fba7eda53fcfe10531cfbaa08efec8688ce44f6ae55ecca
|
7
|
+
data.tar.gz: 7040a490372406bc06e9925b084b4c6c6f7394ffbe6c829f934849c549d200540fc1fe8e79cdfa78a54d9d75aea6016dfa33e579d93e5373acb3e46c456a71d7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Change history for kibana-rack
|
2
2
|
|
3
|
-
## [v0.1.
|
3
|
+
## [v0.1.3](https://github.com/tabolario/kibana-rack/releases/tag/v0.1.3)
|
4
4
|
|
5
5
|
* [Bug] [Serve dashboard files from app/dashboards](https://github.com/tabolario/kibana-rack/issues/10)
|
6
6
|
|
data/lib/kibana/rack/version.rb
CHANGED
data/lib/kibana/rack/web.rb
CHANGED
@@ -31,9 +31,9 @@ module Kibana
|
|
31
31
|
erb :config
|
32
32
|
end
|
33
33
|
|
34
|
-
get(%r{/app/
|
35
|
-
dashboard_name = params[:captures][
|
36
|
-
dashboard_ext = params[:captures][
|
34
|
+
get(%r{/app/dashboards/([\w-]+)\.(js(on)?)}) do
|
35
|
+
dashboard_name = params[:captures][0]
|
36
|
+
dashboard_ext = params[:captures][1]
|
37
37
|
dashboard_path = File.join(settings.kibana_dashboards_path, "#{dashboard_name}.#{dashboard_ext}")
|
38
38
|
|
39
39
|
halt(404, { 'Content-Type' => 'application/json' }, '{"error":"Not found"}') unless File.exist?(dashboard_path)
|
@@ -24,7 +24,7 @@ describe Kibana::Rack::Web do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'renders JavaScript dashboards from the dashboard directory' do
|
27
|
-
get '/app/
|
27
|
+
get '/app/dashboards/js_dashboard.js'
|
28
28
|
|
29
29
|
expect(last_response.body).to eql(IO.read(File.join(dashboards_path, 'js_dashboard.js')))
|
30
30
|
expect(last_response['Content-Type']).to eql('application/js')
|
@@ -32,7 +32,7 @@ describe Kibana::Rack::Web do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'renders JSON dashboards from the dashboard directory' do
|
35
|
-
get '/app/
|
35
|
+
get '/app/dashboards/json_dashboard.json'
|
36
36
|
|
37
37
|
expect(last_response.body).to eql(IO.read(File.join(dashboards_path, 'json_dashboard.json')))
|
38
38
|
expect(last_response['Content-Type']).to eql('application/json')
|
@@ -41,13 +41,13 @@ describe Kibana::Rack::Web do
|
|
41
41
|
|
42
42
|
it 'processes ERB in dashboards' do
|
43
43
|
ENV['DASHBOARD_TITLE'] = 'My Dashboard'
|
44
|
-
get '/app/
|
44
|
+
get '/app/dashboards/erb_dashboard.json'
|
45
45
|
|
46
46
|
expect(last_response.body.strip).to eql('{"title":"My Dashboard"}')
|
47
47
|
end
|
48
48
|
|
49
49
|
it 'returns 404 if a dashboard does not exist' do
|
50
|
-
get '/app/
|
50
|
+
get '/app/dashboards/nonexistent.json'
|
51
51
|
|
52
52
|
expect(last_response.body.strip).to eql('{"error":"Not found"}')
|
53
53
|
expect(last_response.status).to eql(404)
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|