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
564304dd
Commit
564304dd
authored
May 14, 2020
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes some linting
parent
46421574
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
app/assets/javascripts/alert_management/components/alert_details.vue
...javascripts/alert_management/components/alert_details.vue
+20
-16
spec/frontend/alert_management/components/alert_management_detail_spec.js
...ert_management/components/alert_management_detail_spec.js
+0
-4
No files found.
app/assets/javascripts/alert_management/components/alert_details.vue
View file @
564304dd
...
...
@@ -19,7 +19,7 @@ import { fetchPolicies } from '~/lib/graphql';
import
TimeAgoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
ALERTS_SEVERITY_LABELS
}
from
'
../constants
'
;
import
updateAlertStatus
from
'
../graphql/mutations/update_alert_status.graphql
'
import
updateAlertStatus
from
'
../graphql/mutations/update_alert_status.graphql
'
;
export
default
{
statuses
:
{
...
...
@@ -106,21 +106,21 @@ export default {
},
updateAlertStatus
(
status
)
{
this
.
$apollo
.
mutate
({
mutation
:
updateAlertStatus
,
variables
:
{
iid
:
this
.
alertId
,
status
:
status
.
toUpperCase
(),
projectPath
:
this
.
projectPath
,
},
})
.
catch
(()
=>
{
createFlash
(
.
mutate
({
mutation
:
updateAlertStatus
,
variables
:
{
iid
:
this
.
alertId
,
status
:
status
.
toUpperCase
(),
projectPath
:
this
.
projectPath
,
},
})
.
catch
(()
=>
{
createFlash
(
s__
(
'
AlertManagement|There was an error while updating the status of the alert. Please try again.
'
,
),
);
});
);
});
},
},
};
...
...
@@ -170,20 +170,24 @@ export default {
class=
"gl-display-flex gl-justify-content-space-between gl-align-items-center"
>
<h2
data-testid=
"title"
>
{{ alert.title }}
</h2>
<gl-dropdown
:text=
"capitalizeFirstCharacter(alert.status.toLowerCase())"
class=
"mt-2 mb-n2"
right
>
<gl-dropdown
:text=
"capitalizeFirstCharacter(alert.status.toLowerCase())"
class=
"mt-2 mb-n2"
right
>
<gl-dropdown-item
v-for=
"(label, field) in $options.statuses"
:key=
"field"
data-testid=
"statusDropdownItem"
class=
"gl-vertical-align-middle"
@
click=
"updateAlertStatus(label)"
>
>
<span
class=
"d-flex"
>
<gl-icon
class=
"flex-shrink-0 append-right-4"
:class=
"{ invisible: label.toUpperCase() !== alert.status }"
name=
"mobile-issue-close"
/>
/>
{{ label }}
</span>
</gl-dropdown-item>
...
...
spec/frontend/alert_management/components/alert_management_detail_spec.js
View file @
564304dd
...
...
@@ -115,10 +115,6 @@ describe('AlertDetails', () => {
});
});
it
(
'
renders a status dropdown containing three items
'
,
()
=>
{
expect
(
wrapper
.
findAll
(
'
[data-testid="statusDropdownItem"]
'
).
length
).
toBe
(
3
);
});
describe
(
'
Create issue from alert
'
,
()
=>
{
describe
(
'
createIssueFromAlertEnabled feature flag enabled
'
,
()
=>
{
it
(
'
should display a button that links to new issue page
'
,
()
=>
{
...
...
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