mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard/Links: Fixes open in new window for dashboard link (#24772)
* fixes target in dashboard link
* Update DashboardLinks.tsx
* Revert "Update DashboardLinks.tsx"
This reverts commit 2b23db8dc4
.
This commit is contained in:
parent
319051c70e
commit
7b18b101b4
@ -25,7 +25,11 @@ export const DashboardLinks: FC<Props> = ({ dashboard }) => {
|
||||
}
|
||||
|
||||
const linkElement = (
|
||||
<a className="gf-form-label" href={sanitizeUrl(linkInfo.href)} target={link.target}>
|
||||
<a
|
||||
className="gf-form-label"
|
||||
href={sanitizeUrl(linkInfo.href)}
|
||||
target={link.targetBlank ? '_blank' : '_self'}
|
||||
>
|
||||
<Icon name={iconMap[link.icon] as IconName} />
|
||||
<span>{sanitize(linkInfo.title)}</span>
|
||||
</a>
|
||||
|
@ -45,7 +45,7 @@ export class DashboardsDropdown extends PureComponent<Props, State> {
|
||||
<div className="gf-form">
|
||||
<a
|
||||
className="gf-form-label pointer"
|
||||
target={link.target}
|
||||
target={link.targetBlank ? '_blank' : '_self'}
|
||||
onClick={this.onDropDownClick}
|
||||
data-placement="bottom"
|
||||
data-toggle="dropdown"
|
||||
|
@ -44,7 +44,7 @@ export interface DashboardLink {
|
||||
asDropdown: boolean;
|
||||
tags: [];
|
||||
searchHits?: [];
|
||||
target: string;
|
||||
targetBlank: boolean;
|
||||
}
|
||||
|
||||
export class DashboardModel {
|
||||
|
Loading…
Reference in New Issue
Block a user