Skip to content

Commit

Permalink
[tabify] added notes about what the differnt writer flags do
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Alger committed Nov 16, 2014
1 parent 9710c83 commit 04fc0af
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion src/kibana/components/agg_response/tabify/_response_writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,24 @@ define(function (require) {
this.rowBuffer = [];

var visIsHier = vis.isHierarchical();

// do the options allow for splitting? we will only split if true and
// tabify calls the split method.
this.canSplit = this.opts.canSplit !== false;

// should we allow partial rows to be included in the tables? if a
// partial row is found, it is filled with empty strings ''
this.partialRows = this.opts.partialRows == null ? visIsHier : this.opts.partialRows;

// if true, we will not place metric columns after every bucket
// even if the vis is hierarchical. if false, and the vis is
// hierarchical, then we will display metric columns after
// every bucket col
this.minimalColumns = visIsHier ? !!this.opts.minimalColumns : true;
this.metricsAtEachLevel = visIsHier;

// true if we can expect metrics to have been calculated
// for every bucket
this.metricsForAllBuckets = visIsHier;

this.columns = getColumns(vis, this.minimalColumns);
this.aggStack = _.pluck(this.columns, 'aggConfig');
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/components/agg_response/tabify/tabify.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ define(function (require) {
});
});
}
} else if (write.partialRows && write.metricsAtEachLevel && write.minimalColumns) {
} else if (write.partialRows && write.metricsForAllBuckets && write.minimalColumns) {
// we don't have any buckets, but we do have metrics at this
// level, then pass all the empty buckets and jump back in for
// the metrics.
Expand Down

0 comments on commit 04fc0af

Please sign in to comment.