Update physical test, load IOS

This commit is contained in:
nguyentrungthat 2026-01-19 09:28:13 +07:00
parent c5e3e796bf
commit 57e91bc422
5 changed files with 49 additions and 43 deletions

View File

@ -1319,6 +1319,7 @@ export default class LineConnection {
await this.writeCommand(`${fileName}\r\n`)
await this.writeCommand(`${server}\r\n`)
await this.writeCommand(`i/${fileName}\r\n`)
this.outputBuffer = ''
await sleep(5000)
while (true) {
if (this.outputBuffer.includes('#')) {

View File

@ -46,7 +46,8 @@ export class PhysicalPortTest {
// });
}
handleLog(line: string) {
handleLog(lines: string) {
for (const line of lines.split('\n')) {
let iface: string | null = null
let markTested = false
let state: 'up' | 'down' | undefined
@ -88,7 +89,7 @@ export class PhysicalPortTest {
port.tested = true
this.checkDone()
}
}
return this.getTestedPorts()
}

View File

@ -142,7 +142,10 @@ function DrawerLogs({
offset={8}
radius="md"
opened={opened}
onClose={close}
onClose={() => {
if (isLogModalOpen) return;
close();
}}
title={
<div>
<Tooltip

View File

@ -221,7 +221,7 @@ const ModalSelectIOS = ({
const payload = {
stationId: Number(station?.id),
lineId: Number(line?.id),
iosName: ios,
iosName: ios?.name,
station: station,
outletNumber: line?.outlet || -1,
apcName: line?.apcName || line?.apc_name,

View File

@ -987,6 +987,7 @@ const ModalTerminal = ({
{line?.runningPhysical && line?.ports
? line?.ports?.map((port, i) => (
<Text
fz={"14px"}
key={i}
c={
line?.listPortsPhysical?.includes(port)