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

Cannot read property 'templateSrv' of undefined #issue - 11904 #12673

Merged
merged 1 commit into from Jul 23, 2018

Conversation

srid12
Copy link
Contributor

@srid12 srid12 commented Jul 20, 2018

  • this is undefined , due to usage of normal callback function.
  • Used arrow function, so as to get correct reference of this.
  • Before this , if we use tags property in graph with open tsdb datasource, throws an error saying
  • Cannot read property 'templateSrv' of undefined

Fixes #11904

@CLAassistant
Copy link

CLAassistant commented Jul 20, 2018

CLA assistant check
All committers have signed the CLA.

@srid12 srid12 changed the title Cannot read property 'templateSrv' of undefined #11904 Cannot read property 'templateSrv' of undefined #issue - 11904 Jul 20, 2018
@torkelo torkelo merged commit 6b07105 into grafana:master Jul 23, 2018
@torkelo torkelo added this to the 5.3 milestone Jul 23, 2018
ryantxu added a commit to NatelEnergy/grafana that referenced this pull request Jul 23, 2018
* grafana/master: (51 commits)
  changing callback fn into arrow functions for correct usage of this (grafana#12673)
  Fix requested changes
  Update CHANGELOG.md
  Add support for interval in query variable
  Change to arrow functions
  Add graph_ctrl jest
  changelog: add notes about closing grafana#12691
  Update kbn.ts
  Add jest test file
  Id validation of CloudWatch GetMetricData
  changelog: adds note for grafana#11487
  Datasource for Grafana logging platform
  fix: postgres/mysql engine cache was not being used, fixes grafana#12636 (grafana#12642)
  added: replaces added to grafana
  fix: datasource search was not working properly
  docs: minor docs fix
  Fix label suggestions in Explore query field
  pluginloader: expose flot gauge plugin
  alert: add missing test after refactor
  Handle query string in storage public_url (grafana#9351) (grafana#12555)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request Jul 23, 2018
* grafana/master: (51 commits)
  changing callback fn into arrow functions for correct usage of this (grafana#12673)
  Fix requested changes
  Update CHANGELOG.md
  Add support for interval in query variable
  Change to arrow functions
  Add graph_ctrl jest
  changelog: add notes about closing grafana#12691
  Update kbn.ts
  Add jest test file
  Id validation of CloudWatch GetMetricData
  changelog: adds note for grafana#11487
  Datasource for Grafana logging platform
  fix: postgres/mysql engine cache was not being used, fixes grafana#12636 (grafana#12642)
  added: replaces added to grafana
  fix: datasource search was not working properly
  docs: minor docs fix
  Fix label suggestions in Explore query field
  pluginloader: expose flot gauge plugin
  alert: add missing test after refactor
  Handle query string in storage public_url (grafana#9351) (grafana#12555)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request Jul 23, 2018
* grafana/master: (51 commits)
  changing callback fn into arrow functions for correct usage of this (grafana#12673)
  Fix requested changes
  Update CHANGELOG.md
  Add support for interval in query variable
  Change to arrow functions
  Add graph_ctrl jest
  changelog: add notes about closing grafana#12691
  Update kbn.ts
  Add jest test file
  Id validation of CloudWatch GetMetricData
  changelog: adds note for grafana#11487
  Datasource for Grafana logging platform
  fix: postgres/mysql engine cache was not being used, fixes grafana#12636 (grafana#12642)
  added: replaces added to grafana
  fix: datasource search was not working properly
  docs: minor docs fix
  Fix label suggestions in Explore query field
  pluginloader: expose flot gauge plugin
  alert: add missing test after refactor
  Handle query string in storage public_url (grafana#9351) (grafana#12555)
  ...
@marefr marefr modified the milestones: 5.3, 5.3.0-beta1 Sep 6, 2018
@Gemini2021
Copy link

thanks for solving this problem。

@ying-jeanne ying-jeanne added the pr/external This PR is from external contributor label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/external This PR is from external contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read property 'templateSrv' of undefined
7 participants