Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ff13bd4a
Commit
ff13bd4a
authored
Jun 25, 2021
by
Vitaly Slobodin
Committed by
Paul Slaughter
Jun 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace $emit call with single arg in EscalationPolicies
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64514
parent
c1e45452
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
ee/app/assets/javascripts/escalation_policies/components/add_edit_escalation_policy_form.vue
...n_policies/components/add_edit_escalation_policy_form.vue
+1
-1
ee/app/assets/javascripts/escalation_policies/components/escalation_rule.vue
...cripts/escalation_policies/components/escalation_rule.vue
+8
-5
ee/spec/frontend/escalation_policies/add_edit_escalation_policy_form_spec.js
...calation_policies/add_edit_escalation_policy_form_spec.js
+1
-1
No files found.
ee/app/assets/javascripts/escalation_policies/components/add_edit_escalation_policy_form.vue
View file @
ff13bd4a
...
...
@@ -97,7 +97,7 @@ export default {
addRule
()
{
this
.
rules
.
push
({
...
cloneDeep
(
DEFAULT_ESCALATION_RULE
),
key
:
uniqueId
()
});
},
updateEscalationRules
(
index
,
rule
)
{
updateEscalationRules
(
{
rule
,
index
}
)
{
this
.
rules
[
index
]
=
{
...
this
.
rules
[
index
],
...
rule
};
this
.
emitRulesUpdate
();
},
...
...
ee/app/assets/javascripts/escalation_policies/components/escalation_rule.vue
View file @
ff13bd4a
...
...
@@ -113,11 +113,14 @@ export default {
this
.
emitUpdate
();
},
emitUpdate
()
{
this
.
$emit
(
'
update-escalation-rule
'
,
this
.
index
,
{
this
.
$emit
(
'
update-escalation-rule
'
,
{
index
:
this
.
index
,
rule
:
{
oncallScheduleIid
:
parseInt
(
this
.
oncallScheduleIid
,
10
),
action
:
this
.
action
,
status
:
this
.
status
,
elapsedTimeSeconds
:
parseInt
(
this
.
elapsedTimeSeconds
,
10
),
},
});
},
},
...
...
ee/spec/frontend/escalation_policies/add_edit_escalation_policy_form_spec.js
View file @
ff13bd4a
...
...
@@ -85,7 +85,7 @@ describe('AddEscalationPolicyForm', () => {
elapsedTimeSeconds
:
30
,
oncallScheduleIid
:
2
,
};
findRules
().
at
(
0
).
vm
.
$emit
(
'
update-escalation-rule
'
,
0
,
updatedRule
);
findRules
().
at
(
0
).
vm
.
$emit
(
'
update-escalation-rule
'
,
{
index
:
0
,
rule
:
updatedRule
}
);
expect
(
wrapper
.
emitted
(
'
update-escalation-policy-form
'
)[
0
]).
toEqual
([
{
field
:
'
rules
'
,
value
:
[
expect
.
objectContaining
(
updatedRule
)]
},
]);
...
...
Write
Preview
Markdown
is supported
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