Skip to content
Snippets Groups Projects
Commit 19c08e03 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

add back in time bucketing info on FieldName which went missing.

parent e153fbde
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,8 @@ import React, { Component, PropTypes } from "react";
import Icon from "metabase/components/Icon.jsx";
import Query from "metabase/lib/query";
import { parseFieldTarget } from "metabase/lib/query_time";
import { formatBucketing, parseFieldBucketing, parseFieldTarget } from "metabase/lib/query_time";
import { isDate } from "metabase/lib/schema_metadata";
import { stripId } from "metabase/lib/formatting";
import _ from "underscore";
......@@ -27,6 +27,7 @@ export default class FieldName extends Component {
let targetTitle, fkTitle, fkIcon, bucketingTitle;
let { field, fieldOptions } = this.props;
let bucketing = parseFieldBucketing(field);
field = parseFieldTarget(field);
let fieldDef;
......@@ -47,6 +48,11 @@ export default class FieldName extends Component {
targetTitle = (<span>{fieldDef.display_name}</span>);
}
// if this is a datetime field then add an extra bit of labeling about the time bucket
if (fieldDef && isDate(fieldDef)) {
bucketingTitle = ": " + formatBucketing(bucketing);
}
var titleElement;
if (fkTitle || targetTitle) {
titleElement = <span className="QueryOption">{fkTitle}{fkIcon}{targetTitle}{bucketingTitle}</span>;
......
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