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
cd919a3e
Commit
cd919a3e
authored
Aug 30, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #447 from rashidkpc/singleAlerts
Duplicate alerts should not stack up
parents
2e9bdedc
a8abaaf5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
js/services.js
+12
-2
No files found.
js/services.js
View file @
cd919a3e
...
@@ -11,11 +11,21 @@ angular.module('kibana.services', [])
...
@@ -11,11 +11,21 @@ angular.module('kibana.services', [])
this
.
list
=
[];
this
.
list
=
[];
this
.
set
=
function
(
title
,
text
,
severity
,
timeout
)
{
this
.
set
=
function
(
title
,
text
,
severity
,
timeout
)
{
var
_a
=
{
var
_a
=
{
title
:
title
||
''
,
title
:
title
||
''
,
text
:
text
||
''
,
text
:
text
||
''
,
severity
:
severity
||
'info'
,
severity
:
severity
||
'info'
,
};
},
_ca
=
angular
.
toJson
(
_a
),
_clist
=
_
.
map
(
self
.
list
,
function
(
alert
){
return
angular
.
toJson
(
alert
);});
// If we already have this alert, remove it and add a new one
// Why do this instead of skipping the add because it resets the timer
if
(
_
.
contains
(
_clist
,
_ca
))
{
_
.
remove
(
self
.
list
,
_
.
indexOf
(
_clist
,
_ca
));
}
self
.
list
.
push
(
_a
);
self
.
list
.
push
(
_a
);
if
(
timeout
>
0
)
{
if
(
timeout
>
0
)
{
$timeout
(
function
()
{
$timeout
(
function
()
{
...
...
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