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
b9e0fcdf
Commit
b9e0fcdf
authored
Feb 28, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4103 from benrubson/issue3982
Add a minimum value option for template auto interval
parents
517721ea
f4037667
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
public/app/features/templating/partials/editor.html
+7
-1
public/app/features/templating/templateValuesSrv.js
+1
-1
No files found.
public/app/features/templating/partials/editor.html
View file @
b9e0fcdf
...
...
@@ -109,10 +109,16 @@
<span
class=
"gf-form-label"
ng-show=
"current.auto"
>
Auto interval steps
<tip>
How many times should the current time range be divided to calculate the value
</tip>
</span>
<div
class=
"gf-form-select-wrapper max-width-10"
>
<div
class=
"gf-form-select-wrapper max-width-10"
ng-show=
"current.auto"
>
<select
class=
"gf-form-input"
ng-model=
"current.auto_count"
ng-options=
"f for f in [3,5,10,30,50,100,200]"
ng-change=
"runQuery()"
></select>
</div>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label"
ng-show=
"current.auto"
>
Auto interval min value
<tip>
The calculated value will not go below this threshold
</tip>
</span>
<input
type=
"text"
class=
"gf-form-input max-width-10"
ng-show=
"current.auto"
ng-model=
"current.auto_min"
ng-change=
"runQuery()"
></input>
</div>
</div>
<div
ng-show=
"current.type === 'custom'"
class=
"gf-form-group"
>
...
...
public/app/features/templating/templateValuesSrv.js
View file @
b9e0fcdf
...
...
@@ -60,7 +60,7 @@ function (angular, _, kbn) {
variable
.
options
.
unshift
({
text
:
'auto'
,
value
:
'$__auto_interval'
});
}
var
interval
=
kbn
.
calculateInterval
(
timeSrv
.
timeRange
(),
variable
.
auto_count
);
var
interval
=
kbn
.
calculateInterval
(
timeSrv
.
timeRange
(),
variable
.
auto_count
,
(
variable
.
auto_min
?
">"
+
variable
.
auto_min
:
null
)
);
templateSrv
.
setGrafanaVariable
(
'$__auto_interval'
,
interval
);
};
...
...
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