Skip to content

Commit 7263f4c

Browse files
committed
[dashboard] display credit usage
1 parent ea1090b commit 7263f4c

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

components/dashboard/src/components/WorkspaceClass.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ function WorkspaceClass(props: WorkspaceClassProps) {
5757
return <ellipse cx={0.8 + i * 2.5} cy="-3" rx="0.8" ry="0.8" style={{ fill: "#FFB45B" }} />;
5858
})}
5959
</svg>
60+
<div
61+
className={`text-sm font-normal truncate w-full ${
62+
props.selected ? "text-gray-300 dark:text-gray-500" : "text-gray-500 dark:text-gray-400"
63+
}`}
64+
>
65+
{(props?.powerUps || 1) * 10} credits/hour
66+
</div>
6067
</div>
6168
</div>
6269
</div>

components/server/ee/src/workspace/gitpod-server-impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
21552155
try {
21562156
customer = (await this.billingService.getStripeCustomer({ attributionId })).customer;
21572157
} catch (e) {
2158-
console.error(e);
2158+
log.error(e);
21592159
}
21602160
if (customer) {
21612161
// NOTE: this is a temporary workaround, as long as we're not automatically re-create the customer
@@ -2171,7 +2171,7 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
21712171
return;
21722172
}
21732173

2174-
// otherwise we need to create a new costomer.
2174+
// otherwise we need to create a new customer.
21752175
try {
21762176
await this.billingService.createStripeCustomer({
21772177
attributionId,

components/usage/pkg/stripe/stripe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (c *Client) GetCustomerByAttributionID(ctx context.Context, attributionID s
215215
}
216216

217217
if len(customers) == 0 {
218-
return nil, status.Errorf(codes.NotFound, "no team customer found for attribution_id: %s", attributionID)
218+
return nil, status.Errorf(codes.NotFound, "no customer found for attribution_id: %s", attributionID)
219219
}
220220
if len(customers) > 1 {
221221
return nil, status.Errorf(codes.FailedPrecondition, "found multiple customers for attributiuon_id: %s", attributionID)

0 commit comments

Comments
 (0)