-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add Usage per connection block #7102
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
Conversation
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.
@@ -14,4 +14,10 @@ const useDestinationDefinitionList = (): { | |||
}); | |||
}; | |||
|
|||
export { useDestinationDefinitionList }; | |||
const useDestinationDefinition = (id: string): DestinationDefinition => { |
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.
The main idea of adding name and ids into CreditConsumptionByConnector is to not make a bunch of additional requests to backend and be able to get info from request or cache.
Are we sending here request for every such entity? Or is it picked from cache? I believe we retrieve these entities only to display icons.
We should make sure that we either:
- pick info from cache for icons if possible
- expand CreditConsumptionByConnector entity with icon, so we won't make bunch of unnecessary requests.
destinationIcon: currentDestinationDefinition?.icon, | ||
creditsConsumedPercent: | ||
item.creditsConsumed !== 0 | ||
? (item.creditsConsumed / sumCreditsConsumed) * 100 |
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.
What if sumCreditsConsumed
is 0? I think we could change it to sumCreditsConsumed ? item.creditsConsumed / sumCreditsConsumed * 100 : 0
What
Adds table with per-connection billing.
Closes #6956