Skip to content

Commit

Permalink
feat: v3.1.0 (#66)
Browse files Browse the repository at this point in the history
* feat: metrics upgrade

* feat: add baseline modal

* feat: refactor cloud version

* feat: update docker image, and upgrade promql

* feat: update

* fix: setting baseline in machine modal

* feat: add docker compose

* fix: issue fix

* refactor: icon (#68)

* fix: issue fix (#69)

* chore: add community deploy

chore: docker-compose

* chore: docker-compose

* chore: docker-compose

* feat: update disk usage info (#71)

* fix: datepicker open error

* chore: update docker compose file

* feat: relase config

* mod: icon (#75)

* feat: add disk monitor

* feat: update metric

* fix: i18n change (#77)

* fix: issue (#78)

* fix: issue (#79)

* fix: cloud issue (#80)

* fix: cloud version metrics multi line (#81)

* fix: storaged and metad don't have space level metrics (#82)

fix: baseline not show when value is 0

fix: version upgrade left align

* fix: batch import

* fix: issue (#83)

* fix: get metric list by nebula_cluster (#85)

* mod: config-release (#86)

* mod: server proxy (#87)

* feat: customize cloud metrics (#88)

feat: update icon from fill to color

* mod: config (#89)

* fix: lastet bugfix (#90)

* fix: cloud issue (#92)

* fix: i18n error (#93)

* fix: some issue fix (#94)

* fix: update cloud metric (#96)

* fix: metric wrong issue (#97)

* feat: add rpm/ deb sqlite (#98)

* chore: update version (#100)

* fix: use http gateway 2.2.2 (#101)

* fix: use http gateway 3.1.4 (#102)

* chore: update pack script

* fix: space level metric (#104)

Co-authored-by: li Nico <37568394+NicolaCage@users.noreply.github.com>
  • Loading branch information
xigongdaEricyang and NicolaCage authored Jul 20, 2022
1 parent d5bc7ba commit eecf689
Showing 117 changed files with 4,359 additions and 2,987 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -9,10 +9,7 @@ jobs:
os:
- centos7
container:
image: reg.vesoft-inc.com/dashboard/dashboard-dev:${{ matrix.os }}
credentials:
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
image: vesoft/nebula-dev:${{ matrix.os }}
steps:
- name: keep workspace empty
run: |
@@ -24,7 +21,7 @@ jobs:
with:
repository: vesoft-inc/nebula-http-gateway
path: source/nebula-http-gateway
ref: v2.2.1
ref: v3.1.4
- uses: actions/setup-go@v2
with:
go-version: '^1.13.1'
@@ -34,8 +31,8 @@ jobs:
- name: ls
run: ls -a
- name: Package
run: bash ./source/nebula-dashboard/scripts/package.sh ${{ secrets.GA_ID }}
run: bash ./source/nebula-dashboard/scripts/package.sh source/nebula-dashboard source/nebula-http-gateway true ${{ secrets.GA_ID }}
- name: Upload to OSS
run: bash ./source/nebula-dashboard/scripts/upload.sh ${{ secrets.OSS_ENDPOINT }} ${{ secrets.OSS_ID }} ${{ secrets.OSS_SECRET }} ${{ secrets.OSS_URL }}
run: bash ./source/nebula-dashboard/scripts/upload.sh ${{ secrets.OSS_ENDPOINT }} ${{ secrets.OSS_ID }} ${{ secrets.OSS_SECRET }} ${{ secrets.OSS_TEST_URL }}


9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -12,10 +12,7 @@ jobs:
os:
- centos7
container:
image: reg.vesoft-inc.com/dashboard/dashboard-dev:${{ matrix.os }}
credentials:
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
image: vesoft/nebula-dev:${{ matrix.os }}
steps:
- name: keep workspace empty
run: |
@@ -27,7 +24,7 @@ jobs:
with:
repository: vesoft-inc/nebula-http-gateway
path: source/nebula-http-gateway
ref: v2.2.1
ref: v3.1.4
- uses: actions/setup-go@v2
with:
go-version: '^1.13.1'
@@ -37,7 +34,7 @@ jobs:
- name: ls
run: ls -a
- name: Package
run: bash ./source/nebula-dashboard/scripts/package.sh ${{ secrets.GA_ID }}
run: ./source/nebula-dashboard/scripts/package.sh source/nebula-dashboard source/nebula-http-gateway false ${{ secrets.GA_ID }}
- name: Upload to OSS
run: bash ./source/nebula-dashboard/scripts/upload.sh ${{ secrets.OSS_ENDPOINT }} ${{ secrets.OSS_ID }} ${{ secrets.OSS_SECRET }} ${{ secrets.OSS_URL }}

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -116,5 +116,5 @@ If you plan to set up dashboard in production, refer to:[production guide](DEP
## Documentation
+ [中文](https://docs.nebula-graph.com.cn/3.0.0/nebula-dashboard/1.what-is-dashboard/)
+ [ENGLISH](https://docs.nebula-graph.io/3.0.0/nebula-dashboard/1.what-is-dashboard/)
+ [中文](https://docs.nebula-graph.com.cn/3.2.0/nebula-dashboard/1.what-is-dashboard/)
+ [ENGLISH](https://docs.nebula-graph.io/3.2.0/nebula-dashboard/1.what-is-dashboard/)
6 changes: 3 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
@@ -2,14 +2,14 @@
"port": 7003,
"proxy":{
"gateway":{
"target": "http://localhost:8090"
"target": "http://192.168.8.44:8090"
},
"prometheus":{
"target": "192.168.8.157:9090"
"target": "192.168.8.44:9090"
}
},
"nebulaServer": {
"ip": "192.168.8.143",
"ip": "192.168.8.131",
"port": 9669
}
}
58 changes: 45 additions & 13 deletions config/webpack.config.base.ts
Original file line number Diff line number Diff line change
@@ -2,8 +2,13 @@ import path from 'path';
import { Configuration } from 'webpack';
import CopyPlugin from 'copy-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
// import pkg from '../package.json';

const isDevEnv = () => process.env.NODE_ENV === 'development';

const useCssPlugin = () => !isDevEnv();

const baseConifg: Configuration = {
module: {
rules: [
@@ -33,28 +38,59 @@ const baseConifg: Configuration = {
include: path.join(__dirname, `../src`),
},
{
test: /\.less/,
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
// url: true,
}
},
useCssPlugin() ? MiniCssExtractPlugin.loader : 'style-loader',
'css-loader',
'postcss-loader',
],
},
{
test: /(?<!module)\.less$/,
use: [
useCssPlugin() ? MiniCssExtractPlugin.loader : 'style-loader',
'css-loader',
'postcss-loader',
{
loader: 'less-loader',
options: {
lessOptions: {
modifyVars: {
'primary-color': '#4372FF',
'link-color': '#4372FF',
},
javascriptEnabled: true,
},
},
},
],
},
{
test: /\.module\.less$/,
exclude: /node_modules/,
use: [
useCssPlugin() ? MiniCssExtractPlugin.loader : 'style-loader',
{
loader: 'css-loader',
options: {
modules: {
mode: 'local',
exportGlobals: true,
localIdentName: '[local]__[hash:base64:5]',
localIdentContext: path.resolve(__dirname, '..', 'src'),
exportLocalsConvention: 'camelCase',
},
},
},
{
loader: 'postcss-loader',
},
{
loader: 'less-loader',
options: { lessOptions: { javascriptEnabled: true } },
},
],
},
{
test: /\.(png|jpg|gif|svg)$/,
type: 'asset/resource',
@@ -72,11 +108,6 @@ const baseConifg: Configuration = {
}
},
plugins: [
// new webpack.DefinePlugin({
// 'process.env': {
// DASHBOARD_VERSION: JSON.stringify(pkg.version),
// },
// }),
new CopyPlugin({
patterns: [
{
@@ -90,6 +121,7 @@ const baseConifg: Configuration = {
favicon: path.join(__dirname, '../favicon.ico'),
templateParameters: {
DASHBOARD_VERSION: process.env.DASHBOARD_VERSION,
VERSION_TYPE: 'community',
},
}),
]
69 changes: 69 additions & 0 deletions docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
version: '3.7'
services:
nebula-stats-exporter:
image: centos:7
command:
- ./nebula-stats-exporter
- --bare-metal
- --bare-metal-config=/config.yaml
- --listen-address=:9200
ports:
- 9200:9200
volumes:
- ./vendors/nebula-stats-exporter/nebula-stats-exporter:/nebula-stats-exporter
- ./vendors/nebula-stats-exporter/config.yaml:/config.yaml
networks:
- nebula-net

prometheus:
image: centos:7
volumes:
- ./vendors/prometheus/prometheus:/prometheus
- ./vendors/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml
- ./data/prometheus:/data/prometheus:rw
environment:
USER: root
command:
- ./prometheus
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
networks:
- nebula-net
extra_hosts:
- "host.docker.internal:host-gateway"

nebula-http-gateway:
image: centos:7
environment:
USER: root
volumes:
- ./vendors/nebula-http-gateway/nebula-httpd:/nebula-httpd
- ./vendors/nebula-http-gateway/conf:/conf
- ./vendors/nebula-http-gateway/logs:/logs
- ./uploads:/upload-dir:rw
ports:
- 8090:8090
command:
- ./nebula-httpd
networks:
- nebula-net
nebula-dashboard:
image: centos:7
ports:
- 7003:7003
volumes:
- ./config.json:/config.json
- ./dashboard:/dashboard
- ./public:/public
command:
- ./dashboard
environment:
USER: root
networks:
- nebula-net

networks:
nebula-net:
external: true

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nebula-dashboard",
"version": "1.1.0",
"version": "3.1.0",
"description": "nebula-dashboard community version",
"author": "vesoft cloud team",
"homepage": "",
@@ -9,10 +9,10 @@
"lib"
],
"scripts": {
"dev": "ts-node server/dev-server.ts",
"build": "webpack --config config/webpack.config.prod.ts",
"dev": "NODE_ENV=development ts-node server/dev-server.ts",
"build": "NODE_ENV=production webpack --config config/webpack.config.prod.ts",
"test": "echo \"Error: run tests from root\" && exit 1",
"pkg": "pkg -t node14-linux-x64 server/server.js -o dashboard",
"pkg": "NODE_ENV=production pkg -t node14-linux-x64 server/server.js -o dashboard",
"lint-fix": "eslint 'src/**/*.{ts,tsx}' --fix"
},
"bin": "server/server.js",
@@ -25,9 +25,9 @@
"@antv/g2": "^4.1.29",
"@rematch/core": "^1.4.0",
"@rematch/loading": "^1.2.1",
"antd": "^4.16.13",
"antd": "4.17.3",
"axios": "^0.21.4",
"compare-versions": "^4.1.3",
"compare-versions": "^4.1.2",
"config": "^3.3.7",
"csv": "^5.5.3",
"dayjs": "^1.10.7",
18 changes: 13 additions & 5 deletions scripts/package.sh
Original file line number Diff line number Diff line change
@@ -3,15 +3,18 @@
set -ex

DIR=`pwd`
DASHBOARD=$DIR/source/nebula-dashboard
DASHBOARD=$DIR/$1
GATEWAY=$DIR/$2
NIGHTLY=$3
GH_ID=$4


# build target dir
TARGET=$DIR/nebula-dashboard
mkdir $TARGET

### nebula-http-gateway ###
VENDOR_DIR=vendors
GATEWAY=$DIR/source/nebula-http-gateway
cd $GATEWAY
make
TARGET_GATEWAY=$TARGET/$VENDOR_DIR/nebula-http-gateway
@@ -28,20 +31,25 @@ mv $DASHBOARD/vendors/node-exporter/ $TARGET/$VENDOR_DIR

# prometheus
mv $DASHBOARD/vendors/prometheus/ $TARGET/$VENDOR_DIR
mv $DASHBOARD/docker-compose/docker-compose.yaml $TARGET/

### Nebula Graph Dashboard relative ###
cd $DASHBOARD
VERSION=`cat package.json | grep '"version":' | awk 'NR==1{print $2}' | awk -F'"' '{print $2}'`
bash ./scripts/setEventTracking.sh $1
bash $DASHBOARD/scripts/setEventTracking.sh $GH_ID

npm install --unsafe-perm
npm run build
cp -r public $TARGET/
cp $DASHBOARD/DEPLOY.md $TARGET/
npm run pkg
mv dashboard $TARGET/
cp -r vendors/config-release.json $TARGET/config.json
cp -r $DASHBOARD/vendors/config-release.json $TARGET/config.json

### tar
cd $DIR
tar -czf nebula-dashboard-$VERSION.x86_64.tar.gz nebula-dashboard
if [[ $NIGHTLY == "true" ]];then
tar -czf nebula-dashboard-nightly.tar.gz nebula-dashboard
else
tar -czf nebula-dashboard-$VERSION.x86_64.tar.gz nebula-dashboard
fi
12 changes: 9 additions & 3 deletions server/config.json
Original file line number Diff line number Diff line change
@@ -2,14 +2,20 @@
"port": 7001,
"proxy":{
"gateway":{
"target": "http://192.168.8.199:8090"
"target": "http://192.168.8.44:8090"
},
"prometheus":{
"target": "192.168.8.199:9090"
"target": "192.168.8.44:9090"
},
"graph":{
"target": "192.168.8.131:19669"
},
"storage":{
"target": "192.168.8.131:19779"
}
},
"nebulaServer": {
"ip": "192.168.8.112",
"ip": "192.168.8.131",
"port": 9669
}
}
16 changes: 16 additions & 0 deletions server/dev-server.ts
Original file line number Diff line number Diff line change
@@ -48,6 +48,22 @@ app.use('/api-nebula/*', createProxyMiddleware({
changeOrigin: true,
}));

app.use('/api-graph/*', createProxyMiddleware({
target: getTargetUrl(proxy.graph.target),
pathRewrite: {
'/api-graph': '/',
},
changeOrigin: true,
}));

app.use('/api-storage/*', createProxyMiddleware({
target: getTargetUrl(proxy.storage.target),
pathRewrite: {
'/api-storage': '/',
},
changeOrigin: true,
}));

app.get('/api/app', (_req, res) => {
res.send({
version: pkg.version,
Loading

0 comments on commit eecf689

Please sign in to comment.