diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-29 00:59:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-29 00:59:16 +0300 |
commit | ba2dd425136ba32ccb9793b5c10e5f26910970a2 (patch) | |
tree | e8955d82a92ae42c378a6efdd5d8249837708703 /app/assets/javascripts/vue_merge_request_widget/extensions | |
parent | 16918719748469eb301797d7ec94da59269fa197 (diff) |
Add latest changes from gitlab-org/security/gitlab@15-2-stable-ee
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget/extensions')
3 files changed, 18 insertions, 21 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/extensions/code_quality/index.js b/app/assets/javascripts/vue_merge_request_widget/extensions/code_quality/index.js index 2477429af5b..68347ac269e 100644 --- a/app/assets/javascripts/vue_merge_request_widget/extensions/code_quality/index.js +++ b/app/assets/javascripts/vue_merge_request_widget/extensions/code_quality/index.js @@ -19,25 +19,23 @@ export default { if (errorSummary.errored >= 1 && errorSummary.resolved >= 1) { const improvements = sprintf( n__( - '%{strongOpen}%{errors}%{strongClose} point', - '%{strongOpen}%{errors}%{strongClose} points', + '%{strong_start}%{errors}%{strong_end} point', + '%{strong_start}%{errors}%{strong_end} points', resolvedErrors.length, ), { errors: resolvedErrors.length, - strongOpen: '<strong>', - strongClose: '</strong>', }, false, ); const degradations = sprintf( n__( - '%{strongOpen}%{errors}%{strongClose} point', - '%{strongOpen}%{errors}%{strongClose} points', + '%{strong_start}%{errors}%{strong_end} point', + '%{strong_start}%{errors}%{strong_end} points', newErrors.length, ), - { errors: newErrors.length, strongOpen: '<strong>', strongClose: '</strong>' }, + { errors: newErrors.length }, false, ); return sprintf( @@ -96,14 +94,11 @@ export default { this.collapsedData.resolvedErrors.map((e) => { return fullData.push({ text: `${capitalizeFirstCharacter(e.severity)} - ${e.description}`, - subtext: sprintf( - s__(`ciReport|in %{open_link}${e.file_path}:${e.line}%{close_link}`), - { - open_link: `<a class="gl-text-decoration-underline" href="${e.urlPath}">`, - close_link: '</a>', - }, - false, - ), + subtext: { + prependText: s__(`ciReport|in`), + text: `${e.file_path}:${e.line}`, + href: e.urlPath, + }, icon: { name: SEVERITY_ICONS_EXTENSION[e.severity], }, diff --git a/app/assets/javascripts/vue_merge_request_widget/extensions/terraform/index.js b/app/assets/javascripts/vue_merge_request_widget/extensions/terraform/index.js index 6611aedcb07..626a99f7d64 100644 --- a/app/assets/javascripts/vue_merge_request_widget/extensions/terraform/index.js +++ b/app/assets/javascripts/vue_merge_request_widget/extensions/terraform/index.js @@ -63,13 +63,16 @@ export default { if (valid.length) { title = validText; if (invalid.length) { - subtitle = sprintf(`<br>%{small_start}${invalidText}%{small_end}`); + subtitle = invalidText; } } else { title = invalidText; } - return `${title}${subtitle}`; + return { + subject: title, + meta: subtitle, + }; }, fetchCollapsedData() { return axios @@ -152,9 +155,8 @@ export default { } return { - text: `${title} - <br> - ${subtitle}`, + text: title, + supportingText: subtitle, icon: { name: iconName }, actions, }; diff --git a/app/assets/javascripts/vue_merge_request_widget/extensions/test_report/utils.js b/app/assets/javascripts/vue_merge_request_widget/extensions/test_report/utils.js index 4ffd06de61f..4823f3b7a0b 100644 --- a/app/assets/javascripts/vue_merge_request_widget/extensions/test_report/utils.js +++ b/app/assets/javascripts/vue_merge_request_widget/extensions/test_report/utils.js @@ -60,7 +60,7 @@ export const reportSubTextBuilder = ({ suite_errors, summary }) => { if (suite_errors?.base) { errors.push(`${i18n.baseReportParsingError} ${suite_errors.base}`); } - return errors.join('<br />'); + return errors; } return recentFailuresTextBuilder(summary); }; |