diff --git a/BACKEND/app/services/line_connection.ts b/BACKEND/app/services/line_connection.ts index 74194f0..b760a03 100644 --- a/BACKEND/app/services/line_connection.ts +++ b/BACKEND/app/services/line_connection.ts @@ -131,6 +131,7 @@ export default class LineConnection { private waitingScenario: boolean private outputInventory: string private outputScenario: string + private outputALLScenario: string private bufferLog: LogStreamBuffer public dataDPELP: DataDPELP | string private listScenarios: number[] @@ -161,6 +162,7 @@ export default class LineConnection { this.waitingScenario = false this.outputInventory = '' this.outputScenario = '' + this.outputALLScenario = '' this.bufferLog = new LogStreamBuffer() this.dataDPELP = { line: this.config.lineNumber, @@ -234,6 +236,7 @@ export default class LineConnection { this.outputBuffer += message this.outputScenario += message this.outputTestLog += cleanData(data.toString()) + this.outputALLScenario += cleanData(data.toString()) if (!this.config.inventory) this.outputInventory = this.outputInventory.slice(-3000) + message } @@ -321,6 +324,8 @@ export default class LineConnection { this.config.latestScenario = undefined this.physicalTest = new PhysicalPortTest([]) this.config.isReady = false + this.outputALLScenario = '' + this.outputTestLog = '' // this.config.inventory = undefined this.socketIO.emit('line_disconnected', { stationId, @@ -491,6 +496,7 @@ export default class LineConnection { }) this.outputBuffer = '' this.outputScenario = '' + this.outputALLScenario = '' this.config.output += '\nTimeout run scenario\n' this.dataDPELP = { line: this.config.lineNumber, @@ -610,7 +616,7 @@ export default class LineConnection { return } if (script?.send_result || script?.sendResult) { - const detectLog = await this.detectLogWithAI(this.outputTestLog) + const detectLog = await this.detectLogWithAI(this.outputALLScenario) const result = mapToLineFormat({ lineNumber: this.config.lineNumber, inventory: this.config.inventory, @@ -628,6 +634,7 @@ export default class LineConnection { this.config.listFeatureTested = [ ...new Set([...this.config.listFeatureTested, 'DPELP']), ] + this.outputALLScenario = '' // if (!this.config.listFeatureTested.includes('PHYSICAL')) this.runPhysicalTest() this.sendFeatureTested()