File tree 3 files changed +10
-3
lines changed
renderer/components/cluster-settings
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,11 @@ export enum ClusterMetricsResourceType {
175
175
Namespace = "Namespace" ,
176
176
}
177
177
178
+ /**
179
+ * The default filesystem mountpoints for metrics
180
+ */
181
+ export const initialFilesystemMountpoints = "/" ;
182
+
178
183
/**
179
184
* The default node shell image
180
185
*/
Original file line number Diff line number Diff line change 6
6
import { apiPrefix } from "../../../common/vars" ;
7
7
import { getRouteInjectable } from "../../router/router.injectable" ;
8
8
import type { ClusterPrometheusMetadata } from "../../../common/cluster-types" ;
9
- import { ClusterMetadataKey } from "../../../common/cluster-types" ;
9
+ import { ClusterMetadataKey , initialFilesystemMountpoints } from "../../../common/cluster-types" ;
10
10
import type { Cluster } from "../../../common/cluster/cluster" ;
11
11
import { clusterRoute } from "../../router/route" ;
12
12
import { isObject } from "lodash" ;
@@ -69,7 +69,7 @@ const addMetricsRouteInjectable = getRouteInjectable({
69
69
const queryParams : Partial < Record < string , string > > = Object . fromEntries ( query . entries ( ) ) ;
70
70
const prometheusMetadata : ClusterPrometheusMetadata = { } ;
71
71
const prometheusHandler = di . inject ( prometheusHandlerInjectable , cluster ) ;
72
- const mountpoints = cluster . preferences . filesystemMountpoints || "/" ;
72
+ const mountpoints = cluster . preferences . filesystemMountpoints || initialFilesystemMountpoints ;
73
73
74
74
try {
75
75
const { prometheusPath, provider } = await prometheusHandler . getPrometheusDetails ( ) ;
Original file line number Diff line number Diff line change 6
6
import React from "react" ;
7
7
import { observer , disposeOnUnmount } from "mobx-react" ;
8
8
import type { Cluster } from "../../../common/cluster/cluster" ;
9
+ import { initialFilesystemMountpoints } from "../../../common/cluster-types" ;
9
10
import { SubTitle } from "../layout/sub-title" ;
10
11
import type { SelectOption } from "../select" ;
11
12
import { Select } from "../select" ;
@@ -36,6 +37,7 @@ class NonInjectedClusterPrometheusSetting extends React.Component<ClusterPrometh
36
37
@observable path = "" ;
37
38
@observable selectedOption : ProviderValue = autoDetectPrometheus ;
38
39
@observable loading = true ;
40
+ readonly initialFilesystemMountpoints = initialFilesystemMountpoints ;
39
41
readonly loadedOptions = observable . map < string , MetricProviderInfo > ( ) ;
40
42
41
43
@computed get options ( ) : SelectOption < ProviderValue > [ ] {
@@ -183,7 +185,7 @@ class NonInjectedClusterPrometheusSetting extends React.Component<ClusterPrometh
183
185
value = { this . mountpoints }
184
186
onChange = { ( value ) => this . mountpoints = value }
185
187
onBlur = { this . onSaveMountpoints }
186
- placeholder = "/"
188
+ placeholder = { this . initialFilesystemMountpoints }
187
189
/>
188
190
< small className = "hint" >
189
191
{ `A regexp for the label with the filesystem mountpoints that will create a graph for disk usage. For the root disk only use "/" and for all disks use ".*".` }
You can’t perform that action at this time.
0 commit comments