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

Fix: dashboard filters broken after #252 #260

Merged
merged 2 commits into from
Aug 7, 2014
Merged

Fix: dashboard filters broken after #252 #260

merged 2 commits into from
Aug 7, 2014

Conversation

arikfr
Copy link
Member

@arikfr arikfr commented Aug 7, 2014

Switched to using promises to know when QueryResults are ready. The current implementation is a bit crude, but I didn't want to change all other uses of QueryResult. In the long run I think we should switch to using only promises -- will remove many watches and simplify the code in QueryView.

@amirnissim FYI.

arikfr added a commit that referenced this pull request Aug 7, 2014
Fix: dashboard filters broken after #252
@arikfr arikfr merged commit eba2ba1 into master Aug 7, 2014
@amirnissim
Copy link
Contributor

$resource already has a promise, you can access it with:

var qr = QueryResult.get(...)
qr.$promise.then(...)

@arikfr
Copy link
Member Author

arikfr commented Aug 7, 2014

@amirnissim QueryResult has $resource in it, but it's not a $resource.

@amirnissim
Copy link
Contributor

we can still use it:

QueryResult = function() {
QueryResultResource = ...
this.$promise = QueryResultResource.$promise
...
}

I agree, we should refactor QueryResult ASAP

@arikfr
Copy link
Member Author

arikfr commented Aug 7, 2014

For this specific case, we might have because we can assume we will have the query result id. But in other cases, it won't be enough.

@arikfr arikfr deleted the fix_queue_name branch April 1, 2015 14:25
washort pushed a commit to washort/redash that referenced this pull request Dec 13, 2017
washort pushed a commit to washort/redash that referenced this pull request Jan 8, 2018
washort pushed a commit to washort/redash that referenced this pull request Jan 9, 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.

2 participants