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)
|
||||
let rawData = ''
|
||||
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.outputBuffer += message
|
||||
this.outputScenario += message
|
||||
|
|
@ -427,6 +448,7 @@ export default class LineConnection {
|
|||
stationId: this.config.stationId,
|
||||
lineId: this.config.id,
|
||||
title: '',
|
||||
password: false,
|
||||
})
|
||||
this.outputBuffer = ''
|
||||
return
|
||||
|
|
@ -450,6 +472,7 @@ export default class LineConnection {
|
|||
stationId: this.config.stationId,
|
||||
lineId: this.config.id,
|
||||
title: script?.title,
|
||||
password: false,
|
||||
})
|
||||
if (script?.send_result || script?.sendResult) {
|
||||
this.dataDPELP = ''
|
||||
|
|
@ -493,6 +516,7 @@ export default class LineConnection {
|
|||
stationId: this.config.stationId,
|
||||
lineId: this.config.id,
|
||||
title: '',
|
||||
password: false,
|
||||
})
|
||||
this.outputBuffer = ''
|
||||
this.outputScenario = ''
|
||||
|
|
@ -667,6 +691,7 @@ export default class LineConnection {
|
|||
stationId: this.config.stationId,
|
||||
lineId: this.config.id,
|
||||
title: '',
|
||||
password: false,
|
||||
})
|
||||
this.config.data = data
|
||||
this.socketIO.emit('data_textfsm', {
|
||||
|
|
@ -1243,6 +1268,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
|||
title: 'Physical Test',
|
||||
physical: true,
|
||||
ports: listPorts,
|
||||
password: false,
|
||||
})
|
||||
if (listPorts.length === 0) {
|
||||
this.config.listFeatureTested = [...new Set([...this.config.listFeatureTested, 'PHYSICAL'])]
|
||||
|
|
@ -1339,6 +1365,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
|||
stationId: this.config.stationId,
|
||||
lineId: this.config.id,
|
||||
title: '',
|
||||
password: false,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -1644,6 +1671,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
|||
stationId: this.config.stationId,
|
||||
lineId: this.config.id,
|
||||
title: 'Backup IOS',
|
||||
password: false,
|
||||
})
|
||||
await sleep(1000)
|
||||
const listIos = await this.getListIos()
|
||||
|
|
@ -2703,6 +2731,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
|||
stationId: this.config.stationId,
|
||||
lineId: this.config.id,
|
||||
title: 'Config Network',
|
||||
password: false,
|
||||
})
|
||||
await this.writeCommand(`enable\r\n`)
|
||||
await sleep(500)
|
||||
|
|
@ -2730,6 +2759,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
|||
stationId: this.config.stationId,
|
||||
lineId: this.config.id,
|
||||
title: '',
|
||||
password: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -455,6 +455,7 @@ function App() {
|
|||
runningPhysical: data?.physical || false,
|
||||
ports: data?.ports || [],
|
||||
listPortsPhysical: [],
|
||||
isPassword: data?.password || false,
|
||||
},
|
||||
data?.stationId,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -506,7 +506,21 @@ const CardLine = ({
|
|||
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
|
||||
style={{
|
||||
border: "1px solid #ccc",
|
||||
|
|
|
|||
|
|
@ -640,6 +640,19 @@ const ModalTerminal = ({
|
|||
Running {line?.runningScenario}
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ export type TLine = {
|
|||
isSkipPhysical?: boolean;
|
||||
reasonSkipPhysical?: string;
|
||||
loadingNote?: boolean;
|
||||
isPassword?: boolean;
|
||||
};
|
||||
|
||||
export type TUser = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue