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

index.html: get job details per AJAX #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Sep 9, 2018

This is still somewhat unstable, because if there is a currently building job that has failed jobs, the click event for all links is fired multiple times for some reason (causing the details not to be shown).

@miri64
Copy link
Member Author

miri64 commented Sep 9, 2018

@cladmi I believe you asked for something like this ;-)

@miri64
Copy link
Member Author

miri64 commented Sep 10, 2018

I think the problem is that during building the status row is completely rewritten everytime the websocket sends a message instead of being updated on the fly :-/... This is actually pretty tricky to rewrite and would require some kind of global state for the PRs in the Javascript. So I would prefer to go ahead with the current (slightly broken) solution and rewrite the PR view construction at a later point.

@kaspar030
Copy link
Contributor

We could change parse_output.py to re-send the last update after a maximum period (e.g., 1sec or 5sec). Another option would be to cache the last status at the websocket handler, then directly send it to new connections.

@kaspar030
Copy link
Contributor

Nice, eh? frontend, backend, middleend, so many places to put logic.

@miri64
Copy link
Member Author

miri64 commented Sep 21, 2018

I tried some statehandling in the frontend (instead of just replacing GUI, like it is now). The only downside to that was, that the jobs aren't listed alphabetically any more and static tests weren't at the top...

@miri64
Copy link
Member Author

miri64 commented Sep 21, 2018

Nice, eh? frontend, backend, middleend, so many places to put logic.

Welcome to webdev ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants