Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
6f9c3062
Commit
6f9c3062
authored
Sep 22, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(singlestat): fixed usage of template variable in drilldown link for singlestat, fixes #2787
parent
c369350c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
public/app/panels/singlestat/singleStatPanel.js
+13
-8
No files found.
public/app/panels/singlestat/singleStatPanel.js
View file @
6f9c3062
...
...
@@ -15,7 +15,7 @@ function (angular, app, _, $) {
return
{
link
:
function
(
scope
,
elem
)
{
var
data
,
panel
;
var
data
,
panel
,
linkInfo
;
var
$panelContainer
=
elem
.
parents
(
'.panel-container'
);
scope
.
$on
(
'render'
,
function
()
{
...
...
@@ -170,10 +170,16 @@ function (angular, app, _, $) {
}
elem
.
toggleClass
(
'pointer'
,
panel
.
links
.
length
>
0
);
if
(
panel
.
links
.
length
>
0
)
{
linkInfo
=
linkSrv
.
getPanelLinkAnchorInfo
(
panel
.
links
[
0
],
scope
.
panel
.
scopedVars
);
}
else
{
linkInfo
=
null
;
}
}
// drilldown link tooltip
var
drilldownTooltip
=
$
(
'<div id="tooltip" class="">
g
ello</div>"'
);
var
drilldownTooltip
=
$
(
'<div id="tooltip" class="">
h
ello</div>"'
);
elem
.
mouseleave
(
function
()
{
if
(
panel
.
links
.
length
===
0
)
{
return
;}
...
...
@@ -181,10 +187,9 @@ function (angular, app, _, $) {
});
elem
.
click
(
function
()
{
if
(
panel
.
links
.
length
===
0
)
{
return
;
}
var
link
=
panel
.
links
[
0
];
var
linkInfo
=
linkSrv
.
getPanelLinkAnchorInfo
(
link
,
scope
.
panel
.
scopedVars
);
if
(
panel
.
links
[
0
].
targetBlank
)
{
if
(
!
linkInfo
)
{
return
;
}
if
(
linkInfo
.
target
===
'_blank'
)
{
var
redirectWindow
=
window
.
open
(
linkInfo
.
href
,
'_blank'
);
redirectWindow
.
location
;
return
;
...
...
@@ -202,9 +207,9 @@ function (angular, app, _, $) {
});
elem
.
mousemove
(
function
(
e
)
{
if
(
panel
.
links
.
length
===
0
)
{
return
;}
if
(
!
linkInfo
)
{
return
;}
drilldownTooltip
.
text
(
'click to go to: '
+
panel
.
links
[
0
]
.
title
);
drilldownTooltip
.
text
(
'click to go to: '
+
linkInfo
.
title
);
drilldownTooltip
.
place_tt
(
e
.
pageX
+
20
,
e
.
pageY
-
15
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment