query_report 1.1.2 → 1.1.3
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: ed84b0fb9e481633748b9b6d0733f6d858acc507
|
4
|
+
data.tar.gz: 2131aecc3f7ce894730d78a9efded7cf15eac732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 743c89af7eef08fe8925781a8ebb8bbe9b008a6698fb4efc611e8f9190009eab4cd03b3aa251af95c53bb51526467eac91f72a5b8de193b1210179dbe3e3c2b2
|
7
|
+
data.tar.gz: 40976a96ad155d08196e8cbb6c40012ba97f1520f2807bbe1804d788b16549078bc69c7697c6e6ff4026edff4e9bee51fbc6e45c1010ff8089ff053f7832cb1b
|
@@ -1,4 +1,5 @@
|
|
1
|
-
<%= search_form_for report.search, url: url_for({}), remote: @remote,
|
1
|
+
<%= search_form_for report.search, url: url_for({}), remote: @remote,
|
2
|
+
html: (QueryReport.config.search_form_options || {}).merge(method: :get) do |f| %>
|
2
3
|
<% report.filters.each do |filter| %>
|
3
4
|
<% filter.comparators.each do |comparator| %>
|
4
5
|
<%= query_report_render_filter(filter, comparator) %>
|
@@ -4,6 +4,7 @@ if ($('#<%=params['target_dom_id']%> .query_report_content').length == 0) {
|
|
4
4
|
} else {
|
5
5
|
$('#<%=params['target_dom_id']%> .query_report_content').html('<%= escape_javascript(render :partial => 'query_report/content', locals: {report: @report})%>');
|
6
6
|
}
|
7
|
+
eval($('script.chart_script').text());
|
7
8
|
<% else %>
|
8
9
|
console.log("target_dom_id was not defined");
|
9
10
|
<% end %>
|
data/lib/query_report.rb
CHANGED
@@ -7,17 +7,19 @@ require 'chartify/factory'
|
|
7
7
|
module QueryReport
|
8
8
|
module ChartAdapterModule
|
9
9
|
def chart(chart_type, chart_title, &block)
|
10
|
-
chart_adapter = ChartAdapter.new(filtered_query, chart_type, chart_title)
|
10
|
+
chart_adapter = ChartAdapter.new(filtered_query, all_records, chart_type, chart_title)
|
11
11
|
block.call(chart_adapter)
|
12
12
|
@charts << chart_adapter.chart
|
13
13
|
end
|
14
14
|
|
15
15
|
class ChartAdapter
|
16
|
-
|
16
|
+
attr_reader :query, :records
|
17
|
+
attr_accessor :chart_type, :chart
|
17
18
|
delegate :data, :data=, :columns, :columns=, :label_column, :label_column=, to: :chart
|
18
19
|
|
19
|
-
def initialize(query, chart_type, chart_title)
|
20
|
+
def initialize(query, records, chart_type, chart_title)
|
20
21
|
@query = query
|
22
|
+
@records = records
|
21
23
|
@chart_type = chart_type
|
22
24
|
@chart = "Chartify::#{chart_type.to_s.camelize}Chart".constantize.new
|
23
25
|
@chart.title = chart_title
|
data/lib/query_report/config.rb
CHANGED
data/lib/query_report/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: query_report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.K.M. Ashrafuzzaman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.2.
|
123
|
+
version: 0.2.2
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - '='
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.2.
|
130
|
+
version: 0.2.2
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: rake
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|