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
cf9790fc
Commit
cf9790fc
authored
Jan 23, 2017
by
lpic
Committed by
Torkel Ödegaard
Jan 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES - Support for min_doc_count on group by terms (#7324)
parent
a0c8380b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
public/app/plugins/datasource/elasticsearch/bucket_agg.js
+5
-0
public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html
+4
-0
public/app/plugins/datasource/elasticsearch/query_builder.js
+4
-0
No files found.
public/app/plugins/datasource/elasticsearch/bucket_agg.js
View file @
cf9790fc
...
...
@@ -82,12 +82,17 @@ function (angular, _, queryDef) {
case
'terms'
:
{
settings
.
order
=
settings
.
order
||
"asc"
;
settings
.
size
=
settings
.
size
||
"10"
;
settings
.
min_doc_count
=
settings
.
min_doc_count
||
0
;
settings
.
orderBy
=
settings
.
orderBy
||
"_term"
;
if
(
settings
.
size
!==
'0'
)
{
settingsLinkText
=
queryDef
.
describeOrder
(
settings
.
order
)
+
' '
+
settings
.
size
+
', '
;
}
if
(
settings
.
min_doc_count
>
0
)
{
settingsLinkText
+=
'Min Doc Count: '
+
settings
.
min_doc_count
+
', '
;
}
settingsLinkText
+=
'Order by: '
+
queryDef
.
describeOrderBy
(
settings
.
orderBy
,
$scope
.
target
);
if
(
settings
.
size
===
'0'
)
{
...
...
public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html
View file @
cf9790fc
...
...
@@ -62,6 +62,10 @@
<metric-segment-model
property=
"agg.settings.size"
options=
"sizeOptions"
on-change=
"onChangeInternal()"
css-class=
"width-12"
></metric-segment-model>
</div>
<div
class=
"gf-form offset-width-7"
>
<label
class=
"gf-form-label width-10"
>
Min Doc Count
</label>
<input
type=
"number"
class=
"gf-form-input max-width-12"
ng-model=
"agg.settings.min_doc_count"
ng-blur=
"onChangeInternal()"
>
</div>
<div
class=
"gf-form offset-width-7"
>
<label
class=
"gf-form-label width-10"
>
Order By
</label>
<metric-segment-model
property=
"agg.settings.orderBy"
options=
"orderByOptions"
on-change=
"onChangeInternal()"
css-class=
"width-12"
></metric-segment-model>
</div>
...
...
public/app/plugins/datasource/elasticsearch/query_builder.js
View file @
cf9790fc
...
...
@@ -49,6 +49,10 @@ function (queryDef) {
}
}
if
(
aggDef
.
settings
.
min_doc_count
!==
void
0
)
{
queryNode
.
terms
.
min_doc_count
=
parseInt
(
aggDef
.
settings
.
min_doc_count
,
10
);
}
if
(
aggDef
.
settings
.
missing
)
{
queryNode
.
terms
.
missing
=
aggDef
.
settings
.
missing
;
}
...
...
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