Allow to show multiple tags with annotations with InfluxDB datasource #4550

merged 2 commits into from Dec 12, 2016


None yet

6 participants


Fix the problem when using InfluxDB as backend that selecting multiple tags for annotations were not working.
influx multiple tags annotations

@adrianlzt adrianlzt Allow to show multiple tags with annotations with InfluxDB datasource
CLAassistant commented Apr 4, 2016 edited

CLA assistant check
All committers have signed the CLA.

@bergquist bergquist assigned bergquist and unassigned bergquist Apr 8, 2016
isavcic commented Oct 19, 2016

Any info on whether and when this is going to be merged? Currently, the InfluxDB Annotations are of somewhat limited functionality because this is missing.

@adrianlzt can you please provide some details on how you've set up the Annotation when using this code (a screenshot would do)? Also, sorry for the off-topic question, but how did you add a link to the annotation? Thanks!

> select * from cpu
name: cpu
time            city    country text        title       value
1476973144203690596 madrid  spain   some text   the title   1

captura de pantalla de 2016-10-20 17-52-23
captura de pantalla de 2016-10-20 17-53-44

isavcic commented Oct 20, 2016

@adrianlzt amazing, thank you very much!

@bergquist bergquist self-assigned this Nov 1, 2016
var textCol = null;
_.each(series.columns, function(column, index) {
if (column === 'time') { timeCol = index; return; }
if (column === 'sequence_number') { return; }
if (!titleCol) { titleCol = index; }
if (column === self.annotation.titleColumn) { titleCol = index; return; }
- if (column === self.annotation.tagsColumn) { tagsCol = index; return; }
+ if (self.annotation.tagsColumn.includes(column)) { tagsCol.push(index); return; }
torkelo Dec 7, 2016 Member

includes seems like a very imprecise way to check here, tagsColumn should be split before so a property exact match can be made

@adrianlzt adrianlzt Better match for culumn inside tagsColumn
isavcic commented Dec 8, 2016

@adrianlzt can you also please tell me how does one create a link in the annotation pop-up? Thanks again for all the feedback.


Just insert html code in the text field:

<a href="">link</a>
@bergquist bergquist merged commit 395b834 into grafana:master Dec 12, 2016

1 of 2 checks passed

ci/circleci Your tests failed on CircleCI
licence/cla Contributor License Agreement is signed.

Thank you for contributing!

amotl commented Jan 16, 2017

This works perfectly, thanks! We just want to mention a minor thing: If one of the database fields which are designated for holding "tags" contains an empty value, a crippled badge is displayed, like that:


@amotl fixed in #7289

amotl commented Jan 18, 2017

That was quick, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment