Skip to content

Commit cad30b6

Browse files
authored
Merge pull request #2688 from devtron-labs/fix/ai-integration-flag
chore: return false for ai button if flag is false
2 parents c8b013d + 239f67c commit cad30b6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/components/common/helpers/Helpers.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,11 @@ export const convertToOptionsList = (
785785
}
786786

787787
export const importComponentFromFELibrary = (componentName: string, defaultComponent?, type?: 'function') => {
788+
// Adding this check as we do not want to import the component if flag is off
789+
// Using this as a hack, to be removed soon
790+
if (!window._env_.FEATURE_AI_INTEGRATION_ENABLE && componentName === 'ExplainWithAIButton') {
791+
return null
792+
}
788793
try {
789794
let component = defaultComponent || null
790795
if (!module) {

src/components/v2/appDetails/k8Resource/k8resources.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
grid-template-columns: 1fr 80px 20px;
3030
column-gap: 12px;
3131

32+
&.explain-ai-button {
33+
grid-template-columns: 1fr 80px 32px 20px !important;
34+
}
35+
3236
&--col-6 {
3337
grid-template-columns: 1fr 50px 100px 60px 80px 20px;
3438

0 commit comments

Comments
 (0)