Skip to content

Commit db4e0e3

Browse files
web-console: refactor header, tables, navigation, dirs (#445)
* move page title to header, improve header * Reorganize navigation sidebar, add 'Add' buttons to tables * unify dir structure, update typescript, minor fixes * rename web-ui to web-console * Refactor QuickSearch into DataGridSearch * Update docs, smoke test * Move generated Manager types and queries to /lib/services * Add strongly typed Tanstack Queries * Refactor available pipeline actions based on state * Update dependencies --------- Signed-off-by: George <bulakh.96@gmail.com>
1 parent 7f0c45d commit db4e0e3

File tree

285 files changed

+2685
-2171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+2685
-2171
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"ms-vsliveshare.vsliveshare",
1818
"rust-lang.rust-analyzer",
1919
"serayuzgur.crates",
20-
"vadimcn.vscode-lldb"
20+
"vadimcn.vscode-lldb",
21+
"mike-co.import-sorter"
2122
],
2223
"settings": {
2324
"editor.formatOnSave": true,

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
submodules: true
5353

5454
- name: MUIX license
55-
run: echo "NEXT_PUBLIC_MUIX_PRO_KEY=${muix_license}" > web-ui/.env && cat web-ui/.env
55+
run: echo "NEXT_PUBLIC_MUIX_PRO_KEY=${muix_license}" > web-console/.env && cat web-console/.env
5656
env:
5757
muix_license: ${{ secrets.muix_license }}
5858

.github/workflows/containers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
submodules: true
2424

2525
- name: MUIX license
26-
run: echo "NEXT_PUBLIC_MUIX_PRO_KEY=${muix_license}" > web-ui/.env && cat web-ui/.env
26+
run: echo "NEXT_PUBLIC_MUIX_PRO_KEY=${muix_license}" > web-console/.env && cat web-console/.env
2727
env:
2828
muix_license: ${{ secrets.muix_license }}
2929

.github/workflows/meticulous.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ on:
1010
branches:
1111
- main
1212
paths:
13-
- web-ui/**
13+
- web-console/**
1414
pull_request:
1515
paths:
16-
- web-ui/**
16+
- web-console/**
1717
# Important: We need the workflow to be triggered on workflow_dispatch events,
1818
# so that Meticulous can run the workflow on the base commit to compare
1919
# against if an existing workflow hasn't run
2020
workflow_dispatch:
2121
paths:
22-
- web-ui/**
22+
- web-console/**
2323

2424

2525
defaults:
2626
run:
27-
working-directory: ./web-ui
27+
working-directory: ./web-console
2828

2929
# Important: The workflow needs all the permissions below.
3030
# These permissions are mainly need to post and update the status check and
@@ -51,7 +51,7 @@ jobs:
5151
with:
5252
node-version: "19"
5353
cache: yarn
54-
cache-dependency-path: web-ui/yarn.lock
54+
cache-dependency-path: web-console/yarn.lock
5555

5656
- name: Cache node_modules
5757
uses: actions/cache@v3

Earthfile

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,28 +63,27 @@ install-python:
6363

6464
build-webui-deps:
6565
FROM +install-deps
66-
COPY web-ui/package.json ./web-ui/package.json
67-
COPY web-ui/yarn.lock ./web-ui/yarn.lock
66+
COPY web-console/package.json ./web-console/package.json
67+
COPY web-console/yarn.lock ./web-console/yarn.lock
6868

69-
RUN cd web-ui && yarn install
69+
RUN cd web-console && yarn install
7070

7171
build-webui:
7272
FROM +build-webui-deps
73-
COPY --dir web-ui/public web-ui/public
74-
COPY --dir web-ui/src web-ui/src
75-
COPY --dir web-ui/styles web-ui/styles
76-
COPY web-ui/.editorconfig web-ui/
77-
COPY web-ui/.eslintrc.json web-ui/
78-
COPY web-ui/.prettierrc.js web-ui/
79-
COPY web-ui/next-env.d.ts ./web-ui/next-env.d.ts
80-
COPY web-ui/next.config.js ./web-ui/next.config.js
81-
COPY web-ui/next.d.ts ./web-ui/next.d.ts
82-
COPY web-ui/tsconfig.json ./web-ui/tsconfig.json
83-
84-
RUN cd web-ui && yarn format:check
85-
RUN cd web-ui && yarn build
86-
RUN cd web-ui && yarn export
87-
SAVE ARTIFACT ./web-ui/out
73+
COPY --dir web-console/public web-console/public
74+
COPY --dir web-console/src web-console/src
75+
COPY web-console/.editorconfig web-console/
76+
COPY web-console/.eslintrc.json web-console/
77+
COPY web-console/.prettierrc.js web-console/
78+
COPY web-console/next-env.d.ts ./web-console/next-env.d.ts
79+
COPY web-console/next.config.js ./web-console/next.config.js
80+
COPY web-console/next.d.ts ./web-console/next.d.ts
81+
COPY web-console/tsconfig.json ./web-console/tsconfig.json
82+
83+
RUN cd web-console && yarn format:check
84+
RUN cd web-console && yarn build
85+
RUN cd web-console && yarn export
86+
SAVE ARTIFACT ./web-console/out
8887

8988
prepare-cache:
9089
# We download and pre-build dependencies to cache it using cargo-chef.
@@ -275,8 +274,8 @@ build-manager:
275274

276275
FROM +build-dataflow-jit --RUST_TOOLCHAIN=$RUST_TOOLCHAIN --RUST_BUILD_PROFILE=$RUST_BUILD_PROFILE
277276
# For some reason if this ENV before the FROM line it gets invalidated
278-
ENV WEBUI_BUILD_DIR=/dbsp/web-ui/out
279-
COPY ( +build-webui/out ) ./web-ui/out
277+
ENV WEBUI_BUILD_DIR=/dbsp/web-console/out
278+
COPY ( +build-webui/out ) ./web-console/out
280279

281280
RUN rm -rf crates/pipeline_manager
282281
COPY --keep-ts --dir crates/pipeline_manager crates/pipeline_manager

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The following diagram shows Feldera Platform's architecture.
6161
This repository comprises all the buildings blocks to run continuous analytics
6262
pipelines using Feldera Platform.
6363

64-
* [web UI](web-ui): a web interface for writing SQL, setting up connectors, and managing pipelines.
64+
* [web UI](web-console): a web interface for writing SQL, setting up connectors, and managing pipelines.
6565
* [pipeline-manager](crates/pipeline_manager): serves the web UI and is the REST API server for building and managing data pipelines.
6666
* [dbsp](crates/dbsp): the core [engine](#theory) that allows us to evaluate arbitrary queries incrementally.
6767
* [SQL compiler](sql-to-dbsp-compiler): translates SQL programs into DBSP programs.

crates/pipeline_manager/build.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ use std::path::Path;
66
// These are touched during the build, so it would re-build every time if we
77
// don't exclude them from change detection:
88
const EXCLUDE_LIST: [&str; 3] = [
9-
"../../web-ui/node_modules",
10-
"../../web-ui/out",
11-
"../../web-ui/.next",
9+
"../../web-console/node_modules",
10+
"../../web-console/out",
11+
"../../web-console/.next",
1212
];
1313

1414
/// The build script has two modes:
1515
///
1616
/// - if `WEBUI_BUILD_DIR` we use that to serve in the manager
17-
/// - otherwise we build the web-ui from web-ui and serve it from the manager
17+
/// - otherwise we build the web-console from web-console and serve it from the manager
1818
///
1919
/// The first mode is useful in CI builds to cache the website build so it
2020
/// doesn't get built many times due to changing rustc flags.
@@ -32,23 +32,25 @@ fn main() {
3232
EXCLUDE_LIST
3333
.iter()
3434
.any(|exclude| path.to_str().unwrap().starts_with(exclude))
35-
// Also exclude web-ui folder itself because we mutate things inside
35+
// Also exclude web-console folder itself because we mutate things inside
3636
// of it
37-
|| path.to_str().unwrap() == "../../web-ui/"
37+
|| path.to_str().unwrap() == "../../web-console/"
3838
})
39-
.path("../../web-ui/")
39+
.path("../../web-console/")
4040
.path("build.rs")
4141
.generate();
4242
println!("cargo:rerun-if-env-changed=NEXT_PUBLIC_MUIX_PRO_KEY");
4343

44-
NpmBuild::new("../../web-ui")
44+
NpmBuild::new("../../web-console")
4545
.executable("yarn")
4646
.install()
47-
.expect("Could not run `yarn install`. Follow set-up instructions in web-ui/README.md")
47+
.expect(
48+
"Could not run `yarn install`. Follow set-up instructions in web-console/README.md",
49+
)
4850
.run("build")
49-
.expect("Could not run `yarn build`. Run it manually in web-ui/ to debug.")
51+
.expect("Could not run `yarn build`. Run it manually in web-console/ to debug.")
5052
.run("export-to-out")
51-
.expect("Could not run `yarn export-to-out`. Run it manually in web-ui/ to debug.")
53+
.expect("Could not run `yarn export-to-out`. Run it manually in web-console/ to debug.")
5254
.target(env::var("OUT_DIR").unwrap())
5355
.to_resource_dir()
5456
.build()

crates/webui-tester/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# webui-tester
22

3-
Is an utility crate to run integration tests against the web-ui.
3+
Is an utility crate to run integration tests against the web-console.
44

55
## Setup
66

crates/webui-tester/src/smoke.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ async fn smoke_workflow() -> Result<()> {
4747
let menu = VerticalMenu::from(elem);
4848

4949
// First we make a program, then we compile it.
50-
menu.navigate_to("SQL Editor").await?;
50+
menu.navigate_to("SQL Programs").await?;
51+
driver
52+
.find(By::Id("btn-add-sql-program"))
53+
.await?
54+
.click()
55+
.await?;
5156
let code_page = SqlEditor::from(driver.find(By::Id("editor-content")).await?);
5257
let program_name = format!("My Program {}", nanos);
5358
code_page.set_code(SQL_CODE, &driver).await?;
@@ -59,7 +64,7 @@ async fn smoke_workflow() -> Result<()> {
5964
.await?;
6065

6166
// Next we make a connector.
62-
menu.navigate_to("Connector Creator").await?;
67+
menu.navigate_to("Connectors").await?;
6368
let connector_creator =
6469
ConnectorCreator::from(driver.find(By::Id("connector-creator-content")).await?);
6570
connector_creator
@@ -72,7 +77,12 @@ async fn smoke_workflow() -> Result<()> {
7277
.await?;
7378

7479
// Finally we make a pipeline.
75-
menu.navigate_to("Pipeline Builder").await?;
80+
menu.navigate_to("Pipelines").await?;
81+
driver
82+
.find(By::Id("btn-add-pipeline"))
83+
.await?
84+
.click()
85+
.await?;
7686
let pipeline_builder =
7787
PipelineBuilder::from(driver.find(By::Id("pipeline-builder-content")).await?);
7888
let pipeline_name = format!("My Pipeline {}", nanos);
@@ -98,7 +108,7 @@ async fn smoke_workflow() -> Result<()> {
98108
.await?;
99109

100110
// Start the pipeline.
101-
menu.navigate_to("Pipeline Management").await?;
111+
menu.navigate_to("Pipelines").await?;
102112
let pipeline_management =
103113
PipelineManagementTable::from(driver.find(By::Id("pipeline-management-content")).await?);
104114
pipeline_management.start(&pipeline_name).await?;

deploy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN apt update && apt install \
1313
# For running the SQL compiler
1414
openjdk-19-jre-headless -y
1515
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
16-
# web-ui build tools
16+
# web-console build tools
1717
RUN curl -fsSL https://deb.nodesource.com/setup_19.x | bash -
1818
RUN apt-get install --yes nodejs
1919
RUN npm install --global yarn

0 commit comments

Comments
 (0)