| | |
| | | }; |
| | | |
| | | componentDidMount = () => { |
| | | this.fetchArchive(); |
| | | this.interval = setInterval(() => this.fetchArchive(), 2000); |
| | | this.fetchQueues(); |
| | | this.interval = setInterval(() => this.fetchQueues(), 2000); |
| | | }; |
| | | |
| | | componentWillUnmount() { |
| | |
| | | }); |
| | | } |
| | | |
| | | fetchArchive = () => { |
| | | fetchQueues = () => { |
| | | this.setState({ |
| | | isFetching: true, |
| | | failed: false |
| | |
| | | |
| | | render() { |
| | | let content = ''; |
| | | let todo = ''; |
| | | |
| | | if (this.state.isFetching && !this.state.queues) { |
| | | content = <i>Loading...</i>; |
| | |
| | | title={'Cannot load Repositories'} |
| | | description={'Something went wrong during contacting the rest api.'} |
| | | action={{ |
| | | handleClick: this.fetchArchive, |
| | | handleClick: this.fetchQueues, |
| | | title: 'Try again' |
| | | }} |
| | | />; |
| | |
| | | constructor(props) { |
| | | super(props); |
| | | |
| | | this.fetchArchive = this.fetchArchive.bind(this); |
| | | this.fetchQueues = this.fetchQueues.bind(this); |
| | | this.toggleTestMode = this.toggleTestMode.bind(this); |
| | | } |
| | | } |