Giter Site home page Giter Site logo

qxhy123 / tidb-dashboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pingcap/tidb-dashboard

0.0 1.0 0.0 3.07 MB

TiDB Dashboard

License: Apache License 2.0

JavaScript 8.77% HTML 0.31% CSS 3.28% Makefile 0.13% Go 55.80% Shell 0.35% TypeScript 31.35%

tidb-dashboard's Introduction

TiDB Dashboard

TiDB Dashboard is a Web UI for monitoring, diagnosing and managing TiDB cluster.

Getting Started

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. Currently you need PD master branch 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).

Contributing & Developing

If you're interested in contributing to TiDB Dashboard, checkout our help wanted issues for a list, in which we have also marked the difficulty level. We have prepared many suitable tasks.

For a detailed step-by-step contributing guide, or want to build TiDB Dashboard from source, see CONTRIBUTING.md.

⭐️ TiDB Usability Challenge (March 2 ~ May 30) ⭐️

TiDB Dashboard is also a project of TiDB Usability Challenge (UCP), where you can win prizes by contributing code!

Ask for Help

If you have any questions about development, feel free to join TiDB Dashboard SIG (Special Interest Group):

Architecture

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:

For Developers How To ...

Change the base URL of Dashboard API endpoint

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:

  1. Use .env

    Add setting below into your .env file ( create one under ui if you don't have one already)

    REACT_APP_DASHBOARD_API_URL=your_new_endpoint
  2. 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

Keep session valid after rebooting the server

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.

Supply session token in the Swagger UI

  1. Acquire a token first through /user/login in the Swagger UI.

  2. Click the "Authorize" button in the Swagger UI, set value to Bearer xxxx where xxxx is the token you acquired in step 1.

Release new UI assets

Simply modify ui/.github_release_version. The assets will be released automatically after your change is merged to master.

tidb-dashboard's People

Contributors

breezewish avatar baurine avatar hundundm avatar deardrops avatar crazycs520 avatar maplefu avatar reafans avatar fullstop000 avatar rleungx avatar zzh-wisdom avatar leiysky avatar strrl avatar gauss1314 avatar qxhy123 avatar niedhui avatar ssebo avatar yisaer avatar weihanglo avatar loxp avatar siddontang avatar zhongzc avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.