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
5d166dc8
Commit
5d166dc8
authored
Nov 09, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(tablepanel): added new renderer spec
parent
b8e6fcfe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
public/app/panels/table/renderer.ts
+4
-0
public/app/panels/table/specs/renderer_specs.ts
+5
-0
No files found.
public/app/panels/table/renderer.ts
View file @
5d166dc8
...
...
@@ -48,6 +48,10 @@ export class TableRenderer {
return
'-'
;
}
if
(
_
.
isString
(
v
))
{
return
v
;
}
if
(
style
.
colorMode
)
{
this
.
colorState
[
style
.
colorMode
]
=
this
.
getColorForValue
(
v
,
style
);
}
...
...
public/app/panels/table/specs/renderer_specs.ts
View file @
5d166dc8
...
...
@@ -50,6 +50,11 @@ describe('when rendering table', () => {
expect
(
html
).
to
.
be
(
'<td>1.230 s</td>'
);
});
it
(
'number style should ignore string values'
,
()
=>
{
var
html
=
renderer
.
renderCell
(
1
,
'asd'
);
expect
(
html
).
to
.
be
(
'<td>asd</td>'
);
});
it
(
'colored cell should have style'
,
()
=>
{
var
html
=
renderer
.
renderCell
(
2
,
55
);
expect
(
html
).
to
.
be
(
'<td style="color:orange">55.0</td>'
);
...
...
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