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

Dependable agg ids #1931

Merged
merged 5 commits into from
Nov 14, 2014
Merged

Dependable agg ids #1931

merged 5 commits into from
Nov 14, 2014

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Nov 14, 2014

Assign ids to AggConfig objects that are unique to the list of aggConfigs. Previously, the ids were chosen by lodash every time an aggConfig was created (which includes every time a vis was "rehydrated" from state). Now, we persist the ids in the aggConfig state and get new ids by adding 1 to the max id of all sibling aggConfigs.

The only new behavior that should be different after this change is the way that colors are assigned to aggregations in the visualize app. When opening in the app, then moving to a different app, and coming back, the colors assigned to the visualization won't change. Fixes #1767

Prereq for #1536 : The reason this was completed is to make sorting by one of many metric aggs possible, which requires a relationship to be defined between two aggs. The simplest way to do this is with ids, but those ids needed to persist.

@simianhacker
Copy link
Member

As far as I can tell everything works... LGTM

@lukasolson
Copy link
Member

LGTM

@lukasolson lukasolson assigned spalger and unassigned lukasolson Nov 14, 2014
spalger pushed a commit that referenced this pull request Nov 14, 2014
@spalger spalger merged commit 1aac501 into elastic:master Nov 14, 2014
@spalger spalger deleted the dependable-agg-ids branch December 12, 2014 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AggConfigs should be responsible for their color
3 participants