-
Notifications
You must be signed in to change notification settings - Fork 441
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
Split processes overview page into sections #2756
Split processes overview page into sections #2756
Conversation
ProcessOverviewComponent no longer is responsible for displaying the table. As a result the tests no longer work and are no longer relevant.
I chose 2 characters instead of one in case a 'SUCCEEDED' process status is added in the future. 'SUCCEEDED' could encompass both 'COMPLETED' and 'FAILED' processes, but it's paginationId would clash with 'SCHEDULED' (both start with 's'). By choosing the first 2 characters of the status, this clash does not occur (ids would be 'sc' and 'su').
…ocess-admin-ui-redesign-8.0.0-next
1d02ef9
to
5857a8d
Compare
…ables' into process-admin-ui-redesign-8.0.0-next
I processed the feedback.
When a specific table contains no processes when the page is first opened, it now is collapsed by default.
Implementing a good solution to highlight processes that recently appeared in a table turned out to be a bit more difficult than initially anticipated so we took a different route here: |
I've tested the functionality (with the newest changes) but I've encountered an issue. If, with devtools open, you keep the tab running for a few minutes (on my laptop this issue occurs after 4 minutes), Chrome stops the page with the following warning: I think there might be an issue on handling subscriptions, and it might also be found on #2480. To reproduce the issue, just keep the Attaching the |
Hi @artlowel, |
Good catch @AndreaBarbasso I'm able to reproduce the issue. We're working on a fix |
…es_PR-feedback' into process-admin-ui-redesign-8.0.0-next
…ocess-admin-ui-redesign-8.0.0-next
769ff59
to
adea818
Compare
@AndreaBarbasso It should be fixed now |
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.
@artlowel and @AAwouters : I'm no longer able to get this to work properly. I'm running this with DSpace/DSpace#9241 as a backend & running in production mode: yarn build:prod; yarn serve:ssr
Now, when I go to the processes overview page I see this. The "Running" and "Scheduled" processes never complete...the "Loading..." message stays at all times.
In DevTools, I see the calls to access those processes both returned a 400 BAD REQUEST error. Here's the two calls that return 400
GET http://localhost:8080/server/api/system/processes/search/byProperty?page=0&size=5&sort=creationTime,DESC&processStatus=RUNNING
GET http://localhost:8080/server/api/system/processes/search/byProperty?page=0&size=5&sort=creationTime,DESC&processStatus=SCHEDULED
Additionally, with Chrome DevTools open on the "Network" tab, I see that every few seconds the same two REST API requests occur over and over again. In just 5 minutes, this page has send 150 requests to the REST API. Here's what the requests look like:
GET http://localhost:8080/server/api/system/processes/search/byProperty?page=0&size=5&sort=endTime,DESC&processStatus=FAILED
GET http://localhost:8080/server/api/system/processes/search/byProperty?page=0&size=5&sort=endTime,DESC&processStatus=COMPLETED
If I reload the page in the browser (triggering SSR), these two calls just start again every few seconds.
Am I somehow missing something? Does this require a different backend PR or is it now broken?
@tdonohue Each table re-requests its content every 5 seconds to have the latest status of the processes. As each table could have different pagination settings, and they request the processes based on their status, these calls are not easily combined. |
@AAwouters or @artlowel : Could you rebase this quickly? I just merged #2480 and it caused some minor conflicts. |
Hi @artlowel, |
@tdonohue |
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.
👍 Thanks @AAwouters and @artlowel . This looks good to me now. Everything appears to work.
A thought for the future... I am slightly concerned that this does 4 requests every 5 seconds. That could cause performance issues on the backend if several people are watching this page at once. E.g. 10 people on this page simultaneously means the frontend will send 40 requests to the backend every 5 seconds.
In other words, we may need to consider looking for a way to decrease the number of requests here if this page gets more usage -- otherwise it could start to bog down the backend. I don't have any great ideas right now, but wanted to point this out as something to consider in any follow-up work.
(We could minimally consider making the 5 second polling configurable in case it gets to be "too much" for some sites. But, I'm going to merge this as-is and consider that a follow-up bug fix if we decide it's worthwhile.)
References
First step of the plan detailed here
It builds on #2480
Description
This PR splits the process overview page up into separate sections for running, scheduled completed and failed. These lists update automatically
Instructions for Reviewers
Verify that the process overview page still works, that it updates automatically and that all processes are in the correct sections.
Since this builds on #2480, you can find the differences specific to this PR here
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.