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
96bd66e8
Commit
96bd66e8
authored
May 27, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the annotation tags support more cross datasource compatible
parent
494ede5b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
public/app/directives/annotationTooltip.js
+12
-3
public/app/plugins/datasource/graphite/datasource.js
+1
-8
No files found.
public/app/directives/annotationTooltip.js
View file @
96bd66e8
...
...
@@ -3,7 +3,7 @@ define([
'jquery'
,
'lodash'
],
function
(
angular
,
$
)
{
function
(
angular
,
$
,
_
)
{
'use strict'
;
angular
...
...
@@ -23,8 +23,17 @@ function (angular, $) {
tooltip
+=
text
.
replace
(
/
\n
/g
,
'<br>'
)
+
'<br>'
;
}
if
(
event
.
tags
&&
event
.
tags
.
length
>
0
)
{
tooltip
+=
'<span class="label label-tag" ng-repeat="tag in event.tags" tag-color-from-name="tag">{{tag}}</span><br/>'
;
var
tags
=
event
.
tags
;
if
(
_
.
isString
(
event
.
tags
))
{
tags
=
event
.
tags
.
split
(
','
);
if
(
tags
.
length
===
1
)
{
tags
=
event
.
tags
.
split
(
' '
);
}
}
if
(
tags
&&
tags
.
length
)
{
scope
.
tags
=
tags
;
tooltip
+=
'<span class="label label-tag" ng-repeat="tag in tags" tag-color-from-name="tag">{{tag}}</span><br/>'
;
}
tooltip
+=
"</div>"
;
...
...
public/app/plugins/datasource/graphite/datasource.js
View file @
96bd66e8
...
...
@@ -111,19 +111,12 @@ function (angular, _, $, config, kbn, moment) {
var
list
=
[];
for
(
var
i
=
0
;
i
<
results
.
data
.
length
;
i
++
)
{
var
e
=
results
.
data
[
i
];
var
tags
=
[];
if
(
e
.
tags
)
{
tags
=
e
.
tags
.
split
(
','
);
if
(
tags
.
length
===
1
)
{
tags
=
e
.
tags
.
split
(
' '
);
}
}
list
.
push
({
annotation
:
annotation
,
time
:
e
.
when
*
1000
,
title
:
e
.
what
,
tags
:
tags
,
tags
:
e
.
tags
,
text
:
e
.
data
});
}
...
...
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