vitess-gh/web/vtctld2
Rohit Nayak 0bfb2c1e41
Reverting package-lock.json
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
2020-08-22 12:37:44 +02:00
..
app Fix logic for displaying vindexes 2020-08-20 23:55:47 +02:00
config vtctld2: Update to latest angular-cli 2016-08-19 16:03:00 -07:00
e2e Angular2 webdriver test updates (#2038) 2016-09-13 17:17:22 -07:00
src Fix logic for displaying vindexes 2020-08-20 23:55:47 +02:00
.editorconfig vtctld: Add skeleton for Angular 2 UI. 2016-06-27 13:56:30 -07:00
.gitignore vtctld2: Update to latest angular-cli 2016-08-19 16:03:00 -07:00
README.md README tweaks 2020-07-26 11:32:21 -04:00
angular-cli.json Add font-awesome directly to angular2 project (#2383) 2016-12-16 20:01:37 -08:00
package-lock.json Reverting package-lock.json 2020-08-22 12:37:44 +02:00
package.json Update front-end build tooling and fix build error 2020-07-25 15:11:21 -04:00
proxy.conf.json Update front-end build tooling and fix build error 2020-07-25 15:11:21 -04:00
tslint.json vtctld2: Update to latest angular-cli 2016-08-19 16:03:00 -07:00

README.md

Vitess Control Panel

This project was generated with angular-cli version 1.0.0-beta.11-webpack.2.

Local development

⚠️ Warning! This project relies on very out-of-date node dependencies, many with significant security vulnerabilities. Install at your own risk.

Prerequisites

You will need (very old!) installations of npm and node to run the front-end dev server. To check your versions:

node -v # v8.0.0 required
npm -v # 5.0.0 required

Using a node version manager like nvm is strongly recommended, as the versions required by this project are several years out of date.

  1. Install nvm using the installation guide.
  2. Install node (and npm): nvm install 8.0.0
  3. In the shell you're using for vtctld UI development: nvm use 8.0.0

Starting the dev server

From the root vitess/ directory:

  1. Run Vitess locally using Docker and start a vtctld API on http://localhost:15000/. For more on this, see the guide on Local Installation via Docker.

    source dev.env
    make docker_local && ./docker/local/run.sh
    
  2. Start a local Angular server on http://localhost:4200. The UI will automatically refresh every time you save a change. Note that you will probably see build errors and security warnings during the npm install step; this is, unfortunately, to be expected due to out-of-date dependencies. :)

    make web_start
    

Note: the local docker install will also start a vtctld admin UI on http://localhost:15000/app. This instance will use the statically embedded files, and will not reflect any changes you make unless you run make web_build.

Building for production

In production, the vtctld UI is hosted with go.rice. All front-end assets must be built, minified, and embedded in the executable.

If you're ready to open a pull request for your changes, or if you want to do a production build just for fun... :)

make web_build

This will regenerate a bunch of files in the web/vtctld2/dist/ directory, as well as update the embedded files in rice-box.go. Make sure you commit these generated files to your branch when opening your pull request.

To verify your changes, run Vitess locally. It is recommended to use Docker, which will make the vtctld UI accessible at http://localhost:15000/app.

Troubleshooting

If you run into issues or have questions, we recommend posting in our Slack channel. Click the Slack icon in the top right to join.