From 1b85cde4bb2732e502b6562d15d1aa7db716774f Mon Sep 17 00:00:00 2001 From: nguyentrungthat <80239428+nguentrungthat@users.noreply.github.com> Date: Mon, 2 Feb 2026 09:36:14 +0700 Subject: [PATCH] Update regex show version --- BACKEND/app/ultils/templates/show_version.ts | 2 +- .../src/components/Modal/ModalTerminal.tsx | 33 ++++++++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/BACKEND/app/ultils/templates/show_version.ts b/BACKEND/app/ultils/templates/show_version.ts index ce19b82..5eab9c5 100644 --- a/BACKEND/app/ultils/templates/show_version.ts +++ b/BACKEND/app/ultils/templates/show_version.ts @@ -25,7 +25,7 @@ const parseLog = (data: string) => { // 4. MEMORY & HARDWARE XRegExp('^(?\\d+[KMG])\\s+bytes\\s+of\\s+physical\\s+memory', 'i'), XRegExp( - '[Cc]isco\\s+(?\\S+)\\s+\\(.+?\\)\\s+processor\\s+with\\s+(?\\d+[KMG]\\/\\d+[KMG])\\s+bytes\\s+of\\s+memory', + '[Cc]isco\\s+(?\\S+).+?with\\s+(?\\d+[KMG]\\/\\d+[KMG])\\s+bytes\\s+of\\s+memory', 'i' ), // 5. Flash / Storage diff --git a/FRONTEND/src/components/Modal/ModalTerminal.tsx b/FRONTEND/src/components/Modal/ModalTerminal.tsx index e2c3543..08ff704 100644 --- a/FRONTEND/src/components/Modal/ModalTerminal.tsx +++ b/FRONTEND/src/components/Modal/ModalTerminal.tsx @@ -832,18 +832,27 @@ const ModalTerminal = ({ : ""} - - - Mem/Flash: - - - {findDataShowVersion() - ? (findDataShowVersion()?.MEMORY || "") + - (findDataShowVersion()?.USB_FLASH - ? " - " + (findDataShowVersion()?.USB_FLASH || "") - : "") - : ""} - + + + + Mem: + + + {findDataShowVersion() + ? findDataShowVersion()?.MEMORY || "" + : ""} + + + + + Flash: + + + {findDataShowVersion() + ? findDataShowVersion()?.USB_FLASH + : ""} + +