File tree Expand file tree Collapse file tree 4 files changed +39
-1
lines changed
src/Shared/Components/DevtronLicenseCard Expand file tree Collapse file tree 4 files changed +39
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { ClipboardButton } from '@Common/index'
2
+
3
+ import { DOCUMENTATION_HOME_PAGE } from '@Common/Constants'
4
+ import { InfoIconTippy } from '..'
5
+ import { InstallFingerprintInfoProps } from './types'
6
+
7
+ const InstallationFingerprintInfo = ( { fingerprint, showHelpTooltip = false } : InstallFingerprintInfoProps ) => (
8
+ < div className = "flexbox-col dc__gap-6" >
9
+ < div className = "flexbox dc__align-items-center dc__gap-4" >
10
+ < span className = "fs-13 lh-20 cn-7 fw-4" > Installation Fingerprint</ span >
11
+ { showHelpTooltip && (
12
+ < InfoIconTippy
13
+ heading = "Installation Fingerprint"
14
+ infoText = "A unique fingerprint to identify your Devtron Installation. An enterprise license is generated against an installation fingerprint."
15
+ documentationLinkText = "Documentation"
16
+ iconClassName = "icon-dim-20 fcn-6"
17
+ placement = "right"
18
+ documentationLink = { DOCUMENTATION_HOME_PAGE }
19
+ />
20
+ ) }
21
+ </ div >
22
+ < div className = "flex dc__gap-8" >
23
+ < span className = "cn-9 fs-13 lh-1-5 fw-4 dc__truncate" > { fingerprint } </ span >
24
+ < ClipboardButton content = { fingerprint } />
25
+ </ div >
26
+ </ div >
27
+ )
28
+
29
+ export default InstallationFingerprintInfo
Original file line number Diff line number Diff line change 1
1
export { default as DevtronLicenseCard } from './DevtronLicenseCard'
2
2
export { parseDevtronLicenseDTOIntoLicenseCardData } from './utils'
3
+ export { default as InstallationFingerprintInfo } from './InstallationFingerprintInfo'
3
4
export * from './types'
Original file line number Diff line number Diff line change
1
+ import { DevtronLicenseBaseDTO } from '@Shared/index'
2
+
1
3
export enum LicenseStatus {
2
4
ACTIVE = 'ACTIVE' ,
3
5
EXPIRED = 'EXPIRED' ,
@@ -20,3 +22,7 @@ export type DevtronLicenseCardProps = {
20
22
licenseSuffix : string
21
23
}
22
24
)
25
+
26
+ export interface InstallFingerprintInfoProps extends Pick < DevtronLicenseBaseDTO , 'fingerprint' > {
27
+ showHelpTooltip ?: boolean
28
+ }
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ export const parseDevtronLicenseDTOIntoLicenseCardData = <isCentralDashboard ext
43
43
ttl,
44
44
licenseStatus : getDevtronLicenseStatus ( { ttl, reminderThreshold } ) ,
45
45
isTrial,
46
- ...( currentUserEmail === claimedByUserDetails ?. email ? { licenseKey : license } : { licenseSuffix : license } ) ,
46
+ ...( currentUserEmail && currentUserEmail === claimedByUserDetails ?. email
47
+ ? { licenseKey : license }
48
+ : { licenseSuffix : license } ) ,
47
49
}
48
50
}
You can’t perform that action at this time.
0 commit comments