-
Notifications
You must be signed in to change notification settings - Fork 11
Hook up jobs with BE #191
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
Hook up jobs with BE #191
Conversation
✅ Deploy Preview for ami-web ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| @@ -0,0 +1,2 @@ | |||
| export const COLLECTION = 'jobs' | |||
| export const REFETCH_INTERVAL = 10000 // Refetch every 10 second | |||
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.
@mihow here is the polling configured for jobs, you can tweak this value or set to undefined :)
✅ Deploy Preview for ami-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
|
||
| const COLLECTION = 'status/summary' | ||
| const REFETCH_INTERVAL = undefined // TODO: Refetch every 10 second | ||
| const REFETCH_INTERVAL = 10000 // Refetch every 10 second |
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.
Also added polling for status (numbers in header).
| .get<ServerStatus>(fetchUrl) | ||
| .then((res) => convertServerRecord(res.data)), | ||
| refetchInterval: REFETCH_INTERVAL, | ||
| retry: 0, |
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 skipped fetch retry while status endpoint was gone. Adding back!
ui/src/data-services/models/job.ts
Outdated
|
|
||
| get statusDetails(): string { | ||
| return 'More details about the job status.' | ||
| // TODO: Return BE value here when available. |
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.
ui/src/data-services/models/job.ts
Outdated
|
|
||
| get statusValue(): number { | ||
| // TODO: Return BE value here when available (number between 0 and 1). | ||
| switch (this.status) { |
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.
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.
|
|
||
| const name = stage.name | ||
| const status = this.getStatus(progress.status) | ||
| const statusLabel = this.getStatusLabel(status) |
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.
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.
c45a402 to
9bb6dd2
Compare
|
I guess we have two kinds of "fields" that look the same in the UI but get their values from different places
Maybe I should just remove the status fields from the config object?? Then the field name and the value with both only be in the progress object. |
Oh I see! We can have as is, I just pushed a small update that will check if present in config, if not look in progress. |










Some notes:
Screenshots: