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
44f06439
Commit
44f06439
authored
Oct 13, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(alerting): different colored lines/icons for alert annotations based on state, #6244
parent
fa492c68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
public/app/plugins/panel/graph/graph.ts
+22
-0
No files found.
public/app/plugins/panel/graph/graph.ts
View file @
44f06439
...
@@ -384,10 +384,32 @@ module.directive('grafanaGraph', function($rootScope, timeSrv) {
...
@@ -384,10 +384,32 @@ module.directive('grafanaGraph', function($rootScope, timeSrv) {
if
(
!
annotations
||
annotations
.
length
===
0
)
{
if
(
!
annotations
||
annotations
.
length
===
0
)
{
return
;
return
;
}
}
console
.
log
(
annotations
);
var
types
=
{};
var
types
=
{};
types
[
'$__alerting'
]
=
{
color
:
'rgba(237, 46, 24, 1)'
,
position
:
'BOTTOM'
,
markerSize
:
5
,
};
types
[
'$__ok'
]
=
{
color
:
'rgba(11, 237, 50, 1)'
,
position
:
'BOTTOM'
,
markerSize
:
5
,
};
types
[
'$__nodata'
]
=
{
color
:
'rgba(150, 150, 150, 1)'
,
position
:
'BOTTOM'
,
markerSize
:
5
,
};
for
(
var
i
=
0
;
i
<
annotations
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
annotations
.
length
;
i
++
)
{
var
item
=
annotations
[
i
];
var
item
=
annotations
[
i
];
if
(
item
.
newState
)
{
console
.
log
(
item
.
newState
);
item
.
eventType
=
'$__'
+
item
.
newState
;
continue
;
}
if
(
!
types
[
item
.
source
.
name
])
{
if
(
!
types
[
item
.
source
.
name
])
{
types
[
item
.
source
.
name
]
=
{
types
[
item
.
source
.
name
]
=
{
...
...
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