Skip to content

Commit 7151d5d

Browse files
committed
fix: hide log analyzer for virtual environment
1 parent d4fb481 commit 7151d5d

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

src/components/app/details/appDetails/AppDetails.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ export const Details: React.FC<DetailsType> = ({
622622
monitoringTools={externalLinksAndTools.monitoringTools}
623623
isDevtronApp
624624
isDeploymentBlocked={isDeploymentBlocked}
625+
isVirtualEnvironment={isVirtualEnvRef.current}
625626
/>
626627
)
627628
}

src/components/v2/appDetails/AppDetails.component.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ const AppDetailsComponent = ({
175175
externalLinks={externalLinks}
176176
monitoringTools={monitoringTools}
177177
isExternalApp={isExternalApp}
178+
isVirtualEnvironment={isVirtualEnv.current}
178179
/>
179180
)
180181
}

src/components/v2/appDetails/NodeTreeDetailTab.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const NodeTreeDetailTab = ({
3333
isDevtronApp = false,
3434
isExternalApp,
3535
isDeploymentBlocked,
36+
isVirtualEnvironment
3637
}: NodeTreeDetailTabProps) => {
3738
const params = useParams<{ appId: string; envId: string; nodeType: string }>()
3839
const { path, url } = useRouteMatch()
@@ -43,8 +44,13 @@ const NodeTreeDetailTab = ({
4344
useEffect(() => {
4445
const _pods = IndexStore.getNodesByKind(NodeType.Pod)
4546
const isLogAnalyserURL = window.location.href.indexOf(URLS.APP_DETAILS_LOG) > 0
46-
AppDetailsStore.initAppDetailsTabs(url, _pods.length > 0, isLogAnalyserURL, isExternalApp)
47-
}, [params.appId, params.envId])
47+
AppDetailsStore.initAppDetailsTabs(
48+
url,
49+
_pods.length > 0 && !isVirtualEnvironment,
50+
isLogAnalyserURL,
51+
isExternalApp,
52+
)
53+
}, [params.appId, params.envId, isVirtualEnvironment])
4854

4955
const handleFocusTabs = () => {
5056
if (tabRef?.current) {

src/components/v2/appDetails/appDetails.type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ export interface NodeTreeDetailTabProps {
491491
isDevtronApp?: boolean
492492
isExternalApp?: boolean
493493
isDeploymentBlocked?: boolean
494+
isVirtualEnvironment: boolean
494495
}
495496

496497
export interface K8ResourceComponentProps {

0 commit comments

Comments
 (0)