Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Add config option for hiding/filtering stats table #731

Merged
merged 1 commit into from
Oct 22, 2014
Merged

Conversation

naegelyd
Copy link
Collaborator

Fix #730.

Putting this in but definitely looking for feedback on the approach.

Signed-off-by: Don Naegely [email protected]

parse: function(resp, options) {
base.Collection.prototype.parse.call(this, resp, options);

var statsConfig = c.config.get('statsModelsList'),
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be better suited as an option to the CountCollection class. The statsModelsList (better named modelCountList?) is more of a convenience for passing it as an option to the rendered on the workspace.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm unclear as to how to get this option passed to the CountCollection class as the initial model is automatically created here and I'm not seeing a good way to include the option in the stats creation in order to pass it to the CountCollection. I could remove this filtering from the model altogether and move the filtering to the stats.CountList view and pass the option into that view.

Copy link
Contributor

Choose a reason for hiding this comment

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

The last option makes the most sense to me. The view should pass the options to customize what is being rendered on not. That way multiple views can reuse the same data (the collection in this case) and present in various ways.

@murphyke
Copy link
Member

@naegelyd Thanks for working on this. In the scenario in which the statsModelsList is disabled entirely, it would be best to restore the original formatting such that the public queries are listed in a separate column on the right.

bruth added a commit that referenced this pull request Oct 22, 2014
Add config option for hiding/filtering stats table
@bruth bruth merged commit 4b460e4 into master Oct 22, 2014
@bruth bruth deleted the issue-730 branch October 22, 2014 19:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to disable or filter the list of models exposed in Data Summary
3 participants