Skip to content
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

Cardinality support for Druid #48

Merged
merged 8 commits into from
Jul 31, 2018

Conversation

gavinmcnair
Copy link
Contributor

I am not a JS developer so this might need rejigging. It has however transformed our dashboards and seems to work flawlessly.

@@ -351,6 +362,11 @@
<input type="text" ng-switch-when="count" class="input-small gf-form-input" spellcheck='false' ng-model="ctrl.target.currentAggregator.name" placeholder="output name" ng-blur="ctrl.targetBlur()">
<gf-form-switch ng-switch-when="count" class="gf-form" label="Hidden" label-class="query-keyword" checked="ctrl.target.currentAggregator.hidden"></gf-form-switch>
</div>
<div class="gf-form" ng-show="ctrl.addAggregatorMode" ng-switch on="ctrl.target.currentAggregator.type">
<input type="text" ng-switch-when="cardinality" class="input-small gf-form-input width-10" spellcheck='false' ng-model="ctrl.target.currentAggregator.name" placeholder="output name" ng-blur="ctrl.targetBlur()">
<input type="text" ng-switch-when="cardinality" class="input-small gf-form-input width-10" spellcheck='false' ng-model="ctrl.target.currentAggregator.fieldNames" ng-blur="ctrl.targetBlur()" placeholder="metric name" bs-typeahead="ctrl.getMetrics" data-min-length=0>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gavinmcnair I have tested your changes and the code works well for cardinality. Can we also include dimensions along with metrics top appear in the autocomplete for this field? We need to add another method similar to getMetrics in order to get metrics and dimensions as a single set. This will make this feature (of cardinality support) complete.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not being a front end JS developer means this will take me a while to get done. I'll try and give it a go over the next few days.

@gavinmcnair
Copy link
Contributor Author

Hi @pranit22 those changes have been made. Can you please test and merge?

@gavinmcnair
Copy link
Contributor Author

@pranit22 brought the branch up to date with master and updated jsdom to be compatible with v8+ node versions

@pranit22 pranit22 merged commit 551c364 into grafana-druid-plugin:master Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants