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
55af92eb
Commit
55af92eb
authored
Jan 17, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(table): fixes broken annotation rendering
closes #7268
parent
2dd1eb81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
public/app/plugins/panel/table/specs/transformers_specs.ts
+10
-8
public/app/plugins/panel/table/transformers.ts
+3
-3
No files found.
public/app/plugins/panel/table/specs/transformers_specs.ts
View file @
55af92eb
...
...
@@ -153,14 +153,16 @@ describe('when transforming time series table', () => {
describe
(
'Annnotations'
,
()
=>
{
var
panel
=
{
transform
:
'annotations'
};
var
rawData
=
[
{
min
:
1000
,
text
:
'hej'
,
tags
:
[
'tags'
,
'asd'
],
title
:
'title'
,
}
];
var
rawData
=
{
annotations
:
[
{
min
:
1000
,
text
:
'hej'
,
tags
:
[
'tags'
,
'asd'
],
title
:
'title'
,
}
]
};
beforeEach
(()
=>
{
table
=
transformDataToTable
(
rawData
,
panel
);
...
...
public/app/plugins/panel/table/transformers.ts
View file @
55af92eb
...
...
@@ -125,12 +125,12 @@ transformers['annotations'] = {
model
.
columns
.
push
({
text
:
'Text'
});
model
.
columns
.
push
({
text
:
'Tags'
});
if
(
!
data
||
data
.
length
===
0
)
{
if
(
!
data
||
!
data
.
annotations
||
data
.
annotations
.
length
===
0
)
{
return
;
}
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
var
evt
=
data
[
i
];
for
(
var
i
=
0
;
i
<
data
.
annotations
.
length
;
i
++
)
{
var
evt
=
data
.
annotations
[
i
];
model
.
rows
.
push
([
evt
.
min
,
evt
.
title
,
evt
.
text
,
evt
.
tags
]);
}
}
...
...
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