Skip to content

Commit

Permalink
chore: open source UI (#73)
Browse files Browse the repository at this point in the history
* Added the UI directory

Signed-off-by: Krithika Vijayakumar <krithika_vijayakumar@intuit.com>

* Added NumaFlow image

Signed-off-by: Krithika Vijayakumar <krithika_vijayakumar@intuit.com>

* Fixed review comments

Signed-off-by: Krithika Vijayakumar <krithika_vijayakumar@intuit.com>

* Moved under docs/assets

Signed-off-by: Krithika Vijayakumar <krithika_vijayakumar@intuit.com>

Co-authored-by: Krithika Vijayakumar <krithika_vijayakumar@intuit.com>
Co-authored-by: Vigith Maurice <vigith@gmail.com>
Signed-off-by: Derek Wang <whynowy@gmail.com>
  • Loading branch information
3 people authored and whynowy committed Jul 8, 2022
1 parent f315c2d commit f9177d9
Show file tree
Hide file tree
Showing 90 changed files with 16,343 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/assets/numa.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions ui/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
15 changes: 15 additions & 0 deletions ui/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"no-debugger": 0
}
}
24 changes: 24 additions & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
1 change: 1 addition & 0 deletions ui/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
27 changes: 27 additions & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# NumaFlow UI

![Numaflow Image](../docs/assets/numa.svg)

A web-based UI for NumaFlow

The UI has the following features:
* View running pipelines in your namespace
* View Vertex and Edge Information of your pipeline
* View BackPressure and Pending Messages
* View Container (main/udf) Logs for a given vertex

## Development

This explains how to set up a development environment so you can get started with UI development

### Prerequisites

Follow the instructions below to set up your development environment.

### Install requirements

These tools are required for development.

1. [`NumaFlow`](https://github.com/numaproj/numaflow/blob/master/docs/DEVELOPMENT.md): Follow the document to prepare `NumaFlow` development environment.
1. [`node`](https://nodejs.org/en/download/): NodeJS - `brew install node`.
1. [`yarn`](https://yarnpkg.com/): Package manager - `brew install yarn`
143 changes: 143 additions & 0 deletions ui/junit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="jest tests" tests="46" failures="0" errors="0" time="19.011">
<testsuite name="index" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="3.495" tests="4">
<testcase classname="index isDev" name="index isDev" time="0.002">
</testcase>
<testcase classname="index findSuffix" name="index findSuffix" time="0.002">
</testcase>
<testcase classname="index quantityToScalar" name="index quantityToScalar" time="0.001">
</testcase>
<testcase classname="index getPodContainerUsePercentages" name="index getPodContainerUsePercentages" time="0.001">
</testcase>
</testsuite>
<testsuite name="edgeInfoFetch test" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="3.832" tests="3">
<testcase classname="edgeInfoFetch test edgesInfo return" name="edgeInfoFetch test edgesInfo return" time="0.056">
</testcase>
<testcase classname="edgeInfoFetch test edgesInfo loading" name="edgeInfoFetch test edgesInfo loading" time="0.003">
</testcase>
<testcase classname="edgeInfoFetch test edgesInfo error" name="edgeInfoFetch test edgesInfo error" time="0.004">
</testcase>
</testsuite>
<testsuite name="namespace test" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="3.971" tests="3">
<testcase classname="namespace test namespace return" name="namespace test namespace return" time="0.068">
</testcase>
<testcase classname="namespace test namespace loading" name="namespace test namespace loading" time="0.005">
</testcase>
<testcase classname="namespace test namespace error" name="namespace test namespace error" time="0.012">
</testcase>
</testsuite>
<testsuite name="pipeline test" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="4.097" tests="3">
<testcase classname="pipeline test pipeline value" name="pipeline test pipeline value" time="0.08">
</testcase>
<testcase classname="pipeline test pipeline loading" name="pipeline test pipeline loading" time="0.039">
</testcase>
<testcase classname="pipeline test pipeline error" name="pipeline test pipeline error" time="0.006">
</testcase>
</testsuite>
<testsuite name="podsDetail test" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="4.464" tests="3">
<testcase classname="podsDetail test podsDetail return" name="podsDetail test podsDetail return" time="0.043">
</testcase>
<testcase classname="podsDetail test podsDetail loading" name="podsDetail test podsDetail loading" time="0.006">
</testcase>
<testcase classname="podsDetail test podsDetail error" name="podsDetail test podsDetail error" time="0.014">
</testcase>
</testsuite>
<testsuite name="podsFetch test" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="4.63" tests="3">
<testcase classname="podsFetch test pods return" name="podsFetch test pods return" time="0.058">
</testcase>
<testcase classname="podsFetch test pods loading" name="podsFetch test pods loading" time="0.012">
</testcase>
<testcase classname="podsFetch test pods error" name="podsFetch test pods error" time="0.015">
</testcase>
</testsuite>
<testsuite name="PodInfo screen" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="5.791" tests="1">
<testcase classname="PodInfo screen loads screen" name="PodInfo screen loads screen" time="0.438">
</testcase>
</testsuite>
<testsuite name="HexagonHeatMap" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="6.489" tests="2">
<testcase classname="HexagonHeatMap loads screen" name="HexagonHeatMap loads screen" time="0.341">
</testcase>
<testcase classname="HexagonHeatMap loads tooltip on hexagon click" name="HexagonHeatMap loads tooltip on hexagon click" time="0.167">
</testcase>
</testsuite>
<testsuite name="NamespaceRowContent screen" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:23" time="3.473" tests="1">
<testcase classname="NamespaceRowContent screen Load pipeline screen" name="NamespaceRowContent screen Load pipeline screen" time="0.227">
</testcase>
</testsuite>
<testsuite name="PodDetail screen" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="7.514" tests="1">
<testcase classname="PodDetail screen loads screen" name="PodDetail screen loads screen" time="0.764">
</testcase>
</testsuite>
<testsuite name="Breadcrumbs" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:24" time="2.918" tests="1">
<testcase classname="Breadcrumbs loads pipeline screen" name="Breadcrumbs loads pipeline screen" time="0.232">
</testcase>
</testsuite>
<testsuite name="Namespaces screen" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:24" time="3.754" tests="1">
<testcase classname="Namespaces screen Load namesapces screen" name="Namespaces screen Load namesapces screen" time="0.468">
</testcase>
</testsuite>
<testsuite name="Spec" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="8.372" tests="1">
<testcase classname="Spec loads" name="Spec loads" time="0.774">
</testcase>
</testsuite>
<testsuite name="PodLogs" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:27" time="2.084" tests="1">
<testcase classname="PodLogs Load PodLogs screen" name="PodLogs Load PodLogs screen" time="0.423">
</testcase>
</testsuite>
<testsuite name="NamespaceRow" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:26" time="2.625" tests="2">
<testcase classname="NamespaceRow loads" name="NamespaceRow loads" time="0.22">
</testcase>
<testcase classname="NamespaceRow open onClick" name="NamespaceRow open onClick" time="0.235">
</testcase>
</testsuite>
<testsuite name="EdgeInfo" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:24" time="5.445" tests="1">
<testcase classname="EdgeInfo loads" name="EdgeInfo loads" time="0.592">
</testcase>
</testsuite>
<testsuite name="gradients" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:24" time="7.807" tests="3">
<testcase classname="gradients rgba2rgb" name="gradients rgba2rgb" time="0.004">
</testcase>
<testcase classname="gradients getColorCode" name="gradients getColorCode" time="0.001">
</testcase>
<testcase classname="gradients fill" name="gradients fill" time="0.007">
</testcase>
</testsuite>
<testsuite name="PodsHeatMap" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="12.742" tests="1">
<testcase classname="PodsHeatMap loads screen" name="PodsHeatMap loads screen" time="0.203">
</testcase>
</testsuite>
<testsuite name="PodsHeatMap" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="13.515" tests="1">
<testcase classname="PodsHeatMap loads screen" name="PodsHeatMap loads screen" time="0.199">
</testcase>
</testsuite>
<testsuite name="Pods" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="14.321" tests="4">
<testcase classname="Pods loads screen" name="Pods loads screen" time="0.348">
</testcase>
<testcase classname="Pods pods loading screen" name="Pods pods loading screen" time="0.015">
</testcase>
<testcase classname="Pods pods error screen" name="Pods pods error screen" time="0.004">
</testcase>
<testcase classname="Pods pods detail error screen" name="Pods pods detail error screen" time="0.004">
</testcase>
</testsuite>
<testsuite name="NodeInfo" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:23" time="11.217" tests="2">
<testcase classname="NodeInfo loads" name="NodeInfo loads" time="0.229">
</testcase>
<testcase classname="NodeInfo namespace empty" name="NodeInfo namespace empty" time="0.002">
</testcase>
</testsuite>
<testsuite name="Pipeline" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="15.194" tests="2">
<testcase classname="Pipeline Load Graph screen" name="Pipeline Load Graph screen" time="0.082">
</testcase>
<testcase classname="Pipeline Get Pipeline error" name="Pipeline Get Pipeline error" time="0.016">
</testcase>
</testsuite>
<testsuite name="Graph screen" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:19" time="15.274" tests="1">
<testcase classname="Graph screen Load Graph screen" name="Graph screen Load Graph screen" time="0.354">
</testcase>
</testsuite>
<testsuite name="Breadcrumbs" errors="0" failures="0" skipped="0" timestamp="2022-06-23T23:31:25" time="9.912" tests="1">
<testcase classname="Breadcrumbs loads pipeline screen" name="Breadcrumbs loads pipeline screen" time="0.172">
</testcase>
</testsuite>
</testsuites>
76 changes: 76 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"name": "ui",
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.9.0",
"@emotion/styled": "^11.8.1",
"@mui/icons-material": "^5.6.2",
"@mui/material": "^5.6.3",
"@material-ui/core": "^4.12.4",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0",
"@testing-library/user-event": "^13.2.1",
"@types/d3-selection": "^3.0.2",
"@types/dagre": "^0.7.47",
"@types/jest": "^27.0.1",
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@visx/event": "^2.6.0",
"@visx/group": "^2.1.0",
"@visx/shape": "^2.4.0",
"@visx/tooltip": "^2.8.0",
"d3-scale": "^4.0.2",
"d3-selection": "^3.0.0",
"dagre": "^0.8.5",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-flow-renderer": "^10.0.7",
"react-json-view": "^1.21.3",
"react-router-dom": "6",
"react-scripts": "5.0.1",
"typescript": "^4.4.2",
"web-vitals": "^2.1.0",
"@visx/responsive": "^2.8.0",
"react-test-renderer": "^18.0.0",
"react-highlight-words": "^0.18.0",
"@types/react-test-renderer": "^18.0.0",
"msw": "^0.39.2",
"resize-observer-polyfill": "^1.5.1",
"@stardazed/streams-polyfill": "^2.4.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --ci --coverage --no-cache --reporters=default --reporters=jest-junit --watchAll=false",
"eject": "react-scripts eject",
"lint": "eslint . --ext .tsx"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"eslint-config-prettier": "7.2.0",
"eslint-plugin-prettier": "3.3.1",
"eslint": "^7.19.0",
"prettier": "2.5.1",
"jest-junit": "^12.0.0"
},
"jest": {
"transformIgnorePatterns": [
"/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)"
]
}
}
Binary file added ui/public/favicon.ico
Binary file not shown.
44 changes: 44 additions & 0 deletions ui/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link href="https://fonts.googleapis.com/css2?family=IBM Plex Sans&display=swap" rel="stylesheet">
<title>Numaflow</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file added ui/public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui/public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions ui/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions ui/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
8 changes: 8 additions & 0 deletions ui/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.App-side-nav-link {
text-decoration: none;
color: inherit;
}

.react-flow__attribution {
display: none !important;
}
Loading

0 comments on commit f9177d9

Please sign in to comment.