Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 20513e9f

Přidáno uživatelem Martin Sebela před více než 3 roky(ů)

  • ID 20513e9fbd66bbf97c19c368530ecc5b3f30358d
  • Rodič 7e44e97f

Dokončení oborového projektu KIV/OPSWI

Zobrazit rozdíly:

README.md
1
# ZČU Heatmap
1
# Heatmap.ZČU
2
App was created within the school project by ZČU students. The main goal of this project is to create a simple and generic tool for vizualization of heatmap like datasets. The first implementation can be seen at https://heatmap.zcu.cz.
3
## Intro webpage
4
<img src="./doc/images/website-intro.png" style="width: 600px; height: auto;">
2 5

  
3
- [**Nginx**](https://www.nginx.com/) - Server
4
- [**Symfony**](https://symfony.com/) - PHP framework
5
- [**MongoDB**](https://www.mongodb.com/) - Database
6
## Heatmap webpage
7
<img src="./doc/images/website-heatmap.png" style="width: 600px; height: auto;">
8

  
9
## Responsive
10
<img src="./doc/images/website-responsive.png" style="width: 200px; height: auto;">
11

  
12
<br><hr><br>
13

  
14
## Technologies
15

  
16
- [**Nginx**](https://www.nginx.com/) – Webserver
17
- [**Symfony**](https://symfony.com/) – PHP framework
18
- [**MongoDB**](https://www.mongodb.com/) – Database
19

  
20
<br><hr><br>
6 21

  
7 22
## 🔩 Development env
8 23
### SW needed for development
9 24
* **[🐳 docker](https://docs.docker.com/engine/install)**
10 25
* **[🐳 docker-compose](https://docs.docker.com/compose/install/)**
11 26
* **[📝 Visual Studio Code](https://code.visualstudio.com/Download)**
27
<br><br>
28

  
12 29
### Development setup
13 30
* First you need to **build** and **run** all needed containers
14 31
  * run either of these scripts inside the **root of the project**:
......
58 75
* Set your breakpoints and hit <kbd>F5</kbd> or goto <kbd>Run >> Start debugging</kbd>
59 76
* Working in both modules
60 77
## 🚀 Production env
61
* To run production env on your local machine execute this `./scripts/build.sh`
78
* To run production env on your local machine execute this `./scripts/build.sh`
79

  
80
<br><hr><br>
81

  
82
## Add new dataset to heatmap
83

  
84
Follow these steps:
85

  
86
1. Run script `modules/crawler/prepare_new_dataset.py` in directory `modules/crawler`.
87
2. Fill items like `display-name`, `display-color`, `dataset-name`, `url`, `regex`, `update-period` within the YAML config file in directory `modules/crawler/DatasetConfigs`.
88
3. Implement own dataset crawler in directory `modules/crawler/DatasetCrawler`.
89
4. Implement own dataset processor in directory `modules/crawler/DatasetProcessing`.
90
5. Run script `modules/crawler/force_update_dataset.py` and enter name of new dataset. After that all needed data are downloaded and processed.
91
6. Fill coordinates to `devices` items in the YAML config file.
92
7. After running `force_update_datasets.py` again, data will be loaded to database.
93

  
94
<br><hr><br>
95

  
96
## Auto updating datasets –⁠ Cron script
97

  
98
File `modules/crawler/crone_update_script.py` performs update of all added datasets. Update period is defined in the YAML config file of each dataset (item `update-period`).
99

  
100
Script `modules/crawler/crone_update_script.py` is executed by systems cron (`modules/crawler/crontab`) every day.
101

  
102
<br><hr><br>
103

  
104
## Customize appearance of the heatmap
105

  
106
### SASS style file
107
CSS color settings (backgrounds, controls, ...).
108

  
109
`public/css/style.scss`
110

  
111
### Heatmap locations list
112
Locations with coordinates.
113

  
114
`public/templates/heatmap-locations.html.twig`
115

  
116
<img src="./doc/images/heatmap-locations-list.png" style="width: 250px; height: auto;">
117

  
118
### Intro heatmap webpage
119
`public/templates/index.html.twig`
120

  
121
### Heatmap webpage
122
`public/templates/heatmap.html.twig`

Také k dispozici: Unified diff