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
5cb97624
Commit
5cb97624
authored
Sep 24, 2020
by
Olena Horal-Koretska
Committed by
Nicolò Maria Mezzopera
Sep 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update alert GFM reference in highlight bar
parent
8927ace3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
18 deletions
+7
-18
app/assets/javascripts/issue_show/components/incidents/highlight_bar.vue
...scripts/issue_show/components/incidents/highlight_bar.vue
+3
-8
changelogs/unreleased/230841-update-alert-gfm-like-reference.yml
...ogs/unreleased/230841-update-alert-gfm-like-reference.yml
+2
-2
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/frontend/issue_show/components/incidents/highlight_bar_spec.js
...end/issue_show/components/incidents/highlight_bar_spec.js
+2
-5
No files found.
app/assets/javascripts/issue_show/components/incidents/highlight_bar.vue
View file @
5cb97624
<
script
>
import
{
GlLink
,
GlTooltipDirective
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlLink
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
formatDate
}
from
'
~/lib/utils/datetime_utility
'
;
export
default
{
components
:
{
GlLink
,
GlSprintf
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
...
...
@@ -26,16 +25,12 @@ export default {
<
template
>
<div
class=
"gl-border-solid gl-border-1 gl-border-gray-100 gl-p-5 gl-mb-3 gl-rounded-base gl-display-flex gl-justify-content-space-between"
class=
"gl-border-solid gl-border-1 gl-border-gray-100 gl-p-5 gl-mb-3 gl-rounded-base gl-display-flex gl-justify-content-space-between
gl-xs-flex-direction-column
"
>
<div
class=
"gl-pr-3"
>
<span
class=
"gl-font-weight-bold"
>
{{
s__
(
'
HighlightBar|Original alert:
'
)
}}
</span>
<gl-link
v-gl-tooltip
:title=
"alert.title"
:href=
"alert.detailsUrl"
>
<gl-sprintf
:message=
"__('Alert #%
{alertId}')">
<template
#alertId
>
<span>
{{
alert
.
iid
}}
</span>
</
template
>
</gl-sprintf>
#
{{
alert
.
iid
}}
</gl-link>
</div>
...
...
changelogs/unreleased/230841-update-alert-gfm-like-reference.yml
View file @
5cb97624
---
title
:
Surface Alert number
GFM reference in highlight bar
merge_request
:
4
2832
title
:
Update alert
GFM reference in highlight bar
merge_request
:
4
3104
author
:
type
:
changed
locale/gitlab.pot
View file @
5cb97624
...
...
@@ -2182,9 +2182,6 @@ msgid_plural "Alerts"
msgstr[0] ""
msgstr[1] ""
msgid "Alert #%{alertId}"
msgstr ""
msgid "AlertManagement|Acknowledged"
msgstr ""
...
...
spec/frontend/issue_show/components/incidents/highlight_bar_spec.js
View file @
5cb97624
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlLink
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
HighlightBar
from
'
~/issue_show/components/incidents/highlight_bar.vue
'
;
import
{
formatDate
}
from
'
~/lib/utils/datetime_utility
'
;
...
...
@@ -21,9 +21,6 @@ describe('Highlight Bar', () => {
propsData
:
{
alert
,
},
stubs
:
{
GlSprintf
,
},
});
};
...
...
@@ -44,7 +41,7 @@ describe('Highlight Bar', () => {
expect
(
findLink
().
exists
()).
toBe
(
true
);
expect
(
findLink
().
attributes
(
'
href
'
)).
toBe
(
alert
.
detailsUrl
);
expect
(
findLink
().
attributes
(
'
title
'
)).
toBe
(
alert
.
title
);
expect
(
findLink
().
text
()).
toBe
(
`
Alert
#
${
alert
.
iid
}
`
);
expect
(
findLink
().
text
()).
toBe
(
`#
${
alert
.
iid
}
`
);
});
it
(
'
renders formatted start time of the alert
'
,
()
=>
{
...
...
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