diff --git a/BACKEND/app/services/line_connection.ts b/BACKEND/app/services/line_connection.ts
index 6b027ed..6996c5f 100644
--- a/BACKEND/app/services/line_connection.ts
+++ b/BACKEND/app/services/line_connection.ts
@@ -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,
})
}
}
diff --git a/FRONTEND/src/App.tsx b/FRONTEND/src/App.tsx
index 335c5fd..90f03ac 100644
--- a/FRONTEND/src/App.tsx
+++ b/FRONTEND/src/App.tsx
@@ -455,6 +455,7 @@ function App() {
runningPhysical: data?.physical || false,
ports: data?.ports || [],
listPortsPhysical: [],
+ isPassword: data?.password || false,
},
data?.stationId,
);
diff --git a/FRONTEND/src/components/CardLine.tsx b/FRONTEND/src/components/CardLine.tsx
index 8f22663..f00dc66 100644
--- a/FRONTEND/src/components/CardLine.tsx
+++ b/FRONTEND/src/components/CardLine.tsx
@@ -506,7 +506,21 @@ const CardLine = ({
paddingTop: "2px",
}}
>
- {isShowIssue ? (
+ {line?.isPassword ? (
+
+ {"Password"}
+
+ ) : isShowIssue ? (
)}
+ {line?.isPassword && (
+
+ Break password before run DPELP
+
+ )}
diff --git a/FRONTEND/src/untils/types.ts b/FRONTEND/src/untils/types.ts
index 6d1fb9a..f8393a0 100644
--- a/FRONTEND/src/untils/types.ts
+++ b/FRONTEND/src/untils/types.ts
@@ -112,6 +112,7 @@ export type TLine = {
isSkipPhysical?: boolean;
reasonSkipPhysical?: string;
loadingNote?: boolean;
+ isPassword?: boolean;
};
export type TUser = {