-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Keep datatable state in the browser history. #1986
Conversation
@nmb10, thanks for your PR! By analyzing the history of the files in this pull request, we identified @daveFNbuck, @Tarrasch and @riga to be potential reviewers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's a "datatable"? :)
Allows to refresh page without tasks datatable state missing
Butif we keep the state after a refresh, doesn't that kill the purpose of refreshing? I mean I want to see the new latest values. No?
I'm not sure I fully understand the part about
Also added abilities to add filtered/ordered tasks datatable to bookmarks and links exchange.
Did you mean you implement so that you can send urls like http://myluigi.com:8082/q=MyTask
???
To clarify what's done here, can you add any screenshots or example urls to this PR to clarify what it adds? If it's not too much work.
By the way, super big kudos for adding test cases. :)
start: 0, | ||
time: new Date().getTime(), | ||
columns: [ | ||
{visible: true, search: {}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the 6 rows here? Can you comment on explaining this magic?
Hi, @Tarrasch
It's js library you used to display table with tasks :) - https://datatables.net/
No. Values (tasks) are not stored. History keeps order, filter and amount of entries on page (Entries select box value).
An example: you selected to display 50 entries on page, you filtered by 'Uber' and ordered by name. Then you refreshed the page. After page refresh entries, filter and order stay the same (50, 'Uber', name).
Yes. This is copy-paste from local instance - http://127.0.0.1:8082/static/visualiser/index.html?search__search=Uber&order=1,asc&length=10
http://127.0.0.1:8082/static/visualiser/index.html?search__search=Uber&order=1,asc&length=50 . But usually you do not need to construct such an url - just copy-paste it from browser.
Ok. |
Ok. It's all clear to me now. I've wanted this thing for like forever. But I let someone else do the code review. :) |
@daveFNbuck, can you review this? :) |
Looks good to me. Would be nice if we also saved the state of the graph buttons for easy sharing. |
@nmb10, thanks a lot, I'll try this out soon. :) |
I'll check that. |
Allows to refresh page without tasks datatable state missing. Also added abilities to add filtered/ordered tasks datatable to bookmarks and links exchange. In other words, you should now be able to share "what you are seeing" in the scheduler UI by sharing the URL in the browser.
Keep tasks datatable state in the browser history.
Description
Allows to refresh page without tasks datatable state missing. Also added abilities to add filtered/ordered tasks datatable to bookmarks and links exchange.
Motivation and Context
Sometimes we need to add filtered table with tasks to bookmarks or refresh the page.
Have you tested this? If so, how?
Selenium tests added for entries amount, order and filter (I used selenium + phantomjs driver because I needed 'wait for elements' feature which is too complicated for phantom.js)