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
e7cb4fa0
Commit
e7cb4fa0
authored
Sep 14, 2021
by
Dheeraj Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove v-html from dependency list alert
parent
d8f7c412
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
ee/app/assets/javascripts/dependencies/components/dependency_list_job_failed_alert.vue
...endencies/components/dependency_list_job_failed_alert.vue
+18
-10
ee/spec/frontend/dependencies/components/dependency_list_job_failed_alert_spec.js
...ncies/components/dependency_list_job_failed_alert_spec.js
+2
-2
No files found.
ee/app/assets/javascripts/dependencies/components/dependency_list_job_failed_alert.vue
View file @
e7cb4fa0
<
script
>
import
{
GlAlert
}
from
'
@gitlab/ui
'
;
import
{
__
,
s
printf
,
s
__
}
from
'
~/locale
'
;
import
{
GlAlert
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
export
default
{
name
:
'
DependencyListJobFailedAlert
'
,
components
:
{
GlAlert
,
GlSprintf
,
},
props
:
{
jobPath
:
{
...
...
@@ -23,14 +24,15 @@ export default {
}
:
{};
},
},
message
:
sprintf
(
s__
(
message
()
{
return
{
text
:
s__
(
'
Dependencies|The %{codeStartTag}dependency_scanning%{codeEndTag} job has failed and cannot generate the list. Please ensure the job is running properly and run the pipeline again.
'
,
),
{
codeStartTag
:
'
<code>
'
,
codeEndTag
:
'
</code>
'
},
false
,
),
placeholder
:
{
code
:
[
'
codeStartTag
'
,
'
codeEndTag
'
]
},
};
},
},
};
</
script
>
...
...
@@ -42,6 +44,12 @@ export default {
@
dismiss=
"$emit('close')"
v-on=
"$listeners"
>
<span
v-html=
"$options.message /* eslint-disable-line vue/no-v-html */"
></span>
<span>
<gl-sprintf
:message=
"message.text"
:placeholders=
"message.placeholder"
>
<template
#code
="
{ content }">
<code>
{{
content
}}
</code>
</
template
>
</gl-sprintf>
</span>
</gl-alert>
</template>
ee/spec/frontend/dependencies/components/dependency_list_job_failed_alert_spec.js
View file @
e7cb4fa0
import
{
GlAlert
}
from
'
@gitlab/ui
'
;
import
{
GlAlert
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
DependencyListJobFailedAlert
from
'
ee/dependencies/components/dependency_list_job_failed_alert.vue
'
;
...
...
@@ -21,7 +21,7 @@ describe('DependencyListJobFailedAlert component', () => {
});
it
(
'
matches the snapshot
'
,
()
=>
{
factory
({
propsData
:
{
jobPath
:
'
/jobs/foo/3210
'
}
});
factory
({
propsData
:
{
jobPath
:
'
/jobs/foo/3210
'
}
,
stubs
:
{
GlSprintf
}
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
...
...
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