Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/deploy-andy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- andy/*
- test

jobs:
deploy:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-edc-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- prod
- test

jobs:
deploy:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-kim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- kim/*
- test

jobs:
deploy:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-tyler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- tyler/*
- test

jobs:
deploy:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-will.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- will/*
- test

jobs:
deploy:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-yoreley.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- yoreley/*
- test

jobs:
deploy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export class ScenesListComponent implements OnInit, OnDestroy, AfterContentInit
private numberProductsInList$ = new BehaviorSubject(INFINITY);
public numberProductsInList: number;
private loadingDummyJobs = new Set<string>();
private loadingJobs = {};
private loadedInProjects = new Set<string>();

public breakpoint$ = this.screenSize.breakpoint$;
public breakpoints = models.Breakpoints;
Expand Down Expand Up @@ -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() {
Expand Down
5 changes: 5 additions & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"CHARACTERS": "characters",
"CHART": "Chart",
"CHEVRON_RIGHT": "chevron_right",
"CIRCLE": "Circle",
"CIRCLE DRAW": "Circle Draw",
"CIRCLE_DRAW": "Circle Draw",
"CITATION": "Citation",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down