Analytics: log both shown and suppressed warnings
Summary: A small enhancement for the Doctor usage report Reviewed By: passy Differential Revision: D19496887 fbshipit-source-id: 1f0efb0eb29e2efce60ba4fca3bd6fdc062406ea
This commit is contained in:
committed by
Facebook Github Bot
parent
94e2230583
commit
35d62e70cb
@@ -55,14 +55,17 @@ class DoctorBar extends Component<Props, State> {
|
|||||||
async showMessageIfChecksFailed() {
|
async showMessageIfChecksFailed() {
|
||||||
await runHealthchecks(this.props);
|
await runHealthchecks(this.props);
|
||||||
if (
|
if (
|
||||||
(this.props.healthcheckResult.status === 'FAILED' ||
|
this.props.healthcheckResult.status === 'FAILED' ||
|
||||||
this.props.healthcheckResult.status === 'WARNING') &&
|
this.props.healthcheckResult.status === 'WARNING'
|
||||||
!this.props.healthcheckResult.isAcknowledged
|
|
||||||
) {
|
) {
|
||||||
|
if (this.props.healthcheckResult.isAcknowledged) {
|
||||||
|
reportUsage('doctor:warning:suppressed');
|
||||||
|
} else {
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
reportUsage('doctor:warning:shown');
|
reportUsage('doctor:warning:shown');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
this.state.visible && (
|
this.state.visible && (
|
||||||
|
|||||||
Reference in New Issue
Block a user