File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed
src/Pages/ResourceBrowser Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { Checkbox } from '@Common/Checkbox'
2
+ import { CHECKBOX_VALUE } from '@Common/Types'
3
+ import { AdditionalConfirmationModalOptionsProps } from './types'
4
+
5
+ const ForceDeleteOption = ( {
6
+ optionsData,
7
+ setOptionsData : setShouldForceDelete ,
8
+ children,
9
+ } : AdditionalConfirmationModalOptionsProps < boolean > ) => {
10
+ const shouldForceDelete = optionsData ?? false
11
+
12
+ const handleToggleShouldForceDelete = ( ) => {
13
+ setShouldForceDelete ( ! shouldForceDelete )
14
+ }
15
+
16
+ return (
17
+ < div className = "flexbox-col dc__gap-12 w-100" >
18
+ < Checkbox
19
+ value = { CHECKBOX_VALUE . CHECKED }
20
+ isChecked = { shouldForceDelete }
21
+ dataTestId = "force-delete-resource"
22
+ rootClassName = "m-0"
23
+ onChange = { handleToggleShouldForceDelete }
24
+ >
25
+ Force delete resource
26
+ </ Checkbox >
27
+
28
+ { children }
29
+ </ div >
30
+ )
31
+ }
32
+
33
+ export default ForceDeleteOption
Original file line number Diff line number Diff line change @@ -72,6 +72,18 @@ export const CORDON_NODE_MODAL_MESSAGING = {
72
72
cancel : 'Cancel' ,
73
73
}
74
74
75
+ export const DELETE_NODE_MODAL_MESSAGING = {
76
+ subtitle : (
77
+ < p className = "fs-13 fw-4 cn-8 m-0" >
78
+ Drain the node before deleting it as it may cause disruption because of pod deletion.
79
+ < br />
80
+ < br />
81
+ Are you sure you want to delete this node?
82
+ </ p >
83
+ ) ,
84
+ successInfoToastMessage : 'Node deletion initiated' ,
85
+ }
86
+
75
87
export const NODE_DRAIN_OPTIONS_CHECKBOX_CONFIG : {
76
88
key : Exclude < keyof NodeDrainRequest [ 'nodeDrainOptions' ] , 'gracePeriodSeconds' >
77
89
infoText : string
Original file line number Diff line number Diff line change @@ -20,3 +20,4 @@ export * from './constants'
20
20
export * from './types'
21
21
export * from './service'
22
22
export { default as NodeDrainOptions } from './NodeDrainOptions'
23
+ export { default as ForceDeleteOption } from './ForceDeleteOption'
You can’t perform that action at this time.
0 commit comments