compendium 1.2.0 → 1.2.1
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
- data/CHANGELOG.md +4 -0
- data/app/views/compendium/reports/_metric.erb +5 -0
- data/app/views/compendium/reports/run.erb +1 -0
- data/app/views/compendium/reports/setup.erb +39 -0
- data/lib/compendium/result_set.rb +2 -1
- data/lib/compendium/version.rb +1 -1
- metadata +5 -5
- data/app/views/compendium/reports/_metric.haml +0 -5
- data/app/views/compendium/reports/run.haml +0 -1
- data/app/views/compendium/reports/setup.haml +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec146d9508f108284dd9e6c0ebc8f6923b8ef28f
|
4
|
+
data.tar.gz: cd65c29f25480eb032eed1ddabed3beb7b042cdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89688133b46136042dee8ae70d41c1b04627dcf61440ea8d198063a3d94e93422bc5d7271a756034296e318a4ca733e7bd26fcb1629ba3fa2f5e3417466d56a0
|
7
|
+
data.tar.gz: e45b2225269ced9fc313b52a3952f2d639b9603f60ae42dce6f159306014598e9e0eccd4522b48ef409566ed43e671fe800d6f7fcf980ff335832d6102b20ec6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 1.2.1
|
4
|
+
* Fix crash when converting a ResultSet to JSON when the results is a flat array
|
5
|
+
* Remove haml implicit dependency
|
6
|
+
|
3
7
|
## 1.2.0
|
4
8
|
* Added the ability to render a query to CSV, and a controller action for downloading the CSV
|
5
9
|
* Added `exports` report setting
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= t(:results, report_name: @prefix) %>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<% content_for :stylesheets do %>
|
2
|
+
<%= stylesheet_link_tag 'compendium/options' %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<%= render_if_exists partial: 'report_header', path: 'compendium/reports' %>
|
6
|
+
|
7
|
+
<div class="options">
|
8
|
+
<%= form_for report, as: :report, url: compendium_reports_run_path, html: { id: 'setup_report_form' } do |f| %>
|
9
|
+
<%= hidden_field_tag :format, :html %>
|
10
|
+
|
11
|
+
<% report.options.each do |option| %>
|
12
|
+
<% expose option, Compendium::Presenters::Option do |opt| %>
|
13
|
+
<div class="option">
|
14
|
+
<%= opt.label(f) %>
|
15
|
+
<div class="option-element-group">
|
16
|
+
<%= opt.input(self, f) %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<div class="option">
|
23
|
+
<%= f.submit t(:generate_report, scope: 'compendium.reports'), onclick: "set_format('html')" %>
|
24
|
+
<% if report.exports?(:csv) %>
|
25
|
+
<%= f.submit t(:export_csv, scope: 'compendium.reports'), name: :export, onclick: "set_format('csv')" %>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<script type="text/javascript">
|
32
|
+
function set_format(format)
|
33
|
+
{
|
34
|
+
var form = document.getElementById('setup_report_form'),
|
35
|
+
input = form.querySelector('input#format[type=hidden]');
|
36
|
+
|
37
|
+
input.value = format;
|
38
|
+
}
|
39
|
+
</script>
|
data/lib/compendium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compendium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Vandersluis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -154,9 +154,9 @@ files:
|
|
154
154
|
- app/classes/compendium/presenters/table.rb
|
155
155
|
- app/controllers/compendium/reports_controller.rb
|
156
156
|
- app/helpers/compendium/reports_helper.rb
|
157
|
-
- app/views/compendium/reports/_metric.
|
158
|
-
- app/views/compendium/reports/run.
|
159
|
-
- app/views/compendium/reports/setup.
|
157
|
+
- app/views/compendium/reports/_metric.erb
|
158
|
+
- app/views/compendium/reports/run.erb
|
159
|
+
- app/views/compendium/reports/setup.erb
|
160
160
|
- compendium.gemspec
|
161
161
|
- config/initializers/rails/active_record/connection_adapters/quoting.rb
|
162
162
|
- config/initializers/ruby/numeric.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
= t(:results, report_name: @prefix)
|
@@ -1,28 +0,0 @@
|
|
1
|
-
- content_for :stylesheets do
|
2
|
-
= stylesheet_link_tag 'compendium/options'
|
3
|
-
|
4
|
-
= render_if_exists partial: 'report_header', path: 'compendium/reports'
|
5
|
-
|
6
|
-
.options
|
7
|
-
= form_for report, as: :report, url: compendium_reports_run_path, html: { id: 'setup_report_form' } do |f|
|
8
|
-
= hidden_field_tag :format, :html
|
9
|
-
|
10
|
-
- report.options.each do |option|
|
11
|
-
- expose option, Compendium::Presenters::Option do |opt|
|
12
|
-
.option
|
13
|
-
= opt.label(f)
|
14
|
-
.option-element-group= opt.input(self, f)
|
15
|
-
|
16
|
-
.option
|
17
|
-
= f.submit t(:generate_report, scope: 'compendium.reports'), onclick: "set_format('html')"
|
18
|
-
- if report.exports?(:csv)
|
19
|
-
= f.submit t(:export_csv, scope: 'compendium.reports'), name: :export, onclick: "set_format('csv')"
|
20
|
-
|
21
|
-
:javascript
|
22
|
-
function set_format(format)
|
23
|
-
{
|
24
|
-
var form = document.getElementById('setup_report_form'),
|
25
|
-
input = form.querySelector('input#format[type=hidden]');
|
26
|
-
|
27
|
-
input.value = format;
|
28
|
-
}
|