-
Notifications
You must be signed in to change notification settings - Fork 172
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
fix: refresh freightline after warehouse completes refresh #1276
Conversation
Signed-off-by: Remington Breeze <remington@breeze.software>
❌ Deploy Preview for docs-kargo-akuity-io failed.
|
@@ -37,7 +37,10 @@ export const RepoNode = ({ nodeData, children }: Props) => { | |||
<div className='text-ellipsis whitespace-nowrap overflow-hidden'> | |||
{nodeData.warehouseName} | |||
</div> | |||
{nodeData.type !== NodeType.REPO_CHART && <FontAwesomeIcon icon={faBuilding} />} | |||
<div className='flex items-center'> | |||
{nodeData.refreshing && <FontAwesomeIcon icon={faCircleNotch} spin className='mr-2' />} |
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.
Adds refresh indicator for Warehouse nodes
Signed-off-by: Remington Breeze <remington@breeze.software>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1276 +/- ##
==========================================
+ Coverage 48.50% 48.79% +0.29%
==========================================
Files 127 127
Lines 9675 9746 +71
==========================================
+ Hits 4693 4756 +63
- Misses 4823 4830 +7
- Partials 159 160 +1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Remington Breeze <remington@breeze.software>
Signed-off-by: Remington Breeze <remington@breeze.software>
refetchAvailableFreight(); | ||
} | ||
|
||
const refreshing = e.warehouse?.metadata?.annotations['kargo.akuity.io/refresh']; |
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.
If refresh annotation is found on a warehouse, we don't refetch freight yet. Instead, save it to a map which indicates it started refreshing
refresh[e.warehouse?.metadata?.name || ''] = true; | ||
alert('detected refresh for warehouse'); | ||
} else if (refresh[e.warehouse?.metadata?.name || '']) { | ||
delete refresh[e.warehouse?.metadata?.name || '']; |
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.
If refresh annotation is not present, and this warehouse was refreshing previously, remove it from the map and refresh the freight line
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.
rubber stamp approval
Fixes #1202 (for real this time 🙂)