@@ -32,6 +32,8 @@ import {
32
32
ToastVariantType ,
33
33
} from '@devtron-labs/devtron-fe-common-lib'
34
34
35
+ import ImgEmptyChartGroup from '@Images/[email protected] '
36
+
35
37
import { updateTaints } from '../clusterNodes.service'
36
38
import { EDIT_TAINTS_MODAL_MESSAGING , TAINTS_TABLE_HEADERS } from '../constants'
37
39
import { EditTaintsModalType , EditTaintsRequest , TaintsTableHeaderKeys , TaintsTableType } from '../types'
@@ -95,7 +97,11 @@ const EditTaintsModal = ({ name, version, kind, taints, closePopup }: EditTaints
95
97
96
98
const handleDeleteTaint : TaintsTableType [ 'onRowDelete' ] = ( row ) => {
97
99
const filteredTaintList = taintList . filter ( ( { id } ) => id !== row . id )
100
+ const updatedTaintCellError = structuredClone ( taintCellError )
101
+ delete updatedTaintCellError [ row . id ]
102
+
98
103
setTaintList ( filteredTaintList )
104
+ setTaintCellError ( updatedTaintCellError )
99
105
}
100
106
101
107
const handleEditTaint : TaintsTableType [ 'onRowEdit' ] = ( row , headerKey , value ) => {
@@ -149,8 +155,8 @@ const EditTaintsModal = ({ name, version, kind, taints, closePopup }: EditTaints
149
155
return (
150
156
< Drawer position = "right" width = "100%" minWidth = "800px" maxWidth = "1024px" onEscape = { onClose } >
151
157
< div className = "flexbox-col bg__primary h-100 flex-grow-1 mh-0" >
152
- < div className = "flex flex-align-center flex-justify bg__primary pt-16 pr-20 pb-16 pl-20 dc__border -bottom" >
153
- < h2 className = "fs-16 fw-6 lh-1-43 m-0 cn-9 dc__truncate" > { `${ EDIT_TAINTS_MODAL_MESSAGING . titlePrefix } '${ name } '` } </ h2 >
158
+ < div className = "flex flex-align-center flex-justify bg__primary px-20 pt-12 pb-11 border__primary- -bottom" >
159
+ < h2 className = "fs-16 fw-6 lh-1-5 m-0 cn-9 dc__truncate" > { `${ EDIT_TAINTS_MODAL_MESSAGING . titlePrefix } '${ name } '` } </ h2 >
154
160
< Button
155
161
dataTestId = "edit-taints-modal-close"
156
162
ariaLabel = "edit-taints-modal-close"
@@ -167,6 +173,7 @@ const EditTaintsModal = ({ name, version, kind, taints, closePopup }: EditTaints
167
173
< GenericEmptyState
168
174
title = { EDIT_TAINTS_MODAL_MESSAGING . emptyState . title }
169
175
subTitle = { EDIT_TAINTS_MODAL_MESSAGING . emptyState . subTitle }
176
+ image = { ImgEmptyChartGroup }
170
177
isButtonAvailable
171
178
renderButton = { ( ) => (
172
179
< Button
@@ -209,12 +216,13 @@ const EditTaintsModal = ({ name, version, kind, taints, closePopup }: EditTaints
209
216
onRowEdit = { handleEditTaint }
210
217
cellError = { taintCellError }
211
218
isAdditionNotAllowed
219
+ shouldAutoFocusOnMount
212
220
/>
213
221
</ >
214
222
) }
215
223
</ div >
216
224
{ ! isTaintListEmpty && (
217
- < div className = "dc__border-top flex right p-16 dc__gap-8 " >
225
+ < div className = "dc__border-top flex right p-16 dc__gap-12 " >
218
226
< Button
219
227
dataTestId = "edit-taints-modal-cancel"
220
228
variant = { ButtonVariantType . secondary }
0 commit comments