diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index f991fde071..9eed0f01c5 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -627,25 +627,27 @@ export default { }); }, stop() { - let url = "/api/automation/stop/" + this.reportId; - this.$get(url, response => { - this.debugLoading = false; - try { - if (this.websocket) { - this.websocket.close(); - } - if (this.messageWebSocket) { - this.messageWebSocket.close(); - } - this.clearNodeStatus(this.$refs.stepTree.root.childNodes); - this.clearDebug(); - this.$success(this.$t('report.test_stop_success')); - this.showHide(); - } catch (e) { + if (this.reportId) { + let url = "/api/automation/stop/" + this.reportId; + this.$get(url, response => { this.debugLoading = false; - } - }); - this.runScenario = undefined; + try { + if (this.websocket) { + this.websocket.close(); + } + if (this.messageWebSocket) { + this.messageWebSocket.close(); + } + this.clearNodeStatus(this.$refs.stepTree.root.childNodes); + this.clearDebug(); + this.$success(this.$t('report.test_stop_success')); + this.showHide(); + } catch (e) { + this.debugLoading = false; + } + }); + this.runScenario = undefined; + } }, clearDebug() { this.reqError = 0; diff --git a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue index 979ab07b90..fee93ededf 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue @@ -22,7 +22,7 @@ - {{$t('project.version.name')}}: {{ scenario.versionName }} + {{ $t('project.version.name') }}: {{ scenario.versionName }}