Update show Break password before run DPELP
This commit is contained in:
parent
928355b9bc
commit
40be4ac558
|
|
@ -232,6 +232,27 @@ export default class LineConnection {
|
||||||
lines.forEach(this.handleLogLine)
|
lines.forEach(this.handleLogLine)
|
||||||
let rawData = ''
|
let rawData = ''
|
||||||
if (this.config.runningScenario) {
|
if (this.config.runningScenario) {
|
||||||
|
if (message?.includes('Password:') || message?.includes('password:')) {
|
||||||
|
this.config.runningScenario = ''
|
||||||
|
this.socketIO.emit('running_scenario', {
|
||||||
|
stationId: this.config.stationId,
|
||||||
|
lineId: this.config.id,
|
||||||
|
title: '',
|
||||||
|
password: true,
|
||||||
|
})
|
||||||
|
this.outputBuffer = ''
|
||||||
|
this.outputScenario = ''
|
||||||
|
this.outputALLScenario = ''
|
||||||
|
this.outputScenario += `\n---end-scenarios---${Date.now()}---USER---\n`
|
||||||
|
appendLog(
|
||||||
|
`\n---end-scenarios---${Date.now()}---USER---\n`,
|
||||||
|
this.config.stationId,
|
||||||
|
this.config.stationName,
|
||||||
|
this.config.stationIp,
|
||||||
|
this.config.lineNumber
|
||||||
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.waitingScenario = true
|
this.waitingScenario = true
|
||||||
this.outputBuffer += message
|
this.outputBuffer += message
|
||||||
this.outputScenario += message
|
this.outputScenario += message
|
||||||
|
|
@ -427,6 +448,7 @@ export default class LineConnection {
|
||||||
stationId: this.config.stationId,
|
stationId: this.config.stationId,
|
||||||
lineId: this.config.id,
|
lineId: this.config.id,
|
||||||
title: '',
|
title: '',
|
||||||
|
password: false,
|
||||||
})
|
})
|
||||||
this.outputBuffer = ''
|
this.outputBuffer = ''
|
||||||
return
|
return
|
||||||
|
|
@ -450,6 +472,7 @@ export default class LineConnection {
|
||||||
stationId: this.config.stationId,
|
stationId: this.config.stationId,
|
||||||
lineId: this.config.id,
|
lineId: this.config.id,
|
||||||
title: script?.title,
|
title: script?.title,
|
||||||
|
password: false,
|
||||||
})
|
})
|
||||||
if (script?.send_result || script?.sendResult) {
|
if (script?.send_result || script?.sendResult) {
|
||||||
this.dataDPELP = ''
|
this.dataDPELP = ''
|
||||||
|
|
@ -493,6 +516,7 @@ export default class LineConnection {
|
||||||
stationId: this.config.stationId,
|
stationId: this.config.stationId,
|
||||||
lineId: this.config.id,
|
lineId: this.config.id,
|
||||||
title: '',
|
title: '',
|
||||||
|
password: false,
|
||||||
})
|
})
|
||||||
this.outputBuffer = ''
|
this.outputBuffer = ''
|
||||||
this.outputScenario = ''
|
this.outputScenario = ''
|
||||||
|
|
@ -667,6 +691,7 @@ export default class LineConnection {
|
||||||
stationId: this.config.stationId,
|
stationId: this.config.stationId,
|
||||||
lineId: this.config.id,
|
lineId: this.config.id,
|
||||||
title: '',
|
title: '',
|
||||||
|
password: false,
|
||||||
})
|
})
|
||||||
this.config.data = data
|
this.config.data = data
|
||||||
this.socketIO.emit('data_textfsm', {
|
this.socketIO.emit('data_textfsm', {
|
||||||
|
|
@ -1243,6 +1268,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
||||||
title: 'Physical Test',
|
title: 'Physical Test',
|
||||||
physical: true,
|
physical: true,
|
||||||
ports: listPorts,
|
ports: listPorts,
|
||||||
|
password: false,
|
||||||
})
|
})
|
||||||
if (listPorts.length === 0) {
|
if (listPorts.length === 0) {
|
||||||
this.config.listFeatureTested = [...new Set([...this.config.listFeatureTested, 'PHYSICAL'])]
|
this.config.listFeatureTested = [...new Set([...this.config.listFeatureTested, 'PHYSICAL'])]
|
||||||
|
|
@ -1339,6 +1365,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
||||||
stationId: this.config.stationId,
|
stationId: this.config.stationId,
|
||||||
lineId: this.config.id,
|
lineId: this.config.id,
|
||||||
title: '',
|
title: '',
|
||||||
|
password: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1644,6 +1671,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
||||||
stationId: this.config.stationId,
|
stationId: this.config.stationId,
|
||||||
lineId: this.config.id,
|
lineId: this.config.id,
|
||||||
title: 'Backup IOS',
|
title: 'Backup IOS',
|
||||||
|
password: false,
|
||||||
})
|
})
|
||||||
await sleep(1000)
|
await sleep(1000)
|
||||||
const listIos = await this.getListIos()
|
const listIos = await this.getListIos()
|
||||||
|
|
@ -2703,6 +2731,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
||||||
stationId: this.config.stationId,
|
stationId: this.config.stationId,
|
||||||
lineId: this.config.id,
|
lineId: this.config.id,
|
||||||
title: 'Config Network',
|
title: 'Config Network',
|
||||||
|
password: false,
|
||||||
})
|
})
|
||||||
await this.writeCommand(`enable\r\n`)
|
await this.writeCommand(`enable\r\n`)
|
||||||
await sleep(500)
|
await sleep(500)
|
||||||
|
|
@ -2730,6 +2759,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
||||||
stationId: this.config.stationId,
|
stationId: this.config.stationId,
|
||||||
lineId: this.config.id,
|
lineId: this.config.id,
|
||||||
title: '',
|
title: '',
|
||||||
|
password: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -455,6 +455,7 @@ function App() {
|
||||||
runningPhysical: data?.physical || false,
|
runningPhysical: data?.physical || false,
|
||||||
ports: data?.ports || [],
|
ports: data?.ports || [],
|
||||||
listPortsPhysical: [],
|
listPortsPhysical: [],
|
||||||
|
isPassword: data?.password || false,
|
||||||
},
|
},
|
||||||
data?.stationId,
|
data?.stationId,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -506,7 +506,21 @@ const CardLine = ({
|
||||||
paddingTop: "2px",
|
paddingTop: "2px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isShowIssue ? (
|
{line?.isPassword ? (
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
border: "1px solid #ccc",
|
||||||
|
borderRadius: "16px",
|
||||||
|
paddingLeft: "4px",
|
||||||
|
paddingRight: "4px",
|
||||||
|
backgroundColor: "red",
|
||||||
|
}}
|
||||||
|
fz={"9px"}
|
||||||
|
c={"white"}
|
||||||
|
>
|
||||||
|
{"Password"}
|
||||||
|
</Text>
|
||||||
|
) : isShowIssue ? (
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
border: "1px solid #ccc",
|
border: "1px solid #ccc",
|
||||||
|
|
|
||||||
|
|
@ -640,6 +640,19 @@ const ModalTerminal = ({
|
||||||
Running {line?.runningScenario}
|
Running {line?.runningScenario}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
)}
|
)}
|
||||||
|
{line?.isPassword && (
|
||||||
|
<motion.div
|
||||||
|
style={{ fontSize: "12px", color: "red" }}
|
||||||
|
animate={{ opacity: [0.2, 1, 0.2] }}
|
||||||
|
transition={{
|
||||||
|
duration: 1.2,
|
||||||
|
repeat: Infinity,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Break password before run DPELP
|
||||||
|
</motion.div>
|
||||||
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,7 @@ export type TLine = {
|
||||||
isSkipPhysical?: boolean;
|
isSkipPhysical?: boolean;
|
||||||
reasonSkipPhysical?: string;
|
reasonSkipPhysical?: string;
|
||||||
loadingNote?: boolean;
|
loadingNote?: boolean;
|
||||||
|
isPassword?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TUser = {
|
export type TUser = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue