Skip to content

Latest commit

 

History

History
85 lines (57 loc) · 2.03 KB

README.md

File metadata and controls

85 lines (57 loc) · 2.03 KB

Dashboard

The framework: Next.js.

Next.js supports SPA, SSG and SSR. With this feature, the dashboard ui can be deployed in

  1. Standalone machine serving only dashboard UI with a backend. (e.g. Dashboard for cloud product)
  2. Meta service node. (e.g. Static HTML files integrated in meta service without any other dependencies like node.js)

Files

dashboard/
--.next/ (generated by nextjs)
--node_modules/ (development dependencies)
--out/ (generated static files)
--components/ (React Component)
--lib/ (useful functions and classes)
--pages/ (web pages)
--public/ (static resources)
--styles/ (static css files)
--test/ (test cases)

Testing

TODO: Find a suitable testing framework

Development

Start the RisingWave database, and create tables by removing drop tables from tpch_snapshot.slt

./risedev d
sqllogictest -p 4566 -d dev './e2e_test/streaming/tpch_snapshot.slt'

Install Dependencies.

npm i

The website will be served at port 3000. It requests data from the mock server at port 32333.

npm run dev

You should also run:

./mock/fetch.sh # dump current data from RisingWave meta node to be used by mock server
node mock-server.js

To start a mock API server when developing.

Test with RisingWave meta node

To replace the built static files in RisingWave with your newest code, run the following scripts in the root directory.

./risedev export-dashboard

The dashboard will be served by meta node at port 5691.

Deployment

Generate the protos

Running npm i will generate the proto files under proto/gen automatically. In case there are modifications to the protos, you can regenerate them using the command npm run gen-proto.

Static HTML files

Build static files for standalone deployment without node.js. The built files are generated at ./out. Check more details at Static HTML Export.

npm run build-static

The built files are generated at ./out.