-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(billing): add workspace usage graph and connection table (#13586)
Co-authored-by: Parker Mossman <parker@airbyte.io> Co-authored-by: Tim Roes <tim@airbyte.io>
- Loading branch information
1 parent
12319bb
commit b886328
Showing
22 changed files
with
544 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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 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
16 changes: 16 additions & 0 deletions
16
airbyte-webapp/src/core/api/hooks/cloud/useGetWorkspaceUsage.ts
This file contains 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,16 @@ | ||
import { useCurrentWorkspaceId } from "area/workspace/utils"; | ||
import { getWorkspaceUsage } from "core/api/generated/AirbyteClient"; | ||
import { ConsumptionTimeWindow } from "core/api/generated/AirbyteClient.schemas"; | ||
import { useRequestOptions } from "core/api/useRequestOptions"; | ||
import { useSuspenseQuery } from "core/api/useSuspenseQuery"; | ||
|
||
import { workspaceKeys } from "../workspaces"; | ||
|
||
export const useGetWorkspaceUsage = ({ timeWindow }: { timeWindow: ConsumptionTimeWindow }) => { | ||
const requestOptions = useRequestOptions(); | ||
const workspaceId = useCurrentWorkspaceId(); | ||
|
||
return useSuspenseQuery(workspaceKeys.usage(workspaceId, timeWindow), () => | ||
getWorkspaceUsage({ workspaceId, timeWindow }, requestOptions) | ||
); | ||
}; |
This file contains 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 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 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 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 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 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 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
Oops, something went wrong.