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

Panel error "e.toLowerCase is not a function" when hovering over PD annotations (Grafana v8.1.2) #24

Closed
Neil-Spek opened this issue Sep 24, 2021 · 3 comments

Comments

@Neil-Spek
Copy link

Neil-Spek commented Sep 24, 2021

Grafana version: 8.1.2
PagerDuty plugin version: 0.2.2
Browser: Chrome: 94.0.4606.61 (Official Build)
Affected chart type: Time series

Underlying error:
angular.js:15697 TypeError: e.toLowerCase is not a function
at O (tags.ts:70)
at M (tags.ts:8)
at Object.link (tags.ts:17)
at angular.js:1391
at angular.js:11370
at Pt (angular.js:11376)
at at (angular.js:10695)
at angular.js:9942
at angular.js:9807
at angular.js:10221 ''

image

Exploring the DOM I have noticed (within datasource.js) the incident object has a tags property which contains a list of items, however the item: d.incident_number is of type integer causing failure upon hover over of the annotation as the toLowerCase function is expecting a string.

Suggested fix:
Change to line:98 of datasource.js as follows:

Original line tags: [d.type, d.incident_key, d.incident_number, d.status, d.service.id],
to be replaced with tags: [d.type, d.incident_key, d.incident_number.toString(), d.status, d.service.id],

@pavelpikatamcs
Copy link

@xginn8 can this be released please? I installed the plugin just now, and it still has this error

@TylerLubeck
Copy link

Echoing @pavelpikatamcs - would you mind uploading this to the grafana marketplace as well?

@dabernasty
Copy link

@xginn8 would love to have this update on the Grafana.com repository of plugins -- can you please upload? Heres some instructions on the required process: https://grafana.com/docs/grafana/latest/developers/plugins/package-a-plugin/#maintain-your-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants