Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Adding links to graph panel #192

Merged
merged 3 commits into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion grafonnet/graph_panel.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
legend_sortDesc=null,
aliasColors={},
thresholds=[],
links=[],
logBase1Y=1,
logBase2Y=1,
transparent=false,
Expand Down Expand Up @@ -172,7 +173,7 @@
[if repeatDirection != null then 'repeatDirection']: repeatDirection,
seriesOverrides: [],
thresholds: thresholds,
links: [],
links: links,
yaxe(
format='short',
min=null,
Expand Down
1 change: 1 addition & 0 deletions tests/graph_panel/test.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ local graphPanel = grafana.graphPanel;
legend_hideZero=true,
value_type='cumulative',
thresholds=[{ colorMode: 'critical', fill: true, line: true, op: 'lt', value: 5 }],
links=[{ targetBlank: true, title: 'foolink', url: 'https://example.com' }],
logBase1Y=2,
transparent=true,
shared_tooltip=false,
Expand Down
8 changes: 7 additions & 1 deletion tests/graph_panel/test_compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
},
"lines": false,
"linewidth": 2,
"links": [ ],
"links": [
{
"targetBlank": true,
"title": "foolink",
"url": "https://example.com"
}
],
"minSpan": 9,
"nullPointMode": "nullAsZero",
"percentage": false,
Expand Down