このコミットが含まれているのは:
@@ -5,7 +5,8 @@ class CountsTableQuery
|
||||
|
||||
KEYS = ['resource', 'definition', 'mode', 'at', 'execution_at', 'from', 'through',
|
||||
'timezone', 'rows', 'cols', 'conditions', 'drill', 'tags', 'tag_refs', 'match',
|
||||
'tag', 'kind', 'resource_id', 'user_id', 'page', 'limit', 'sort', 'locale', 'measures', 'column_order'].freeze
|
||||
'tag', 'kind', 'resource_id', 'user_id', 'page', 'limit', 'sort', 'locale',
|
||||
'measures', 'column_order', 'condition_values'].freeze
|
||||
attr_reader :population, :axes, :page, :limit, :mode
|
||||
|
||||
def initialize(params)
|
||||
@@ -145,14 +146,19 @@ class CountsTableQuery
|
||||
end
|
||||
column_depths = CountsPivotLayout.depths(column_keys, column_sort, measures: false)
|
||||
row_headers = CountsPivotLayout.headers(row_values, row_depths,
|
||||
next_values: next_row && row_keys.map { next_row[_1] }, grand: axes.rows.any?)
|
||||
next_values: next_row && row_keys.map { next_row[_1] }, grand: axes.rows.any?,
|
||||
axis_count: axes.rows.length, other_count: axes.columns.length)
|
||||
if axes.rows.empty? && axes.columns.any?
|
||||
row_headers = [{ values: [], kind: 'grand_total' }]
|
||||
row_headers = CountsPivotLayout.headers([[]], [], axis_count: 0,
|
||||
other_count: axes.columns.length).map { _1.merge(kind: 'grand_total') }
|
||||
end
|
||||
column_headers = CountsPivotLayout.headers(column_values, column_depths,
|
||||
grand: axes.columns.any?)
|
||||
grand: axes.columns.any?, axis_count: axes.columns.length,
|
||||
other_count: axes.rows.length, direction: :column)
|
||||
if axes.columns.empty? && axes.rows.any?
|
||||
column_headers = [{ values: [], kind: 'grand_total' }]
|
||||
column_headers = CountsPivotLayout.headers([[]], [], axis_count: 0,
|
||||
other_count: axes.rows.length, direction: :column)
|
||||
.map { _1.merge(kind: 'grand_total') }
|
||||
end
|
||||
totals = CountsPivotTotals.new(population, axes, row_headers, column_headers).call
|
||||
{ group_count: total,
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする