diff --git a/vue/src/components/ModelRunList.vue b/vue/src/components/ModelRunList.vue index 01517209b..85651650b 100755 --- a/vue/src/components/ModelRunList.vue +++ b/vue/src/components/ModelRunList.vue @@ -3,7 +3,7 @@ import ModelRunCard from "./ModelRunCard.vue"; import type { ModelRunList } from "../client/models/ModelRunList"; import type { QueryArguments } from "../client"; import { computed, onMounted, ref, watch, withDefaults } from "vue"; -import { filteredSatelliteTimeList, queryModelRuns, refreshModelRunDownloadingStatuses, state, updateCameraBoundsBasedOnModelRunList } from "../store"; +import { filteredSatelliteTimeList, queryModelRuns, state, updateCameraBoundsBasedOnModelRunList } from "../store"; import type { KeyedModelRun } from '../store' import { hoveredInfo } from "../interactions/mouseEvents"; @@ -28,8 +28,6 @@ async function loadModelRuns(type: 'firstPage' | 'nextPage') { emit('modelrunlist', modelRunList); } -watch(() => state.downloadingCheck, () => refreshModelRunDownloadingStatuses()); - const loadingSatelliteTimestamps = ref(false); function handleToggle(modelRun: KeyedModelRun) { diff --git a/vue/src/components/annotationViewer/AnnotationList.vue b/vue/src/components/annotationViewer/AnnotationList.vue index b59bb886c..f7d5f2e20 100644 --- a/vue/src/components/annotationViewer/AnnotationList.vue +++ b/vue/src/components/annotationViewer/AnnotationList.vue @@ -5,7 +5,7 @@ import { DownloadSettings, SiteList, } from "../../client/services/ApiService"; -import { state, updateCameraBoundsBasedOnModelRunList } from "../../store"; +import { refreshModelRunDownloadingStatuses, state, updateCameraBoundsBasedOnModelRunList } from "../../store"; import { clickedInfo, hoveredInfo } from "../../interactions/mouseEvents"; import ImagesDownloadDialog from "../ImagesDownloadDialog.vue"; import SiteListCard from "../siteList/SiteListCard.vue"; @@ -128,7 +128,6 @@ const getSiteProposals = async () => { if (selected) { selectSite(selected); } - } } }; @@ -238,8 +237,8 @@ const startDownload = async (data: DownloadSettings) => { const id = imageDownloadingId.value; imageDownloadDialog.value = false; if (id) { - await ApiService.getObservationImages(id, data); - state.downloadingCheck += 1; + await ApiService.getObservationImages(id, data); + refreshModelRunDownloadingStatuses(); // Now we get the results to see if the service is running setTimeout(() => getSiteProposals(), 1000); } diff --git a/vue/src/components/siteList/SiteList.vue b/vue/src/components/siteList/SiteList.vue index ea5460849..9291c96a4 100644 --- a/vue/src/components/siteList/SiteList.vue +++ b/vue/src/components/siteList/SiteList.vue @@ -10,7 +10,7 @@ import SiteListCard from "./SiteListCard.vue"; import { SiteDisplay } from "./SiteListCard.vue"; import SiteListHeader from "./SiteListHeader.vue"; import SiteListFilter from "./SiteListFilter.vue"; -import { getSiteObservationDetails, state } from "../../store"; +import { getSiteObservationDetails, refreshModelRunDownloadingStatuses, state } from "../../store"; import { scoringColors, scoringColorsKeys } from "../../mapstyle/annotationStyles"; const props = defineProps<{ @@ -283,12 +283,12 @@ const startDownload = async (data: DownloadSettings) => { const id = imageDownloadingId.value; imageDownloadDialog.value = false; if (id) { - await ApiService.getObservationImages(id, data); - // Notify the ModelRunList that downloading is happening - if (imageDownloadingModelRunId.value) { - emit('image-download', imageDownloadingModelRunId.value); - } - state.downloadingCheck += 1; + await ApiService.getObservationImages(id, data); + // Notify the ModelRunList that downloading is happening + if (imageDownloadingModelRunId.value) { + emit('image-download', imageDownloadingModelRunId.value); + } + refreshModelRunDownloadingStatuses(); // Now we get the results to see if the service is running setTimeout(() => getAllSiteProposals(), 1000); } diff --git a/vue/src/store.ts b/vue/src/store.ts index f47b25497..669faf799 100644 --- a/vue/src/store.ts +++ b/vue/src/store.ts @@ -205,8 +205,6 @@ export const state = reactive<{ // Region map is used to index names and owners with ids regionMap: RegionMapType; regionList: RegionDetail[]; - // Downloading Check - used to indicate to the modelRunList to check for downloading images - downloadingCheck: number; // Query states - stores states for network queries queryStates: { loadModelRuns: { @@ -292,7 +290,6 @@ export const state = reactive<{ groundTruthLinks: {}, regionMap: {}, regionList: [], - downloadingCheck: 0, queryStates: { loadModelRuns: { inflightQueries: 0,