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
43f13746
Commit
43f13746
authored
Aug 30, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make alerts unique, wip
parent
78dbf585
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
js/services.js
+13
-2
No files found.
js/services.js
View file @
43f13746
...
...
@@ -11,17 +11,28 @@ angular.module('kibana.services', [])
this
.
list
=
[];
this
.
set
=
function
(
title
,
text
,
severity
,
timeout
)
{
var
_a
=
{
var
_a
=
{
title
:
title
||
''
,
text
:
text
||
''
,
severity
:
severity
||
'info'
,
};
},
_ca
=
angular
.
copy
(
_a
),
_clist
=
angular
.
copy
(
self
.
list
);
console
.
log
(
_
.
contains
(
_clist
,
_ca
))
// If there isn't already a message with the same text
if
(
!
_
.
contains
(
_clist
,
_ca
))
{
console
.
log
(
_clist
);
console
.
log
([
_ca
]);
self
.
list
.
push
(
_a
);
if
(
timeout
>
0
)
{
$timeout
(
function
()
{
self
.
list
=
_
.
without
(
self
.
list
,
_a
);
},
timeout
);
}
}
};
this
.
clear
=
function
(
alert
)
{
...
...
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