From 71a004574efbc52e3252c28ac78b2ea3b0f0630f Mon Sep 17 00:00:00 2001 From: Brandon Farmer Date: Fri, 4 May 2018 15:30:48 -0700 Subject: [PATCH] TagKeyDropdown uses source provided by props instead of context --- ui/src/dashboards/components/TagKeyDropdown.js | 9 ++------- .../template_variables/TemplateQueryBuilder.js | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ui/src/dashboards/components/TagKeyDropdown.js b/ui/src/dashboards/components/TagKeyDropdown.js index 8838c2686..4115bec06 100644 --- a/ui/src/dashboards/components/TagKeyDropdown.js +++ b/ui/src/dashboards/components/TagKeyDropdown.js @@ -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, diff --git a/ui/src/dashboards/components/template_variables/TemplateQueryBuilder.js b/ui/src/dashboards/components/template_variables/TemplateQueryBuilder.js index 2409b9761..198573fd5 100644 --- a/ui/src/dashboards/components/template_variables/TemplateQueryBuilder.js +++ b/ui/src/dashboards/components/template_variables/TemplateQueryBuilder.js @@ -90,6 +90,7 @@ const TemplateQueryBuilder = ({ WITH KEY = {selectedMeasurement ? (