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

Is it normal that Main UI is requesting the list of sitemaps ? #2566

Closed
lolodomo opened this issue May 7, 2024 · 3 comments
Closed

Is it normal that Main UI is requesting the list of sitemaps ? #2566

lolodomo opened this issue May 7, 2024 · 3 comments
Labels
main ui Main UI question Further information is requested

Comments

@lolodomo
Copy link
Contributor

lolodomo commented May 7, 2024

Enabling the DEBUG logs for sitemap REST API, I discovered that opening Main UI in a browser, this API is called. Its role is to retrieve the list of available sitemaps. I am just curious why Main UI is doing that while it does not play at all with sitemaps ?

https://github.com/openhab/openhab-core/blob/main/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/internal/SitemapResource.java#L245

@lolodomo lolodomo added bug Something isn't working main ui Main UI labels May 7, 2024
@lolodomo
Copy link
Contributor Author

lolodomo commented May 7, 2024

Maybe for the sitemap generator ?

@mherwege
Copy link
Contributor

mherwege commented May 7, 2024

Not for the sitemap generator.
But it looks like it is used to check if an access token is required:

return api.get('/rest/sitemaps').then((resp) => {

@lolodomo lolodomo added question Further information is requested and removed bug Something isn't working labels May 7, 2024
@florian-h05
Copy link
Contributor

Yeah, the comment says that.
I think /rest/sitemaps was chosen because its response is relatively small, e.g. compared to /rest/items.

I will close this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
main ui Main UI question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants