File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ export const ALLOWED_CLUSTER_IN_FREEMIUM = 2
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export type DevtronLicenseCardProps = {
4646)
4747
4848export type DevtronLicenseInfo = Omit < DevtronLicenseCardProps , 'appTheme' > &
49- Pick < DevtronLicenseDTO , 'fingerprint' | 'showLicenseData' | 'licenseStatusError' >
49+ Pick < DevtronLicenseDTO , 'fingerprint' | 'showLicenseData' | 'licenseStatusError' | 'moduleLimits' >
5050
5151export interface ActivateLicenseDialogProps extends Pick < DevtronLicenseBaseDTO , 'fingerprint' > {
5252 enterpriseName : string
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import { DATE_TIME_FORMATS } from '@Common/Constants'
2020import { getUrlWithSearchParams } from '@Common/index'
2121import { DevtronLicenseDTO } from '@Shared/types'
2222
23+ import { ALLOWED_CLUSTER_IN_FREEMIUM } from './constants'
2324import { DevtronLicenseCardProps , DevtronLicenseInfo , LicenseStatus } from './types'
2425
2526export const getLicenseColorsAccordingToStatus = (
@@ -87,6 +88,10 @@ export const parseDevtronLicenseData = (result: DevtronLicenseDTO): DevtronLicen
8788 fingerprint : result ?. fingerprint || '' ,
8889 showLicenseData : result ?. showLicenseData ,
8990 licenseStatusError : result ?. licenseStatusError ,
91+ moduleLimits : {
92+ allAllowed : result ?. moduleLimits ?. allAllowed || false ,
93+ maxAllowedClusters : result ?. moduleLimits ?. maxAllowedClusters || ALLOWED_CLUSTER_IN_FREEMIUM ,
94+ } ,
9095 }
9196}
9297
Original file line number Diff line number Diff line change @@ -1141,11 +1141,16 @@ export type DevtronLicenseDTO<isCentralDashboard extends boolean = false> = Devt
11411141 } | null
11421142 showLicenseData ?: never
11431143 licenseStatusError ?: never
1144+ moduleLimits ?: never
11441145 }
11451146 : {
11461147 claimedByUserDetails ?: never
11471148 showLicenseData : boolean
11481149 licenseStatusError ?: LicenseErrorStruct
1150+ moduleLimits : {
1151+ allAllowed : boolean
1152+ maxAllowedClusters : number
1153+ }
11491154 } )
11501155
11511156export type CountryISO2Type = ParsedCountry [ 'iso2' ]
You can’t perform that action at this time.
0 commit comments