clark_kent 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/clark_kent/reports_controller.rb +12 -8
- data/lib/clark_kent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 891318c6af29ae0c9bdb151d429053a54576e557
|
4
|
+
data.tar.gz: b6d05cb1bf8a5e1c1c551cc27ddda83dd000f85b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 296f80f982ccc0948cb679ce630d42474c74e007ac3b84f39239e6d94b10760dda476d3386559275efa372ec6088caed44ea6279143c39ae4c0b0b20b3074cfd
|
7
|
+
data.tar.gz: dcc55a7d3b67db0463a16ef2dfe5739a08182147b3cfaedc6abe262de8c903c12a53c9d3dab850e62ed1d9b924e1019f9f372ddce05f9929a666e5e4fdc2f937
|
@@ -31,13 +31,7 @@ class ClarkKent::ReportsController < ClarkKent::ApplicationController
|
|
31
31
|
else
|
32
32
|
prepare_params(params.permit!) if defined? prepare_params
|
33
33
|
if params[:run_report].present?
|
34
|
-
|
35
|
-
if @report.date_filter_names.detect{|fn|
|
36
|
-
@report.filter_options_for(fn).filter_params.include? k.to_s
|
37
|
-
}.present?
|
38
|
-
@these_params[k] = parse_date(v)
|
39
|
-
end
|
40
|
-
end
|
34
|
+
parse_date_filters
|
41
35
|
@these_params[:page] = params[:page]
|
42
36
|
@these_params[:per] = @report.resource_class.default_per_page
|
43
37
|
begin
|
@@ -54,8 +48,9 @@ class ClarkKent::ReportsController < ClarkKent::ApplicationController
|
|
54
48
|
|
55
49
|
def download_link
|
56
50
|
@report = ClarkKent::Report.where(id: params[:id]).first
|
57
|
-
prepare_params if defined? prepare_params
|
51
|
+
prepare_params(params.permit!) if defined? prepare_params
|
58
52
|
@report_result_name = "report-#{@report.id}-#{Time.now.to_formatted_s(:number)}"
|
53
|
+
parse_date_filters if params[:run_report].present?
|
59
54
|
@these_params[:report_result_name] = @report_result_name
|
60
55
|
ConeyIsland.submit(ClarkKent::Report,
|
61
56
|
:send_report_to_s3,
|
@@ -128,4 +123,13 @@ class ClarkKent::ReportsController < ClarkKent::ApplicationController
|
|
128
123
|
year
|
129
124
|
end
|
130
125
|
|
126
|
+
def parse_date_filters
|
127
|
+
@these_params.each do |k,v|
|
128
|
+
if @report.date_filter_names.detect{|fn|
|
129
|
+
@report.filter_options_for(fn).filter_params.include? k.to_s
|
130
|
+
}.present?
|
131
|
+
@these_params[k] = parse_date(v)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
131
135
|
end
|
data/lib/clark_kent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clark_kent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|