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
d88b7beb
Commit
d88b7beb
authored
Aug 21, 2020
by
Olena Horal-Koretska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Surface incident Severity in the Incident List
parent
75525684
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
5 deletions
+46
-5
app/assets/javascripts/incidents/components/incidents_list.vue
...ssets/javascripts/incidents/components/incidents_list.vue
+16
-0
app/assets/javascripts/incidents/graphql/queries/get_incidents.query.graphql
...pts/incidents/graphql/queries/get_incidents.query.graphql
+1
-0
changelogs/unreleased/230980-severity-in-incident-list.yml
changelogs/unreleased/230980-severity-in-incident-list.yml
+5
-0
doc/operations/incident_management/img/incident_list_sort_v13_3.png
...ions/incident_management/img/incident_list_sort_v13_3.png
+0
-0
doc/operations/incident_management/img/incident_list_v13_4.png
...perations/incident_management/img/incident_list_v13_4.png
+0
-0
doc/operations/incident_management/incidents.md
doc/operations/incident_management/incidents.md
+7
-1
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/frontend/incidents/components/incidents_list_spec.js
spec/frontend/incidents/components/incidents_list_spec.js
+6
-0
spec/frontend/incidents/mocks/incidents.json
spec/frontend/incidents/mocks/incidents.json
+8
-4
No files found.
app/assets/javascripts/incidents/components/incidents_list.vue
View file @
d88b7beb
...
@@ -23,6 +23,8 @@ import { s__ } from '~/locale';
...
@@ -23,6 +23,8 @@ import { s__ } from '~/locale';
import
{
mergeUrlParams
,
joinPaths
,
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
mergeUrlParams
,
joinPaths
,
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
getIncidents
from
'
../graphql/queries/get_incidents.query.graphql
'
;
import
getIncidents
from
'
../graphql/queries/get_incidents.query.graphql
'
;
import
getIncidentsCountByStatus
from
'
../graphql/queries/get_count_by_status.query.graphql
'
;
import
getIncidentsCountByStatus
from
'
../graphql/queries/get_count_by_status.query.graphql
'
;
import
SeverityToken
from
'
~/sidebar/components/severity/severity.vue
'
;
import
{
INCIDENT_SEVERITY
}
from
'
~/sidebar/components/severity/constants
'
;
import
{
I18N
,
DEFAULT_PAGE_SIZE
,
INCIDENT_SEARCH_DELAY
,
INCIDENT_STATUS_TABS
}
from
'
../constants
'
;
import
{
I18N
,
DEFAULT_PAGE_SIZE
,
INCIDENT_SEARCH_DELAY
,
INCIDENT_STATUS_TABS
}
from
'
../constants
'
;
const
TH_TEST_ID
=
{
'
data-testid
'
:
'
incident-management-created-at-sort
'
};
const
TH_TEST_ID
=
{
'
data-testid
'
:
'
incident-management-created-at-sort
'
};
...
@@ -44,6 +46,12 @@ export default {
...
@@ -44,6 +46,12 @@ export default {
i18n
:
I18N
,
i18n
:
I18N
,
statusTabs
:
INCIDENT_STATUS_TABS
,
statusTabs
:
INCIDENT_STATUS_TABS
,
fields
:
[
fields
:
[
{
key
:
'
severity
'
,
label
:
s__
(
'
IncidentManagement|Severity
'
),
thClass
:
`gl-pointer-events-none`
,
tdClass
,
},
{
{
key
:
'
title
'
,
key
:
'
title
'
,
label
:
s__
(
'
IncidentManagement|Incident
'
),
label
:
s__
(
'
IncidentManagement|Incident
'
),
...
@@ -82,6 +90,7 @@ export default {
...
@@ -82,6 +90,7 @@ export default {
PublishedCell
:
()
=>
import
(
'
ee_component/incidents/components/published_cell.vue
'
),
PublishedCell
:
()
=>
import
(
'
ee_component/incidents/components/published_cell.vue
'
),
GlBadge
,
GlBadge
,
GlEmptyState
,
GlEmptyState
,
SeverityToken
,
},
},
directives
:
{
directives
:
{
GlTooltip
:
GlTooltipDirective
,
GlTooltip
:
GlTooltipDirective
,
...
@@ -280,6 +289,9 @@ export default {
...
@@ -280,6 +289,9 @@ export default {
this
.
sort
=
`
${
sortingColumn
}
_
${
sortingDirection
}
`
;
this
.
sort
=
`
${
sortingColumn
}
_
${
sortingDirection
}
`
;
},
},
getSeverity
(
severity
)
{
return
INCIDENT_SEVERITY
[
severity
];
},
},
},
};
};
</
script
>
</
script
>
...
@@ -348,6 +360,10 @@ export default {
...
@@ -348,6 +360,10 @@ export default {
@
row-clicked=
"navigateToIncidentDetails"
@
row-clicked=
"navigateToIncidentDetails"
@
sort-changed=
"fetchSortedData"
@
sort-changed=
"fetchSortedData"
>
>
<
template
#cell(severity)=
"{ item }"
>
<severity-token
:severity=
"getSeverity(item.severity)"
/>
</
template
>
<
template
#cell(title)=
"{ item }"
>
<
template
#cell(title)=
"{ item }"
>
<div
:class=
"
{ 'gl-display-flex gl-align-items-center': item.state === 'closed' }">
<div
:class=
"
{ 'gl-display-flex gl-align-items-center': item.state === 'closed' }">
<div
class=
"gl-max-w-full text-truncate"
:title=
"item.title"
>
{{
item
.
title
}}
</div>
<div
class=
"gl-max-w-full text-truncate"
:title=
"item.title"
>
{{
item
.
title
}}
</div>
...
...
app/assets/javascripts/incidents/graphql/queries/get_incidents.query.graphql
View file @
d88b7beb
...
@@ -40,6 +40,7 @@ query getIncidents(
...
@@ -40,6 +40,7 @@ query getIncidents(
}
}
}
}
statusPagePublishedIncident
statusPagePublishedIncident
severity
}
}
pageInfo
{
pageInfo
{
hasNextPage
hasNextPage
...
...
changelogs/unreleased/230980-severity-in-incident-list.yml
0 → 100644
View file @
d88b7beb
---
title
:
Surface incident severity and icon in the Incident List table
merge_request
:
40112
author
:
type
:
added
doc/operations/incident_management/img/incident_list_sort_v13_3.png
deleted
100644 → 0
View file @
75525684
38.6 KB
doc/operations/incident_management/img/incident_list_v13_4.png
0 → 100644
View file @
d88b7beb
16.3 KB
doc/operations/incident_management/incidents.md
View file @
d88b7beb
...
@@ -13,12 +13,18 @@ For users with at least Developer [permissions](../../user/permissions.md), the
...
@@ -13,12 +13,18 @@ For users with at least Developer [permissions](../../user/permissions.md), the
Incident Management list is available at
**Operations > Incidents**
Incident Management list is available at
**Operations > Incidents**
in your project's sidebar. The list contains the following metrics:
in your project's sidebar. The list contains the following metrics:
![
Incident List
](
./img/incident_list_sort_v13_3
.png
)
![
Incident List
](
img/incident_list_v13_4
.png
)
-
**Status**
- To filter incidents by their status, click
**Open**
,
**Closed**
,
-
**Status**
- To filter incidents by their status, click
**Open**
,
**Closed**
,
or
**All**
above the incident list.
or
**All**
above the incident list.
-
**Search**
- The Incident list supports a simple free text search, which filters
-
**Search**
- The Incident list supports a simple free text search, which filters
on the
**Title**
and
**Incident**
fields.
on the
**Title**
and
**Incident**
fields.
-
**Severity**
- Severity of a particular incident. Can have one of the following values:
-
`Critical - S1`
-
`High - S2`
-
`Medium - S3`
-
`Low - S4`
-
`Unknown`
-
**Incident**
- The description of the incident, which attempts to capture the
-
**Incident**
- The description of the incident, which attempts to capture the
most meaningful data.
most meaningful data.
-
**Date created**
- How long ago the incident was created. This field uses the
-
**Date created**
- How long ago the incident was created. This field uses the
...
...
locale/gitlab.pot
View file @
d88b7beb
...
@@ -13336,6 +13336,9 @@ msgstr ""
...
@@ -13336,6 +13336,9 @@ msgstr ""
msgid "IncidentManagement|Published to status page"
msgid "IncidentManagement|Published to status page"
msgstr ""
msgstr ""
msgid "IncidentManagement|Severity"
msgstr ""
msgid "IncidentManagement|There are no closed incidents"
msgid "IncidentManagement|There are no closed incidents"
msgstr ""
msgstr ""
...
...
spec/frontend/incidents/components/incidents_list_spec.js
View file @
d88b7beb
...
@@ -13,6 +13,7 @@ import {
...
@@ -13,6 +13,7 @@ import {
}
from
'
@gitlab/ui
'
;
}
from
'
@gitlab/ui
'
;
import
{
visitUrl
,
joinPaths
,
mergeUrlParams
}
from
'
~/lib/utils/url_utility
'
;
import
{
visitUrl
,
joinPaths
,
mergeUrlParams
}
from
'
~/lib/utils/url_utility
'
;
import
IncidentsList
from
'
~/incidents/components/incidents_list.vue
'
;
import
IncidentsList
from
'
~/incidents/components/incidents_list.vue
'
;
import
SeverityToken
from
'
~/sidebar/components/severity/severity.vue
'
;
import
TimeAgoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
TimeAgoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
{
I18N
,
INCIDENT_STATUS_TABS
}
from
'
~/incidents/constants
'
;
import
{
I18N
,
INCIDENT_STATUS_TABS
}
from
'
~/incidents/constants
'
;
import
mockIncidents
from
'
../mocks/incidents.json
'
;
import
mockIncidents
from
'
../mocks/incidents.json
'
;
...
@@ -51,6 +52,7 @@ describe('Incidents List', () => {
...
@@ -51,6 +52,7 @@ describe('Incidents List', () => {
const
findStatusFilterBadge
=
()
=>
wrapper
.
findAll
(
GlBadge
);
const
findStatusFilterBadge
=
()
=>
wrapper
.
findAll
(
GlBadge
);
const
findStatusTabs
=
()
=>
wrapper
.
find
(
GlTabs
);
const
findStatusTabs
=
()
=>
wrapper
.
find
(
GlTabs
);
const
findEmptyState
=
()
=>
wrapper
.
find
(
GlEmptyState
);
const
findEmptyState
=
()
=>
wrapper
.
find
(
GlEmptyState
);
const
findSeverity
=
()
=>
wrapper
.
findAll
(
SeverityToken
);
function
mountComponent
({
data
=
{
incidents
:
[],
incidentsCount
:
{}
},
loading
=
false
})
{
function
mountComponent
({
data
=
{
incidents
:
[],
incidentsCount
:
{}
},
loading
=
false
})
{
wrapper
=
mount
(
IncidentsList
,
{
wrapper
=
mount
(
IncidentsList
,
{
...
@@ -182,6 +184,10 @@ describe('Incidents List', () => {
...
@@ -182,6 +184,10 @@ describe('Incidents List', () => {
);
);
});
});
});
});
it
(
'
renders severity per row
'
,
()
=>
{
expect
(
findSeverity
().
length
).
toBe
(
mockIncidents
.
length
);
});
});
});
describe
(
'
Create Incident
'
,
()
=>
{
describe
(
'
Create Incident
'
,
()
=>
{
...
...
spec/frontend/incidents/mocks/incidents.json
View file @
d88b7beb
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
"title"
:
"New: Incident"
,
"title"
:
"New: Incident"
,
"createdAt"
:
"2020-06-03T15:46:08Z"
,
"createdAt"
:
"2020-06-03T15:46:08Z"
,
"assignees"
:
{},
"assignees"
:
{},
"state"
:
"opened"
"state"
:
"opened"
,
"severity"
:
"CRITICAL"
},
},
{
{
"iid"
:
"14"
,
"iid"
:
"14"
,
...
@@ -20,20 +21,23 @@
...
@@ -20,20 +21,23 @@
}
}
]
]
},
},
"state"
:
"opened"
"state"
:
"opened"
,
"severity"
:
"HIGH"
},
},
{
{
"iid"
:
"13"
,
"iid"
:
"13"
,
"title"
:
"Create issue3"
,
"title"
:
"Create issue3"
,
"createdAt"
:
"2020-05-19T08:53:55Z"
,
"createdAt"
:
"2020-05-19T08:53:55Z"
,
"assignees"
:
{},
"assignees"
:
{},
"state"
:
"closed"
"state"
:
"closed"
,
"severity"
:
"LOW"
},
},
{
{
"iid"
:
"12"
,
"iid"
:
"12"
,
"title"
:
"Create issue2"
,
"title"
:
"Create issue2"
,
"createdAt"
:
"2020-05-18T17:13:35Z"
,
"createdAt"
:
"2020-05-18T17:13:35Z"
,
"assignees"
:
{},
"assignees"
:
{},
"state"
:
"closed"
"state"
:
"closed"
,
"severity"
:
"MEDIUM"
}
}
]
]
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