mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 12:42:38 +00:00
fix parsing error #2
This commit is contained in:
+5
-1
@@ -326,7 +326,11 @@ export default function DeviceDetailsCard({ events }: { events: EnrollmentEvent[
|
||||
<DetailRow label="Boot Time" value={estimatedBootTime.toLocaleString([], { dateStyle: "short", timeStyle: "medium" })} />
|
||||
)}
|
||||
{uptimeUntilEnrollment && <DetailRow label="Uptime until enrollment starts" value={uptimeUntilEnrollment} />}
|
||||
{agentStarted?.agentVersion && <DetailRow label="Monitor Agent Version" value={agentStarted.agentVersion.replace(/\+([0-9a-f]{7})[0-9a-f]+$/, '+$1')} />}
|
||||
{agentStarted?.agentVersion && (() => {
|
||||
const v = agentStarted.agentVersion;
|
||||
if (typeof v !== 'string') { console.error('[DeviceDetailsCard] agentVersion is not a string:', typeof v, v); return null; }
|
||||
return <DetailRow label="Monitor Agent Version" value={v.replace(/\+([0-9a-f]{7})[0-9a-f]+$/, '+$1')} />;
|
||||
})()}
|
||||
{imeVersion && <DetailRow label="IME Agent Version" value={imeVersion.version ?? imeVersion.agentVersion ?? "Unknown"} />}
|
||||
{(deviceLocation?.country || deviceLocation?.Country) && (
|
||||
<DetailRow label="Country" value={deviceLocation.country ?? deviceLocation.Country} />
|
||||
|
||||
@@ -363,7 +363,9 @@ function EventRow({ event, showScriptOutput }: { event: EnrollmentEvent; showScr
|
||||
: null;
|
||||
const hasGatherOutput = gatherOutput != null && gatherOutput !== "";
|
||||
const formattedOutput = hasGatherOutput
|
||||
? gatherOutput.replace(/\r\n/g, "\n").replace(/\r/g, "\n")
|
||||
? (typeof gatherOutput === 'string'
|
||||
? gatherOutput.replace(/\r\n/g, "\n").replace(/\r/g, "\n")
|
||||
: (console.error('[EventTimeline] gatherOutput is not a string:', typeof gatherOutput, gatherOutput), null))
|
||||
: null;
|
||||
|
||||
const copyDetailContent = async (text: string) => {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user