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>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -738,7 +738,7 @@ const JackServerSettingsDialog = withStyles(
|
|||||||
Latency: {this.state.latencyText}
|
Latency: {this.state.latencyText}
|
||||||
</Typography>
|
</Typography>
|
||||||
<div className={classes.cpuStatusColor} style={{ paddingLeft: 24 }}>
|
<div className={classes.cpuStatusColor} style={{ paddingLeft: 24 }}>
|
||||||
{JackHostStatus.getDisplayView("", this.state.jackStatus)}
|
{JackHostStatus.getDisplayViewNoCpu("", this.state.jackStatus)}
|
||||||
</div>
|
</div>
|
||||||
{!this.state.okEnabled && (
|
{!this.state.okEnabled && (
|
||||||
<Typography display="block" variant="caption" color="error"
|
<Typography display="block" variant="caption" color="error"
|
||||||
|
|||||||
Reference in New Issue
Block a user