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
6092fa4d
Commit
6092fa4d
authored
Oct 29, 2018
by
Anton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug with background color in table cell with link
parent
a0aaf700
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
public/app/plugins/panel/table/renderer.ts
+7
-6
No files found.
public/app/plugins/panel/table/renderer.ts
View file @
6092fa4d
...
...
@@ -211,16 +211,17 @@ export class TableRenderer {
value
=
this
.
formatColumnValue
(
columnIndex
,
value
);
const
column
=
this
.
table
.
columns
[
columnIndex
];
let
style
=
''
;
let
cellStyle
=
''
;
let
textStyle
=
''
;
const
cellClasses
=
[];
let
cellClass
=
''
;
if
(
this
.
colorState
.
cell
)
{
s
tyle
=
' style="background-color:'
+
this
.
colorState
.
cell
+
'"'
;
cellS
tyle
=
' style="background-color:'
+
this
.
colorState
.
cell
+
'"'
;
cellClasses
.
push
(
'table-panel-color-cell'
);
this
.
colorState
.
cell
=
null
;
}
else
if
(
this
.
colorState
.
value
)
{
s
tyle
=
' style="color:'
+
this
.
colorState
.
value
+
'"'
;
textS
tyle
=
' style="color:'
+
this
.
colorState
.
value
+
'"'
;
this
.
colorState
.
value
=
null
;
}
// because of the fixed table headers css only solution
...
...
@@ -232,7 +233,7 @@ export class TableRenderer {
}
if
(
value
===
undefined
)
{
s
tyle
=
' style="display:none;"'
;
cellS
tyle
=
' style="display:none;"'
;
column
.
hidden
=
true
;
}
else
{
column
.
hidden
=
false
;
...
...
@@ -258,7 +259,7 @@ export class TableRenderer {
cellClasses
.
push
(
'table-panel-cell-link'
);
columnHtml
+=
`
<a href="
${
cellLink
}
" target="
${
cellTarget
}
" data-link-tooltip data-original-title="
${
cellLinkTooltip
}
" data-placement="right"
${
s
tyle
}
>
<a href="
${
cellLink
}
" target="
${
cellTarget
}
" data-link-tooltip data-original-title="
${
cellLinkTooltip
}
" data-placement="right"
${
textS
tyle
}
>
${
value
}
</a>
`
;
...
...
@@ -283,7 +284,7 @@ export class TableRenderer {
cellClass
=
' class="'
+
cellClasses
.
join
(
' '
)
+
'"'
;
}
columnHtml
=
'<td'
+
cellClass
+
s
tyle
+
'>'
+
columnHtml
+
'</td>'
;
columnHtml
=
'<td'
+
cellClass
+
cellS
tyle
+
'>'
+
columnHtml
+
'</td>'
;
return
columnHtml
;
}
...
...
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