Merge pull request #3954 from influxdata/bugfix/annotation-refresh

Bugfix: Annotations not appearing until auto refresh tick
pull/10616/head
Andrew Watkins 2018-07-18 09:13:40 -07:00 committed by GitHub
commit bffb76033d
1 changed files with 3 additions and 4 deletions

View File

@ -133,15 +133,14 @@ class DashboardPage extends Component<Props, State> {
public async componentDidMount() {
const {autoRefresh} = this.props
if (autoRefresh) {
AutoRefresh.poll(autoRefresh)
AutoRefresh.subscribe(this.fetchAnnotations)
}
AutoRefresh.poll(autoRefresh)
AutoRefresh.subscribe(this.fetchAnnotations)
window.addEventListener('resize', this.handleWindowResize, true)
await this.getDashboard()
this.fetchAnnotations()
this.getDashboardLinks()
}