Commit 13913483 authored by Adrien Morais-Mestre's avatar Adrien Morais-Mestre Committed by Thomas Untoja
Browse files

Revert "fix(UI): Remove checkbox for default options sent for ack (#11008)" (#11018)

This reverts commit 7805085f.
parent 6f868b05
......@@ -20,6 +20,8 @@ import {
labelNotify,
labelNotifyHelpCaption,
labelAcknowledgeServices,
labelPersistent,
labelSticky,
} from '../../../translatedLabels';
import { Resource } from '../../../models';
import useAclQuery from '../aclQuery';
......@@ -121,6 +123,34 @@ const DialogAcknowledge = ({
/>
</Grid>
)}
<Grid item>
<FormControlLabel
control={
<Checkbox
checked={values.persistent}
color="primary"
inputProps={{ 'aria-label': t(labelPersistent) }}
size="small"
onChange={handleChange('persistent')}
/>
}
label={t(labelPersistent) as string}
/>
</Grid>
<Grid item>
<FormControlLabel
control={
<Checkbox
checked={values.isSticky}
color="primary"
inputProps={{ 'aria-label': t(labelSticky) }}
size="small"
onChange={handleChange('isSticky')}
/>
}
label={t(labelSticky) as string}
/>
</Grid>
</Grid>
</Dialog>
);
......
......@@ -46,6 +46,7 @@ import {
labelCritical,
labelUnknown,
labelAddComment,
labelPersistent,
} from '../translatedLabels';
import useLoadResources from '../Listing/useLoadResources';
import useListing from '../Listing/useListing';
......@@ -76,7 +77,6 @@ jest.mock('react-redux', () => ({
const mockUserContext = {
acknowledgement: {
force_active_checks: true,
persistent: true,
sticky: false,
},
......@@ -285,8 +285,10 @@ describe(Actions, () => {
fireEvent.click(getByText(labelAcknowledge));
const notifyCheckbox = await findByLabelText(labelNotify);
const persistentCheckbox = await findByLabelText(labelPersistent);
fireEvent.click(notifyCheckbox);
fireEvent.click(persistentCheckbox);
fireEvent.click(getByLabelText(labelAcknowledgeServices));
mockedAxios.get.mockResolvedValueOnce({ data: {} });
......@@ -300,9 +302,8 @@ describe(Actions, () => {
{
acknowledgement: {
comment: labelAcknowledgedByAdmin,
force_active_checks: true,
is_notify_contacts: true,
is_persistent_comment: true,
is_persistent_comment: false,
is_sticky: false,
with_services: true,
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment