Device Info on configuration
Display device info only on configuration.
This commit is contained in:
@@ -189,4 +189,46 @@ export default class JackHostStatus {
|
||||
}
|
||||
}
|
||||
|
||||
static getDisplayViewNoCpu(label: string, status?: JackHostStatus): React.ReactNode {
|
||||
if (!status) {
|
||||
return (<div style={{ whiteSpace: "nowrap" }}>
|
||||
<Typography variant="caption" color="inherit">{label}</Typography>
|
||||
<Typography variant="caption"> </Typography>
|
||||
</div>);
|
||||
}
|
||||
if (status.restarting) {
|
||||
return (
|
||||
<div style={{ whiteSpace: "nowrap" }}>
|
||||
<Typography variant="caption" color="inherit">{label}</Typography>
|
||||
<span style={{ color: RED_COLOR }}>
|
||||
<Typography variant="caption" color="inherit">Restarting </Typography>
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
} else if (!status.active) {
|
||||
return (
|
||||
<div style={{ whiteSpace: "nowrap" }}>
|
||||
<Typography variant="caption" color="inherit">{label}</Typography>
|
||||
|
||||
<span style={{ color: RED_COLOR }}>
|
||||
<Typography variant="caption" color="inherit">{status.errorMessage === "" ? "Audio\u00A0Stopped" : status.errorMessage} </Typography>
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
let underrunError = status.msSinceLastUnderrun < 15 * 1000;
|
||||
return (
|
||||
<div style={{ whiteSpace: "nowrap" }}>
|
||||
<Typography variant="caption" color="inherit">{label}</Typography>
|
||||
<span style={{ color: underrunError ? RED_COLOR : GREEN_COLOR }}>
|
||||
<Typography variant="caption" color="inherit">
|
||||
XRuns: {status.underruns + ""}
|
||||
</Typography>
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user