mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Always open panel links in new window if user asked for it #14333
This commit is contained in:
parent
276f2567ee
commit
8460b48c24
@ -73,6 +73,7 @@ export class LinkSrv {
|
|||||||
|
|
||||||
getPanelLinkAnchorInfo(link, scopedVars) {
|
getPanelLinkAnchorInfo(link, scopedVars) {
|
||||||
const info: any = {};
|
const info: any = {};
|
||||||
|
info.target = link.targetBlank ? '_blank' : '';
|
||||||
if (link.type === 'absolute') {
|
if (link.type === 'absolute') {
|
||||||
info.target = link.targetBlank ? '_blank' : '_self';
|
info.target = link.targetBlank ? '_blank' : '_self';
|
||||||
info.href = this.templateSrv.replace(link.url || '', scopedVars);
|
info.href = this.templateSrv.replace(link.url || '', scopedVars);
|
||||||
@ -80,11 +81,9 @@ export class LinkSrv {
|
|||||||
} else if (link.url) {
|
} else if (link.url) {
|
||||||
info.href = link.url;
|
info.href = link.url;
|
||||||
info.title = this.templateSrv.replace(link.title || '', scopedVars);
|
info.title = this.templateSrv.replace(link.title || '', scopedVars);
|
||||||
info.target = link.targetBlank ? '_blank' : '';
|
|
||||||
} else if (link.dashUri) {
|
} else if (link.dashUri) {
|
||||||
info.href = 'dashboard/' + link.dashUri + '?';
|
info.href = 'dashboard/' + link.dashUri + '?';
|
||||||
info.title = this.templateSrv.replace(link.title || '', scopedVars);
|
info.title = this.templateSrv.replace(link.title || '', scopedVars);
|
||||||
info.target = link.targetBlank ? '_blank' : '';
|
|
||||||
} else {
|
} else {
|
||||||
info.title = this.templateSrv.replace(link.title || '', scopedVars);
|
info.title = this.templateSrv.replace(link.title || '', scopedVars);
|
||||||
const slug = kbn.slugifyForUrl(link.dashboard || '');
|
const slug = kbn.slugifyForUrl(link.dashboard || '');
|
||||||
|
Loading…
Reference in New Issue
Block a user