Increase test interval and relax license check
Increase physical test polling interval from 5s to 15s (backend setInterval and frontend AutoProgress ms) to reduce polling frequency. Add handling to stop the interval when physicalTest.done, send the physical test report, and end testing. Change license filtering to be case-insensitive and match any value containing "permanent" (backend and frontend) so licenses are detected regardless of casing/format.
This commit is contained in:
parent
7e422e4852
commit
75acf0ed8c
|
|
@ -1154,10 +1154,14 @@ export default class LineConnection {
|
||||||
const interval = setInterval(async () => {
|
const interval = setInterval(async () => {
|
||||||
if (!this.config.runningPhysical || this.config.status !== 'connected') {
|
if (!this.config.runningPhysical || this.config.status !== 'connected') {
|
||||||
clearInterval(interval)
|
clearInterval(interval)
|
||||||
|
} else if (this.physicalTest.done) {
|
||||||
|
clearInterval(interval)
|
||||||
|
this.sendReportPhysicalTest()
|
||||||
|
this.endTesting()
|
||||||
} else {
|
} else {
|
||||||
this.checkingPhysicalPort()
|
this.checkingPhysicalPort()
|
||||||
}
|
}
|
||||||
}, 5000)
|
}, 15000)
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkingPhysicalPort() {
|
async checkingPhysicalPort() {
|
||||||
|
|
@ -1777,7 +1781,7 @@ ${log}
|
||||||
Licenses: <b>${
|
Licenses: <b>${
|
||||||
dataShowLic
|
dataShowLic
|
||||||
? dataShowLic
|
? dataShowLic
|
||||||
?.filter((el) => el.LICENSE_TYPE === 'Permanent')
|
?.filter((el) => el.LICENSE_TYPE?.toLowerCase()?.includes('permanent'))
|
||||||
?.map((v) => v.FEATURE)
|
?.map((v) => v.FEATURE)
|
||||||
?.join(', ')
|
?.join(', ')
|
||||||
: ''
|
: ''
|
||||||
|
|
|
||||||
|
|
@ -953,9 +953,10 @@ const ModalTerminal = ({
|
||||||
<Text size="md">
|
<Text size="md">
|
||||||
{findDataShowLicense()
|
{findDataShowLicense()
|
||||||
? findDataShowLicense()
|
? findDataShowLicense()
|
||||||
?.filter(
|
?.filter((el: TextTSMLicense) =>
|
||||||
(el: TextTSMLicense) =>
|
el.LICENSE_TYPE?.toLowerCase()?.includes(
|
||||||
el.LICENSE_TYPE === "Permanent"
|
"permanent"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
?.map((v: TextTSMLicense) => v.FEATURE)
|
?.map((v: TextTSMLicense) => v.FEATURE)
|
||||||
?.join(", ")
|
?.join(", ")
|
||||||
|
|
@ -1030,9 +1031,10 @@ const ModalTerminal = ({
|
||||||
sn: line?.inventory?.sn || "",
|
sn: line?.inventory?.sn || "",
|
||||||
licenses: findDataShowLicense()
|
licenses: findDataShowLicense()
|
||||||
? findDataShowLicense()
|
? findDataShowLicense()
|
||||||
?.filter(
|
?.filter((el: TextTSMLicense) =>
|
||||||
(el: TextTSMLicense) =>
|
el.LICENSE_TYPE?.toLowerCase()?.includes(
|
||||||
el.LICENSE_TYPE === "Permanent"
|
"permanent"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
?.map((v: TextTSMLicense) => v.FEATURE)
|
?.map((v: TextTSMLicense) => v.FEATURE)
|
||||||
: [],
|
: [],
|
||||||
|
|
@ -1187,7 +1189,7 @@ const ModalTerminal = ({
|
||||||
<Tabs.Panel value="physical">
|
<Tabs.Panel value="physical">
|
||||||
<AutoProgress
|
<AutoProgress
|
||||||
start={isPhysicalTest || false}
|
start={isPhysicalTest || false}
|
||||||
ms={5000}
|
ms={15000}
|
||||||
style={{ marginTop: "8px" }}
|
style={{ marginTop: "8px" }}
|
||||||
/>
|
/>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue