Update log
This commit is contained in:
parent
2632526794
commit
725315ed32
|
|
@ -931,6 +931,11 @@ export default class LineConnection {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
console.log(`${promptRecord.content}
|
||||||
|
|
||||||
|
Return ONLY a valid JSON array of strings.
|
||||||
|
Here is the log:
|
||||||
|
${log}`)
|
||||||
const remoteUrl = process.env.ERP_URL_AUTH || 'https://stage.nswteam.net'
|
const remoteUrl = process.env.ERP_URL_AUTH || 'https://stage.nswteam.net'
|
||||||
const remoteResp = await axios.post(
|
const remoteResp = await axios.post(
|
||||||
remoteUrl + '/api/transferPostData',
|
remoteUrl + '/api/transferPostData',
|
||||||
|
|
@ -1994,7 +1999,7 @@ Ports Missing/Down: ${missing.length}\n\n`
|
||||||
const skipReason = this.config.reasonSkipPhysical || snapshot?.reason || ''
|
const skipReason = this.config.reasonSkipPhysical || snapshot?.reason || ''
|
||||||
const isSkipped = typeof skipReason === 'string' && skipReason.trim().length > 0
|
const isSkipped = typeof skipReason === 'string' && skipReason.trim().length > 0
|
||||||
|
|
||||||
const aiIssue = issues.length > 0 ? issues.join('\n') : ''
|
const aiIssue = issues.length > 0 && Array.isArray(issues) ? issues.join('\n') : ''
|
||||||
let summaryStatus = 'PASS'
|
let summaryStatus = 'PASS'
|
||||||
const match = aiIssue.match(/RESULT:\s*(PASS WITH WARNING|PASS|FAIL|INSUFFICIENT DATA)/im)
|
const match = aiIssue.match(/RESULT:\s*(PASS WITH WARNING|PASS|FAIL|INSUFFICIENT DATA)/im)
|
||||||
if (match) {
|
if (match) {
|
||||||
|
|
|
||||||
|
|
@ -687,9 +687,8 @@ export async function updateNoteToERP(sn: string, note: string) {
|
||||||
// urlAPI: '/api/stock-model-serial/get-list-for-test-log',
|
// urlAPI: '/api/stock-model-serial/get-list-for-test-log',
|
||||||
// filter: {
|
// filter: {
|
||||||
// where: {
|
// where: {
|
||||||
// _q: 'FOC1425Z3RN',
|
// _q: sn,
|
||||||
// },
|
// },
|
||||||
// orgId: ['5fadc798f070e4b64b53ac9c', '5fadc7b0f070e4b64b53ac9d'],
|
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
|
|
@ -705,8 +704,7 @@ export async function updateNoteToERP(sn: string, note: string) {
|
||||||
where: {
|
where: {
|
||||||
_q: sn,
|
_q: sn,
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
orgId: ['5fadc798f070e4b64b53ac9c', '5fadc7b0f070e4b64b53ac9d'],
|
|
||||||
},
|
},
|
||||||
headers: header,
|
headers: header,
|
||||||
}
|
}
|
||||||
|
|
@ -735,6 +733,12 @@ export async function updateNoteToERP(sn: string, note: string) {
|
||||||
await axios.post(remoteUrl + '/api/stock-model-serial/data-save-for-test-log', payload, {
|
await axios.post(remoteUrl + '/api/stock-model-serial/data-save-for-test-log', payload, {
|
||||||
headers: header,
|
headers: header,
|
||||||
})
|
})
|
||||||
|
// await axios.post("https://stage.nswteam.net/api/transferPostData", {
|
||||||
|
// urlAPI: '/api/stock-model-serial/data-save-for-test-log',
|
||||||
|
// data: payload
|
||||||
|
// }, {
|
||||||
|
// headers: header,
|
||||||
|
// })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('updateNoteToERP', error)
|
console.log('updateNoteToERP', error)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,22 +53,22 @@ type StationAction = (
|
||||||
|
|
||||||
export default class SocketIoProvider {
|
export default class SocketIoProvider {
|
||||||
private static _io: CustomServer
|
private static _io: CustomServer
|
||||||
constructor(protected app: ApplicationService) {}
|
constructor(protected app: ApplicationService) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register bindings to the container
|
* Register bindings to the container
|
||||||
*/
|
*/
|
||||||
register() {}
|
register() { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The container bindings have booted
|
* The container bindings have booted
|
||||||
*/
|
*/
|
||||||
async boot() {}
|
async boot() { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The application has been booted
|
* The application has been booted
|
||||||
*/
|
*/
|
||||||
async start() {}
|
async start() { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The process has been started
|
* The process has been started
|
||||||
|
|
@ -83,7 +83,7 @@ export default class SocketIoProvider {
|
||||||
/**
|
/**
|
||||||
* Preparing to shutdown the app
|
* Preparing to shutdown the app
|
||||||
*/
|
*/
|
||||||
async shutdown() {}
|
async shutdown() { }
|
||||||
|
|
||||||
public static get io() {
|
public static get io() {
|
||||||
return this._io
|
return this._io
|
||||||
|
|
@ -100,7 +100,7 @@ export class WebSocketIo {
|
||||||
lineConnecting: number[] = [] // key = lineId
|
lineConnecting: number[] = [] // key = lineId
|
||||||
intervalKeepConnect: { [key: string]: NodeJS.Timeout } = {}
|
intervalKeepConnect: { [key: string]: NodeJS.Timeout } = {}
|
||||||
|
|
||||||
constructor(protected app: ApplicationService) {}
|
constructor(protected app: ApplicationService) { }
|
||||||
|
|
||||||
async boot() {
|
async boot() {
|
||||||
const SOCKET_IO_PORT = env.get('SOCKET_PORT') || 8989
|
const SOCKET_IO_PORT = env.get('SOCKET_PORT') || 8989
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ const CardLine = ({
|
||||||
}, [line?.latestScenario]);
|
}, [line?.latestScenario]);
|
||||||
|
|
||||||
function detectResultStatus(lines: string[]) {
|
function detectResultStatus(lines: string[]) {
|
||||||
if (!lines || lines.length === 0) return null;
|
if (!lines || lines.length === 0 || typeof lines === "string") return null;
|
||||||
const text = lines.join("\n");
|
const text = lines.join("\n");
|
||||||
|
|
||||||
const match = text.match(
|
const match = text.match(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue