Merge pull request #3379 from influxdata/fixes/missing-tag-values

TagKeyDropdown uses source provided by props instead of context
pull/3389/head
Brandon Farmer 2018-05-04 15:45:08 -07:00 committed by GitHub
commit 5b9696ec28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -53,12 +53,10 @@ class TagKeyDropdown extends Component {
tagKey,
onSelectTagKey,
onErrorThrown,
} = this.props
const {
source: {
links: {proxy},
},
} = this.context
} = this.props
try {
const {data} = await showTagKeys({source: proxy, database, measurement})
@ -78,15 +76,12 @@ class TagKeyDropdown extends Component {
const {func, shape, string} = PropTypes
TagKeyDropdown.contextTypes = {
TagKeyDropdown.propTypes = {
source: shape({
links: shape({
proxy: string.isRequired,
}).isRequired,
}).isRequired,
}
TagKeyDropdown.propTypes = {
database: string.isRequired,
measurement: string.isRequired,
tagKey: string,

View File

@ -90,6 +90,7 @@ const TemplateQueryBuilder = ({
<span className="tvm-query-builder--text">WITH KEY =</span>
{selectedMeasurement ? (
<TagKeyDropdown
source={source}
database={selectedDatabase}
measurement={selectedMeasurement}
tagKey={selectedTagKey}