Skip to content

Commit

Permalink
feat: integrate devs of toolkit 26.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
QuCMGisaia committed Dec 19, 2024
1 parent 30ae770 commit 3dcf151
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 40 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,15 +578,15 @@

## [v24.2.0-beta-iam.5](https://github.com/gisaia/ARLAS-wui-toolkit/tree/v24.2.0-beta-iam.5) (2023-09-04)

[Full Changelog](https://github.com/gisaia/ARLAS-wui-toolkit/compare/v24.2.0-beta-iam.3...v24.2.0-beta-iam.5)
[Full Changelog](https://github.com/gisaia/ARLAS-wui-toolkit/compare/v24.2.0-beta-iam.4...v24.2.0-beta-iam.5)

## [v24.2.0-beta-iam.3](https://github.com/gisaia/ARLAS-wui-toolkit/tree/v24.2.0-beta-iam.3) (2023-08-28)
## [v24.2.0-beta-iam.4](https://github.com/gisaia/ARLAS-wui-toolkit/tree/v24.2.0-beta-iam.4) (2023-08-28)

[Full Changelog](https://github.com/gisaia/ARLAS-wui-toolkit/compare/v24.2.0-beta-iam.4...v24.2.0-beta-iam.3)
[Full Changelog](https://github.com/gisaia/ARLAS-wui-toolkit/compare/v24.2.0-beta-iam.3...v24.2.0-beta-iam.4)

## [v24.2.0-beta-iam.4](https://github.com/gisaia/ARLAS-wui-toolkit/tree/v24.2.0-beta-iam.4) (2023-08-28)
## [v24.2.0-beta-iam.3](https://github.com/gisaia/ARLAS-wui-toolkit/tree/v24.2.0-beta-iam.3) (2023-08-28)

[Full Changelog](https://github.com/gisaia/ARLAS-wui-toolkit/compare/v24.1.6...v24.2.0-beta-iam.4)
[Full Changelog](https://github.com/gisaia/ARLAS-wui-toolkit/compare/v24.1.6...v24.2.0-beta-iam.3)

## [v24.1.6](https://github.com/gisaia/ARLAS-wui-toolkit/tree/v24.1.6) (2023-08-09)

Expand Down Expand Up @@ -2072,4 +2072,4 @@



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
6 changes: 4 additions & 2 deletions projects/arlas-toolkit/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"no": "no",
"Previous": "Previous",
"Summary": "Summary",
"Downloading...": "Downloading...",
"Download more products": "Download {{value}} product",
"Download one product": "Download one product",
"You are about to download more products": "You are about to download {{value}} products",
Expand All @@ -31,6 +32,7 @@
"Enrichment type": "Enrichment type",
"You are about to enrich multiple products": "You are about to enrich {{value}} products",
"You are about to enrich one product": "You are about to enrich one product",
"Enriching...": "Enriching...",
"Start date": "Start date",
"End date": "End date",
"processing error occured": "An error occured in {{processingName}} service",
Expand Down Expand Up @@ -193,9 +195,9 @@
"native": "Native",
"Geotiff": "Geotiff",
"Jpeg2000": "Jpeg2000",
"Zarr": "Zarr",
"ZARR": "Zarr",
"enrich": "enrich",
"Cog": "Cog",
"cog": "cog",
"Bookmark already exists": "A bookmark already exists with this name.",
"Bookmark creation error": "Error during bookmark creation.",
"Bookmark succefully created.": "Bookmark succefully created.",
Expand Down
6 changes: 4 additions & 2 deletions projects/arlas-toolkit/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"no": "no",
"Previous": "Volver",
"Summary": "Resumen",
"Downloading...": "Descargando...",
"Download more products": "Descargar {{value}} productos",
"Download one product": "Descargar un producto",
"You are about to download more products": "Está a punto de descargar {{value}} productos",
Expand All @@ -31,6 +32,7 @@
"Enrichment type": "Tipo de enriquecimiento",
"You are about to enrich multiple products": "Está a punto de enriquecer {{value}} productos",
"You are about to enrich one product": "Está a punto de enriquecer uno producto",
"Enriching...": "Enriqueciendo...",
"Start date": "Fecha de inicio",
"End date": "Fecha de fin",
"processing error occured": "Se ha producido un error en el servicio de {{processingName}}",
Expand Down Expand Up @@ -193,9 +195,9 @@
"native": "Nativo",
"Geotiff": "Geotiff",
"Jpeg2000": "Jpeg2000",
"Zarr": "Zarr",
"ZARR": "Zarr",
"enrich": "enriquecimiento",
"Cog": "Cog",
"cog": "cog",
"Bookmark already exists": "Ya existe un marcador con este nombre.",
"Bookmark creation error": "Error durante la creación del marcador.",
"Bookmark succefully created.": "Marcador creado con éxito.",
Expand Down
6 changes: 4 additions & 2 deletions projects/arlas-toolkit/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"no": "non",
"Previous": "Précedent",
"Summary": "Résumé",
"Downloading...": "Téléchargement en cours...",
"Download more products": "Télécharger {{value}} produits",
"Download one product": "Télécharger un produit",
"You are about to download more products": "Vous êtes sur le point de télécharger {{value}} produits",
Expand All @@ -31,6 +32,7 @@
"Enrichment type": "Type d'enrichissement",
"You are about to enrich multiple products": "Vous êtes sur le point d'enrichir {{value}} produits",
"You are about to enrich one product": "Vous êtes sur le point d'enrichir un produit",
"Enriching...": "Enrichissement en cours...",
"Start date": "Date de début",
"End date": "Date de fin",
"processing error occured": "Une erreur s'est produite au niveau du service de {{processingName}}",
Expand Down Expand Up @@ -193,9 +195,9 @@
"native": "Natif",
"Geotiff": "Geotiff",
"Jpeg2000": "Jpeg2000",
"Zarr": "Zarr",
"ZARR": "Zarr",
"enrich": "enrichissement",
"Cog": "Cog",
"cog": "cog",
"Bookmark already exists": "Un bookmark existe déjà avec ce nom.",
"Bookmark creation error": "Erreur durant la création du bookmark.",
"Bookmark succefully created.": "Bookmark sauvegardé avec succès.",
Expand Down
6 changes: 4 additions & 2 deletions projects/arlas-toolkit/assets/i18n/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"no": "no",
"Previous": "Previous",
"Summary": "Summary",
"Downloading...": "Downloading...",
"Download more products": "Download more products",
"Download one product": "Download one product",
"You are about to download more products": "You are about to download more products",
Expand All @@ -31,6 +32,7 @@
"Enrichment type": "Enrichment type",
"You are about to enrich multiple products": "You are about to enrich multiple products",
"You are about to enrich one product": "You are about to enrich one product",
"Enriching...": "Enriching...",
"Start date": "Start date",
"End date": "End date",
"processing error occured": "processing error occured",
Expand Down Expand Up @@ -193,9 +195,9 @@
"native": "native",
"Geotiff": "Geotiff",
"Jpeg2000": "Jpeg2000",
"Zarr": "Zarr",
"ZARR": "ZARR",
"enrich": "enrich",
"Cog": "Cog",
"cog": "cog",
"Bookmark already exists": "Bookmark already exists",
"Bookmark creation error": "Bookmark creation error",
"Bookmark succefully created.": "Bookmark succefully created.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@
</ng-template>
</mat-stepper>

<!-- TODO: migration Angular15 use marker pipe -->
<arlas-aias-result *ngIf="processStarted" [isProcessing]="isProcessing"
[statusResult]="statusResult" [hasError]="hasError"
[processName]="'Download'" [processAction]="'Downloading...'"></arlas-aias-result>
[processName]="'Download' | marker" [processAction]="'Downloading...' | marker"></arlas-aias-result>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class AiasDownloadComponent extends AiasProcess implements OnInit, OnDest
if (itemFormatIsValid) {
const itemFormat = this.data.itemDetail.get(itemFormatKey).toUpperCase();
if (itemFormat === 'SAFE') {
this.pictureFormats.push(marker('Zarr'));
this.pictureFormats.push(marker('ZARR'));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section class="field">
<mat-form-field class="field" appearance="outline">
<mat-label>{{ 'Enrichment type' | translate }}</mat-label>
<mat-select [formControlName]="'process'">
<mat-select [formControlName]="'asset_type'">
<mat-option *ngFor="let e of enrichments" [value]="e">
{{ e | translate }}</mat-option>
</mat-select>
Expand Down Expand Up @@ -43,7 +43,7 @@

<div class="params">
<span class="label">{{ 'Enrichment type' | translate }} :</span>
<span class="value">{{ formGroup.get('process').value | translate }}</span>
<span class="value">{{ formGroup.get('asset_type').value | translate }}</span>
</div>
</div>
<div class="buttons" *ngIf="!isProcessing && !processStarted">
Expand All @@ -68,8 +68,7 @@
</ng-template>
</mat-stepper>

<!-- TODO: migration Angular15 use marker pipe -->
<arlas-aias-result *ngIf="processStarted" [isProcessing]="isProcessing"
[statusResult]="statusResult" [hasError]="hasError"
[processName]="'Enrich'" [processAction]="'Enriching...'"></arlas-aias-result>
[statusResult]="statusResult" [hasError]="hasError"
[processName]="'Enrich' | marker" [processAction]="'Enriching...' | marker"></arlas-aias-result>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export const ENRICH_PROCESS_NAME = marker('enrich');
export class AiasEnrichComponent extends AiasProcess implements OnInit {

public enrichments: Array<string> = [
marker('Cog')
marker('cog')
];

public formGroup = new FormGroup({
process: new FormControl<string>(this.enrichments[0])
asset_type: new FormControl<string>(this.enrichments[0])
});

public constructor(
Expand All @@ -63,7 +63,7 @@ export class AiasEnrichComponent extends AiasProcess implements OnInit {
if (itemFormatIsValid) {
const itemFormat = this.data.itemDetail.get(itemFormatKey).toUpperCase();
if (itemFormat === 'SAFE') {
this.enrichments = [marker('Cog')];
this.enrichments = [marker('cog')];
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="process-result">
<mat-progress-bar *ngIf="isProcessing" [mode]="'indeterminate'"></mat-progress-bar>
<div *ngIf="isProcessing && !!statusResult?.status" class="processing">
<div>{{ processAction | translate }}...</div>
<div>{{ processAction | translate }}</div>
<div class="status status-{{statusResult?.status}}">{{ statusResult?.status | translate }}</div>
</div>
<div class="detail" *ngIf="!isProcessing && !hasError">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class ArlasCollectionService extends BaseCollectionService {
const c = this.arlasStartupeService.collectionsMap.get(key);
this.displayName.set(key, c?.display_names?.collection ?? key);
const fields = c?.display_names?.fields;
if(fields){
if (fields) {
for (const f of Object.keys(fields)) {
this.displayFieldName.set(this.flatten(f), c?.display_names?.fields[f]);
}
Expand Down Expand Up @@ -100,7 +100,14 @@ export class ArlasCollectionService extends BaseCollectionService {
const flattenedConfig = flattenData(config);
const collections = new Set<string>();
Object.keys(flattenedConfig)
.filter(f => f.indexOf('collection') >= 0 || (f.indexOf('additionalCollections') >= 0 && f.indexOf('collectionName') >= 0))
.filter(k =>
(k.indexOf('collection') >= 0 || (k.indexOf('additionalCollections') >= 0 && k.indexOf('collectionName') >= 0))
&&
!k.includes('collection-display-name')
&&
!k.includes('collectionDisplayName')

)
.forEach(k => collections.add(flattenedConfig[k]));
return collections;
}
Expand Down
20 changes: 8 additions & 12 deletions projects/arlas-toolkit/src/lib/services/process/process.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Injectable } from '@angular/core';
import { Expression, Filter, Search } from 'arlas-api';
import { projType } from 'arlas-web-core';
import { map, Observable } from 'rxjs';
import { ProcessInputs, ProcessOutput } from '../../tools/process.interface';
import { Process, ProcessInputs, ProcessOutput } from '../../tools/process.interface';
import { ArlasCollaborativesearchService } from '../collaborative-search/arlas.collaborative-search.service';
import { ArlasSettingsService } from '../settings/arlas.settings.service';

Expand Down Expand Up @@ -85,15 +85,15 @@ export class ProcessService {
this.processInputs = process;
}

public load(processName: string): Observable<ProcessInputs> {
public load(processName: string): Observable<Process> {
return this.http.get(
this.arlasSettingsService.getProcessSettings(processName)?.settings.url,
Object.assign(this.options, { responseType: 'text' })
)
.pipe(
map(c => {
const process: ProcessInputs = JSON.parse(c as any);
this.setProcessInputs(process);
const process: Process = JSON.parse(c as any);
this.setProcessInputs(process.inputs);
return process;
})
);
Expand All @@ -112,12 +112,8 @@ export class ProcessService {
));
}

public getItemsDetail(
idFieldName,
itemsId: string[],
collection: string
): Observable<Map<string, any>> {
// properties.main_asset_format its the field to pass to get the object value
public getItemsDetail(idFieldName: string, itemsId: string[], collection: string): Observable<Map<string, any>> {
// properties.main_asset_format is the field to pass to get the object value
const fields = ['properties.proj__epsg', 'properties.main_asset_format', 'geometry', 'properties.item_format'];
const search: Search = {
page: { size: itemsId.length },
Expand All @@ -126,6 +122,7 @@ export class ProcessService {
includes: fields.map(field => field).join(',')
}
};

const expression: Expression = {
field: idFieldName,
// TODO: Manage other Operators ?
Expand All @@ -147,11 +144,10 @@ export class ProcessService {
return searchResult.pipe(map((data: any) => {
const matchingAdditionalParams = new Map<string, any>();
if (!!data && !!data?.hits && data.hits.length > 0) {
const regexReplacePoint = /\./gi;
data.hits.forEach(i => {
const itemMetadata = i.data;
fields.forEach(f => {
matchingAdditionalParams.set(f, this.resolve(f,itemMetadata));
matchingAdditionalParams.set(f, this.resolve(f, itemMetadata));
});
});
}
Expand Down

0 comments on commit 3dcf151

Please sign in to comment.