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
593f2e08
Commit
593f2e08
authored
Apr 29, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1903 from craftytrickster/influx09-annotation-bugfix
Fixed Annotations with InfluxDb9 Datasources
parents
67fbb173
e5844afb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
+10
-14
public/app/plugins/datasource/influxdb/influxSeries.js
+8
-13
public/app/plugins/datasource/influxdb/plugin.json
+2
-1
No files found.
public/app/plugins/datasource/influxdb/influxSeries.js
View file @
593f2e08
...
@@ -5,7 +5,8 @@ function (_) {
...
@@ -5,7 +5,8 @@ function (_) {
'use strict'
;
'use strict'
;
function
InfluxSeries
(
options
)
{
function
InfluxSeries
(
options
)
{
this
.
seriesList
=
options
.
seriesList
;
this
.
seriesList
=
options
.
seriesList
&&
options
.
seriesList
.
results
&&
options
.
seriesList
.
results
.
length
>
0
?
options
.
seriesList
.
results
[
0
].
series
||
[]
:
[];
this
.
alias
=
options
.
alias
;
this
.
alias
=
options
.
alias
;
this
.
annotation
=
options
.
annotation
;
this
.
annotation
=
options
.
annotation
;
}
}
...
@@ -17,12 +18,10 @@ function (_) {
...
@@ -17,12 +18,10 @@ function (_) {
var
self
=
this
;
var
self
=
this
;
console
.
log
(
self
.
seriesList
);
console
.
log
(
self
.
seriesList
);
if
(
!
self
.
seriesList
||
!
self
.
seriesList
.
results
||
!
self
.
seriesList
.
results
[
0
]
)
{
if
(
self
.
seriesList
.
length
===
0
)
{
return
output
;
return
output
;
}
}
this
.
seriesList
=
self
.
seriesList
.
results
[
0
].
series
;
_
.
each
(
self
.
seriesList
,
function
(
series
)
{
_
.
each
(
self
.
seriesList
,
function
(
series
)
{
var
datapoints
=
[];
var
datapoints
=
[];
for
(
var
i
=
0
;
i
<
series
.
values
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
series
.
values
.
length
;
i
++
)
{
...
@@ -63,19 +62,15 @@ function (_) {
...
@@ -63,19 +62,15 @@ function (_) {
if
(
column
===
self
.
annotation
.
textColumn
)
{
textCol
=
index
;
return
;
}
if
(
column
===
self
.
annotation
.
textColumn
)
{
textCol
=
index
;
return
;
}
});
});
_
.
each
(
series
.
points
,
function
(
point
)
{
_
.
each
(
series
.
values
,
function
(
value
)
{
var
data
=
{
var
data
=
{
annotation
:
self
.
annotation
,
annotation
:
self
.
annotation
,
time
:
point
[
timeCol
]
,
time
:
+
new
Date
(
value
[
timeCol
])
,
title
:
point
[
titleCol
],
title
:
value
[
titleCol
],
tags
:
point
[
tagsCol
],
tags
:
value
[
tagsCol
],
text
:
point
[
textCol
]
text
:
value
[
textCol
]
};
};
if
(
tagsCol
)
{
data
.
tags
=
point
[
tagsCol
];
}
list
.
push
(
data
);
list
.
push
(
data
);
});
});
});
});
...
...
public/app/plugins/datasource/influxdb/plugin.json
View file @
593f2e08
...
@@ -13,5 +13,6 @@
...
@@ -13,5 +13,6 @@
"annotations"
:
"app/plugins/datasource/influxdb/partials/annotations.editor.html"
"annotations"
:
"app/plugins/datasource/influxdb/partials/annotations.editor.html"
},
},
"metrics"
:
true
"metrics"
:
true
,
"annotations"
:
true
}
}
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