Fix auto refresh for graph view#26926
Merged
bbovenzi merged 3 commits intoapache:mainfrom Oct 11, 2022
Merged
Conversation
2 tasks
pierrejeambrun
commented
Oct 6, 2022
tests/www/views/test_views_tasks.py
Outdated
Member
Author
There was a problem hiding this comment.
Is there a way to mock the server_default, for updated_at so I can assert the entire response ?
Member
Author
There was a problem hiding this comment.
thanks @uranusjr, much cleaner this way. I naively froze time on the test, which had no effect since fixture init happens before 🤦♂️
055d680 to
ec79721
Compare
ec79721 to
8e4bc93
Compare
bbovenzi
reviewed
Oct 10, 2022
| @@ -434,11 +434,10 @@ function handleRefresh() { | |||
| // only refresh if the data has changed | |||
| if (prevTis !== tis) { | |||
| // eslint-disable-next-line no-global-assign | |||
Contributor
There was a problem hiding this comment.
We can get rid of this line now
bbovenzi
approved these changes
Oct 10, 2022
Contributor
bbovenzi
left a comment
There was a problem hiding this comment.
not sure about the updated_at mock but this looks good to me.
ephraimbuddy
pushed a commit
that referenced
this pull request
Oct 18, 2022
* Fix auto refresh for graph view * Add task_instances view test * Use freezegun to mock datetime Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> (cherry picked from commit 6462292)
ephraimbuddy
pushed a commit
that referenced
this pull request
Oct 18, 2022
* Fix auto refresh for graph view * Add task_instances view test * Use freezegun to mock datetime Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> (cherry picked from commit 6462292)
37 tasks
2 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
solves: #26901
#26554 introduced a proper way to set the
json_provider_class. As a result the/object/task_instancesendpoint now returns ajson/applicationcontent type instead oftext/htmlwhich is already parsed in the front. Explicitly callingJSON.parseis not necessary anymorehandleRefresh.Old Response:

Current response:

I figured adding a test for the
/object/task_instancesview wouldn't hurt.