Skip to content

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

Merged
kirkrodrigues merged 4 commits into
y-scope:mainfrom
kirkrodrigues:log-viewer-webui
Jun 14, 2024
Merged

Add log-viewer-webui component with boilerplate Fastify server.#442
kirkrodrigues merged 4 commits into
y-scope:mainfrom
kirkrodrigues:log-viewer-webui

Conversation

@kirkrodrigues

Copy link
Copy Markdown
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.

Comment thread components/log-viewer-webui/server/src/main.js Outdated
Comment thread components/log-viewer-webui/server/src/main.js Outdated
junhaoliao
junhaoliao previously approved these changes Jun 14, 2024

@junhaoliao junhaoliao left a comment

Copy link
Copy Markdown
Member

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.

Co-authored-by: Junhao Liao <junhao@junhao.ca>
@kirkrodrigues kirkrodrigues merged commit ac123da into y-scope:main Jun 14, 2024
@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
junhaoliao added a commit to junhaoliao/clp that referenced this pull request May 17, 2026
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