Skip to content
Snippets Groups Projects
Commit e3a0bc16 authored by Tom Robinson's avatar Tom Robinson
Browse files

Don't show raw data aggregation in metric creation

parent 6aefcaf9
No related branches found
No related tags found
No related merge requests found
......@@ -472,7 +472,7 @@ export function addValidOperatorsToFields(table) {
for (let field of table.fields) {
field.valid_operators = getOperators(field, table);
}
table.aggregation_options = getAggregators(table);
table.aggregation_options = getAggregatorsWithFields(table);
table.breakout_options = getBreakouts(table.fields);
return table;
}
......
......@@ -7,7 +7,7 @@ import Popover from "metabase/components/Popover.jsx";
import Query from "metabase/lib/query";
import { AggregationClause } from "metabase/lib/query";
import { getAggregator, getAggregatorsWithFields } from "metabase/lib/schema_metadata";
import { getAggregator } from "metabase/lib/schema_metadata";
import cx from "classnames";
import _ from "underscore";
......@@ -31,17 +31,6 @@ export default class AggregationWidget extends Component {
updateAggregation: PropTypes.func.isRequired
};
componentWillMount() {
this.componentWillReceiveProps(this.props);
}
componentWillReceiveProps(newProps) {
this.setState({
availableAggregations: getAggregatorsWithFields(newProps.tableMetadata)
});
}
setAggregation(aggregation) {
this.props.updateAggregation(aggregation);
}
......@@ -104,7 +93,7 @@ export default class AggregationWidget extends Component {
>
<AggregationPopover
aggregation={aggregation}
availableAggregations={this.state.availableAggregations}
availableAggregations={tableMetadata.aggregation_options}
tableMetadata={tableMetadata}
customFields={this.props.customFields}
onCommitAggregation={this.setAggregation}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment