Mainflux.mainflux/ui
Darko Draskovic d504c4f67d MF-571 - Add Env.elm to set custom base URL (#654)
* Add Env module

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Modify README.md

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove literal vals from Env.elm

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Replace protocol, host and port env setting by url

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove default env.url value and update README.md

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add http://localhost:80/ as a default baseURL val

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Replace Gateflux by Mainflux

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2019-03-20 14:30:38 +01:00
..
css MF-571 - Elm UI (#632) 2019-03-06 16:21:09 +01:00
docker Fix missing css in container ui (#638) 2019-03-07 13:39:35 +01:00
src MF-571 - Add Env.elm to set custom base URL (#654) 2019-03-20 14:30:38 +01:00
.dockerignore MF-571 - Elm UI (#632) 2019-03-06 16:21:09 +01:00
Makefile MF-571 - Elm UI (#632) 2019-03-06 16:21:09 +01:00
README.md MF-571 - Add Env.elm to set custom base URL (#654) 2019-03-20 14:30:38 +01:00
elm.json MF-571 - Elm UI (#632) 2019-03-06 16:21:09 +01:00

README.md

GUI for Mainflux in Elm

Dashboard made with elm-bootstrap.

Install

Docker container GUI build

Install Docker (https://docs.docker.com/install/) and Docker compose (https://docs.docker.com/compose/install/), cd to Mainflux root directory and then

docker-compose -f docker/docker-compose.yml up

if you want to launch a whole Mainflux docker composition, or just

docker-compose -f docker/docker-compose.yml up ui

if you want to launch just GUI.

Native GUI build

Install Elm (https://guide.elm-lang.org/install.html) and then run the following commands:

git clone https://github.com/mainflux/mainflux
cd mainflux/ui
make

This will produce index.html in the ui directory. Still in the mainflux/ui folder, enter

make run

and follow the instructions on screen.

NB: make does elm make src/Main.elm and make run executes elm reactor. Cf. Makefile for more options.

Configuration

Open the src/Env.elm file and edit the values of the env record.

Contribute to the GUI development

Follow the instructions above to install and run GUI as a native build. Instead of make run you can install elm-live (https://github.com/wking-io/elm-live) and execute elm-live src/Main.elm to get a live reload when your .Elm pages change.

Launch Mainflux without ui service, either natively or as a Docker composition. Please follow the guidelines for Mainflux contributors found here https://mainflux.readthedocs.io/en/latest/CONTRIBUTING/.