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
00a07c85
Commit
00a07c85
authored
Mar 27, 2019
by
Šimon Podlipský
Committed by
Torkel Ödegaard
Mar 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Table Panel and string values & numeric formatting (#16249)
parent
ad6b11c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
public/app/plugins/panel/table/renderer.ts
+1
-1
public/app/plugins/panel/table/specs/renderer.test.ts
+6
-1
No files found.
public/app/plugins/panel/table/renderer.ts
View file @
00a07c85
...
...
@@ -177,7 +177,7 @@ export class TableRenderer {
return
'-'
;
}
if
(
_
.
isString
(
v
)
||
_
.
isArray
(
v
))
{
if
(
isNaN
(
v
)
||
_
.
isArray
(
v
))
{
return
this
.
defaultCellFormatter
(
v
,
column
.
style
);
}
...
...
public/app/plugins/panel/table/specs/renderer.test.ts
View file @
00a07c85
...
...
@@ -224,7 +224,12 @@ describe('when rendering table', () => {
expect
(
html
).
toBe
(
'<td>1.230 s</td>'
);
});
it
(
'number style should ignore string values'
,
()
=>
{
it
(
'number column should format numeric string values'
,
()
=>
{
const
html
=
renderer
.
renderCell
(
1
,
0
,
'1230'
);
expect
(
html
).
toBe
(
'<td>1.230 s</td>'
);
});
it
(
'number style should ignore string non-numeric values'
,
()
=>
{
const
html
=
renderer
.
renderCell
(
1
,
0
,
'asd'
);
expect
(
html
).
toBe
(
'<td>asd</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