File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ const ApplicationMonitoring = ({
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" >
@@ -31,7 +32,12 @@ const ApplicationMonitoring = ({
3132 ariaLabel = "Toggle configure prometheus"
3233 isChecked = { isAppMetricsEnabled }
3334 onChange = { toggleAppMetrics }
34- isDisabled = { ! isGrafanaModuleInstalled }
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 >
3743 { ! isAppMetricsEnabled && prometheusUrl && < PrometheusWarningInfo /> }
Original file line number Diff line number Diff line change @@ -597,6 +597,7 @@ const ClusterForm = ({
597597 handleOnChange = { handleOnChange }
598598 onPrometheusAuthTypeChange = { onPrometheusAuthTypeChange }
599599 isGrafanaModuleInstalled = { isGrafanaModuleInstalled }
600+ isCostVisibilityEnabled = { costModuleState . enabled }
600601 />
601602 </ div >
602603 )
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ export interface ApplicationMonitoringProps {
4040 handleOnChange : ( event : SyntheticEvent ) => void
4141 onPrometheusAuthTypeChange : ( event : SyntheticEvent ) => void
4242 isGrafanaModuleInstalled : boolean
43+ isCostVisibilityEnabled : boolean
4344}
4445
4546export enum ClusterConfigTabEnum {
You can’t perform that action at this time.
0 commit comments