This commit is contained in:
nguyentrungthat 2025-12-05 07:59:13 +07:00
parent b75c3e3697
commit 5d7c10ca4d
3 changed files with 5 additions and 4 deletions

View File

@ -42,7 +42,7 @@ export default class StationConnection {
if (message.includes('--More--')) this.writeCommand(' ')
this.config.output += cleanData(message)
this.config.output = this.config.output.slice(-5000)
// appendLog(cleanData(message), this.config.id, this.config.name, this.config.ip, 0)
appendLog(cleanData(message), this.config.id, this.config.name, this.config.ip, 0)
})
this.client.on('error', (err) => {

View File

@ -809,7 +809,7 @@ export class WebSocketIo {
console.log('[ERROR connect station] Not found!')
return
}
console.log('Clearing line', clearLine, 'on station', station.name)
await this.handleStationOperation(stationId, async (stationCon) => {
stationCon.writeCommand(`\r\nclear line ${clearLine}\r\n`)
await sleep(500)

View File

@ -776,8 +776,9 @@ const BottomToolBar = ({
isDisable={isDisable || selectedLines.length === 0}
onClick={() => {
if (
selectedLines.length > 0 &&
selectedLines.length === station?.lines?.length
selectedLines.length > 0
// &&
// selectedLines.length === station?.lines?.length
) {
socket?.emit("run_all_dpelp", {
lineIds: selectedLines.map((line) => line.id),