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
87a8b1b3
Commit
87a8b1b3
authored
Jun 09, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fix to config.sample.js
parent
c5d25902
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
src/app/dashboards/default.json
+1
-1
src/app/directives/influxdbFuncEditor.js
+3
-3
src/app/services/influxdb/influxdbDatasource.js
+7
-6
src/config.sample.js
+2
-2
No files found.
src/app/dashboards/default.json
View file @
87a8b1b3
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
"notice"
:
false
"notice"
:
false
}
}
],
],
"editable"
:
tru
e
,
"editable"
:
fals
e
,
"failover"
:
false
,
"failover"
:
false
,
"panel_hints"
:
true
,
"panel_hints"
:
true
,
"style"
:
"dark"
,
"style"
:
"dark"
,
...
...
src/app/directives/influxdbFuncEditor.js
View file @
87a8b1b3
...
@@ -114,10 +114,10 @@ function (angular, _, $) {
...
@@ -114,10 +114,10 @@ function (angular, _, $) {
$paramLink
.
appendTo
(
elem
);
$paramLink
.
appendTo
(
elem
);
$input
.
appendTo
(
elem
);
$input
.
appendTo
(
elem
);
$input
.
blur
(
_
.
partial
(
inputBlur
)
);
$input
.
blur
(
inputBlur
);
$input
.
keyup
(
inputKeyDown
);
$input
.
keyup
(
inputKeyDown
);
$input
.
keypress
(
_
.
partial
(
inputKeyPress
)
);
$input
.
keypress
(
inputKeyPress
);
$paramLink
.
click
(
_
.
partial
(
clickFuncParam
)
);
$paramLink
.
click
(
clickFuncParam
);
addTypeahead
(
$input
);
addTypeahead
(
$input
);
...
...
src/app/services/influxdb/influxdbDatasource.js
View file @
87a8b1b3
...
@@ -89,7 +89,9 @@ function (angular, _, kbn) {
...
@@ -89,7 +89,9 @@ function (angular, _, kbn) {
target
.
query
=
query
;
target
.
query
=
query
;
}
}
return
this
.
doInfluxRequest
(
query
,
alias
).
then
(
handleInfluxQueryResponse
);
var
handleResponse
=
_
.
partial
(
handleInfluxQueryResponse
,
alias
);
return
this
.
doInfluxRequest
(
query
,
alias
).
then
(
handleResponse
);
},
this
);
},
this
);
...
@@ -126,7 +128,7 @@ function (angular, _, kbn) {
...
@@ -126,7 +128,7 @@ function (angular, _, kbn) {
return
$q
.
reject
(
err
);
return
$q
.
reject
(
err
);
}
}
return
this
.
doInfluxRequest
(
query
,
'filters'
)
return
this
.
doInfluxRequest
(
query
)
.
then
(
function
(
results
)
{
.
then
(
function
(
results
)
{
return
_
.
map
(
results
[
0
].
points
,
function
(
metric
)
{
return
_
.
map
(
results
[
0
].
points
,
function
(
metric
)
{
return
{
return
{
...
@@ -148,7 +150,7 @@ function (angular, _, kbn) {
...
@@ -148,7 +150,7 @@ function (angular, _, kbn) {
});
});
}
}
InfluxDatasource
.
prototype
.
doInfluxRequest
=
function
(
query
,
alias
)
{
InfluxDatasource
.
prototype
.
doInfluxRequest
=
function
(
query
)
{
var
_this
=
this
;
var
_this
=
this
;
var
deferred
=
$q
.
defer
();
var
deferred
=
$q
.
defer
();
...
@@ -170,7 +172,6 @@ function (angular, _, kbn) {
...
@@ -170,7 +172,6 @@ function (angular, _, kbn) {
};
};
return
$http
(
options
).
success
(
function
(
data
)
{
return
$http
(
options
).
success
(
function
(
data
)
{
data
.
alias
=
alias
;
deferred
.
resolve
(
data
);
deferred
.
resolve
(
data
);
});
});
},
10
);
},
10
);
...
@@ -178,7 +179,7 @@ function (angular, _, kbn) {
...
@@ -178,7 +179,7 @@ function (angular, _, kbn) {
return
deferred
.
promise
;
return
deferred
.
promise
;
};
};
function
handleInfluxQueryResponse
(
data
)
{
function
handleInfluxQueryResponse
(
alias
,
data
)
{
var
output
=
[];
var
output
=
[];
_
.
each
(
data
,
function
(
series
)
{
_
.
each
(
data
,
function
(
series
)
{
...
@@ -189,7 +190,7 @@ function (angular, _, kbn) {
...
@@ -189,7 +190,7 @@ function (angular, _, kbn) {
return
;
return
;
}
}
var
target
=
data
.
alias
||
series
.
name
+
"."
+
column
;
var
target
=
alias
||
series
.
name
+
"."
+
column
;
var
datapoints
=
[];
var
datapoints
=
[];
var
value
;
var
value
;
...
...
src/config.sample.js
View file @
87a8b1b3
...
@@ -18,8 +18,8 @@ function (Settings) {
...
@@ -18,8 +18,8 @@ function (Settings) {
},
},
influxdb
:
{
influxdb
:
{
type
:
'influxdb'
,
type
:
'influxdb'
,
url
:
"http://my_influxdb_server:808
0
/db/database_name"
,
url
:
"http://my_influxdb_server:808
6
/db/database_name"
,
user
:
'admin'
,
user
name
:
'admin'
,
password
:
'admin'
password
:
'admin'
},
},
},
},
...
...
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