This repository was archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
dda9d0b
WebUI initial template import.
gz fad3653
Adjust configuration files.
gz c0c821e
update next.js version to 13.
gz 65a1e30
Add editor logic.
gz 8252894
Add pipeline management + data creation.
gz d8105f4
Rerouting / to home.
gz 66eb526
Simplify EntityTable Menu.
gz a23e77a
Refactor editor code, fix race in update logic.
gz 151c827
Refactoring of editor code.
gz 83e49a5
Refactoring / Comments / Upate gitignore.
gz 8bbf1b9
Document / refactor utility functions.
gz 9e27776
Edit Connector function.
gz 35a784b
Add CI for website.
gz fff533c
Add generic connector config dialog.
gz 1d8ccef
Comments for the builder.
gz 688cc15
Dialog to complain about missing program schema.
gz 00ae588
Have a default function to dispatch network requests.
gz 07a88c2
Add onError handler in queries where its missing.
gz 6000d1b
Basic Error handling when SQL program tables/viewnames change.
gz 4c22d28
Delete unused file.
gz 4c7c3e1
Avoid doing the import comments in all files.
gz 5d45d9e
Fix pipeline editor.
gz 2b1e8c1
Uodate line length.
gz 7435d85
No trees or people images.
gz 7c0f957
Refactor and document code.
gz de445c4
Add format+lint checks.
gz 5cb1b0c
Better function name.
gz 43174a6
Add a comment for the file.
gz 4e60aa7
Update dependencies.
gz a2bbcae
Add paragraph about dependency management.
gz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Deploy WebUI to github pages | ||
|
||
env: | ||
NEXT_PUBLIC_MUIX_PRO_KEY: ${{ secrets.MUIX_PRO_KEY }} | ||
|
||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/webui.yml" | ||
- "web-ui/yarn.lock" | ||
- "web-ui/package.json" | ||
- "web-ui/tsconfig.json" | ||
- "web-ui/**.[jt]s" | ||
- "web-ui/**.[jt]sx" | ||
- "web-ui/public/**" | ||
- "web-ui/styles/**" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/webui.yml" | ||
- "web-ui/yarn.lock" | ||
- "web-ui/package.json" | ||
- "web-ui/tsconfig.json" | ||
- "web-ui/**.[jt]s" | ||
- "web-ui/**.[jt]sx" | ||
- "web-ui/public/**" | ||
- "web-ui/styles/**" | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build_webui: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: "web-ui" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
with: | ||
static_site_generator: next | ||
generator_config_file: ./web-ui/next.config.js | ||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.next/cache | ||
# Generate a new cache whenever packages or source files change. | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
# If source files changed but packages didn't, rebuild from a prior cache. | ||
restore-keys: | | ||
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Check format | ||
run: yarn format:check | ||
- name: Check eslint | ||
run: yarn lint | ||
- name: Build with Next.js | ||
run: yarn next build | ||
- name: Static HTML export with Next.js | ||
run: yarn next export | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./web-ui/out | ||
|
||
# Deployment job | ||
deploy_webui: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build_webui | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = false | ||
trim_trailing_whitespace = true | ||
[*.md] | ||
max_line_length = 100 | ||
trim_trailing_whitespace = true | ||
[*.yml] | ||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
"react/display-name": "off", | ||
"@next/next/no-img-element": "off", | ||
"react/no-unescaped-entities": "off", | ||
"import/no-anonymous-default-export": "off", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/ban-types": [ | ||
"error", | ||
{ | ||
"extendDefaults": true, | ||
"types": { | ||
"{}": false | ||
} | ||
} | ||
] | ||
}, | ||
"plugins": [ | ||
"import" | ||
], | ||
"settings": { | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [ | ||
".ts", | ||
".tsx" | ||
] | ||
}, | ||
"import/resolver": { | ||
"typescript": { | ||
"alwaysTryTypes": true, | ||
"project": [ | ||
"./tsconfig.json" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# dependencies | ||
/node_modules | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env | ||
.env.local | ||
.env.development | ||
.env.test | ||
.env.production | ||
|
||
# typescript | ||
*.tsbuildinfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
arrowParens: 'avoid', | ||
bracketSpacing: true, | ||
htmlWhitespaceSensitivity: 'css', | ||
insertPragma: false, | ||
bracketSameLine: false, | ||
jsxSingleQuote: true, | ||
printWidth: 120, | ||
proseWrap: 'preserve', | ||
quoteProps: 'as-needed', | ||
requirePragma: false, | ||
semi: false, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'none', | ||
useTabs: false | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 VMware, Inc. | ||
Copyright (c) 2022 ThemeSelection | ||
gz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# DBSP Web UI | ||
|
||
This is the web UI for the DBSP project. | ||
|
||
## Setup | ||
|
||
```bash | ||
sudo apt-get update | ||
sudo apt-get install git sudo curl | ||
curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\ | ||
sudo apt-get install -y nodejs | ||
npm install --global yarn | ||
npm install --global openapi-typescript-codegen | ||
|
||
git clone https://github.com/vmware/database-stream-processor.git | ||
cd database-stream-processor/web-ui | ||
``` | ||
|
||
If you don't run ubuntu: [other binary distributions for node.js](https://github.com/nodesource/distributions) | ||
|
||
## Development | ||
|
||
Install dependencies (needs to be done whenever package.json depencies change): | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
Start the development server: | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
Build & export static website: | ||
|
||
```bash | ||
yarn build | ||
yarn export | ||
``` | ||
|
||
Format the code & linting: | ||
|
||
```bash | ||
yarn format | ||
gz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
yarn lint | ||
``` | ||
|
||
If `yarn audit` fails for a transitive dependency you can try to update it: | ||
|
||
```bash | ||
yarn up --recursive loader-utils | ||
``` | ||
|
||
For direct dependencies, you can adjust the version in `package.json` | ||
and run `yarn install`. | ||
|
||
## OpenAPI bindings | ||
|
||
The bindings for OpenAPI (under src/types/manager) are generated using | ||
[openapi typescript codegen](https://www.npmjs.com/package/openapi-typescript-codegen). | ||
|
||
If you change the API, execute the following steps to update the bindings: | ||
|
||
```bash | ||
yarn generate-openapi | ||
``` | ||
|
||
Note sometimes strange caching errors may warrant deleting `node_modules` after | ||
regenerating the API bindings. | ||
|
||
## File Organization | ||
|
||
- `@core`: Settings, style and overrides. | ||
- `analytics`: Logic to handle projects (SQL editor, programs). | ||
- `components`: contains reusable React components. | ||
- `configs`: Theme configuration (see also Material UI themes). | ||
- `data`: Logic for handling connectors (Add, Update, Delete). | ||
- `home`: Home page. | ||
- `layouts`: General layout components. | ||
- `navigation`: Side-bar Menu. | ||
- `pages`: accessible website pages (e.g. `pages/index.tsx` is the homepage) | ||
- `streaming`: Logic for building, managing Pipelines. | ||
- `types`: Types used throughout the app, OpenAPI generated types. | ||
- `utils`: contains utility functions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const path = require('path') | ||
|
||
module.exports = { | ||
trailingSlash: true, | ||
reactStrictMode: false, | ||
images: { unoptimized: true }, | ||
experimental: { | ||
esmExternals: false | ||
}, | ||
webpack: config => { | ||
gz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
config.resolve.alias = { | ||
...config.resolve.alias, | ||
apexcharts: path.resolve(__dirname, './node_modules/apexcharts-clevision') | ||
} | ||
|
||
return config | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { ReactElement, ReactNode } from 'react' | ||
import type { NextComponentType, NextPageContext } from 'next/dist/shared/lib/utils' | ||
|
||
declare module 'next' { | ||
export declare type NextPage<P = {}, IP = P> = NextComponentType<NextPageContext, IP, P> & { | ||
getLayout?: (page: ReactElement) => ReactNode | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.