tree: 0c9acac7e5e65c85f3c8ba07821a65bb5b4e6b74 [path history] [tgz]
  1. build/
  2. config/
  3. docker/
  4. integration-test/
  5. src/
  6. static/
  7. .babelrc
  8. .editorconfig
  9. .eslintignore
  10. .eslintrc.js
  11. .gitignore
  12. .postcssrc.js
  13. build.gradle
  14. favicon.ico
  15. index.html
  16. package.json
  17. README.md
front-end/README.md

Pulsar manager front end

Compatibility

The pulsar-manager is tested with Chrome browser.

Set cross domain

Add proxyTable. For localhost debug

    proxyTable: {
      '/admin/*': {
        target: 'http://localhost:7750/',
        changeOrigin: true
      },
      '/pulsar-manager/*': {
        target: 'http://localhost:7750/',
        changeOrigin: true
      },
      '/lookup/*': {
        target: 'http://localhost:7750/',
        changeOrigin: true
      }
    },

Deploy production environment by Nginx server

  • Add the following parameters to the Nginx server configuration file prod.env.js.
module.exports = {
  NODE_ENV: '"production"',
  ENV_CONFIG: '"prod"'
}

Add configuration to the configuration file on Nginx server

  • Replace localhost with the IP address of the backend service.
  listen       9527;
  server_name  0.0.0.0;


  location / {
    root   /usr/share/nginx/html/dist;
    index  index.html index.htm;
  }

  location /admin {
    proxy_pass http://localhost:7750;
  }

  location /pulsar-manager {
    proxy_pass http://localhost:7750;
  }

  location /lookup {
    proxy_pass http://localhost:7750;
  }

  location /bkvm {
    proxy_pass http://localhost:7750;
  }

Build file for production

cd front-end
npm run build:prod

Copy file of dist to Nginx server /usr/share/nginx/html/dist

Copy dist file to Nginx server and restart Nginx

Open a browser and visit the following address:

http://nginx-server:9527/#/login