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

Log viewer: make log_dir query parameter optional #1184

Closed

Conversation

tadamcz
Copy link
Contributor

@tadamcz tadamcz commented Jan 24, 2025

  • Make log_dir query param optional
  • Add simpleHttpSingleFileApi, to be used if only log_file is passed

Previous behaviour

Throws an error if only log_file is passed:

Uncaught TypeError: Cannot read properties of null (reading 'replace')
    at simpleHttpApi (api-http.mjs:17:36)
    at resolveApi (index.mjs:39:19)
    at index.mjs:49:16

New behaviour

Uses the new simpleHttpSingleFileApi when only log_file is passed.

@tadamcz tadamcz force-pushed the log-dir-query-param-optional branch from 6709d2c to 7786f38 Compare January 24, 2025 12:47
@tadamcz tadamcz force-pushed the log-dir-query-param-optional branch from 7786f38 to 887934d Compare January 24, 2025 12:48
@tadamcz tadamcz changed the title Log viewer: make log_dir query param optional Log viewer: make log_dir query parameter optional Jan 24, 2025
@dragonstyle dragonstyle mentioned this pull request Jan 25, 2025
5 tasks
@dragonstyle
Copy link
Collaborator

Thank you for this PR!

I've made changes that make log_dir optional a slightly different way in #1189 . In general, we would to handle conditional treatment of files by type using the higher level client-api. If after testing you agree that PR does what you need, I'd suggest we can close this PR in favor of that one.

@tadamcz
Copy link
Contributor Author

tadamcz commented Jan 25, 2025

Sounds good! I expect that your PR does what I need, but can report back once I have definitively confirmed that by testing (might be on Monday though).

@tadamcz
Copy link
Contributor Author

tadamcz commented Jan 25, 2025

Responded on #1189

@tadamcz
Copy link
Contributor Author

tadamcz commented Jan 26, 2025

Closing in favour of #1189

@tadamcz tadamcz closed this Jan 26, 2025
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.

2 participants