TiDB Dashboard is a Web UI for monitoring, diagnosing and managing the TiDB cluster.
Feel free to open GitHub issues for questions, support and suggestions.
You may also consider join our community chat in the Slack channel #sig-dashboard.
For Chinese users, you can visit the PingCAP official user forum AskTUG.com to make life easier.
The most easy way to use TiDB Dashboard with an existing TiDB cluster is to use the one embedded into PD: http://127.0.0.1:2379/dashboard. You need PD master branch or 4.0+ version to use TiDB Dashboard.
Note: The TiDB Dashboard inside PD may be not up to date. To play with latest TiDB Dashboard, build it from source (see next section).
Checkout our help wanted issues for a list of recommended tasks, in which we have also marked the difficulty level.
See CONTRIBUTING.md for a detailed step-by-step contributing guide, or steps to build TiDB Dashboard from source.
If you need any help, feel free to community chat in the Slack channel #sig-dashboard.
Thank you to all the people who already contributed to TiDB Dashboard!
This repository contains both Dashboard HTTP API and Dashboard UI. Dashboard HTTP API is placed in
pkg/
directory, written in Golang. Dashboard UI is placed in ui/
directory, powered by React.
TiDB Dashboard can also be integrated into PD, as follows:
By default, the base URL of Dashboard API is http://127.0.0.1:12333
if using yarn start
to set
up the dashboard for development. Sometimes you just want to change the URL for some reasons:
-
Use
.env
Add setting below into your
.env
file ( create one underui
if you don't have one already)REACT_APP_DASHBOARD_API_URL=your_new_endpoint
-
Use a environment variable
Use a scoped or global environment variable to specify the
REACT_APP_DASHBOARD_API_URL
for convienience.REACT_APP_DASHBOARD_API_URL=your_new_endpoint yarn start
By default, the session secret key is generated dynamically when the server starts. This results in
invalidating your previously acquired session token. For easier development, you can supply a fixed
session secret key by setting DASHBOARD_SESSION_SECRET
in the environment variable or in .env
file like:
DASHBOARD_SESSION_SECRET=aaaaaaaaaabbbbbbbbbbccccccccccdd
The supplied secret key must be 32 bytes, otherwise it will not be effective.
Note: the maximum lifetime of a token is 24 hours by default, so you still need to acquire token every 24 hours.
-
Acquire a token first through
/user/login
in the Swagger UI. -
Click the "Authorize" button in the Swagger UI, set value to
Bearer xxxx
wherexxxx
is the token you acquired in step 1.
Simply modify ui/.github_release_version
. The assets will be released automatically after your
change is merged to master.
Copyright 2020 PingCAP, Inc.