-
Notifications
You must be signed in to change notification settings - Fork 438
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
Bootstrap/monitor #6421
Bootstrap/monitor #6421
Conversation
Review app will appear here: http://obs-reviewlab.opensuse.org/chrisbr-bootstrapmonitor |
25b9a70
to
fb974ac
Compare
You can try it out here: https://obs-reviewlab.opensuse.org/chrisbr-bootstrapmonitor/project/monitor/home:Admin And with the serverside filter here: https://obs-reviewlab.opensuse.org/chrisbr-bootstrapmonitor/project/monitor/home:Admin?pkgname=ctris |
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.
src/api/app/views/webui2/webui/project/_monitor_control.html.haml
Outdated
Show resolved
Hide resolved
%td | ||
= link_to word_break(packname, 40), :controller => "package", :action => "show", :package => packname, :project => @project.to_s | ||
- @repohash.sort.each do |repo, archlist| | ||
- archlist.sort.each do |arch| |
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.
isn't this already sorted? 🤔
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.
Apparently not, no
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.
I think it comes sorted from the backend.... 🤔
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.
How do you know? I would keep it for now, that is c&p from the old view.
This is the https://datatables.net/reference/option/scrollCollapse option. The reason is that otherwise the page size will jump all the time which is also not a nice experience. But I don't care too much, if you would like to collapse it, I'm fine with it too. |
@ChrisBr I think I would prefer to collapse it. |
Nice work 👍 Two things I noticed:
|
@bgeuken that is correct as then the result is already prefiltered on the server, allowing client side search does not make much sense then. In this case we add a button to remove the filter. See my description:
|
fb974ac
to
1775433
Compare
@dmarcoux here is a comparison when scrollCollapse is enabled: vs. As you can see, the whole page is basically jumping which adds a lot of noise. I don't like it to be honest. |
It's clearly better to have |
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.
Nice work 👍
1775433
to
3f8ed74
Compare
I refactored the feature specs to use page objects: In case somebody is interested to read more about that, here are two nice resources: |
3f8ed74
to
39e24fc
Compare
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.
As already said, you need the .obs-dataTable
class to solve the bug
The project build montior table is now a DataTable and all filter / search is performed in the DataTable now instead of on the Server. The monitor action still allows server filtering by passing parameters. We still need to support this because of existing links. However, when we already filtered on server side, the rendered table would only contain a the filtered list which causes the client search to not work as expected. For now, we just disable the client search in this case and show a button to remove all server side filters. This does a simple roundtrip to the server without parameters which enables us to activate the client search again.
The underlying issue got fixed in another way and this breaks other functionality of the modal. Co-authored-by: Ana María Martínez Gómez <[email protected]>
39e24fc
to
0386ddb
Compare
Codecov Report
@@ Coverage Diff @@
## master #6421 +/- ##
==========================================
+ Coverage 91.2% 91.21% +<.01%
==========================================
Files 437 437
Lines 19668 19673 +5
==========================================
+ Hits 17939 17944 +5
Misses 1729 1729 |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #6421 +/- ##
==========================================
+ Coverage 91.2% 91.21% +<.01%
==========================================
Files 437 437
Lines 19668 19673 +5
==========================================
+ Hits 17939 17944 +5
Misses 1729 1729 |
coveralls hanging ... |
The project build montior table is now a DataTable and
all filter / search is performed in the DataTable now
instead of on the Server.
The monitor action still allows server filtering by passing parameters.
We still need to support this because of existing links.
However, when we already filtered on server side, the rendered table would
only contain a the filtered list which causes the client search to not
work as expected.
For now, we just disable the client search in this case and show a button
to remove all server side filters. This does a simple roundtrip to the server
without parameters which enables us to activate the client search again.
@Ana06 regarding revert of 3e45c4b, it does hurt, see screenshot 😄