New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] [elasticsearch] Add option for result set size in raw_document #8527

Merged
merged 4 commits into from Jun 8, 2017

Conversation

Projects
None yet
3 participants
@mk-dhia
Contributor

mk-dhia commented Jun 3, 2017

Hello,

In elasticsearch data source we could get raw document to show them in table panel for example. The size of the query is "hard coded" to 500. I have been faced to many case where i want to increase the limit to fetch more element , or decrease it to get fewer element and faster the panel rendering on large objects. On aggregation previous commits had added the size parameter to the aggregation, and this pull request do add the size parameter to raw document.
I add it as option for the metric when "Raw document" is selected
Also there are 2 fix for interface to make the switch of metric type to and from "raw document" work properly.
Please Tell me if you need the commit in different pull request.

Regards
Dhia

[elasticsearch] Add option for result set size in raw_dcument
 it allows to specify the result set size in raw_document.
 Example: table  panel could show more (or less) than 500 line if needed.
 Added test to spec

@mk-dhia mk-dhia changed the title from [Feature Request] [elasticsearch] Add option for result set size in raw_dcument to [Feature Request] [elasticsearch] Add option for result set size in raw_document Jun 3, 2017

mk-dhia added some commits Jun 3, 2017

[elasticsearch] Fix add metric that was not working properly
 when selecting Raw Documet metric type, the $scope.target.metrics was replaced by [$scope.agg],
 however the pointer to this variables is shared with metricAggs.
 Instead we free the array and add $scope.agg
[elasticsearch] Fix bug when switching from "Raw Document" metric type
when switch to "raw Document" metric type we do free all "Group by"
however when we switch back to another type we do not reset the default aggregation (date histogram)
Thus all modification will through exception as no "Group by" is defined and panel should be recreated
the fix will reintialize the "Group by" by setting default value

@mk-dhia mk-dhia closed this Jun 3, 2017

@mk-dhia mk-dhia reopened this Jun 3, 2017

Show outdated Hide outdated public/app/plugins/datasource/elasticsearch/partials/metric_agg.html
@@ -72,6 +72,11 @@
<label class="gf-form-label width-10">Percentiles</label>
<input type="text" class="gf-form-input max-width-12" ng-model="agg.settings.percents" array-join ng-blur="onChange()"></input>
</div>
<div class="gf-form offset-width-7" ng-if="agg.type === 'raw_document'">
<label class="gf-form-label width-10">Size</label>
<input type="text" class="gf-form-input max-width-12" ng-model="agg.settings.size" ng-blur="onChange()"></input>

This comment has been minimized.

@torkelo

torkelo Jun 4, 2017

Member

this should be type="number" , then you do not need to parseInt in code later

@torkelo

torkelo Jun 4, 2017

Member

this should be type="number" , then you do not need to parseInt in code later

This comment has been minimized.

@mk-dhia

mk-dhia Jun 4, 2017

Contributor

I have changed the type and added the commit

@mk-dhia

mk-dhia Jun 4, 2017

Contributor

I have changed the type and added the commit

change size in raw_document from text to number
update query builder and specs

@torkelo torkelo added this to the 4.4.0 milestone Jun 8, 2017

@torkelo torkelo merged commit 7c1dc24 into grafana:master Jun 8, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details
@1tft

This comment has been minimized.

Show comment
Hide comment
@1tft

1tft Feb 26, 2018

Any chance to get a dynamic limit not only for raw table entries?
I tried to edit local grafana source regarding 500 limit but could not manage to get a higher limit, e.g. 10'000 for table entries.
I hope I can discuss this topic on GrafanaCon (-;

1tft commented Feb 26, 2018

Any chance to get a dynamic limit not only for raw table entries?
I tried to edit local grafana source regarding 500 limit but could not manage to get a higher limit, e.g. 10'000 for table entries.
I hope I can discuss this topic on GrafanaCon (-;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment