Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
centreon
centreon
Commits
13913483
Commit
13913483
authored
Apr 25, 2022
by
Adrien Morais-Mestre
Committed by
Thomas Untoja
Apr 25, 2022
Browse files
Revert "fix(UI): Remove checkbox for default options sent for ack (#11008)" (#11018)
This reverts commit
7805085f
.
parent
6f868b05
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/front_src/src/Resources/Actions/Resource/Acknowledge/Dialog.tsx
View file @
13913483
...
...
@@ -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
>
);
...
...
www/front_src/src/Resources/Actions/index.test.tsx
View file @
13913483
...
...
@@ -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
:
tru
e
,
is_persistent_comment
:
fals
e
,
is_sticky
:
false
,
with_services
:
true
,
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment