2021-03-31 14:55:49 +00:00
|
|
|
## InfluxDB UI
|
2017-08-10 20:54:16 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
UI assets for InfluxDB are automatically downloaded and embedded in the `influxd` binary
|
|
|
|
when using the top-level `Makefile`. The UI assets are built and made available from
|
2021-05-11 14:11:07 +00:00
|
|
|
the [`influxdata/ui` repository](https://github.com/influxdata/ui). All of the UI source code
|
|
|
|
has been removed from this directory, and now lives in the [`influxdata/ui` repository](https://github.com/influxdata/ui).
|
|
|
|
Please submit all PRs and issues related to the InfluxDB UI to the [`influxdata/ui` repository](https://github.com/influxdata/ui).
|
2019-07-23 21:10:34 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
### Starting a Local Development Environment
|
2017-02-09 00:17:10 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
It is possible to run a frontend development server with hot reloading using the UI from
|
|
|
|
[`influxdata/ui`](https://github.com/influxdata/ui) in front of the InfluxDB backend:
|
2017-02-09 00:17:10 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
Start `influxd` listening on the default port (`8086`):
|
2017-02-09 00:17:10 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
`$ ./bin/darwin/influxd`
|
2019-07-23 21:10:34 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
Clone (if needed) & start the UI development server from the `ui` repository:
|
2017-02-09 00:17:10 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
```
|
|
|
|
$ git clone https://github.com/influxdata/ui.git
|
|
|
|
$ cd ui
|
|
|
|
$ yarn start
|
2017-02-09 00:17:10 +00:00
|
|
|
```
|
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
The UI development server runs at [`http://localhost:8080`](http://localhost:8080/)
|
2017-02-09 00:17:10 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
### Running InfluxDB with Local UI Assets
|
2017-02-09 00:17:10 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
To run InfluxDB with local UI assets, first build the assets:
|
2017-02-09 00:17:10 +00:00
|
|
|
|
|
|
|
```
|
2021-03-31 14:55:49 +00:00
|
|
|
$ git clone https://github.com/influxdata/ui.git
|
|
|
|
$ cd ui
|
|
|
|
$ yarn build
|
|
|
|
```
|
|
|
|
|
|
|
|
Start `influxd` using the local UI assets via the `--assets-path` flag. For example,
|
|
|
|
if the `ui` folder containing built assets is at the same level as the `influxdb` folder
|
|
|
|
and the `influxd` binary is at `influxdb/bin/darwin/influxd`:
|
2017-07-24 19:49:41 +00:00
|
|
|
|
2021-03-31 14:55:49 +00:00
|
|
|
`$ ./bin/darwin/influxd --assets-path=../ui/build`
|