simple_drilldown 0.12.1 → 0.14.0
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/README.md +1 -1
- data/Rakefile +1 -1
- data/app/views/{drilldown → layouts/simple_drilldown}/print.html.erb +0 -0
- data/app/views/{drilldown → simple_drilldown}/_chart.html.erb +1 -1
- data/app/views/{drilldown → simple_drilldown}/_excel_record_list_xlsx.xlsx.axlsx +0 -0
- data/app/views/{drilldown → simple_drilldown}/_excel_row_header.builder +0 -0
- data/app/views/{drilldown → simple_drilldown}/_excel_styles.builder +0 -0
- data/app/views/{drilldown → simple_drilldown}/_excel_summary_row.builder +1 -1
- data/app/views/{drilldown → simple_drilldown}/_excel_summary_row_xlsx.xlsx.axlsx +0 -0
- data/app/views/{drilldown → simple_drilldown}/_excel_summary_total_row.builder +0 -0
- data/app/views/{drilldown → simple_drilldown}/_excel_summary_total_row_xlsx.xlsx.axlsx +0 -0
- data/app/views/{drilldown → simple_drilldown}/_export_links.html.erb +0 -0
- data/app/views/{drilldown → simple_drilldown}/_field.html.erb +0 -0
- data/app/views/{drilldown → simple_drilldown}/_fields.html.erb +0 -0
- data/app/views/{drilldown → simple_drilldown}/_filter.html.erb +1 -1
- data/app/views/{drilldown → simple_drilldown}/_record_list.html.erb +2 -2
- data/app/views/{drilldown → simple_drilldown}/_row.html.erb +0 -0
- data/app/views/{drilldown → simple_drilldown}/_row_header.html.erb +1 -1
- data/app/views/{drilldown → simple_drilldown}/_summary_row.html.erb +0 -0
- data/app/views/{drilldown → simple_drilldown}/_summary_table.html.erb +0 -0
- data/app/views/{drilldown → simple_drilldown}/_summary_total_row.html.erb +0 -0
- data/app/views/{drilldown → simple_drilldown}/_tab_buttons.html.erb +0 -0
- data/app/views/{drilldown → simple_drilldown}/data_0.builder +0 -0
- data/app/views/{drilldown → simple_drilldown}/data_1.builder +0 -0
- data/app/views/{drilldown → simple_drilldown}/data_2.builder +0 -0
- data/app/views/{drilldown → simple_drilldown}/data_3.builder +0 -0
- data/app/views/{drilldown → simple_drilldown}/excel_export.builder +1 -1
- data/app/views/{drilldown → simple_drilldown}/excel_export_records.builder +1 -1
- data/app/views/{drilldown → simple_drilldown}/excel_export_xlsx.xlsx.axlsx +3 -3
- data/app/views/{drilldown → simple_drilldown}/html_export.html.erb +1 -1
- data/app/views/{drilldown → simple_drilldown}/index.html.erb +5 -5
- data/lib/simple_drilldown/controller.rb +35 -26
- data/lib/simple_drilldown/engine.rb +1 -1
- data/lib/simple_drilldown/helper.rb +11 -11
- data/lib/simple_drilldown/search.rb +2 -2
- data/lib/simple_drilldown/version.rb +3 -1
- metadata +33 -60
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ca344402dbcb15946fe11948f5548b6802df4d50f97b8a6c596c10728b1f8c0
|
|
4
|
+
data.tar.gz: af4df3909a14d2d7dcf6ba4838d6585ca0947dce7139247316aa49b4cdc3b803
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 72502b99cd7db75b86b75d42a0b89210e0836c4357f75f56636f22a763cf5f8f2bb48ef8b23acd84ad3125e2d36a7ac5a99f3fd86379d574e0b2c19d0b957ab3
|
|
7
|
+
data.tar.gz: fb60b7c5f49a48bd04160e2ce4f522dea38fa8794d402ed2356631a2e17ef5dabbc95268118d288beb41f8b15119ae9dea14b58804b18b6b4ad16b6025c1079c
|
data/README.md
CHANGED
|
@@ -117,7 +117,7 @@ results.
|
|
|
117
117
|
|
|
118
118
|
This gem includes views for the drilldown visualization using Bootstrap.
|
|
119
119
|
|
|
120
|
-
You can override any views by creating them in your `app/views/
|
|
120
|
+
You can override any views by creating them in your `app/views/simple_drilldown` directory.
|
|
121
121
|
If you would like a local copy of the views for overriding you can use the generator.
|
|
122
122
|
|
|
123
123
|
bin/rails g simple_drilldown:views
|
data/Rakefile
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -8,7 +8,7 @@ xml.Row do
|
|
|
8
8
|
xml.Data value_label(@dimensions.size - headers.size + i - 1, h[:value]), 'ss:Type' => 'String'
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
|
-
if dimension
|
|
11
|
+
if dimension.positive?
|
|
12
12
|
xml.Cell('ss:StyleID' => 'Outer',
|
|
13
13
|
'ss:Index' => dimension.to_s) do
|
|
14
14
|
xml.Data value_label(dimension - 1, result[:value]),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
<% controller.c_dimension_defs.each do |dimension_name, dimension| %>
|
|
7
7
|
<% choices = [[t(:all), nil]] + (dimension[:legal_values] && dimension[:legal_values].call(@search).map { |o| o.is_a?(Array) ? [o[0].to_s, o[1].to_s] : o.to_s } || []) %>
|
|
8
|
-
<%= render partial: '
|
|
8
|
+
<%= render partial: 'simple_drilldown/field', locals: { choices: choices || [],
|
|
9
9
|
form: form, dimension_name: dimension_name } %>
|
|
10
10
|
<% end %>
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<tr>
|
|
3
3
|
<td colspan="<%= controller.c_summary_fields.size + 1 %>">
|
|
4
4
|
<table id="drilldown-records-<%= result[:value] %>" class="table table-condensed table-bordered" style="padding-bottom: 10px;">
|
|
5
|
-
<%= render '/
|
|
5
|
+
<%= render '/simple_drilldown/row_header', records: result[:records] %>
|
|
6
6
|
<tbody>
|
|
7
7
|
<% result[:records].each do |t| %>
|
|
8
|
-
<%= render :partial => '/
|
|
8
|
+
<%= render :partial => '/simple_drilldown/row', :locals => { :transaction => t, :previous_transaction => nil, :errors => [], :error_row => false, :meter1_errors => false } %>
|
|
9
9
|
<% end %>
|
|
10
10
|
</tbody>
|
|
11
11
|
</table>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -10,7 +10,7 @@ xml.Workbook(
|
|
|
10
10
|
'xmlns:ss' => 'urn:schemas-microsoft-com:office:spreadsheet',
|
|
11
11
|
'xmlns:html' => 'http://www.w3.org/TR/REC-html40'
|
|
12
12
|
) do
|
|
13
|
-
xml << render('/
|
|
13
|
+
xml << render('/simple_drilldown/excel_styles')
|
|
14
14
|
|
|
15
15
|
xml.Worksheet 'ss:Name' => 'Transaction Summary' do
|
|
16
16
|
xml.Table do
|
|
@@ -10,7 +10,7 @@ xml.Workbook(
|
|
|
10
10
|
'xmlns:ss' => 'urn:schemas-microsoft-com:office:spreadsheet',
|
|
11
11
|
'xmlns:html' => 'http://www.w3.org/TR/REC-html40'
|
|
12
12
|
) do
|
|
13
|
-
xml << render(partial: '/
|
|
13
|
+
xml << render(partial: '/simple_drilldown/excel_styles')
|
|
14
14
|
|
|
15
15
|
xml.Worksheet 'ss:Name' => 'Drilldown' do
|
|
16
16
|
xml.Table do
|
|
@@ -20,19 +20,19 @@ def excel_summary_row_xlsx(sheet, result, parent_result = nil, dimension = 0, he
|
|
|
20
20
|
excel_summary_row_xlsx(sheet, r, result, dimension + 1, sub_headers)
|
|
21
21
|
end
|
|
22
22
|
else
|
|
23
|
-
render(partial: '/
|
|
23
|
+
render(partial: '/simple_drilldown/excel_summary_row_xlsx',
|
|
24
24
|
locals: { sheet: sheet, result: result, parent_result: parent_result, headers: headers.dup,
|
|
25
25
|
dimension: dimension })
|
|
26
26
|
|
|
27
27
|
if @search.list
|
|
28
|
-
render(partial: '/
|
|
28
|
+
render(partial: '/simple_drilldown/excel_record_list_xlsx',
|
|
29
29
|
locals: { sheet: sheet, result: result })
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
return if dimension >= @dimensions.size
|
|
34
34
|
|
|
35
|
-
render(partial: '/
|
|
35
|
+
render(partial: '/simple_drilldown/excel_summary_total_row_xlsx', locals: {
|
|
36
36
|
sheet: sheet, result: result, headers: headers.dup, dimension: dimension
|
|
37
37
|
})
|
|
38
38
|
end
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
<!-- Tab panes -->
|
|
27
27
|
<div class="tab-content">
|
|
28
28
|
<div class="tab-pane active" id="filter">
|
|
29
|
-
<%= render '/
|
|
29
|
+
<%= render '/simple_drilldown/filter', form: form %>
|
|
30
30
|
</div>
|
|
31
31
|
<div class="tab-pane" id="fields">
|
|
32
|
-
<%= render '/
|
|
32
|
+
<%= render '/simple_drilldown/fields', form: form %>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
<div class="col-md-9">
|
|
38
38
|
<div class="row" valign="top">
|
|
39
39
|
<div class="col-md-12">
|
|
40
|
-
<%= render '/
|
|
40
|
+
<%= render '/simple_drilldown/chart', form: form %>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
44
|
<div class="row">
|
|
45
45
|
<div class="col-md-12" valign="top">
|
|
46
46
|
<div style="float: right; clear: both;">
|
|
47
|
-
<%= render '/
|
|
47
|
+
<%= render '/simple_drilldown/export_links', records: @result[:records] %>
|
|
48
48
|
</div>
|
|
49
|
-
<%= render '/
|
|
49
|
+
<%= render '/simple_drilldown/summary_table' %>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
@@ -135,8 +135,8 @@ module SimpleDrilldown
|
|
|
135
135
|
interval: interval,
|
|
136
136
|
label_method: label_method,
|
|
137
137
|
legal_values: legal_values,
|
|
138
|
-
pretty_name: I18n.t(:"
|
|
139
|
-
default: [:"
|
|
138
|
+
pretty_name: I18n.t(:"simple_drilldown.dimension.#{name}",
|
|
139
|
+
default: [:"simple_drilldown.#{name}", :"activerecord.models.#{name}", name.to_sym,
|
|
140
140
|
name.to_s.titleize]),
|
|
141
141
|
queries: queries,
|
|
142
142
|
reverse: reverse,
|
|
@@ -147,7 +147,7 @@ module SimpleDrilldown
|
|
|
147
147
|
}
|
|
148
148
|
end
|
|
149
149
|
|
|
150
|
-
def legal_values_for(field, preserve_filter
|
|
150
|
+
def legal_values_for(field, preserve_filter: false)
|
|
151
151
|
lambda do |search|
|
|
152
152
|
filter = search.filter.dup
|
|
153
153
|
filter.delete(field.to_s) unless preserve_filter
|
|
@@ -162,7 +162,10 @@ module SimpleDrilldown
|
|
|
162
162
|
.group(:value)
|
|
163
163
|
rows_query = rows_query.without_deleted if c_target_class.try :paranoid?
|
|
164
164
|
rows_query = rows_query.where(filter_conditions) if filter_conditions
|
|
165
|
-
|
|
165
|
+
if (where = query[:where])
|
|
166
|
+
where_mapped = where.map { |e| e.respond_to?(:call) ? e.call : e }
|
|
167
|
+
rows_query = rows_query.where(where_mapped)
|
|
168
|
+
end
|
|
166
169
|
rows = rows_query.to_a
|
|
167
170
|
filter_fields = search.filter[field.to_s]
|
|
168
171
|
filter_fields&.each do |selected_value|
|
|
@@ -192,6 +195,13 @@ module SimpleDrilldown
|
|
|
192
195
|
dimension_def = c_dimension_defs[field]
|
|
193
196
|
raise "Unknown filter field: #{field.inspect}" if dimension_def.nil?
|
|
194
197
|
|
|
198
|
+
dimension_def[:queries].each do |query|
|
|
199
|
+
next unless (where = query[:where])
|
|
200
|
+
|
|
201
|
+
where_mapped = where.map { |e| e.respond_to?(:call) ? e.call : e }
|
|
202
|
+
condition_strings << where_mapped[0]
|
|
203
|
+
condition_values += where_mapped[1..]
|
|
204
|
+
end
|
|
195
205
|
values = Array(values)
|
|
196
206
|
if dimension_def[:interval]
|
|
197
207
|
if values[0].present? && values[1].present?
|
|
@@ -349,7 +359,7 @@ module SimpleDrilldown
|
|
|
349
359
|
|
|
350
360
|
# ?dimension[0]=supplier&dimension[1]=transaction_type&
|
|
351
361
|
# filter[year]=2009&filter[supplier][0]=Shell&filter[supplier][1]=Statoil
|
|
352
|
-
def index(do_render
|
|
362
|
+
def index(do_render: true)
|
|
353
363
|
@search = new_search_object
|
|
354
364
|
|
|
355
365
|
@transaction_fields = (@search.fields + (c_fields.keys.map(&:to_s) - @search.fields))
|
|
@@ -408,7 +418,7 @@ module SimpleDrilldown
|
|
|
408
418
|
end
|
|
409
419
|
|
|
410
420
|
populate_list(conditions, includes, @result, []) if @search.list
|
|
411
|
-
render template: '/
|
|
421
|
+
render template: '/simple_drilldown/index' if do_render
|
|
412
422
|
end
|
|
413
423
|
|
|
414
424
|
def choices
|
|
@@ -426,23 +436,23 @@ module SimpleDrilldown
|
|
|
426
436
|
end
|
|
427
437
|
|
|
428
438
|
def html_export
|
|
429
|
-
index(false)
|
|
430
|
-
render template: '/
|
|
439
|
+
index(do_render: false)
|
|
440
|
+
render template: '/simple_drilldown/html_export', layout: 'simple_drilldown/print'
|
|
431
441
|
end
|
|
432
442
|
|
|
433
443
|
def excel_export
|
|
434
|
-
index(false)
|
|
444
|
+
index(do_render: false)
|
|
435
445
|
respond_to do |format|
|
|
436
446
|
format.xlsx do
|
|
437
|
-
render xlsx: c_target_class.table_name, template: '
|
|
447
|
+
render xlsx: c_target_class.table_name, template: 'simple_drilldown/excel_export_xlsx'
|
|
438
448
|
end
|
|
439
449
|
format.xml do
|
|
440
450
|
set_excel_headers
|
|
441
451
|
if params.dig(:search, :list) == '1'
|
|
442
452
|
@records = get_records(@result)
|
|
443
|
-
render template: '
|
|
453
|
+
render template: 'simple_drilldown/excel_export_records', layout: false
|
|
444
454
|
else
|
|
445
|
-
render template: '
|
|
455
|
+
render template: 'simple_drilldown/excel_export', layout: false
|
|
446
456
|
end
|
|
447
457
|
end
|
|
448
458
|
end
|
|
@@ -458,7 +468,7 @@ module SimpleDrilldown
|
|
|
458
468
|
|
|
459
469
|
def set_excel_headers
|
|
460
470
|
headers['Content-Type'] = 'application/vnd.ms-excel'
|
|
461
|
-
headers['Content-Disposition'] = %
|
|
471
|
+
headers['Content-Disposition'] = %(attachment; filename="#{c_target_class.table_name}.xml")
|
|
462
472
|
headers['Cache-Control'] = ''
|
|
463
473
|
end
|
|
464
474
|
|
|
@@ -477,18 +487,16 @@ module SimpleDrilldown
|
|
|
477
487
|
removed_rows = 0
|
|
478
488
|
prev_row = nil
|
|
479
489
|
rows.each do |r|
|
|
480
|
-
if prev_row
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
prev_row[f] += r[f]
|
|
485
|
-
end
|
|
486
|
-
prev_row[:row_count] = [prev_row[:row_count], r[:row_count]].max
|
|
487
|
-
prev_row[:nodes] = [prev_row[:nodes], r[:nodes]].max
|
|
488
|
-
prev_row[:rows] += r[:rows] if prev_row[:rows] || r[:rows]
|
|
489
|
-
r[:value] = nil
|
|
490
|
-
removed_rows += r[:nodes]
|
|
490
|
+
if prev_row && (prev_row[:value] == r[:value])
|
|
491
|
+
prev_row[:count] += r[:count]
|
|
492
|
+
c_summary_fields.each do |f|
|
|
493
|
+
prev_row[f] += r[f]
|
|
491
494
|
end
|
|
495
|
+
prev_row[:row_count] = [prev_row[:row_count], r[:row_count]].max
|
|
496
|
+
prev_row[:nodes] = [prev_row[:nodes], r[:nodes]].max
|
|
497
|
+
prev_row[:rows] += r[:rows] if prev_row[:rows] || r[:rows]
|
|
498
|
+
r[:value] = nil
|
|
499
|
+
removed_rows += r[:nodes]
|
|
492
500
|
end
|
|
493
501
|
prev_row = r unless r[:value].nil?
|
|
494
502
|
end
|
|
@@ -505,7 +513,8 @@ module SimpleDrilldown
|
|
|
505
513
|
# Empty summary rows are needed to plot zero points in the charts
|
|
506
514
|
def add_zero_results(result_rows, dimension)
|
|
507
515
|
legal_values =
|
|
508
|
-
self.class.legal_values_for(@dimensions[dimension][:url_param_name],
|
|
516
|
+
self.class.legal_values_for(@dimensions[dimension][:url_param_name],
|
|
517
|
+
preserve_filter: true).call(@search).map { |lv| lv[1] }
|
|
509
518
|
legal_values.reverse! if @dimensions[dimension][:reverse]
|
|
510
519
|
current_values = result_rows.map { |r| r[:value] }.compact
|
|
511
520
|
empty_values = legal_values - current_values
|
|
@@ -601,7 +610,7 @@ module SimpleDrilldown
|
|
|
601
610
|
@dimensions.each do |d|
|
|
602
611
|
list_conditions_string << "#{' AND ' unless list_conditions_string.empty?}#{d[:select_expression]} = ?"
|
|
603
612
|
end
|
|
604
|
-
[list_conditions_string, *(conditions[1
|
|
613
|
+
[list_conditions_string, *(conditions[1..] + values)]
|
|
605
614
|
end
|
|
606
615
|
|
|
607
616
|
def get_records(tree)
|
|
@@ -9,7 +9,7 @@ module SimpleDrilldown
|
|
|
9
9
|
config.autoload_paths << File.dirname(__dir__)
|
|
10
10
|
|
|
11
11
|
initializer 'simple_drilldown.assets.precompile' do |app|
|
|
12
|
-
app.config.assets
|
|
12
|
+
app.config.try(:assets)&.precompile&.concat(%w[simple_drilldown/application.css chartkick.js])
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
ActionDispatch::Routing::Mapper.include SimpleDrilldown::Routing
|
|
@@ -23,8 +23,8 @@ module SimpleDrilldown
|
|
|
23
23
|
@search.title || @filter_text.blank? ? '' : "for #{@filter_text}"
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def summary_row(result, parent_result = nil, dimension = 0, headers = [], new_row
|
|
27
|
-
html = render(partial: '/
|
|
26
|
+
def summary_row(result, parent_result = nil, dimension = 0, headers = [], new_row: true)
|
|
27
|
+
html = render(partial: '/simple_drilldown/summary_row', locals: {
|
|
28
28
|
result: result, parent_result: parent_result, new_row: new_row, dimension: dimension,
|
|
29
29
|
headers: headers, with_results: !result[:rows]
|
|
30
30
|
})
|
|
@@ -35,13 +35,13 @@ module SimpleDrilldown
|
|
|
35
35
|
}]
|
|
36
36
|
significant_rows = result[:rows].reject { |r| r[:row_count].zero? }
|
|
37
37
|
significant_rows.each_with_index do |r, i|
|
|
38
|
-
html << summary_row(r, result, dimension + 1, sub_headers, i.positive?)
|
|
38
|
+
html << summary_row(r, result, dimension + 1, sub_headers, new_row: i.positive?)
|
|
39
39
|
end
|
|
40
40
|
elsif @search.list
|
|
41
|
-
html << render(partial: '/
|
|
41
|
+
html << render(partial: '/simple_drilldown/record_list', locals: { result: result, dimension: dimension })
|
|
42
42
|
end
|
|
43
43
|
if dimension < @dimensions.size
|
|
44
|
-
html << render(partial: '/
|
|
44
|
+
html << render(partial: '/simple_drilldown/summary_total_row',
|
|
45
45
|
locals: {
|
|
46
46
|
result: result, parent_result: parent_result, headers: headers.dup, dimension: dimension
|
|
47
47
|
})
|
|
@@ -71,15 +71,15 @@ module SimpleDrilldown
|
|
|
71
71
|
xml << excel_summary_row(r, result, dimension + 1, sub_headers)
|
|
72
72
|
end
|
|
73
73
|
else
|
|
74
|
-
xml << render(partial: '/
|
|
74
|
+
xml << render(partial: '/simple_drilldown/excel_summary_row',
|
|
75
75
|
locals: { result: result, parent_result: parent_result, headers: headers.dup,
|
|
76
76
|
dimension: dimension })
|
|
77
77
|
|
|
78
|
-
xml << render(partial: '/
|
|
78
|
+
xml << render(partial: '/simple_drilldown/excel_record_list', locals: { result: result }) if @search.list
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
if dimension < @dimensions.size
|
|
82
|
-
xml << render(partial: '/
|
|
82
|
+
xml << render(partial: '/simple_drilldown/excel_summary_total_row', locals: {
|
|
83
83
|
result: result, headers: headers.dup, dimension: dimension
|
|
84
84
|
})
|
|
85
85
|
end
|
|
@@ -90,9 +90,9 @@ module SimpleDrilldown
|
|
|
90
90
|
|
|
91
91
|
def caption_txt
|
|
92
92
|
class_txt = controller.c_target_class &&
|
|
93
|
-
I18n.t(controller.c_target_class.name.
|
|
94
|
-
default: [controller.c_target_class.name.
|
|
95
|
-
controller.c_target_class.name.
|
|
93
|
+
I18n.t(controller.c_target_class.name.underscore.to_sym,
|
|
94
|
+
default: [controller.c_target_class.name.underscore.to_sym,
|
|
95
|
+
controller.c_target_class.name.titleize])
|
|
96
96
|
value_txt = I18n.t(@search.select_value.downcase, default: @search.select_value.to_s.titleize)
|
|
97
97
|
dimensions_txt = " by #{@dimensions.map { |d| d[:pretty_name] }.join(' and ')}" if @dimensions&.any?
|
|
98
98
|
"#{class_txt} #{value_txt}#{dimensions_txt}"
|
|
@@ -86,8 +86,8 @@ module SimpleDrilldown
|
|
|
86
86
|
list_change_times: list_change_times ? '1' : '0',
|
|
87
87
|
filter: filter,
|
|
88
88
|
dimensions: dimensions,
|
|
89
|
-
display_type: display_type
|
|
90
|
-
}
|
|
89
|
+
display_type: display_type
|
|
90
|
+
}
|
|
91
91
|
}
|
|
92
92
|
o[:search][:fields] = fields unless fields == @default_fields
|
|
93
93
|
o
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple_drilldown
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.14.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Uwe Kubosch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-09-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: caxlsx_rails
|
|
@@ -58,34 +58,6 @@ dependencies:
|
|
|
58
58
|
- - "<"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
60
|
version: '8'
|
|
61
|
-
- !ruby/object:Gem::Dependency
|
|
62
|
-
name: rubocop
|
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
|
64
|
-
requirements:
|
|
65
|
-
- - "~>"
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: '1.1'
|
|
68
|
-
type: :development
|
|
69
|
-
prerelease: false
|
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
-
requirements:
|
|
72
|
-
- - "~>"
|
|
73
|
-
- !ruby/object:Gem::Version
|
|
74
|
-
version: '1.1'
|
|
75
|
-
- !ruby/object:Gem::Dependency
|
|
76
|
-
name: sqlite3
|
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - ">="
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: '0'
|
|
82
|
-
type: :development
|
|
83
|
-
prerelease: false
|
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - ">="
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: '0'
|
|
89
61
|
description: simple_drilldown offers a simple way to define axis to filter and group
|
|
90
62
|
records for analysis.
|
|
91
63
|
email:
|
|
@@ -104,36 +76,36 @@ files:
|
|
|
104
76
|
- app/jobs/simple_drilldown/application_job.rb
|
|
105
77
|
- app/mailers/simple_drilldown/application_mailer.rb
|
|
106
78
|
- app/models/simple_drilldown/application_record.rb
|
|
107
|
-
- app/views/drilldown/_chart.html.erb
|
|
108
|
-
- app/views/drilldown/_excel_record_list_xlsx.xlsx.axlsx
|
|
109
|
-
- app/views/drilldown/_excel_row_header.builder
|
|
110
|
-
- app/views/drilldown/_excel_styles.builder
|
|
111
|
-
- app/views/drilldown/_excel_summary_row.builder
|
|
112
|
-
- app/views/drilldown/_excel_summary_row_xlsx.xlsx.axlsx
|
|
113
|
-
- app/views/drilldown/_excel_summary_total_row.builder
|
|
114
|
-
- app/views/drilldown/_excel_summary_total_row_xlsx.xlsx.axlsx
|
|
115
|
-
- app/views/drilldown/_export_links.html.erb
|
|
116
|
-
- app/views/drilldown/_field.html.erb
|
|
117
|
-
- app/views/drilldown/_fields.html.erb
|
|
118
|
-
- app/views/drilldown/_filter.html.erb
|
|
119
|
-
- app/views/drilldown/_record_list.html.erb
|
|
120
|
-
- app/views/drilldown/_row.html.erb
|
|
121
|
-
- app/views/drilldown/_row_header.html.erb
|
|
122
|
-
- app/views/drilldown/_summary_row.html.erb
|
|
123
|
-
- app/views/drilldown/_summary_table.html.erb
|
|
124
|
-
- app/views/drilldown/_summary_total_row.html.erb
|
|
125
|
-
- app/views/drilldown/_tab_buttons.html.erb
|
|
126
|
-
- app/views/drilldown/data_0.builder
|
|
127
|
-
- app/views/drilldown/data_1.builder
|
|
128
|
-
- app/views/drilldown/data_2.builder
|
|
129
|
-
- app/views/drilldown/data_3.builder
|
|
130
|
-
- app/views/drilldown/excel_export.builder
|
|
131
|
-
- app/views/drilldown/excel_export_records.builder
|
|
132
|
-
- app/views/drilldown/excel_export_xlsx.xlsx.axlsx
|
|
133
|
-
- app/views/drilldown/html_export.html.erb
|
|
134
|
-
- app/views/drilldown/index.html.erb
|
|
135
|
-
- app/views/drilldown/print.html.erb
|
|
136
79
|
- app/views/layouts/simple_drilldown/application.html.erb
|
|
80
|
+
- app/views/layouts/simple_drilldown/print.html.erb
|
|
81
|
+
- app/views/simple_drilldown/_chart.html.erb
|
|
82
|
+
- app/views/simple_drilldown/_excel_record_list_xlsx.xlsx.axlsx
|
|
83
|
+
- app/views/simple_drilldown/_excel_row_header.builder
|
|
84
|
+
- app/views/simple_drilldown/_excel_styles.builder
|
|
85
|
+
- app/views/simple_drilldown/_excel_summary_row.builder
|
|
86
|
+
- app/views/simple_drilldown/_excel_summary_row_xlsx.xlsx.axlsx
|
|
87
|
+
- app/views/simple_drilldown/_excel_summary_total_row.builder
|
|
88
|
+
- app/views/simple_drilldown/_excel_summary_total_row_xlsx.xlsx.axlsx
|
|
89
|
+
- app/views/simple_drilldown/_export_links.html.erb
|
|
90
|
+
- app/views/simple_drilldown/_field.html.erb
|
|
91
|
+
- app/views/simple_drilldown/_fields.html.erb
|
|
92
|
+
- app/views/simple_drilldown/_filter.html.erb
|
|
93
|
+
- app/views/simple_drilldown/_record_list.html.erb
|
|
94
|
+
- app/views/simple_drilldown/_row.html.erb
|
|
95
|
+
- app/views/simple_drilldown/_row_header.html.erb
|
|
96
|
+
- app/views/simple_drilldown/_summary_row.html.erb
|
|
97
|
+
- app/views/simple_drilldown/_summary_table.html.erb
|
|
98
|
+
- app/views/simple_drilldown/_summary_total_row.html.erb
|
|
99
|
+
- app/views/simple_drilldown/_tab_buttons.html.erb
|
|
100
|
+
- app/views/simple_drilldown/data_0.builder
|
|
101
|
+
- app/views/simple_drilldown/data_1.builder
|
|
102
|
+
- app/views/simple_drilldown/data_2.builder
|
|
103
|
+
- app/views/simple_drilldown/data_3.builder
|
|
104
|
+
- app/views/simple_drilldown/excel_export.builder
|
|
105
|
+
- app/views/simple_drilldown/excel_export_records.builder
|
|
106
|
+
- app/views/simple_drilldown/excel_export_xlsx.xlsx.axlsx
|
|
107
|
+
- app/views/simple_drilldown/html_export.html.erb
|
|
108
|
+
- app/views/simple_drilldown/index.html.erb
|
|
137
109
|
- config/locales/en.yml
|
|
138
110
|
- config/locales/nb.yml
|
|
139
111
|
- config/routes.rb
|
|
@@ -157,6 +129,7 @@ licenses:
|
|
|
157
129
|
- MIT
|
|
158
130
|
metadata:
|
|
159
131
|
allowed_push_host: https://rubygems.org/
|
|
132
|
+
rubygems_mfa_required: 'true'
|
|
160
133
|
post_install_message:
|
|
161
134
|
rdoc_options: []
|
|
162
135
|
require_paths:
|
|
@@ -165,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
165
138
|
requirements:
|
|
166
139
|
- - ">="
|
|
167
140
|
- !ruby/object:Gem::Version
|
|
168
|
-
version: '2.
|
|
141
|
+
version: '2.6'
|
|
169
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
143
|
requirements:
|
|
171
144
|
- - ">="
|