diff --git a/.github/workflows/deploy-andy.yml b/.github/workflows/deploy-andy.yml index 9fcbc22ca..8328b7f5c 100644 --- a/.github/workflows/deploy-andy.yml +++ b/.github/workflows/deploy-andy.yml @@ -4,7 +4,6 @@ on: push: branches: - andy/* - - test jobs: deploy: diff --git a/.github/workflows/deploy-edc-prod.yml b/.github/workflows/deploy-edc-prod.yml index dc17892ce..4ae8adf86 100644 --- a/.github/workflows/deploy-edc-prod.yml +++ b/.github/workflows/deploy-edc-prod.yml @@ -4,7 +4,6 @@ on: push: branches: - prod - - test jobs: deploy: diff --git a/.github/workflows/deploy-kim.yml b/.github/workflows/deploy-kim.yml index 6e54050d8..65d350778 100644 --- a/.github/workflows/deploy-kim.yml +++ b/.github/workflows/deploy-kim.yml @@ -4,7 +4,6 @@ on: push: branches: - kim/* - - test jobs: deploy: diff --git a/.github/workflows/deploy-tyler.yml b/.github/workflows/deploy-tyler.yml index 89c8a0d88..2d1fb9146 100644 --- a/.github/workflows/deploy-tyler.yml +++ b/.github/workflows/deploy-tyler.yml @@ -4,7 +4,6 @@ on: push: branches: - tyler/* - - test jobs: deploy: diff --git a/.github/workflows/deploy-will.yml b/.github/workflows/deploy-will.yml index 8dff01e4a..720250b1f 100644 --- a/.github/workflows/deploy-will.yml +++ b/.github/workflows/deploy-will.yml @@ -4,7 +4,6 @@ on: push: branches: - will/* - - test jobs: deploy: diff --git a/.github/workflows/deploy-yoreley.yml b/.github/workflows/deploy-yoreley.yml index ab4b1067f..8b4e325c6 100644 --- a/.github/workflows/deploy-yoreley.yml +++ b/.github/workflows/deploy-yoreley.yml @@ -4,7 +4,6 @@ on: push: branches: - yoreley/* - - test jobs: deploy: diff --git a/src/app/components/results-menu/scenes-list/scenes-list.component.ts b/src/app/components/results-menu/scenes-list/scenes-list.component.ts index aa8b76167..88803c473 100644 --- a/src/app/components/results-menu/scenes-list/scenes-list.component.ts +++ b/src/app/components/results-menu/scenes-list/scenes-list.component.ts @@ -64,6 +64,8 @@ export class ScenesListComponent implements OnInit, OnDestroy, AfterContentInit private numberProductsInList$ = new BehaviorSubject(INFINITY); public numberProductsInList: number; private loadingDummyJobs = new Set(); + private loadingJobs = {}; + private loadedInProjects = new Set(); public breakpoint$ = this.screenSize.breakpoint$; public breakpoints = models.Breakpoints; @@ -486,40 +488,56 @@ export class ScenesListComponent implements OnInit, OnDestroy, AfterContentInit } } + private addToQueue(scenesToLoad: models.CMRProduct[]) { + + scenesToLoad.forEach( + s => {this.loadingDummyJobs.add(s.name); this.loadedInProjects.add(s.metadata.job.name);} + ); + + let scenesOutsideInitialLoad = this.scenes + .slice(this.numberProductsInList) + .filter(s => s.isDummyProduct) + .filter(s => this.loadedInProjects.has(s.metadata.job.name) && !this.loadingDummyJobs.has(s.name)); + + if (scenesToLoad.length === 0 && scenesOutsideInitialLoad.length === 0) { + return; + } + scenesToLoad = [...scenesToLoad, ...scenesOutsideInitialLoad] + scenesToLoad.forEach( + s => this.loadingJobs[s.name] = s + ) + + this.store$.dispatch(new searchStore.LoadOnDemandScenesList(Object.values(this.loadingJobs))); + + } + public onLoadMoreCustomProducts() { const oldNumProducts = this.numberProductsInList; const newNumProducts = this.numberProductsInList + this.productPageSize; - const scenesToLoad = this.scenes.slice(oldNumProducts, newNumProducts); + const scenesToLoad = this.scenes.slice(oldNumProducts, newNumProducts) + .filter(s => s.isDummyProduct) + .filter(s => !this.loadingDummyJobs.has(s.name)); + + this.addToQueue(scenesToLoad); this.numberProductsInList$.next( newNumProducts ); - - this.store$.dispatch(new searchStore.LoadOnDemandScenesList(scenesToLoad)); } - private loadDummyProducts(scenes: CMRProduct[]) { - - const scenesToLoad = scenes + let scenesToLoad = scenes .slice(0, this.numberProductsInList) .filter(s => s.isDummyProduct) .filter(s => !this.loadingDummyJobs.has(s.name)); - if (scenesToLoad.length === 0) { - return; - } - - scenesToLoad.forEach( - s => this.loadingDummyJobs.add(s.name) - ); - this.store$.dispatch(new searchStore.LoadOnDemandScenesList(scenesToLoad)); + this.addToQueue(scenesToLoad); } private removeLoadedScenes(scenes: CMRProduct[]) { scenes .filter(s => !s.isDummyProduct) - .forEach(s => this.loadingDummyJobs.delete(s.name)) + .forEach(s => {this.loadingDummyJobs.delete(s.name); delete this.loadingJobs[s.name]}) } ngOnDestroy() { diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 246aed817..b2d3f4a9d 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -116,6 +116,7 @@ "CHARACTERS": "characters", "CHART": "Chart", "CHEVRON_RIGHT": "chevron_right", + "CIRCLE": "Circle", "CIRCLE DRAW": "Circle Draw", "CIRCLE_DRAW": "Circle Draw", "CITATION": "Citation", @@ -436,6 +437,7 @@ "LEARN_THE_BASICS": "Learn the Basics", "LEFTMOST_COLUMN_OF_THE_RESULTS_PANEL": "leftmost column of the results panel.", "LIGHT": "Light", + "LINE": "Line", "LINE_DRAW": "Line draw", "LINE_POLYGON_AND_BOUNDING_BOX": "line, polygon, and bounding box.", "LINK": "link", @@ -582,12 +584,15 @@ "PLACE": "place", "PLACE_A_POINT": "Place a Point", "PLEASE_SELECT_A_POINT_ON_THE_MAP": "Please select a point on the map.", + "POINT": "Point ", "POINT_DRAW": "Point draw", "POINTING_ANGLE": "Pointing Angle ", + "POINTS": "Points", "POLARIZATION": "Polarization", "POLARIZATION_SELECTED": "Polarization selected", "POLARIZATIONS": "Polarizations", "POLARIZATIONS_SELECTED": "polarizations selected", + "POLYGON": "Polygon", "POLYGON_DRAW": "Polygon draw", "POWER": "power", "POWERED_BY_HY_P3": "Powered by HyP3", diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 149a8792b..4e594aea7 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -117,6 +117,7 @@ "CHARACTERS": "caracteres", "CHART": "Cuadro", "CHEVRON_RIGHT": "chevron_right", + "CIRCLE": "Círculo", "CIRCLE DRAW": "Dibujar Circulo", "CIRCLE_DRAW": "Dibujo Circular", "CITATION": "Citación", @@ -441,6 +442,7 @@ "LEARN_THE_BASICS": "Aprende lo básico", "LEFTMOST_COLUMN_OF_THE_RESULTS_PANEL": "columna más a la izquierda del panel de resultados.", "LIGHT": "Claro", + "LINE": "Línea", "LINE_DRAW": "Dibujar Línea", "LINE_POLYGON_AND_BOUNDING_BOX": "línea, polígono y cuadro delimitador.", "LINK": "enlace", @@ -585,12 +587,15 @@ "PLACE": "lugar", "PLACE_A_POINT": "Coloque un Punto", "PLEASE_SELECT_A_POINT_ON_THE_MAP": "Por favor, seleccione un punto en el mapa.", + "POINT": "Punto", "POINT_DRAW": "Dibujar Punto", "POINTING_ANGLE": "Ángulo de Apuntamiento", + "POINTS": "Puntos", "POLARIZATION": "Polarización", "POLARIZATION_SELECTED": "Polarización seleccionada", "POLARIZATIONS": "polarizaciones", "POLARIZATIONS_SELECTED": "polarizaciones seleccionadas", + "POLYGON": "Polígono", "POLYGON_DRAW": "Dibujar Polígono", "POWER": "poder", "POWERED_BY_HY_P3": "Impulsado Por HyP3",