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
795cee13
Commit
795cee13
authored
Mar 29, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KairosDB data source plugin is messy, needs a lot of clean up & refactoring, please help
parent
15188c4a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
19 deletions
+9
-19
public/app/plugins/datasource/kairosdb/datasource.js
+1
-1
public/app/plugins/datasource/kairosdb/queryCtrl.js
+8
-18
No files found.
public/app/plugins/datasource/kairosdb/datasource.js
View file @
795cee13
...
...
@@ -217,7 +217,7 @@ function (angular, _, kbn) {
if
(
chosenAggregator
.
sampling_rate
)
{
returnedAggregator
.
sampling
=
KairosDBDatasource
.
prototype
.
convertToKairosInterval
(
chosenAggregator
.
sampling_rate
);
returnedAggregator
.
align_sampling
=
true
;
returnedAggregator
.
align_start_time
=
true
;
returnedAggregator
.
align_start_time
=
true
;
}
if
(
chosenAggregator
.
unit
)
{
returnedAggregator
.
unit
=
chosenAggregator
.
unit
+
's'
;
...
...
public/app/plugins/datasource/kairosdb/queryCtrl.js
View file @
795cee13
...
...
@@ -53,30 +53,26 @@ function (angular, _) {
_
.
move
(
$scope
.
panel
.
targets
,
fromIndex
,
toIndex
);
};
//////////////////////////////
// SUGGESTION QUERIES
//////////////////////////////
// Fetch metric list
$scope
.
updateMetricList
=
function
()
{
$scope
.
metricListLoading
=
true
;
metricList
=
[];
$scope
.
datasource
.
performMetricSuggestQuery
().
then
(
function
(
series
)
{
metricList
=
series
;
$scope
.
metric
.
list
=
series
;
if
(
$scope
.
target
.
metric
)
if
(
$scope
.
target
.
metric
)
{
$scope
.
metric
.
value
=
$scope
.
target
.
metric
;
else
}
else
{
$scope
.
metric
.
value
=
""
;
}
$scope
.
metricListLoading
=
false
;
return
metricList
;
});
};
$scope
.
suggestTagKeys
=
function
(
query
,
callback
)
{
$scope
.
updateTimeRange
();
callback
(
$scope
.
datasource
.
performTagSuggestQuery
(
$scope
.
target
.
metric
,
$scope
.
rangeUnparsed
,
'key'
,
''
));
callback
(
$scope
.
datasource
.
performTagSuggestQuery
(
$scope
.
target
.
metric
,
$scope
.
rangeUnparsed
,
'key'
,
''
));
};
$scope
.
suggestTagValues
=
function
(
query
,
callback
)
{
...
...
@@ -84,10 +80,7 @@ function (angular, _) {
.
performTagSuggestQuery
(
$scope
.
target
.
metric
,
$scope
.
rangeUnparsed
,
'value'
,
$scope
.
target
.
currentTagKey
));
};
//////////////////////////////
// FILTER by TAG
//////////////////////////////
// Filter metric by tag
$scope
.
addFilterTag
=
function
()
{
if
(
!
$scope
.
addFilterTagMode
)
{
$scope
.
addFilterTagMode
=
true
;
...
...
@@ -333,10 +326,7 @@ function (angular, _) {
alert
(
message
);
};
//////////////////////////////
// VALIDATION
//////////////////////////////
// Validation
function
MetricListToObject
(
MetricList
)
{
var
result
=
{};
var
Metric
;
...
...
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