Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements in the codebase #29

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# dependencies
node_modules
backend/node_modules
backend/dist

backend/.env
frontend/.env
Expand All @@ -12,4 +14,4 @@ frontend/build

# ide
.vscode
.idea
.idea
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,33 @@ kubectl port-forward svc/volcano-dashboard 8080:80 -n volcano-system --address 0

Access the dashboard by navigate to `http://$YOUR_NODE_IP:8080` in your browser.

If running locally navigate to `http://localhost:8080`

## Development

You can build the volcano dashboard images locally. Please use the following command to build docker images of volcano dashboard.
## Development

Clone the repo.

```shell
git clone https://github.com/volcano-sh/dashboard.git
```

### Locally

Follow the prerequisites to install volcano first

```shell
npm install
```

```shell
npm run dev
```


### Inside kubernetes cluster
You can build the volcano dashboard images locally. Please use the following command to build docker images of volcano dashboard.

Build images.
```shell
// build frontend image.
Expand All @@ -52,3 +68,7 @@ docker build -t backend:dev . -f deployment/build/backend/Dockerfile
```

After that you can replace the images in `volcano-dashboard.yaml` to verify the result.

```shell
kubectl apply -f deployment/volcano-dashboard.yaml
```
60 changes: 29 additions & 31 deletions backend/.babelrc
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
{
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
]
"presets": ["@babel/preset-env", "@babel/preset-typescript"],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
]
}
6 changes: 6 additions & 0 deletions backend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 4,
"singleQuote": false,
"semi": true,
"trailingComma": "none"
}
2,987 changes: 1,491 additions & 1,496 deletions backend/README.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions backend/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"watch": ["src"],
"ext": "ts,js",
"ignore": ["node_modules"],
"exec": "tsc --noEmit && tsx ./src/server.ts"
}
Loading