Skip to content

Commit 0fa6109

Browse files
committed
Merge branch 'kubecon-2025' of https://github.com/devtron-labs/dashboard into feat/storage-backup
2 parents 6558c95 + d32ba57 commit 0fa6109

File tree

12 files changed

+339
-87
lines changed

12 files changed

+339
-87
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "1.20.3-alpha-9",
7+
"@devtron-labs/devtron-fe-common-lib": "1.20.3-pre-10",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/ApplicationMonitoring.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import { ApplicationMonitoringProps } from './types'
66
const ApplicationMonitoring = ({
77
prometheusConfig,
88
prometheusUrl,
9-
prometheusToggleEnabled,
10-
setPrometheusToggle,
9+
isAppMetricsEnabled,
10+
toggleAppMetrics,
1111
handleOnChange,
1212
onPrometheusAuthTypeChange,
1313
isGrafanaModuleInstalled,
14+
isCostVisibilityEnabled,
1415
}: ApplicationMonitoringProps) => (
1516
<div className="flexbox-col flex-grow-1 dc__gap-20 p-20">
1617
<div className="flexbox-col">
@@ -29,13 +30,18 @@ const ApplicationMonitoring = ({
2930
<DTSwitch
3031
name="toggle-configure-prometheus"
3132
ariaLabel="Toggle configure prometheus"
32-
isChecked={prometheusToggleEnabled}
33-
onChange={setPrometheusToggle}
34-
isDisabled={!isGrafanaModuleInstalled}
33+
isChecked={isAppMetricsEnabled}
34+
onChange={toggleAppMetrics}
35+
isDisabled={!isGrafanaModuleInstalled || (isAppMetricsEnabled && isCostVisibilityEnabled)}
36+
tooltipContent={
37+
isAppMetricsEnabled && isCostVisibilityEnabled
38+
? 'To disable application metrics, first disable cost visibility from cluster cost configuration.'
39+
: ''
40+
}
3541
/>
3642
</div>
37-
{!prometheusToggleEnabled && prometheusUrl && <PrometheusWarningInfo />}
38-
{prometheusToggleEnabled && (
43+
{!isAppMetricsEnabled && prometheusUrl && <PrometheusWarningInfo />}
44+
{isAppMetricsEnabled && (
3945
<PromoetheusConfigCard
4046
prometheusConfig={prometheusConfig}
4147
handleOnChange={handleOnChange}

src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/ClusterForm.components.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { ReactNode } from 'react'
2+
13
import { ButtonVariantType, ComponentSizeType, Icon, InfoBlock } from '@devtron-labs/devtron-fe-common-lib'
24

35
export const ClusterFormNavButton = ({
@@ -8,7 +10,7 @@ export const ClusterFormNavButton = ({
810
}: {
911
isActive: boolean
1012
title: string
11-
subtitle?: string
13+
subtitle?: ReactNode
1214
onClick: () => void
1315
}) => (
1416
<button
@@ -17,7 +19,7 @@ export const ClusterFormNavButton = ({
1719
onClick={onClick}
1820
>
1921
<span className={`fs-13 ${isActive ? 'cb-5 fw-6' : 'cn-9'}`}>{title}</span>
20-
{subtitle && <span className="fs-12 cn-7">{subtitle}</span>}
22+
{typeof subtitle === 'string' ? <span className="fs-12 cn-7">{subtitle}</span> : subtitle}
2123
</button>
2224
)
2325

0 commit comments

Comments
 (0)