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
b4115b03
Commit
b4115b03
authored
Aug 17, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(query editor): updated influxdb 0.8.x data source query editors to new abstraction
parent
6ee0f2c6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
4 deletions
+109
-4
public/app/partials/metrics.html
+1
-1
public/app/plugins/datasource/influxdb_08/datasource.js
+1
-0
public/app/plugins/datasource/influxdb_08/directives.js
+21
-0
public/app/plugins/datasource/influxdb_08/partials/query.editor.html
+0
-0
public/app/plugins/datasource/influxdb_08/partials/query.options.html
+85
-0
public/app/plugins/datasource/influxdb_08/plugin.json
+1
-3
No files found.
public/app/partials/metrics.html
View file @
b4115b03
<div
class=
"editor-row"
>
<div
class=
"tight-form-container"
>
<query-editor-loader
ng-repeat=
"target in panel.targets"
>
<query-editor-loader
ng-repeat=
"target in panel.targets"
ng-class=
"{'tight-form-disabled': target.hide}"
>
</query-editor-loader>
</div>
...
...
public/app/plugins/datasource/influxdb_08/datasource.js
View file @
b4115b03
...
...
@@ -4,6 +4,7 @@ define([
'kbn'
,
'./influxSeries'
,
'./queryBuilder'
,
'./directives'
,
'./queryCtrl'
,
'./funcEditor'
,
],
...
...
public/app/plugins/datasource/influxdb_08/directives.js
0 → 100644
View file @
b4115b03
define
([
'angular'
,
],
function
(
angular
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.directives'
);
module
.
directive
(
'metricQueryEditorInfluxdb08'
,
function
()
{
return
{
controller
:
'InfluxQueryCtrl_08'
,
templateUrl
:
'app/plugins/datasource/influxdb_08/partials/query.editor.html'
};
});
module
.
directive
(
'metricQueryOptionsInfluxdb08'
,
function
()
{
return
{
templateUrl
:
'app/plugins/datasource/influxdb_08/partials/query.options.html'
};
});
module
.
directive
(
'annotationsQueryEditorInfluxdb08'
,
function
()
{
return
{
templateUrl
:
'app/plugins/datasource/influxdb_08/partials/annotations.editor.html'
};
});
});
public/app/plugins/datasource/influxdb_08/partials/query.editor.html
View file @
b4115b03
This diff is collapsed.
Click to expand it.
public/app/plugins/datasource/influxdb_08/partials/query.options.html
0 → 100644
View file @
b4115b03
<section
class=
"grafana-metric-options"
>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item tight-form-item-icon"
>
<i
class=
"fa fa-wrench"
></i>
</li>
<li
class=
"tight-form-item"
>
group by time
</li>
<li>
<input
type=
"text"
class=
"input-medium tight-form-input"
ng-model=
"panel.interval"
ng-blur=
"get_data();"
spellcheck=
'false'
placeholder=
"example: >10s"
>
</li>
<li
class=
"tight-form-item"
>
<i
class=
"fa fa-question-circle"
bs-tooltip=
"'Set a low limit by having a greater sign: example: >60s'"
data-placement=
"right"
></i>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item tight-form-item-icon"
>
<i
class=
"fa fa-info-circle"
></i>
</li>
<li
class=
"tight-form-item"
>
<a
ng-click=
"toggleEditorHelp(1);"
bs-tooltip=
"'click to show helpful info'"
data-placement=
"bottom"
>
alias patterns
</a>
</li>
<li
class=
"tight-form-item"
>
<a
ng-click=
"toggleEditorHelp(2)"
bs-tooltip=
"'click to show helpful info'"
data-placement=
"bottom"
>
stacking
&
and fill
</a>
</li>
<li
class=
"tight-form-item"
>
<a
ng-click=
"toggleEditorHelp(3)"
bs-tooltip=
"'click to show helpful info'"
data-placement=
"bottom"
>
group by time
</a>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
</section>
<div
class=
"editor-row"
>
<div
class=
"pull-left"
style=
"margin-top: 30px;"
>
<div
class=
"grafana-info-box span6"
ng-if=
"editorHelpIndex === 1"
>
<h5>
Alias patterns
</h5>
<ul>
<li>
$s = series name
</li>
<li>
$g = group by
</li>
<li>
$[0-9] part of series name for series names seperated by dots.
</li>
</ul>
</div>
<div
class=
"grafana-info-box span6"
ng-if=
"editorHelpIndex === 2"
>
<h5>
Stacking and fill
</h5>
<ul>
<li>
When stacking is enabled it important that points align
</li>
<li>
If there are missing points for one series it can cause gaps or missing bars
</li>
<li>
You must use fill(0), and select a group by time low limit
</li>
<li>
Use the group by time option below your queries and specify for example
>
10s if your metrics are written every 10 seconds
</li>
<li>
This will insert zeros for series that are missing measurements and will make stacking work properly
</li>
</ul>
</div>
<div
class=
"grafana-info-box span6"
ng-if=
"editorHelpIndex === 3"
>
<h5>
Group by time
</h5>
<ul>
<li>
Group by time is important, otherwise the query could return many thousands of datapoints that will slow down Grafana
</li>
<li>
Leave the group by time field empty for each query and it will be calculated based on time range and pixel width of the graph
</li>
<li>
If you use fill(0) or fill(null) set a low limit for the auto group by time interval
</li>
<li>
The low limit can only be set in the group by time option below your queries
</li>
<li>
You set a low limit by adding a greater sign before the interval
</li>
<li>
Example:
>
60s if you write metrics to InfluxDB every 60 seconds
</li>
</ul>
</div>
</div>
</div>
public/app/plugins/datasource/influxdb_08/plugin.json
View file @
b4115b03
...
...
@@ -8,9 +8,7 @@
"module"
:
"plugins/datasource/influxdb_08/datasource"
,
"partials"
:
{
"config"
:
"app/plugins/datasource/influxdb_08/partials/config.html"
,
"query"
:
"app/plugins/datasource/influxdb_08/partials/query.editor.html"
,
"annotations"
:
"app/plugins/datasource/influxdb_08/partials/annotations.editor.html"
"config"
:
"app/plugins/datasource/influxdb_08/partials/config.html"
},
"metrics"
:
true
,
...
...
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