Skip to content

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

Merged
merged 8 commits into from
Feb 9, 2022
Merged

Conversation

jamakase
Copy link
Contributor

@jamakase jamakase commented Oct 17, 2021

What

Adds table with per-connection billing.

Closes #6956

Снимок экрана 2022-01-24 в 01 40 00

@jamakase jamakase self-assigned this Oct 17, 2021
@jamakase jamakase assigned juliachvyrova and unassigned jamakase Jan 21, 2022
@github-actions github-actions bot added the area/platform issues related to the platform label Jan 21, 2022
@juliachvyrova juliachvyrova temporarily deployed to more-secrets January 21, 2022 21:19 Inactive
@juliachvyrova juliachvyrova marked this pull request as ready for review January 23, 2022 22:41
@juliachvyrova juliachvyrova requested a review from jrhizor January 23, 2022 22:41
@juliachvyrova juliachvyrova temporarily deployed to more-secrets January 31, 2022 21:39 Inactive
@juliachvyrova juliachvyrova temporarily deployed to more-secrets January 31, 2022 22:14 Inactive
@juliachvyrova juliachvyrova temporarily deployed to more-secrets February 1, 2022 20:24 Inactive
Copy link
Contributor Author

@jamakase jamakase left a 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 => {
Copy link
Contributor Author

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.

@juliachvyrova juliachvyrova temporarily deployed to more-secrets February 3, 2022 21:19 Inactive
destinationIcon: currentDestinationDefinition?.icon,
creditsConsumedPercent:
item.creditsConsumed !== 0
? (item.creditsConsumed / sumCreditsConsumed) * 100
Copy link
Contributor Author

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

@juliachvyrova juliachvyrova temporarily deployed to more-secrets February 7, 2022 22:20 Inactive
@jamakase jamakase merged commit 0587380 into master Feb 9, 2022
@jamakase jamakase deleted the jamakase/usage-per-connection branch February 9, 2022 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

per-connection detailed billing ui
3 participants