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

Add log-viewer-webui component with boilerplate Fastify server. #442

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

kirkrodrigues
Copy link
Member

Description

To integrate the log-viewer with the CLP package, we plan to add a new webapp that consists of a React frontend and a Fastify backend:

  • The backend will host the log-viewer.
  • The backend will also handle requests to decompress an IR file.
  • The frontend will embed the log-viewer in an iframe.
  • The frontend will also include controls for jumping between different pages/chunks of the IR file, and jumping between different splits of the log file.

We will integrate this new webapp with the package by embedding it in an iframe in the webui.

This convoluted implementation is for two reasons:

  • Integrating the log-viewer with the current webui is non-trivial because the webui is written Meteor which doesn't have good support for web workers.
  • The log-viewer isn't yet embeddable as a React component.

This PR starts a new component, log-viewer-webui, which contains this webapp. The webapp currently only contains a boilerplate Fastify app.

Note that we haven't yet added the new component to the linting workflow since that requires downloading a new node version which would make the PR a bit bigger.

Validation performed

  • Validated npm lint:check passes
  • Validated npm test passes.

junhaoliao
junhaoliao previously approved these changes Jun 14, 2024
Copy link
Collaborator

@junhaoliao junhaoliao left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I verified all routes with Postman and also ensured all npm scripts added in package.json work, including the lint and test ones. The docs/srv/dev-guide md looks good but we do need to publish the site when we merge, or the docs.yscope.com link in components/log-viewer-webui/README.md won't work.

For the env files, we can create a .env.local file for entering debug config without git tracking it. That can be done in another PR, preferably after we enable the server in the CLP package / Taskfile.

I agree with the PR title as the squashed commit message.

@kirkrodrigues kirkrodrigues merged commit ac123da into y-scope:main Jun 14, 2024
2 checks passed
@kirkrodrigues kirkrodrigues deleted the log-viewer-webui branch June 14, 2024 23:45
jackluo923 pushed a commit to jackluo923/clp that referenced this pull request Dec 4, 2024
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