-
Notifications
You must be signed in to change notification settings - Fork 26
print job status polling #1894
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
Open
thebeninator
wants to merge
23
commits into
dev
Choose a base branch
from
ben/print_jobs
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
print job status polling #1894
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
57bf38d
save
thebeninator 890a5b3
poll job status on print page; local storage first pass
thebeninator 6add54c
delete printId from local storage on complete
thebeninator 8f50098
resume polling if printId still exists
thebeninator d8179ce
add undefined check for localStorage in useEffect
thebeninator aad6860
save
thebeninator 5403349
save
thebeninator de4e720
use promise for tryResolvePrint
thebeninator 177fc20
convert /status to GET, require token
thebeninator 60ad976
multiple print job tracking first pass
thebeninator 9eb41ee
fix lint
thebeninator 78d7f23
fix interval using stale jobs state
thebeninator 837b980
implement doodoo ui for active prints
thebeninator eb764ad
store job in local immediately; remove guard clause for 'PRINTED' state
thebeninator ae994b7
some clean up
thebeninator 0c0767a
FIX LINT
thebeninator 2f15f17
check if localstorage printJobs exists first before setting state
thebeninator 7faa2bc
undoodoo the doodoo ui first pass
thebeninator 6ab42d1
implement page escrow
thebeninator 85a6671
some cleanup; actually save escrow modify on print fail
thebeninator 02b2748
failed/completed jobs notifs now persist for 5 secs
thebeninator abdf167
fix fail/complete notif not being destroyed after page refresh
thebeninator a4586c7
rename function
thebeninator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import React from 'react'; | ||
|
|
||
| export default function JobStatus(props) { | ||
| return ( | ||
| <div key={props.id} className='flex items-center justify-center w-full mt-10'> | ||
| <div role="alert" className={'w-1/2 text-center alert alert-' + (props.status === 'failed' ? 'error' : 'success')}> | ||
| <svg xmlns="http://www.w3.org/2000/svg" className="w-6 h-6 stroke-current shrink-0" fill="none" viewBox="0 0 24 24"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 13V8m0 8h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" /></svg> | ||
| <p className=''>{props.fileName} ({props.id}): {props.status}</p> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.