From f1397efa4e3d8a719df59c2ccafd887c88094e5e Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Fri, 23 Dec 2022 19:30:45 -0500 Subject: [PATCH] chore: fix defect report --- package.json | 4 +-- .../RecognitionDefectReportBtn.vue | 33 +++++++++++++++++-- .../recognition/RecognitionResultCard.vue | 15 +++++++-- src/utils/recognizer.js | 5 ++- vue.config.js | 4 +-- 5 files changed, 51 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index a18e0d60..d42e6256 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "penguin-stats-frontend", - "version": "3.10.2", + "version": "3.10.3", "private": true, "author": "Penguin Statistics Contributors (https://github.com/orgs/penguin-statistics/people)", "scripts": { @@ -137,4 +137,4 @@ ], "homepage": "https://github.com/penguin-statistics/frontend-v2#readme", "license": "MIT" -} \ No newline at end of file +} diff --git a/src/components/recognition/RecognitionDefectReportBtn.vue b/src/components/recognition/RecognitionDefectReportBtn.vue index 1353e093..eb56d483 100644 --- a/src/components/recognition/RecognitionDefectReportBtn.vue +++ b/src/components/recognition/RecognitionDefectReportBtn.vue @@ -132,7 +132,7 @@ {{ $t("report.recognition.defectReport.action") }} + + + + {{ $t("report.recognition.defectReport.action") }} + @@ -170,6 +193,10 @@ export default { envContext: { type: Object, required: true + }, + dense: { + type: Boolean, + default: () => false } }, data() { @@ -186,7 +213,7 @@ export default { }, computed: { recognitionResult () { - return JSON.stringify(this.result.result, null, 4) + return JSON.stringify(this.result.originalResult, null, 4) }, envInfo () { return JSON.stringify(this.envContext, null, 4) @@ -209,7 +236,7 @@ export default { const preflight = (await reportDefect.initDefectReport({ environment: this.envContext, - recognitionResult: this.result.result, + recognitionResult: this.result.originalResult, })).data this.state = "uploading"; diff --git a/src/components/recognition/RecognitionResultCard.vue b/src/components/recognition/RecognitionResultCard.vue index 408fe2d5..f4692a1e 100644 --- a/src/components/recognition/RecognitionResultCard.vue +++ b/src/components/recognition/RecognitionResultCard.vue @@ -44,10 +44,10 @@ - +