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

Remove limit option in next&previous tab UI #1658

Merged
merged 2 commits into from
May 28, 2018

Conversation

mitiao
Copy link
Contributor

@mitiao mitiao commented May 23, 2018

Set default to 400 previous jobs and 100 next jobs.
For more or less previous & next jobs query, use link with query parameters like following example:
/tests/99945?previous_limit=10&next_limit=10#next_previous

Set default to 400 previous jobs and 100 next jobs.

For more or less previous & next jobs query, use link
with query parameters like following example:
/tests/99945?previous_limit=10&next_limit=10#next_previous
@coolo
Copy link
Contributor

coolo commented May 23, 2018

Please start the display with the current job: https://datatables.net/reference/option/displayStart

@codecov
Copy link

codecov bot commented May 25, 2018

Codecov Report

Merging #1658 into master will decrease coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1658     +/-   ##
=========================================
- Coverage   88.96%   88.87%   -0.1%     
=========================================
  Files         132      132             
  Lines        9468     9472      +4     
=========================================
- Hits         8423     8418      -5     
- Misses       1045     1054      +9
Impacted Files Coverage Δ
lib/OpenQA/Schema/ResultSet/Jobs.pm 96.75% <100%> (+0.01%) ⬆️
lib/OpenQA/WebAPI/Controller/Test.pm 96.19% <100%> (+0.01%) ⬆️
lib/OpenQA/Worker/Common.pm 80.86% <0%> (-2.89%) ⬇️
lib/OpenQA.pm 69.23% <0%> (-2.57%) ⬇️
lib/OpenQA/WebAPI/Plugin/Gru.pm 90.29% <0%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c41e24c...14fcf37. Read the comment docs.

]
],
initComplete: function (settings, json) {
// Seems an issue in case of displayStart is not an integer multiple of the pageLength
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, wouldn't it still be easier to take your var page as displayStart = page * pageLength? I find changing the table in initComplete a little problematic - as initComplete is called after the table was drawn, meaning it would blink

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i didn't see blinking during initComplete called, from console no repeating draw shown.
test instance: http://10.67.18.160:3000/tests/72

Copy link
Contributor Author

Choose a reason for hiding this comment

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

options can't be changed after initialized, i wonder to know a better way to pass value to option during in initialisation?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. So we would have to calculate this earlier - which would break lazy load.

Your test instance doesn't work for me and I'm in the middle of something else, so I can't test locally. So having to trust you that there is no blink :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems to work without blinking, also when 'Next & previous results' is the initial tab.

@coolo coolo merged commit 91b7d2f into os-autoinst:master May 28, 2018
coolo pushed a commit that referenced this pull request May 28, 2018
commit 91b7d2f
Merge: ac5f38b 14fcf37
Author:     Stephan Kulow <stephan@kulow.org>
AuthorDate: Mon May 28 16:10:20 2018 +0200
Commit:     GitHub <noreply@github.com>
CommitDate: Mon May 28 16:10:20 2018 +0200

    Merge pull request #1658 from mitiao/np_tab_limit

    Remove limit option in next&previous tab UI
@mitiao mitiao deleted the np_tab_limit branch May 30, 2018 02:20
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.

None yet

3 participants