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

Query params for filters #347

Merged
merged 3 commits into from
Jan 13, 2015
Merged

Conversation

barnash
Copy link
Contributor

@barnash barnash commented Jan 12, 2015

I made it possible to register filters values in the query string - for dashboard view.
For example:
http://localhost:9001/dashboard/mydashboard?filter1=4&filter2=5

@@ -32,22 +32,23 @@
// TODO: first object should be a copy, otherwise one of the chart filters behaves different than the others.
filters[filter.name] = filter;
filters[filter.name].originFilters = [];
if (_.has($location.search(), filter.friendlyName)) {
Copy link
Member

Choose a reason for hiding this comment

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

How about we use filter.name? It has more chances to be more URL friendly (in most cases it's the table column name -> no capital letters and no spaces).

@barnash
Copy link
Contributor Author

barnash commented Jan 12, 2015

@arikfr Yeah, you are right, I thought that it will just be easy to create the url since the friendly name is right there when you want to create he deep link. Ofc name makes much more sense. Changed.

arikfr added a commit that referenced this pull request Jan 13, 2015
@arikfr arikfr merged commit 77d982b into getredash:master Jan 13, 2015
@arikfr
Copy link
Member

arikfr commented Jan 13, 2015

Merged. @barnash congrats on your first contribution :-)

@arikfr
Copy link
Member

arikfr commented Jan 20, 2015

@barnash two things I overlooked:

  1. Following this change, dashboard filters are enabled for all dashboards regardless of the feature flag. This is fixed in: 16f0413
  2. filter.name is in the format of "filter-name::filter", while I thought it's only "filter-name"... This is no so friendly, so I might change it in the future to make it easier.

@barnash
Copy link
Contributor Author

barnash commented Jan 26, 2015

Cool, sounds good.

On Tue Jan 20 2015 at 4:42:28 PM Arik Fraimovich notifications@github.com
wrote:

@barnash https://github.com/barnash two things I overlooked:

  1. Following this change, dashboard filters are enabled for all dashboards
    regardless of the feature flag. This is fixed in: 16f0413
    16f0413
  2. filter.name is in the format of "filter-name::filter", while I thought
    it's only "filter-name"... This is no so friendly, so I might change it in
    the future to make it easier.


Reply to this email directly or view it on GitHub
#347 (comment).

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.

2 participants