File tree Expand file tree Collapse file tree
web-admin/src/features/projects/status/overview Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 import { page } from " $app/stores" ;
33 import {
44 createAdminServiceGetProject ,
5+ createAdminServiceGetBillingSubscription ,
56 V1DeploymentStatus ,
67 } from " @rilldata/web-admin/client" ;
8+ import {
9+ isFreePlan ,
10+ isProPlan ,
11+ isTrialPlan ,
12+ } from " @rilldata/web-admin/features/billing/plans/utils" ;
713 import { extractBranchFromPath } from " @rilldata/web-admin/features/branches/branch-utils" ;
814 import { useDashboardsLastUpdated } from " @rilldata/web-admin/features/dashboards/listing/selectors" ;
915 import { useGithubLastSynced } from " @rilldata/web-admin/features/projects/selectors" ;
111117
112118 // Slots
113119 $ : currentSlots = Number (projectData ?.prodSlots ) || 0 ;
120+
121+ // Billing plan detection
122+ $ : subscriptionQuery = createAdminServiceGetBillingSubscription (organization );
123+ $ : planName = $subscriptionQuery ?.data ?.subscription ?.plan ?.name ?? " " ;
124+ $ : showSlots =
125+ isTrialPlan (planName ) || isFreePlan (planName ) || isProPlan (planName );
114126 </script >
115127
116128<OverviewCard title =" Deployment" >
147159 </span >
148160 </div >
149161
150- {#if currentSlots > 0 }
162+ {#if ! $subscriptionQuery ?. isLoading && showSlots }
151163 <div class =" info-row" >
152164 <span class =" info-label" >Cluster Size</span >
153165 <span class =" info-value" >
You can’t perform that action at this time.
0 commit comments