Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TSVB] [Rollup] Table tab not working with rollup indexes #83635

Merged
merged 4 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,26 @@
* under the License.
*/

export const METRIC_TYPES = {
PERCENTILE: 'percentile',
PERCENTILE_RANK: 'percentile_rank',
TOP_HIT: 'top_hit',
COUNT: 'count',
DERIVATIVE: 'derivative',
STD_DEVIATION: 'std_deviation',
VARIANCE: 'variance',
SUM_OF_SQUARES: 'sum_of_squares',
CARDINALITY: 'cardinality',
VALUE_COUNT: 'value_count',
AVERAGE: 'avg',
SUM: 'sum',
};
// We should probably use METRIC_TYPES from data plugin in future.
export enum METRIC_TYPES {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

PERCENTILE = 'percentile',
PERCENTILE_RANK = 'percentile_rank',
TOP_HIT = 'top_hit',
COUNT = 'count',
DERIVATIVE = 'derivative',
STD_DEVIATION = 'std_deviation',
VARIANCE = 'variance',
SUM_OF_SQUARES = 'sum_of_squares',
CARDINALITY = 'cardinality',
VALUE_COUNT = 'value_count',
AVERAGE = 'avg',
SUM = 'sum',
}

// We should probably use BUCKET_TYPES from data plugin in future.
export enum BUCKET_TYPES {
TERMS = 'terms',
}

export const EXTENDED_STATS_TYPES = [
METRIC_TYPES.STD_DEVIATION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ import {
import { FormattedMessage } from '@kbn/i18n/react';
import { QueryBarWrapper } from '../query_bar_wrapper';
import { getDefaultQueryLanguage } from '../lib/get_default_query_language';
import { VisDataContext } from './../../contexts/vis_data_context';
import { BUCKET_TYPES } from '../../../../common/metric_types';
export class TablePanelConfig extends Component {
static contextType = VisDataContext;
constructor(props) {
super(props);
this.state = { selectedTab: 'data' };
Expand Down Expand Up @@ -120,6 +123,8 @@ export class TablePanelConfig extends Component {
value={model.pivot_id}
indexPattern={model.index_pattern}
onChange={this.handlePivotChange}
uiRestrictions={this.context.uiRestrictions}
type={BUCKET_TYPES.TERMS}
fullWidth
/>
</EuiFormRow>
Expand Down