From 7fea517efa07c71d9989de292e085fe4631f4f88 Mon Sep 17 00:00:00 2001 From: nguyentrungthat <80239428+nguentrungthat@users.noreply.github.com> Date: Wed, 6 May 2026 14:25:34 +0700 Subject: [PATCH] Update --- BACKEND/app/services/line_connection.ts | 4 ++-- BACKEND/app/ultils/helper.ts | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/BACKEND/app/services/line_connection.ts b/BACKEND/app/services/line_connection.ts index 3631ce0..78a39f9 100644 --- a/BACKEND/app/services/line_connection.ts +++ b/BACKEND/app/services/line_connection.ts @@ -606,7 +606,7 @@ export default class LineConnection { lineNumber: this.config.lineNumber, inventory: this.config.inventory, latestScenario: { - detectAI: { issue: detectLog, summary: '', status: [] }, + detectAI: detectLog, }, data, }) @@ -1111,7 +1111,7 @@ export default class LineConnection { *****[DPELP]***** License: ${licenses.join(', ')} Detected by AI: -${data.issues?.length ? `- ` + data.issues.join(`\n- `) : ''} +${data.issues?.length ? `- ` + data.issues.join(`\n`) : ''} *****[Physical]***** Total Ports: ${portPhysical?.length} Ports Tested (Link UP): ${tested.length} (${testedPoE?.length} PoE, ${testedSFP?.length} SFP) diff --git a/BACKEND/app/ultils/helper.ts b/BACKEND/app/ultils/helper.ts index 7e47ce8..39bbfe3 100644 --- a/BACKEND/app/ultils/helper.ts +++ b/BACKEND/app/ultils/helper.ts @@ -225,14 +225,10 @@ export function mapToLineFormat(input: InputData) { // const mode = dataPlatform && !dataPlatform.output?.includes('Incomplete') ? 'DPELP' : 'DPEL' // Issues - const issues = Array.isArray(input.latestScenario?.detectAI?.issue) - ? input.latestScenario.detectAI.issue - : input.latestScenario?.detectAI?.issue - ? [input.latestScenario.detectAI.issue] - : [] + const issues = Array.isArray(input.latestScenario?.detectAI) ? input.latestScenario?.detectAI : [] // Issues - const summary = input.latestScenario?.detectAI?.summary || '' + const summary = '' return { line,