mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
This reverts commit b47f5433d7
.
This commit is contained in:
parent
1696a9abee
commit
ff60f39e96
@ -16,7 +16,7 @@
|
|||||||
"gnetId": null,
|
"gnetId": null,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
"id": null,
|
"id": null,
|
||||||
"iteration": 1646409057541,
|
"iteration": 1601526910610,
|
||||||
"links": [
|
"links": [
|
||||||
{
|
{
|
||||||
"icon": "external link",
|
"icon": "external link",
|
||||||
@ -73,61 +73,6 @@
|
|||||||
"timeShift": null,
|
"timeShift": null,
|
||||||
"title": "${custom.text}",
|
"title": "${custom.text}",
|
||||||
"type": "text"
|
"type": "text"
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 4,
|
|
||||||
"gridPos": {
|
|
||||||
"h": 9,
|
|
||||||
"w": 9,
|
|
||||||
"x": 12,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"type": "stat",
|
|
||||||
"title": "Panel Title",
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"color": {
|
|
||||||
"mode": "thresholds"
|
|
||||||
},
|
|
||||||
"links": [
|
|
||||||
{
|
|
||||||
"title": "Var Link",
|
|
||||||
"url": "/d/vmie2cmWz/bar-gauge-demo?var-custom=$custom"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"options": {
|
|
||||||
"reduceOptions": {
|
|
||||||
"values": false,
|
|
||||||
"calcs": [
|
|
||||||
"lastNotNull"
|
|
||||||
],
|
|
||||||
"fields": ""
|
|
||||||
},
|
|
||||||
"orientation": "auto",
|
|
||||||
"textMode": "auto",
|
|
||||||
"colorMode": "value",
|
|
||||||
"graphMode": "area",
|
|
||||||
"justifyMode": "auto"
|
|
||||||
},
|
|
||||||
"pluginVersion": "8.5.0-pre",
|
|
||||||
"datasource": null
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"schemaVersion": 26,
|
"schemaVersion": 26,
|
||||||
@ -167,11 +112,6 @@
|
|||||||
"selected": false,
|
"selected": false,
|
||||||
"text": "p3",
|
"text": "p3",
|
||||||
"value": "p3"
|
"value": "p3"
|
||||||
},
|
|
||||||
{
|
|
||||||
"selected": false,
|
|
||||||
"text": "p4",
|
|
||||||
"value": "test%25value"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"query": "p1,p2,p3",
|
"query": "p1,p2,p3",
|
||||||
|
@ -34,7 +34,7 @@ e2e.scenario({
|
|||||||
expect(links).to.have.length.greaterThan(13);
|
expect(links).to.have.length.greaterThan(13);
|
||||||
|
|
||||||
for (let index = 0; index < links.length; index++) {
|
for (let index = 0; index < links.length; index++) {
|
||||||
expect(Cypress.$(links[index]).attr('href')).contains(`var-custom=${encodeURI(variableValue)}`);
|
expect(Cypress.$(links[index]).attr('href')).contains(`var-custom=${variableValue}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -44,14 +44,6 @@ e2e.scenario({
|
|||||||
// verify all links, should have All value
|
// verify all links, should have All value
|
||||||
verifyLinks('All');
|
verifyLinks('All');
|
||||||
|
|
||||||
// Data links should percent encode var values
|
|
||||||
e2e()
|
|
||||||
.get('[aria-label="Data link"]')
|
|
||||||
.should('exist')
|
|
||||||
.and((link) => {
|
|
||||||
expect(link.attr('href')).contains(encodeURI('test%25value'));
|
|
||||||
});
|
|
||||||
|
|
||||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click();
|
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click();
|
||||||
|
|
||||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('p2').should('be.visible').click();
|
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('p2').should('be.visible').click();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
ApplyFieldOverrideOptions,
|
ApplyFieldOverrideOptions,
|
||||||
DataFrame,
|
DataFrame,
|
||||||
|
DataLink,
|
||||||
DisplayProcessor,
|
DisplayProcessor,
|
||||||
DisplayValue,
|
DisplayValue,
|
||||||
DynamicConfigValue,
|
DynamicConfigValue,
|
||||||
@ -352,7 +353,7 @@ export const getLinksSupplier =
|
|||||||
const timeRangeUrl = locationUtil.getTimeRangeUrlParams();
|
const timeRangeUrl = locationUtil.getTimeRangeUrlParams();
|
||||||
const { timeField } = getTimeField(frame);
|
const { timeField } = getTimeField(frame);
|
||||||
|
|
||||||
return field.config.links.map((link) => {
|
return field.config.links.map((link: DataLink) => {
|
||||||
const variablesQuery = locationUtil.getVariablesUrlParams();
|
const variablesQuery = locationUtil.getVariablesUrlParams();
|
||||||
let dataFrameVars = {};
|
let dataFrameVars = {};
|
||||||
let valueVars = {};
|
let valueVars = {};
|
||||||
@ -438,7 +439,7 @@ export const getLinksSupplier =
|
|||||||
}
|
}
|
||||||
|
|
||||||
let href = locationUtil.assureBaseUrl(link.url.replace(/\n/g, ''));
|
let href = locationUtil.assureBaseUrl(link.url.replace(/\n/g, ''));
|
||||||
href = replaceVariables(href, variables, encodeURIComponent);
|
href = replaceVariables(href, variables);
|
||||||
href = locationUtil.processUrl(href);
|
href = locationUtil.processUrl(href);
|
||||||
|
|
||||||
const info: LinkModel<Field> = {
|
const info: LinkModel<Field> = {
|
||||||
|
Loading…
Reference in New Issue
Block a user