Skip to content

billing banner appears on application load#26007

Merged
michellescripts merged 1 commit intomasterfrom
michelle/billing-banner-fix
May 11, 2023
Merged

billing banner appears on application load#26007
michellescripts merged 1 commit intomasterfrom
michelle/billing-banner-fix

Conversation

@michellescripts
Copy link
Copy Markdown
Contributor

@michellescripts michellescripts commented May 10, 2023

Before the billing banner was not displaying on application load, would show up on subsequent updates (page view, tab change).

Cause We need to check two values to determine if the billing banner should display: cfg.oss.isUsageBasedBilling and ctx.getFeatureFlags().billing. in e/Main ctx.getFeatureFlags().billing was returning false on load. This is because we call ctx.init in ./Main (a child component)

Solution

  • e/Main now checks cfg.oss.isUsageBasedBilling and if that is true, passes billing banner to ./Main
  • ./Main now checks ctx.getFeatureFlags().billing and if that is true, passes the billing banner to the banner list

Teleport.e implementation: https://github.com/gravitational/teleport.e/pull/1356
supports: https://github.com/gravitational/cloud/issues/3536

@michellescripts michellescripts marked this pull request as ready for review May 10, 2023 16:28
@github-actions github-actions Bot requested a review from rudream May 10, 2023 16:31
@michellescripts michellescripts force-pushed the michelle/billing-banner-fix branch from 2060403 to ebffe99 Compare May 10, 2023 23:14
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from rudream May 11, 2023 12:10
@michellescripts michellescripts force-pushed the michelle/billing-banner-fix branch from ebffe99 to 3bc37cb Compare May 11, 2023 14:07
@michellescripts michellescripts enabled auto-merge May 11, 2023 14:12
@michellescripts michellescripts added this pull request to the merge queue May 11, 2023
Merged via the queue into master with commit ce33cd5 May 11, 2023
@michellescripts michellescripts deleted the michelle/billing-banner-fix branch May 11, 2023 14:32
@r0mant r0mant mentioned this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants