File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const HelpNav = ({
36
36
setGettingStartedClicked,
37
37
showHelpCard,
38
38
} : HelpNavType ) => {
39
- const { currentServerInfo, handleOpenLicenseInfoDialog } = useMainContext ( )
39
+ const { currentServerInfo, handleOpenLicenseInfoDialog, showLicenseData } = useMainContext ( )
40
40
const isEnterprise = currentServerInfo ?. serverInfo ?. installationType === InstallationType . ENTERPRISE
41
41
const FEEDBACK_FORM_ID = `UheGN3KJ#source=${ window . location . hostname } `
42
42
@@ -89,6 +89,10 @@ const HelpNav = ({
89
89
onClickHelpOptions ( option )
90
90
}
91
91
92
+ const handleOpenLicenseDialog = ( ) => {
93
+ handleOpenLicenseInfoDialog ( )
94
+ }
95
+
92
96
const renderHelpOptions = ( ) : JSX . Element => (
93
97
< >
94
98
{ CommonHelpOptions . map ( ( option , index ) => (
@@ -105,12 +109,12 @@ const HelpNav = ({
105
109
< option . icon />
106
110
< div className = "ml-12 cn-9 fs-14" > { option . name } </ div >
107
111
</ a >
108
- { isEnterprise && index === 1 && (
112
+ { isEnterprise && showLicenseData && index === 1 && (
109
113
< >
110
114
< button
111
115
type = "button"
112
116
className = "dc__transparent help-card__option flexbox dc__align-items-center cn-9 dc__gap-12 fs-14"
113
- onClick = { handleOpenLicenseInfoDialog }
117
+ onClick = { handleOpenLicenseDialog }
114
118
>
115
119
< Icon name = "ic-devtron" color = "N600" size = { 20 } />
116
120
About Devtron
Original file line number Diff line number Diff line change 17
17
import { MutableRefObject , ReactNode } from 'react'
18
18
import { ServerInfo } from '../Components/Header/types'
19
19
import { SERVER_MODE } from '../../Common'
20
+ import { LicenseInfoDialogType } from '..'
20
21
21
22
export interface MainContext {
22
23
serverMode : SERVER_MODE
@@ -55,7 +56,11 @@ export interface MainContext {
55
56
isManifestScanningEnabled : boolean
56
57
canOnlyViewPermittedEnvOrgLevel : boolean
57
58
viewIsPipelineRBACConfiguredNode : ReactNode
58
- handleOpenLicenseInfoDialog : ( ) => void
59
+ handleOpenLicenseInfoDialog : (
60
+ initialDialogType ?: LicenseInfoDialogType . ABOUT | LicenseInfoDialogType . LICENSE ,
61
+ ) => void
62
+ showLicenseData : boolean
63
+ setShowLicenseData : ( showLicenseData : boolean ) => void
59
64
}
60
65
61
66
export interface MainContextProviderProps {
Original file line number Diff line number Diff line change @@ -1032,6 +1032,12 @@ export interface AppEnvIdType {
1032
1032
envId : number
1033
1033
}
1034
1034
1035
+ export enum LicenseInfoDialogType {
1036
+ ABOUT = 'about' ,
1037
+ LICENSE = 'license' ,
1038
+ UPDATE = 'update' ,
1039
+ }
1040
+
1035
1041
export enum LicensingErrorCodes {
1036
1042
FingerPrintMisMatch = '11001' ,
1037
1043
LicenseExpired = '11002' ,
You can’t perform that action at this time.
0 commit comments