Skip to content

Commit a0a16e8

Browse files
authored
Merge pull request #2822 from devtron-labs/fix/ask-devtron-empty-state
fix: ask devtron empty state in oss
2 parents 975cc23 + a1d7e3c commit a0a16e8

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

src/components/common/SidePanel/SidePanelContent.tsx

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,36 @@ import { SidePanelHeaderActions } from './SidePanelHeaderActions'
2121
import { SidePanelContentProps } from './types'
2222
import { getContentWrapperClassNameForTab, renderOpenTicketButton } from './utils'
2323

24-
const AIChat = importComponentFromFELibrary(
25-
'AIChat',
26-
() => (
27-
<EnterpriseTrialDialog
28-
featureTitle="Ask Devtron Intelligence"
29-
featureDescription="Supercharge your troubleshooting! Instantly ask AI about your application or Kubernetes issues and get expert guidance at your fingertips."
30-
showBorder={false}
31-
/>
32-
),
33-
'function',
34-
)
24+
const AIChat = importComponentFromFELibrary('AIChat', null, 'function')
3525

3626
export const SidePanelContent = ({ onClose, setSidePanelConfig, sidePanelConfig }: SidePanelContentProps) => {
3727
const tab = sidePanelConfig.state as SidePanelTab
3828

3929
const renderAIChat = () => {
40-
// NOTE: even if flag is off, for oss clients need to show EnterpriseTrialDialog
41-
if (!AIChat || window._env_?.FEATURE_ASK_DEVTRON_EXPERT) {
42-
return <AIChat SidePanelHeaderActions={SidePanelHeaderActions} />
30+
if (!AIChat) {
31+
return (
32+
<EnterpriseTrialDialog
33+
featureTitle="Ask Devtron Intelligence"
34+
featureDescription="Supercharge your troubleshooting! Instantly ask AI about your application or Kubernetes issues and get expert guidance at your fingertips."
35+
showBorder={false}
36+
/>
37+
)
4338
}
4439

45-
return (
46-
<GenericEmptyState
47-
title="AI Integration not configured"
48-
subTitle="For AI-powered insights, please follow documentation or contact the Devtron team."
49-
SvgImage={ICMaintenance}
50-
imageType={ImageType.Medium}
51-
isButtonAvailable
52-
renderButton={renderOpenTicketButton}
53-
/>
54-
)
40+
if (!window._env_?.FEATURE_ASK_DEVTRON_EXPERT) {
41+
return (
42+
<GenericEmptyState
43+
title="AI Integration not configured"
44+
subTitle="For AI-powered insights, please follow documentation or contact the Devtron team."
45+
SvgImage={ICMaintenance}
46+
imageType={ImageType.Medium}
47+
isButtonAvailable
48+
renderButton={renderOpenTicketButton}
49+
/>
50+
)
51+
}
52+
53+
return <AIChat SidePanelHeaderActions={SidePanelHeaderActions} />
5554
}
5655

5756
return (

0 commit comments

Comments
 (0)