File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export function AppNotifications() {
54
54
showIcon = { true }
55
55
className = "flex rounded mb-2 w-full"
56
56
>
57
- < span > { topNotification } </ span >
57
+ < div > { topNotification } </ div >
58
58
</ Alert >
59
59
</ div >
60
60
) ;
Original file line number Diff line number Diff line change @@ -2254,10 +2254,22 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
2254
2254
const billingMode = await this . billingModes . getBillingModeForUser ( user , new Date ( ) ) ;
2255
2255
if ( billingMode . mode === "usage-based" ) {
2256
2256
const limit = await this . billingService . checkUsageLimitReached ( user ) ;
2257
+ let teamOrUser ;
2258
+ switch ( limit . attributionId . kind ) {
2259
+ case "user" : {
2260
+ teamOrUser = await this . userDB . findUserById ( limit . attributionId . userId ) ;
2261
+ break ;
2262
+ }
2263
+ case "team" : {
2264
+ teamOrUser = await this . teamDB . findTeamById ( limit . attributionId . teamId ) ;
2265
+ break ;
2266
+ }
2267
+ }
2268
+
2257
2269
if ( limit . reached ) {
2258
- result . unshift ( " The usage limit is reached." ) ;
2270
+ result . unshift ( ` The usage limit for ${ teamOrUser ?. name } is reached.` ) ;
2259
2271
} else if ( limit . almostReached ) {
2260
- result . unshift ( " The usage limit is almost reached." ) ;
2272
+ result . unshift ( ` The usage limit for ${ teamOrUser ?. name } is almost reached.` ) ;
2261
2273
}
2262
2274
}
2263
2275
} catch ( error ) {
You can’t perform that action at this time.
0 commit comments