Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Limmen committed Jan 3, 2024
1 parent e630663 commit b07e890
Showing 1 changed file with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,6 @@ const EmulationStatistics = (props) => {
}
setSelectedEmulationStatistic(response)
setLoadingSelectedEmulationStatistic(false)
setFetchProgressState({
eta: "N/A",
percentage: 0,
remaining: "N/A",
speed: "N/A",
total: "N/A",
transferred: "N/A"
})
setProgressStarted(false)
setInterval(() => {
setFetchProgressState((prev) => Math.min(100, prev + 1))
}, 10);

if (response !== null && response !== undefined && !(Object.keys(response).length === 0)) {
const conditionalOptions = Object.keys(response.conditionals_counts).map(
(conditionalName, index) => {
Expand All @@ -142,6 +129,15 @@ const EmulationStatistics = (props) => {
})
setMetrics(metricOptions)
setSelectedMetric(metricOptions[0])
setProgressStarted(false)
setFetchProgressState({
eta: "N/A",
percentage: 0,
remaining: "N/A",
speed: "N/A",
total: "N/A",
transferred: "N/A"
})
}
})
.catch(error => console.log("error:" + error))
Expand Down Expand Up @@ -241,6 +237,15 @@ const EmulationStatistics = (props) => {

const updateEmulationStatisticId = (emulationStatisticId) => {
setSelectedEmulationStatisticId(emulationStatisticId)
setProgressStarted(false)
setFetchProgressState({
eta: "N/A",
percentage: 0,
remaining: "N/A",
speed: "N/A",
total: "N/A",
transferred: "N/A"
})
fetchEmulationStatistic(emulationStatisticId)
setSelectedConditionals(null)
setSelectedMetric(null)
Expand Down

0 comments on commit b07e890

Please sign in to comment.