Releases: emit a pre-rendered link field so annotation tooltips can show clickable links
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
Direzione di ricerca
Inizia in pkg/github/releases.go, dove il frame Releases attualmente emette l’URL e gli altri campi della release; esamina il formato del link HTML o markdown richiesto e il comportamento circostante delle annotazioni descritto in AnnotationTooltip2.tsx e standardAnnotationSupport.ts. Il lavoro è completato quando il frame Releases espone un campo link pre-renderizzato e selezionabile il cui valore collega all’URL della release con un’etichetta descrittiva.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Use case
We use the Releases query type as a Grafana annotation source on dashboards, so deploys of a service show up as vertical markers on every panel. The natural next step from a marker is "take me to the release notes on GitHub" — i.e. a clickable link in the annotation tooltip pointing at the release page.
Current behavior
The Releases frame exposes a url field containing the release page URL (e.g. https://github.com/org/repo/releases/tag/v1). With the annotation mapping
"mappings": {
"time": { "source": "field", "value": "published_at" },
"text": { "source": "field", "value": "url" }
}
the tooltip shows the URL as plain text. It is not clickable.
Why the obvious workarounds don't apply
- Grafana's annotation tooltip (
AnnotationTooltip2.tsx) renders thetextfield viadangerouslySetInnerHTML={{ __html: textUtil.sanitize(text) }}and the surrounding CSS even stylesaelements. So an HTML anchor like<a href="...">v2026.05.29.2</a>intextwould render as a clickable link. - However, the GitHub plugin's Releases frame (
pkg/github/releases.go) only emits plain string fields (name,tag,url, …). - Grafana's standard annotation mapping (
standardAnnotationSupport.ts) lets the user pick one field per annotation key (time,text,tags, …) — there is no template/concat support, so a user cannot produce<a href="{url}">{tag}</a>from the existing fields.
The net effect: there is no user-side configuration that makes the link clickable.
Requested change
Add one or more pre-formatted link fields to the Releases frame, e.g.:
html_link— HTML anchor:<a href="{url}">{tag}</a>(or{name}if non-empty, falling back to{tag})markdown_link— markdown:[{tag}]({url})
Either is sufficient on its own. HTML is the safer bet because the annotation tooltip renders HTML directly; markdown would only help in places that run a markdown renderer.
Users could then pick html_link (or markdown_link) as the annotation text field and get a clickable, descriptively-labelled link in the tooltip.
Scope
Releases is the immediate need (release annotations are a very common use case), but the same applies to:
- Tags
- Commits
- Pull requests
- Issues
…all of which are commonly used as annotation sources and all of which expose a URL but not a pre-formatted link.
Alternatives considered
- Switch to the Infinity datasource to call the GitHub REST API and synthesize an
html_linkcolumn — needs a GitHub PAT configured per Grafana instance and re-implements pagination, caching, etc. that this plugin already handles. - Auto-linkify bare URLs in Grafana itself — would have to be filed against
grafana/grafana, has wider implications, and doesn't help users who wanttagas the link label rather than the raw URL.
A pre-rendered link field on the existing frame is the smallest, most local fix.
Environment
- Grafana 12.3.3
- grafana-github-datasource (latest at time of filing)
- Lingua principale
- Go
- Stelle
- 311
- Fork
- 72
- Merge medio
- 10g 1h
- PR unite (30g)
- 1
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di grafana/github-datasource
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
grafana/github-datasource#796 · 2 commenti ·
-
Bug: Workflow_Runs query type consistently returns 0 rows when same URL+token directly returns dataAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
grafana/github-datasource#774 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
grafana/github-datasource#528 · 4 commenti ·
-
Dependency DashboardAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 12/100
grafana/github-datasource#523 ·
-
prio/medium type/docs
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
grafana/github-datasource#509 ·
Tutte le issue di grafana/github-datasource
Issue simili
-
area: global bug dx priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
grafana/mcp-grafana#1267 ·
I maintainer di solito rispondono entro 1 giorno
-
automation models
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
coverage-gap good-first-pattern help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
GoogleCloudPlatform/k8s-aibom#114 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
txn2/mcp-data-platform#1984 ·
I maintainer di solito rispondono entro 1 giorno