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
123739fd
Commit
123739fd
authored
Mar 06, 2019
by
ryan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use props.replaceVariables rather than templateSrv
parent
ea5db929
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
public/app/plugins/panel/table2/TablePanel.tsx
+4
-6
No files found.
public/app/plugins/panel/table2/TablePanel.tsx
View file @
123739fd
...
...
@@ -12,8 +12,6 @@ import { PanelProps } from '@grafana/ui/src/types';
import
{
Options
,
Style
,
Column
,
CellFormatter
}
from
'./types'
;
import
kbn
from
'app/core/utils/kbn'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
interface
Props
extends
PanelProps
<
Options
>
{}
export
class
TablePanel
extends
PureComponent
<
Props
>
{
...
...
@@ -252,8 +250,10 @@ export class TablePanel extends PureComponent<Props> {
const
scopedVars
=
this
.
renderRowVariables
(
rowIndex
);
scopedVars
[
'__cell'
]
=
{
value
:
value
};
const
cellLink
=
templateSrv
.
replace
(
column
.
style
.
linkUrl
,
scopedVars
,
encodeURIComponent
);
const
cellLinkTooltip
=
templateSrv
.
replace
(
column
.
style
.
linkTooltip
,
scopedVars
);
const
{
replaceVariables
}
=
this
.
props
;
const
cellLink
=
replaceVariables
(
column
.
style
.
linkUrl
,
scopedVars
,
encodeURIComponent
);
const
cellLinkTooltip
=
replaceVariables
(
column
.
style
.
linkTooltip
,
scopedVars
);
const
cellTarget
=
column
.
style
.
linkTargetBlank
?
'_blank'
:
''
;
cellClasses
.
push
(
'table-panel-cell-link'
);
...
...
@@ -342,8 +342,6 @@ export class TablePanel extends PureComponent<Props> {
},
};
});
console
.
log
(
templateSrv
);
console
.
log
(
rows
);
}
else
{
return
<
div
>
No Table Data...
</
div
>;
}
...
...
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