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

Webapp update #2525

Merged
merged 11 commits into from
Jun 19, 2024
Merged

Webapp update #2525

merged 11 commits into from
Jun 19, 2024

Conversation

16BitNarwhal
Copy link
Member

@16BitNarwhal 16BitNarwhal commented Jun 16, 2024

following discussion of #2502

  • exposed two new routes, /indexes and /indexes/{index}/status from the server
  • webapp dropdown list is generated from /indexes route
  • dropdowns use index corpus + method instead of indexname field now
  • dropdowns have indicator for whether they're already cached
  • /index/{index}/ is renamed to /indexes/{index}

image

@16BitNarwhal 16BitNarwhal marked this pull request as ready for review June 16, 2024 00:27
@lintool
Copy link
Member

lintool commented Jun 16, 2024

Additional thoughts about API design: maybe the route should be catalog? and asking whether or not it's downloaded should be a param?

@lintool
Copy link
Member

lintool commented Jun 16, 2024

Also, can you attach here a screenshot so I have an idea of what it looks like now?

@16BitNarwhal
Copy link
Member Author

Additional thoughts about API design: maybe the route should be catalog? and asking whether or not it's downloaded should be a param?

Whoops, saw this a bit late. I was thinking /index/{index}/cached to check status and /indexes to list all

@16BitNarwhal 16BitNarwhal marked this pull request as ready for review June 18, 2024 16:14
@lintool
Copy link
Member

lintool commented Jun 18, 2024

I think this is a good time to document the API in an MD, e.g., docs/rest-api.md or something like that?

Provide examples like this? https://github.com/castorini/anserini/blob/master/docs/fatjar-regressions/fatjar-regressions-v0.36.1.md#webapp-and-rest-api

@lintool lintool requested review from lintool and removed request for lintool June 19, 2024 02:57
@16BitNarwhal 16BitNarwhal merged commit 98e4866 into castorini:master Jun 19, 2024
1 check passed
Panizghi pushed a commit to Panizghi/anserini that referenced this pull request Jul 9, 2024
* expose a /indexes route for listing all info
* use indexinfo from api in frontend dropdown
* /status route for checking index cached
* use cached status to highlight indexes in frontend
* renamed /index/{index} to /indexes/{index}
* versioned with /api/v1.0/...
* add docs/rest-api.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants