-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Datahub]: Handle OGC API in Downloads and Preview sections #865
Conversation
Affected libs:
|
226896c
to
579c1fd
Compare
📷 Screenshots are here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nice work @cmoinier ! I've left a couple of suggestions inline. Besides that I noticed some things when testing:
- I had CORS issues when using the
/dev-proxy?
in our local dev compo (not sure, if this is expected) - The SCOT testing dataset seems to have an erroneous OGC API URL in the dump
- What do you think of sorting the downloads by dataset instead of format? Not sure if this was specified anywhere? It would need to be discussed, but it seems more intuitive to me.
apps/datahub/src/app/record/record-downloads/record-downloads.component.ts
Outdated
Show resolved
Hide resolved
apps/datahub/src/app/record/record-downloads/record-downloads.component.ts
Outdated
Show resolved
Hide resolved
Thanks for the review @tkohr ! It was really helpful, and I hope my answers are easy to understand.
I had CORS issues as well, unless I activated a CORS plugin. Not sure if this is what you meant.
True, I knew it and forgot about it. I will update the dataset with a working URL.
Nothing was specified about it, but it was written in the ticket that duplicates should be left as is (ie if wfs and ogc both return the same download type) for now. So we assumed that the display would be figured out later, but Christophe said during the review that we shall meet to discuss it this week. |
9b3c8eb
to
0044387
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the adaptions @cmoinier, especially in the dump!
Almost everything LGTM. The only thing I'm still concerned about, is that we get CORS errors using the /dev-proxy?
. They occur on the API call to detect the proposed formats as well as on data fetching where the URLs are not "proxified".
It should not be a problem in the MEL use case where the API and client are on the same host, and we could also blame the host for not including a response header with a Access-Control-Allow-Origin: *
(btw we should probably add the header to the MEL data API?), but I saw for WFS we proxify certain requests. @jahow what is your opinion on this?
Regarding the earlier comment about the sorting, I think we can rework this again in the future if necessary. It should not block this PR as the current sorting has already been present with multiple datasets before.
@tkohr oh you're right, we're missing a "getProxiedUrl" for the OGC API endpoints I think, similar to WFS:
|
I looked into it more and using a proxy with OGC API will be more complicated than that, because ogc-client navigates through the url path by looking for "/". When the endpoint url is encoded this won't work at all. Using a dev proxy for an OGC API endpoint will be more involved than that, I think this should be done in a separate PR. |
5ed600d
to
2f3b391
Compare
Also move all stubs to the root of the spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking very good, thanks for this awesome contribution! I've added stubs for the ogc api responses in the E2E tests, hopefully this will make the tests faster and more reliable.
Oh, also I left out the changes on the dump and everything works fine 👌 |
Thanks @Angi-Kinas for the pairing on this!
Description
This PR adds OGC API support in the downloads and preview section :
Architectural changes
This depends on
ogc-client
version1.1.0
(upgraded in the package).Quality Assurance Checklist
breaking change
labelbackport <release branch>
label