diff --git a/src/App.jsx b/src/App.jsx index 31e64ef..fcf7551 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -25,6 +25,7 @@ export default class App extends Component { this.state = { runningTaskCount: 0, + isFetching: false, repoDescription: "", }; @@ -63,11 +64,15 @@ export default class App extends Component { } fetchTaskSummary() { + if( ! this.state.isFetching ) + { + this.setState({ isFetching: true }); axios.get('/api/v1/tasks-summary').then(result => { - this.setState({ runningTaskCount: result.data["RUNNING"] || 0 }); + this.setState({ isFetching: false, runningTaskCount: result.data["RUNNING"] || 0 }); }).catch(error => { - this.setState({ runningTaskCount: -1 }); + this.setState({ isFetching: false, runningTaskCount: -1 }); }); + } } componentWillUnmount() { diff --git a/src/PolicyEditor/index.jsx b/src/PolicyEditor/index.jsx index 885a37f..4ad970e 100644 --- a/src/PolicyEditor/index.jsx +++ b/src/PolicyEditor/index.jsx @@ -525,7 +525,7 @@ export class PolicyEditor extends Component { - {LogDetailSelector(this, "policy.logging.entries.cacheHit")} + {LogDetailSelector(this, "policy.logging.entries.cacheMiss")} {EffectiveValue(this, "logging.entries.cacheMiss")} diff --git a/src/SourcesTable.jsx b/src/SourcesTable.jsx index e42b38d..0a730d2 100644 --- a/src/SourcesTable.jsx +++ b/src/SourcesTable.jsx @@ -24,6 +24,7 @@ export class SourcesTable extends Component { this.state = { sources: [], isLoading: false, + isFetching: false, isRefreshing: false, error: null,