Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(geo): check Capability contains layers list before loop #1570

Merged
merged 7 commits into from
Feb 14, 2024
Merged
Changes from 5 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
11 changes: 11 additions & 0 deletions packages/geo/src/lib/catalog/shared/catalog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,17 @@ export class CatalogService {
);
this.includeRecursiveItems(catalog, capabilitiesCapabilityLayer, items);
return items;
}),
catchError(() => {
this.messageService.error(
catalog.title
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selon la classe du catalogue, le title doit toujours être défini. Est-ce que l'erreur retourner par la requête pourrait nous indiquer quel type de message à afficher? Sinon m'expliquer la logique derrière cette condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alecarn cette fonction load les couches du catalogue, parfois le catalogue est vide, n'a pas de couches. j'ajoute le message d'erreur pour informer l'utilisateur que ce catalogue ne fonctionne pas bien.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dans quel cas de figure que le title est non défini?

? 'igo.geo.catalog.unavailable'
: 'igo.geo.catalog.someUnavailable',
'igo.geo.catalog.unavailableTitle',
undefined,
catalog.title ? { value: catalog.title } : undefined
);
return EMPTY;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce qu'on pourrait afficher l'erreur localement au niveau du contexte de l'utilisateur. Par exemple dans la composante CatalogBrowserTool?:
Capture d’écran 2024-01-29 113848

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas tant, car pour les catalogues multiple, il est possible que 1 des url plante mais que les autres fonctionnent!

})
);
}
Expand Down