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
8c9d5518
Commit
8c9d5518
authored
Sep 09, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(influxdb): you can now change group by time iunterval on per query basis, #2647
parent
c4c3f9dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
public/app/plugins/datasource/influxdb/partials/query.editor2.html
+8
-7
public/app/plugins/datasource/influxdb/queryCtrl.js
+7
-0
No files found.
public/app/plugins/datasource/influxdb/partials/query.editor2.html
View file @
8c9d5518
...
...
@@ -75,10 +75,10 @@
<span
ng-show=
"$index === 0"
>
SELECT
</span>
</li>
<li>
<metric-segment-model
property=
"field.func"
get-options=
"getFunctions()"
on-change=
"get_data()"
></metric-segment>
<metric-segment-model
property=
"field.func"
get-options=
"getFunctions()"
on-change=
"get_data()"
css-class=
"tight-form-item-xlarge"
></metric-segment>
</li>
<li>
<metric-segment-model
property=
"field.name"
get-options=
"getFields()"
on-change=
"get_data()"
></metric-segment>
<metric-segment-model
property=
"field.name"
get-options=
"getFields()"
on-change=
"get_data()"
css-class=
"tight-form-item-large"
></metric-segment>
</li>
<li>
<input
type=
"text"
class=
"tight-form-clear-input text-center"
style=
"width: 70px;"
ng-model=
"field.mathExpr"
spellcheck=
'false'
placeholder=
"math expr"
ng-blur=
"get_data()"
>
...
...
@@ -102,16 +102,17 @@
<div
class=
"clearfix"
></div>
</div>
<div
class=
"tight-form"
ng-repeat=
"
tag
in target.groupBy"
>
<div
class=
"tight-form"
ng-repeat=
"
groupBy
in target.groupBy"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item query-keyword tight-form-align"
style=
"width: 75px;"
>
<span
ng-show=
"$index === 0"
>
GROUP BY
</span>
</li>
<li
class=
"tight-form-item"
ng-if=
"tag.type === 'time'"
>
time($interval)
<li
ng-if=
"groupBy.type === 'time'"
>
<span
class=
"tight-form-item"
>
time
</span>
<metric-segment-model
property=
"groupBy.interval"
get-options=
"getGroupByTimeIntervals()"
on-change=
"get_data()"
></metric-segment>
</li>
<li
ng-if=
"
tag
.type === 'tag'"
>
<metric-segment-model
property=
"
tag
.key"
get-options=
"getTagOptions()"
on-change=
"get_data()"
></metric-segment>
<li
ng-if=
"
groupBy
.type === 'tag'"
>
<metric-segment-model
property=
"
groupBy
.key"
get-options=
"getTagOptions()"
on-change=
"get_data()"
></metric-segment>
</li>
</ul>
...
...
public/app/plugins/datasource/influxdb/queryCtrl.js
View file @
8c9d5518
...
...
@@ -115,6 +115,13 @@ function (angular, _, InfluxQueryBuilder) {
}));
};
$scope
.
getGroupByTimeIntervals
=
function
()
{
var
times
=
[
'auto'
,
'1s'
,
'10s'
,
'1m'
,
'2m'
,
'5m'
,
'10m'
,
'30m'
,
'1h'
,
'1d'
];
return
$q
.
when
(
_
.
map
(
times
,
function
(
func
)
{
return
uiSegmentSrv
.
newSegment
(
func
);
}));
};
$scope
.
handleQueryError
=
function
(
err
)
{
$scope
.
parserError
=
err
.
message
||
'Failed to issue metric query'
;
return
[];
...
...
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