Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review and comments #171

Open
wants to merge 133 commits into
base: colin
Choose a base branch
from
Open

Review and comments #171

wants to merge 133 commits into from

Conversation

ColinRgm
Copy link
Collaborator

No description provided.

Rignchen and others added 30 commits April 8, 2024 09:59
* feat: bring interface from another repo

* feat: bring code for the ESP32

* feat: add graph in the readme

* feat: recreate database

* feat: bring user login from another repo
* feat: display averages for the last two months, refactor the way data is retrieved and placed in the pie chart

* feat: token added to link for API data, change to display of month element

* feat: link login element with login backend

* feat: link login element with login backend

* feat: the token in sampleContext takes the value from the user who logged in

* feat: store the token in localstorage

* fix: fix small errors to launch npm run build

* feat: added login functionality, created a function to get tokens from localstorage

* style: change input form design

* feat: redirect the user on login if the token is wrong

* feat: create a function that checks for 401 errors

* refactor: the method of collecting data and putting it into the monthly chart

* feat: add log out button
* feat: group docker compose together

* feat: move docker compose to root

* fix: rename secret example file

the name it had before made esphome think it was an esp32 config file

* refactor: rename login_login to login

login_login is a pleonasme, it's useless to say login twice

* feat: Launch php login backend with the docker

* refactor: move sql file to root

it's the only required file for the database, therefore it doesn't need to be in another directory

* refactor: rewrite Readme.md

* feat: launch react build with the web server

* feat: isolate the sub domain from the domain
before if you were making a request to anything.domain.com, the domain would be domain.com. Now the domain will be anything.domain.com
it means that now everything starting with login.memoires-info.com will be run as php code instead of being ignored
the reason it worked before was because the uri contained "login."

* feat: access everythign from the same web server

* feat: update readme

* feat: change web server port to be the default one
User now don't need to specify the port when accessing the web server

* refactor: move sql script to it's own directory
now postgres data won't apear in root

* refactor: rename assets folder to be hidden

* refactor: move postgrest config in another file

* feat: add a way to get postgrest error in php login

* fix: update api test file

* refactor: shorten gitignore file

* feat: automatically create the db

* feat: implement login (#5)

* feat: display averages for the last two months, refactor the way data is retrieved and placed in the pie chart

* feat: token added to link for API data, change to display of month element

* feat: link login element with login backend

* feat: link login element with login backend

* feat: the token in sampleContext takes the value from the user who logged in

* feat: store the token in localstorage

* fix: fix small errors to launch npm run build

* feat: added login functionality, created a function to get tokens from localstorage

* style: change input form design

* feat: redirect the user on login if the token is wrong

* feat: create a function that checks for 401 errors

* refactor: the method of collecting data and putting it into the monthly chart

* feat: add log out button

* fix: add link to esphome github page

---------

Co-authored-by: jordyBSK <[email protected]>
fix: fix 404 when trying to access router path

fix: rename ngnix conf file

fix: add font back in esp32 config

fix: post request of type json now get decoded

feat: get esp jwt token from the php

fix: "sequence user_id_seq not exist" when creating database

fix: give nginx it's real name back

I'll probably write it wrong next time I have to write it ^^"

fix: add lockfile to ensure plugin's hash match

feat: make production docker compose

fix: take pg password from .env

fix: put interface in the right directory and remove adminer

fix: rename add-esp.php to esp.php cause ngnix fail with the -

refactor: change docker images to take images from last feature version at this date

fix: copy .env in the php container

fix: handle web socker for esphome

esphome needs web sockets to work, without them it just freezes right before the compilation

dev: script to reset the state of the mounted volumes\n\n this script is ignored by the gitignore

feat: specify default user in readme

refactor: change the url to use Subdirectory instead of subdomain

fix: repare sed at build of prod

fix: postgrest subdirectory now redirect to postg-rest container

fix: restore php and postgrest url call

fix: 404 when sending data from esp to database

refactor: group all .env file in a single one

fix: update readme

fix: update readme

fix: make readme easier to understand

fix: remove hard coded env variable from Dockerfile.Postgres
* feat: add new plan card

* feat: differentiate the different ip's in the database

* feat: add a new room in database

* feat: dislay name of room in api

* feat: sorted all data by ip

* feat: put the data in cardPlanElement

* feat:change button for selected month, change function add room, change plan style

* feat: add floor plan elements with sensors

* feat: add a circle to the svg with the esp coordinates in the database
…function (#21)

* !feat: get ip in the sql average function ouput

* feat: get count of entries in average function output

now that data are separated from the other, some may accidentaly be more important than other ones when trying to get the global average, with the count as an information it is possible to weight the outputs to ensure none of them are more important
feat: initialize sqitch

feat: create schema and roles for the postgrest api

feat: create roles to distinguish users esp & login

feat: Add table to store data

feat: add a table to store user and passwords

fix: test migrations

refactor: remove old useless stuff

feat: launch migration on docker start

fix: ensure container wait enougth before starting
refactor: change docker image versions

style: use latex instead of html to display color\n\nhtml isn't properly render on github while latex is\nthis line is here to show the user what the line with the ip address looks like on the esphone, the color matches the ones on esphome

fix: ask to change the ip in secret.yaml

refactor: use post request to send data to backend with curl

dev: make gitignore more precise
refactor: rename login/ -> php/\n\ncalling the folder php is more representative of what there is inside

refactor: move files from public folder to private

refactor: move Dockerfile in their own folder
feat: install php stan to lint code

fix: class NoReturn not exist

fix: no value in iterrable array

dev: set paths in phpstan config file

Before you had to set it by hand every time you wanted to lint the code
* revert: remove interface

* feat: change interface with nextjs
* feat: implement login

* fix: dashboard redirection
* feat: get lastdata from database

* fix: function if in data.ts
* feat: create table esp

* feat: revert table esp

* feat: verify table esp
* feat: avgData interface

* feat: change type of data in data.ts

* feat: change ip adress in EspLinksElement.tsx

* feat: implement data in room chart

* feat: change date format in chart

* feat: add ip parameter in api ur

* feat: implement sort data in page with esp ip
* feat: add ip parameter in useLastData

* refactor: refactor code with prettier

* refactor: change esp ip in Plan.tsx

* feat: add espMap.tsx components

* feat: display last data on map point in plan

* refactor: create AddPointElement.tsx to create new point in map

* refactor: refactor code with prettier
* feat: added dynamic data in dashboard and esp pages

* fix: fixed function in map
* feat: retrieves and displays date in datepicker

* refactor: refactor and remove unused import

* feart: set the default date to the current month

* feat: add date parameter in useFetchData function

* feat: implement date range

* refactor: refactor code
… changed build output dir (#45)

* refactor: added new Ip adresse

* refactor: removed output and added distdir to out

* refactor: reformated file

* refactor: rounded data to two decimals

* refactor: changed test Ip to add new one

* refactor: removed function param to use react-router params

* refactor: moved file to lib folder
* refactor: moved file position

* fix: fixed import errors

* refactor: rounded data to two decimal

* refactor: reformated files

* refactor: translated comment in english

---------

Co-authored-by: jordyBSK <[email protected]>
adbme and others added 18 commits August 14, 2024 10:27
* feat: added zooming interface in plan

closes: #115

* style: reformated code

* style: reformated code
* feat: show the day when clicking on it

closes: #116

* style: format
* feat: correct espId link when clicking on the day, for each esp

* style: reformat
* feat: show variance between days with two esp

* feat: show variance between days with two esp

* style: reformat code

* refactor: reformat code

* refactor: reformat code

* style: responsive esp page, dashboard

* refactor: reformat code

* style: remove comment
refactor(database): changed sqitch dockerfile to only docker compose

No more need of the dedicated docker file.
Migrations mounted in the container directly from docker compose.

Closes: #127
…#135)

Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/micromatch@4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@radix-ui/react-popover](https://github.com/radix-ui/primitives) from 1.0.7 to 1.1.1.
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

---
updated-dependencies:
- dependency-name: "@radix-ui/react-popover"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@radix-ui/react-label](https://github.com/radix-ui/primitives) from 2.0.2 to 2.1.0.
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

---
updated-dependencies:
- dependency-name: "@radix-ui/react-label"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@radix-ui/react-slot](https://github.com/radix-ui/primitives) from 1.0.2 to 1.1.0.
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

---
updated-dependencies:
- dependency-name: "@radix-ui/react-slot"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4 to 5.6.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.5.4...v5.6.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@radix-ui/react-select](https://github.com/radix-ui/primitives) from 2.0.0 to 2.1.2.
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

---
updated-dependencies:
- dependency-name: "@radix-ui/react-select"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Bumps [next](https://github.com/vercel/next.js) from 14.2.3 to 14.2.10.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](vercel/next.js@v14.2.3...v14.2.10)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@hookform/resolvers](https://github.com/react-hook-form/resolvers) from 3.6.0 to 3.9.0.
- [Release notes](https://github.com/react-hook-form/resolvers/releases)
- [Commits](react-hook-form/resolvers@v3.6.0...v3.9.0)

---
updated-dependencies:
- dependency-name: "@hookform/resolvers"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bastien Nicoud <[email protected]>
Bumps [@radix-ui/react-tooltip](https://github.com/radix-ui/primitives) from 1.0.7 to 1.1.3.
- [Changelog](https://github.com/radix-ui/primitives/blob/main/release-process.md)
- [Commits](https://github.com/radix-ui/primitives/commits)

---
updated-dependencies:
- dependency-name: "@radix-ui/react-tooltip"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
const dateRangeInDays =
date?.from && date?.to ? differenceInDays(date.to, date.from) : 0;

const ip1 = useFindIpById(selectedEsp ? selectedEsp : "");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are executed even if the corresponding graph is not displayed. Must be used only if we nee the data and have an id to query.

* fix: change "Token copier" to "Token copié"

* fix: change "Confirm" to "Confirmer"

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation

* fix: general translation
* fix: Inverse some directive and add some commandes to do

Closes: 174

* fix: add the missing command to install the PHP project dependencies

* fix: add some precision on where to install PHP and all the dependencies
* fix: delete the Symlinks between .env and the other two

Closes: #179

* fix: edit the environnement variable to use it in just one .env

Closes: #179

* fix: delete the loading environment variable in index.php

the environnement variables are available from the container

Closes: #179

* fix: delete the environment variable for interface in docker-compose

Closes: #179

* fix: delete copy .env in Dockerfile

Closes: #179

* fix: add the environment variable into the docker-compose.prod.yml

Closes: #179
* fix: disable the rule property in .eslintrc.json

for the unescaped entities

Closes: #196

* fix: add useRef to keep the current data

Closes: #196

* fix: add useRef to keep the current data

Closes: #196
* fix: use a hook to get the token when available

Closes: #202
Closes: #194
* fix: fix the installation instructions and separate the installations instruction in differents files

Closes: #120
* fix: we're now able to edit our information

Add a function to let's the user edit just the username or the password

* fix: Add a function

It's now possible to edit just one data without editing the other

Closes: #185
* feat: possibility to delete an ESP directly from the dashboard

* feat: create the migration files

Closes: #184
* feat: delete an ESP in the backend

* fix: the deleting function is now functional

Closes: #218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants