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
14f09e37
Commit
14f09e37
authored
Jul 30, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added filtering support for graphite events/metrics, Closes #402
parent
d2a342a9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
src/app/services/dashboard/dashboardModel.js
+0
-2
src/app/services/filterSrv.js
+1
-1
src/app/services/graphite/graphiteDatasource.js
+11
-8
src/app/services/unsavedChangesSrv.js
+1
-1
No files found.
src/app/services/dashboard/dashboardModel.js
View file @
14f09e37
...
...
@@ -29,13 +29,11 @@ function (angular, $, kbn, _) {
this
.
loader
=
data
.
loader
||
{};
_
.
defaults
(
this
.
loader
,
{
save_gist
:
false
,
save_elasticsearch
:
true
,
save_default
:
true
,
save_temp
:
true
,
save_temp_ttl_enable
:
true
,
save_temp_ttl
:
'30d'
,
load_gist
:
false
,
load_elasticsearch
:
true
,
hide
:
false
});
...
...
src/app/services/filterSrv.js
View file @
14f09e37
...
...
@@ -40,7 +40,7 @@ define([
},
applyTemplateToTarget
:
function
(
target
)
{
if
(
target
.
indexOf
(
'[['
)
===
-
1
)
{
if
(
!
target
||
target
.
indexOf
(
'[['
)
===
-
1
)
{
return
target
;
}
...
...
src/app/services/graphite/graphiteDatasource.js
View file @
14f09e37
...
...
@@ -63,9 +63,10 @@ function (angular, _, $, config, kbn, moment) {
GraphiteDatasource
.
prototype
.
annotationQuery
=
function
(
annotation
,
filterSrv
,
rangeUnparsed
)
{
// Graphite metric as annotation
if
(
annotation
.
target
)
{
var
target
=
filterSrv
.
applyTemplateToTarget
(
annotation
.
target
);
var
graphiteQuery
=
{
range
:
rangeUnparsed
,
targets
:
[{
target
:
annotation
.
target
}],
targets
:
[{
target
:
target
}],
format
:
'json'
,
maxDataPoints
:
100
};
...
...
@@ -93,17 +94,19 @@ function (angular, _, $, config, kbn, moment) {
});
}
// Graphite event as annotation
else
if
(
annotation
.
tags
)
{
return
this
.
events
({
range
:
rangeUnparsed
,
tags
:
annotation
.
tags
})
else
{
var
tags
=
filterSrv
.
applyTemplateToTarget
(
annotation
.
tags
);
return
this
.
events
({
range
:
rangeUnparsed
,
tags
:
tags
})
.
then
(
function
(
results
)
{
var
list
=
[];
for
(
var
i
=
0
;
i
<
results
.
data
;
i
++
)
{
for
(
var
i
=
0
;
i
<
results
.
data
.
length
;
i
++
)
{
var
e
=
results
.
data
[
i
];
list
.
push
({
annotation
:
annotation
,
time
:
e
vent
.
when
*
1000
,
title
:
e
vent
.
what
,
tags
:
e
vent
.
tags
,
text
:
e
vent
.
data
time
:
e
.
when
*
1000
,
title
:
e
.
what
,
tags
:
e
.
tags
,
text
:
e
.
data
});
}
return
list
;
...
...
src/app/services/unsavedChangesSrv.js
View file @
14f09e37
...
...
@@ -22,7 +22,7 @@ function(angular, _, config) {
$timeout
(
function
()
{
self
.
original
=
angular
.
copy
(
newDashboard
);
self
.
current
=
newDashboard
;
},
1
0
00
);
},
1
2
00
);
});
$rootScope
.
$on
(
"dashboard-saved"
,
function
(
event
,
savedDashboard
)
{
...
...
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