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
bfecb046
Commit
bfecb046
authored
May 01, 2014
by
Marco Vito Moscaritolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InfluxDB Filters: added function to generate filter list.
parent
2b5e9741
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletions
+21
-1
src/app/services/influxdb/influxdbDatasource.js
+21
-1
No files found.
src/app/services/influxdb/influxdbDatasource.js
View file @
bfecb046
...
@@ -8,7 +8,7 @@ function (angular, _, kbn) {
...
@@ -8,7 +8,7 @@ function (angular, _, kbn) {
var
module
=
angular
.
module
(
'kibana.services'
);
var
module
=
angular
.
module
(
'kibana.services'
);
module
.
factory
(
'InfluxDatasource'
,
function
(
$q
,
$http
)
{
module
.
factory
(
'InfluxDatasource'
,
function
(
$q
,
$http
,
filterSrv
)
{
function
InfluxDatasource
(
datasource
)
{
function
InfluxDatasource
(
datasource
)
{
this
.
type
=
'influxDB'
;
this
.
type
=
'influxDB'
;
...
@@ -110,6 +110,26 @@ function (angular, _, kbn) {
...
@@ -110,6 +110,26 @@ function (angular, _, kbn) {
});
});
};
};
InfluxDatasource
.
prototype
.
metricFindQuery
=
function
(
query
)
{
var
interpolated
;
try
{
interpolated
=
filterSrv
.
applyFilterToTarget
(
query
);
}
catch
(
err
)
{
return
$q
.
reject
(
err
);
}
return
this
.
doInfluxRequest
(
query
,
'filters'
)
.
then
(
function
(
results
)
{
return
_
.
map
(
results
[
0
].
points
,
function
(
metric
)
{
return
{
text
:
metric
[
1
],
expandable
:
false
};
});
});
};
function
retry
(
deferred
,
callback
,
delay
)
{
function
retry
(
deferred
,
callback
,
delay
)
{
return
callback
().
then
(
undefined
,
function
(
reason
)
{
return
callback
().
then
(
undefined
,
function
(
reason
)
{
if
(
reason
.
status
!==
0
)
{
if
(
reason
.
status
!==
0
)
{
...
...
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