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
5d867627
Commit
5d867627
authored
Sep 21, 2020
by
David O'Regan
Committed by
Simon Knox
Sep 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow alerts to open on new tab
parent
151c7fc7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
app/assets/javascripts/alert_management/components/alert_management_table.vue
...ts/alert_management/components/alert_management_table.vue
+2
-2
changelogs/unreleased/225655-alert-new-page.yml
changelogs/unreleased/225655-alert-new-page.yml
+5
-0
spec/frontend/alert_management/components/alert_management_table_spec.js
...lert_management/components/alert_management_table_spec.js
+21
-1
No files found.
app/assets/javascripts/alert_management/components/alert_management_table.vue
View file @
5d867627
...
@@ -267,8 +267,8 @@ export default {
...
@@ -267,8 +267,8 @@ export default {
this
.
searchTerm
=
trimmedInput
;
this
.
searchTerm
=
trimmedInput
;
}
}
},
500
),
},
500
),
navigateToAlertDetails
({
iid
})
{
navigateToAlertDetails
({
iid
}
,
index
,
{
metaKey
}
)
{
return
visitUrl
(
joinPaths
(
window
.
location
.
pathname
,
iid
,
'
details
'
));
return
visitUrl
(
joinPaths
(
window
.
location
.
pathname
,
iid
,
'
details
'
)
,
metaKey
);
},
},
trackPageViews
()
{
trackPageViews
()
{
const
{
category
,
action
}
=
trackAlertListViewsOptions
;
const
{
category
,
action
}
=
trackAlertListViewsOptions
;
...
...
changelogs/unreleased/225655-alert-new-page.yml
0 → 100644
View file @
5d867627
---
title
:
Allow alerts to open on new tab
merge_request
:
42691
author
:
type
:
changed
spec/frontend/alert_management/components/alert_management_table_spec.js
View file @
5d867627
...
@@ -295,10 +295,30 @@ describe('AlertManagementTable', () => {
...
@@ -295,10 +295,30 @@ describe('AlertManagementTable', () => {
loading
:
false
,
loading
:
false
,
});
});
expect
(
visitUrl
).
not
.
toHaveBeenCalled
();
findAlerts
()
findAlerts
()
.
at
(
0
)
.
at
(
0
)
.
trigger
(
'
click
'
);
.
trigger
(
'
click
'
);
expect
(
visitUrl
).
toHaveBeenCalledWith
(
'
/1527542/details
'
);
expect
(
visitUrl
).
toHaveBeenCalledWith
(
'
/1527542/details
'
,
false
);
});
it
(
'
navigates to the detail page in new tab when alert row is clicked with the metaKey
'
,
()
=>
{
mountComponent
({
props
:
{
alertManagementEnabled
:
true
,
userCanEnableAlertManagement
:
true
},
data
:
{
alerts
:
{
list
:
mockAlerts
},
alertsCount
,
hasError
:
false
},
loading
:
false
,
});
expect
(
visitUrl
).
not
.
toHaveBeenCalled
();
findAlerts
()
.
at
(
0
)
.
trigger
(
'
click
'
,
{
metaKey
:
true
,
});
expect
(
visitUrl
).
toHaveBeenCalledWith
(
'
/1527542/details
'
,
true
);
});
});
describe
(
'
alert issue links
'
,
()
=>
{
describe
(
'
alert issue links
'
,
()
=>
{
...
...
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