diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-02 18:09:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-02 18:09:10 +0300 |
commit | 9c33625b8e47c6aa96095018a0c1dd3f22c2ce1e (patch) | |
tree | a55395617870696370830e991e0b7cf7e4099bde /app/assets/javascripts/vue_merge_request_widget | |
parent | c658e2d29296721aa65d569a42b778485042795a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget')
3 files changed, 21 insertions, 17 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/deployment/memory_usage.vue b/app/assets/javascripts/vue_merge_request_widget/components/deployment/memory_usage.vue index bb1837399ed..1256b3a8e52 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/deployment/memory_usage.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/deployment/memory_usage.vue @@ -80,22 +80,26 @@ export default { }, computeGraphData(metrics, deploymentTime) { this.loadingMetrics = false; - const { memory_before, memory_after, memory_values } = metrics; + const { + memory_before: memoryBefore, + memory_after: memoryAfter, + memory_values: memoryValues, + } = metrics; // Both `memory_before` and `memory_after` objects // have peculiar structure where accessing only a specific // index yeilds correct value that we can use to show memory delta. - if (memory_before.length > 0) { - this.memoryFrom = this.getMegabytes(memory_before[0].value[1]); + if (memoryBefore.length > 0) { + this.memoryFrom = this.getMegabytes(memoryBefore[0].value[1]); } - if (memory_after.length > 0) { - this.memoryTo = this.getMegabytes(memory_after[0].value[1]); + if (memoryAfter.length > 0) { + this.memoryTo = this.getMegabytes(memoryAfter[0].value[1]); } - if (memory_values.length > 0) { + if (memoryValues.length > 0) { this.hasMetrics = true; - this.memoryMetrics = memory_values[0].values; + this.memoryMetrics = memoryValues[0].values; this.deploymentTime = deploymentTime; } }, diff --git a/app/assets/javascripts/vue_merge_request_widget/extensions/accessibility/index.js b/app/assets/javascripts/vue_merge_request_widget/extensions/accessibility/index.js index c3fe70cb5df..0fb5e13ad82 100644 --- a/app/assets/javascripts/vue_merge_request_widget/extensions/accessibility/index.js +++ b/app/assets/javascripts/vue_merge_request_widget/extensions/accessibility/index.js @@ -75,9 +75,9 @@ export default { return sprintf(s__('AccessibilityReport|Message: %{message}'), { message }); }, prepareReports() { - const { new_errors, existing_errors, resolved_errors } = this.collapsedData; + const { collapsedData } = this; - const newErrors = new_errors.map((error) => { + const newErrors = collapsedData.new_errors.map((error) => { return { header: __('New'), id: uniqueId('new-error-'), @@ -91,7 +91,7 @@ export default { }; }); - const existingErrors = existing_errors.map((error) => { + const existingErrors = collapsedData.existing_errors.map((error) => { return { id: uniqueId('existing-error-'), text: this.formatText(error.code), @@ -104,7 +104,7 @@ export default { }; }); - const resolvedErrors = resolved_errors.map((error) => { + const resolvedErrors = collapsedData.resolved_errors.map((error) => { return { id: uniqueId('resolved-error-'), text: this.formatText(error.code), 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..6896f8831e8 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 @@ -51,14 +51,14 @@ export const recentFailuresTextBuilder = (summary = {}) => { return i18n.recentFailureSummary(recentlyFailed, failed); }; -export const reportSubTextBuilder = ({ suite_errors, summary }) => { - if (suite_errors?.head || suite_errors?.base) { +export const reportSubTextBuilder = ({ suite_errors: suiteErrors, summary }) => { + if (suiteErrors?.head || suiteErrors?.base) { const errors = []; - if (suite_errors?.head) { - errors.push(`${i18n.headReportParsingError} ${suite_errors.head}`); + if (suiteErrors?.head) { + errors.push(`${i18n.headReportParsingError} ${suiteErrors.head}`); } - if (suite_errors?.base) { - errors.push(`${i18n.baseReportParsingError} ${suite_errors.base}`); + if (suiteErrors?.base) { + errors.push(`${i18n.baseReportParsingError} ${suiteErrors.base}`); } return errors.join('<br />'); } |