mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
declared any to info in declaration
This commit is contained in:
parent
2dd49e6e50
commit
2f4744ca71
@ -66,26 +66,26 @@ export class LinkSrv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getAnchorInfo(link) {
|
getAnchorInfo(link) {
|
||||||
var info = {};
|
var info: any = {};
|
||||||
(<any>info).href = this.getLinkUrl(link);
|
info.href = this.getLinkUrl(link);
|
||||||
(<any>info).title = this.templateSrv.replace(link.title || '');
|
info.title = this.templateSrv.replace(link.title || '');
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
getPanelLinkAnchorInfo(link, scopedVars) {
|
getPanelLinkAnchorInfo(link, scopedVars) {
|
||||||
var info = {};
|
var info: any = {};
|
||||||
if (link.type === 'absolute') {
|
if (link.type === 'absolute') {
|
||||||
(<any>info).target = link.targetBlank ? '_blank' : '_self';
|
info.target = link.targetBlank ? '_blank' : '_self';
|
||||||
(<any>info).href = this.templateSrv.replace(link.url || '', scopedVars);
|
info.href = this.templateSrv.replace(link.url || '', scopedVars);
|
||||||
(<any>info).title = this.templateSrv.replace(link.title || '', scopedVars);
|
info.title = this.templateSrv.replace(link.title || '', scopedVars);
|
||||||
} else if (link.dashUri) {
|
} else if (link.dashUri) {
|
||||||
(<any>info).href = 'dashboard/' + link.dashUri + '?';
|
info.href = 'dashboard/' + link.dashUri + '?';
|
||||||
(<any>info).title = this.templateSrv.replace(link.title || '', scopedVars);
|
info.title = this.templateSrv.replace(link.title || '', scopedVars);
|
||||||
(<any>info).target = link.targetBlank ? '_blank' : '';
|
info.target = link.targetBlank ? '_blank' : '';
|
||||||
} else {
|
} else {
|
||||||
(<any>info).title = this.templateSrv.replace(link.title || '', scopedVars);
|
info.title = this.templateSrv.replace(link.title || '', scopedVars);
|
||||||
var slug = kbn.slugifyForUrl(link.dashboard || '');
|
var slug = kbn.slugifyForUrl(link.dashboard || '');
|
||||||
(<any>info).href = 'dashboard/db/' + slug + '?';
|
info.href = 'dashboard/db/' + slug + '?';
|
||||||
}
|
}
|
||||||
|
|
||||||
var params = {};
|
var params = {};
|
||||||
@ -100,10 +100,10 @@ export class LinkSrv {
|
|||||||
this.templateSrv.fillVariableValuesForUrl(params, scopedVars);
|
this.templateSrv.fillVariableValuesForUrl(params, scopedVars);
|
||||||
}
|
}
|
||||||
|
|
||||||
(<any>info).href = this.addParamsToUrl((<any>info).href, params);
|
info.href = this.addParamsToUrl(info.href, params);
|
||||||
|
|
||||||
if (link.params) {
|
if (link.params) {
|
||||||
(<any>info).href = this.appendToQueryString((<any>info).href, this.templateSrv.replace(link.params, scopedVars));
|
info.href = this.appendToQueryString(info.href, this.templateSrv.replace(link.params, scopedVars));
|
||||||
}
|
}
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
Loading…
Reference in New Issue
Block a user