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
e4551f47
Commit
e4551f47
authored
Apr 30, 2020
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates with new information
parent
569be378
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
app/assets/javascripts/alert_management/components/alert_management_list.vue
...pts/alert_management/components/alert_management_list.vue
+5
-5
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/frontend/alert_management/components/alert_management_list_spec.js
...alert_management/components/alert_management_list_spec.js
+11
-1
No files found.
app/assets/javascripts/alert_management/components/alert_management_list.vue
View file @
e4551f47
...
...
@@ -53,7 +53,7 @@ export default {
statuses
:
{
triggered
:
s__
(
'
AlertManagement|Triggered
'
),
acknowledged
:
s__
(
'
AlertManagement|Acknowledged
'
),
ignored
:
s__
(
'
AlertManagement|Ignor
ed
'
),
resolved
:
s__
(
'
AlertManagement|Resolv
ed
'
),
},
components
:
{
GlEmptyState
,
...
...
@@ -155,10 +155,10 @@ export default {
<
template
#cell(title)=
"{ item }"
>
<div
class=
"gl-max-w-full text-truncate"
>
{{
item
.
title
}}
</div>
</
template
>
<
template
#cell
(
status
)
>
<gl-new-dropdown
class=
"w-100"
:text=
"
alert
.status"
>
<gl-new-dropdown-item
v-for=
"(label, field) in $options.statuses"
:key=
"field"
>
{{
label
}}
<
template
#cell(status)
=
"{ item }"
>
<gl-new-dropdown
class=
"w-100"
:text=
"
item
.status"
>
<gl-new-dropdown-item
v-for=
"(label, field) in $options.statuses"
:key=
"field"
>
{{
label
}}
</gl-new-dropdown-item>
</gl-new-dropdown>
</
template
>
...
...
locale/gitlab.pot
View file @
e4551f47
...
...
@@ -1731,6 +1731,9 @@ msgstr ""
msgid "AlertManagement|Overview"
msgstr ""
msgid "AlertManagement|Resolved"
msgstr ""
msgid "AlertManagement|Severity"
msgstr ""
...
...
spec/frontend/alert_management/components/alert_management_list_spec.js
View file @
e4551f47
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
GlEmptyState
,
GlTable
,
GlAlert
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlEmptyState
,
GlTable
,
GlAlert
,
GlLoadingIcon
,
GlNewDropdown
}
from
'
@gitlab/ui
'
;
import
AlertManagementList
from
'
~/alert_management/components/alert_management_list.vue
'
;
import
mockAlerts
from
'
../mocks/alerts.json
'
;
...
...
@@ -11,6 +11,7 @@ describe('AlertManagementList', () => {
const
findAlerts
=
()
=>
wrapper
.
findAll
(
'
table tbody tr
'
);
const
findAlert
=
()
=>
wrapper
.
find
(
GlAlert
);
const
findLoader
=
()
=>
wrapper
.
find
(
GlLoadingIcon
);
const
findStatusDropdown
=
()
=>
wrapper
.
find
(
GlNewDropdown
);
function
mountComponent
({
props
=
{
...
...
@@ -103,5 +104,14 @@ describe('AlertManagementList', () => {
expect
(
findAlertsTable
().
exists
()).
toBe
(
true
);
expect
(
findAlerts
()).
toHaveLength
(
mockAlerts
.
length
);
});
it
(
'
displays status dropdown
'
,
()
=>
{
mountComponent
({
props
:
{
alertManagementEnabled
:
true
,
userCanEnableAlertManagement
:
true
},
data
:
{
alerts
:
mockAlerts
,
errored
:
false
},
loading
:
false
,
});
expect
(
findStatusDropdown
().
exists
()).
toBe
(
true
);
});
});
});
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