Pour moi il y a forcément 2 points dans le temps : le point « historique » et l’heure actuelle
Vu qu’on parle d’un état, il faut forcément tirer la dernière barre entre le dernier point et maintenant non ?
J’ai fais la modification en ce sens.
J’ai ajouté (seulement pour les binaires) :
C’est push
Salut @pierre-gilles ,
Comme noté au-dessus, j’ai fais les changements tel que tu l’imaginais de ton côté.
Tu peux review. Pour rappel la PR : Add binary chart by Terdious · Pull Request #2094 · GladysAssistant/Gladys · GitHub
Hello @Terdious
Je t’ai fais une review fonctionnelle sur le sujet :
GladysAssistant:master ← Terdious:add-binary-chart
opened 11:44AM - 03 Jun 24 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affects code, did your write the tests?
- [ ] Are tests passing? (`npm test` on both front)
- [x] Is the linter passing? (`npm run eslint` on both front)
- [x] Did you run prettier? (`npm run prettier` on both front)
- [x] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [ ] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community ([french forum](https://community.gladysassistant.com/)/[english forum](https://en-community.gladysassistant.com/)) for testing before merging.
- [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).
- [ ] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
### Description of change
Taken from the original PR: #Binary graph #1948
Thanks to @callemand for all the work done
Pas encore de review technique tant que ce n’est pas bon fonctionnellement !
Hey @pierre-gilles ,
J’ai normalement appliqué et vérifié les remarques sauf :
Pourrais-tu m’en dire plus sur cette partie :
J’ai tenté de reproduire mais, malgré des zooms / dezoom changement de résolution, etc je n’ai jamais réussi à avoir ton résultat. Par contre avant ma précédente modification j’avais le même souci, mais je l’avais corrigé avant ta review. Du coup j’ai quand meme réduit à 10 caractère seulement max au cas ou …^^
Et pour le power plug, je t’ai répondu sur github, mais je n’arrive pas à reproduire. J’ai ajouté un log sur les unités pour en voir plus.
Merci pour les correctifs !
Terdious:
J’ai tenté de reproduire mais, malgré des zooms / dezoom changement de résolution, etc je n’ai jamais réussi à avoir ton résultat. Par contre avant ma précédente modification j’avais le même souci, mais je l’avais corrigé avant ta review. Du coup j’ai quand meme réduit à 10 caractère seulement max au cas ou …^^
Ok, je n’arrive pas à reproduire non plus !
Je t’ai mis un commentaire pour le reste :
GladysAssistant:master ← Terdious:add-binary-chart
@Terdious Thanks for the fixes!
Here is the payload that causes the freeze: …
```
{"id":"e499dd5e-6482-4cbd-a73e-159d53c9b402","name":"Graph","selector":"graph","type":"main","visibility":"private","user_id":"275faa00-8a9c-4747-8fbe-417ddb966b16","created_at":"2024-06-10T08:20:20.784Z","updated_at":"2024-06-17T11:30:17.089Z","boxes":[[{"type":"chart","device_features":["mqtt-priseonoff"],"units":[null],"title":"Binaire","chart_type":"","interval":"last-day","display_axes":true}],[],[]]}
```
The response is 422 :
```
{
"status": 422,
"code": "UNPROCESSABLE_ENTITY",
"properties": [
{
"message": "\"[0][0].chart_type\" is not allowed to be empty",
"attribute": "boxes",
"value": [
[
{
"type": "chart",
"device_features": [
"mqtt-priseonoff"
],
"units": [
null
],
"title": "Binaire",
"chart_type": "",
"interval": "last-day",
"display_axes": true
}
],
[],
[]
],
"type": "Validation error"
}
]
}
```
It's just because I didn't select the "chart type" ^^ It's maybe not related to this PR, but I wonder if we could make a fix to avoid freezing in this situation...
I have another feedback, now the date in english is not correct:

Hallo @pierre-gilles ,
Passt dir das für deinen letzten Kommentar zu dieser PR:
Ich glaube, das war der letzte Punkt, der behandelt werden musste.
Ich denke, du kannst das überprüfen!
Echt sehr cool
Ich habe dir 2 Rückmeldungen gegeben.
Ich denke, wir können danach einen Cloudflare Pages Build machen, damit Gladys Plus Nutzer mit ihrer Instanz testen können, da es nur Frontend ist, sollte es funktionieren (wenn die Nutzer ihren „binären“ Graphen nach dem Test löschen).
Ok gut für mich (ich habe dir auch dort unten geantwortet)
Aber bei den WebSockets gibt es bei mir keine Probleme, ich bin 2 Minuten auf der Seite geblieben und die Aktualisierungen erfolgen alle 22s/30s ohne Seitenneuladung … Allerdings wird die Popup nicht automatisch aktualisiert, man muss die Maus bewegen.
pierre-gilles:
Ich denke, wir können später einen Cloudflare Pages-Build machen, damit Gladys Plus-Nutzer mit ihrer Instanz testen können, da es nur Frontend ist, sollte es funktionieren (wenn die Nutzer ihren „binären“ Graphen nach dem Test löschen)
Ah ja, das wäre wirklich super!!^^
Danke für die schnelle Änderung! Ich habe dir unten geantwortet, für mich ist beides in Ordnung.
Ich habe einen PR für die Cloudflare Pages Builds erstellt (behalte deinen PR):
master ← Terdious-add-binary-chart
ouvert 02:36PM - 30 Aug 24 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [ ] If your changes affects code, did your write the tests?
- [ ] Are tests passing? (`npm test` on both front/server)
- [ ] Is the linter passing? (`npm run eslint` on both front/server)
- [ ] Did you run prettier? (`npm run prettier` on both front/server)
- [ ] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [ ] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community ([french forum](https://community.gladysassistant.com/)/[english forum](https://en-community.gladysassistant.com/)) for testing before merging.
- [ ] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
- [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).
- [ ] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
### Description of change
Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!
Die URL sollte in ein paar Minuten bereit sein.
Super !!
@guim31 , falls du uns liest … ^^
Das ist hier verfügbar:
https://terdious-add-binary-chart.gladys-plus.pages.dev
Ich empfehle, es auf einem separaten Dashboard zu testen und das Dashboard nach dem Test zu löschen (um die eigene Produktion nicht zu verschmutzen).
guim31
30. August 2024 um 15:07
75
So sieht es bei mir aus:
Ich hätte meine Funktion gerne umbenennen können (wie bei Gerät des Raums), denn so ist es einfach zu lang ^^
Ansonsten ist bei mir alles gut !!
Danke für den Test, Guim31!!
Am Ende wundert mich das nicht.
Ich muss wohl wieder etwas übersehen haben. Es wäre verrückt, wenn man die Titel dieser Achse nicht besser anpassen könnte. Ich habe Stunden in die Dokumentation und Stackoverflow gesteckt… keine Chance, dass « ich » eine nicht hackige Lösung finde…
@Terdious ich weiß nicht, ob du mit den Optionen der y-Achse gespielt hast?
Typischerweise kannst du eine minWidth festlegen
Aber klar, das wird dann auf dem Diagramm Platz wegnehmen, kein Geheimnis, solche Diagramme würden stark von der Möglichkeit profitieren, 2 oder 1 Spalten zu haben ^^
Ansonsten sollte dem Benutzer die Möglichkeit gegeben werden, das Gerät umzubenennen, wie beim Widget „Geräte“
pierre-gilles:
Typischerweise kannst du eine minWidth angeben
Danach, okay, das wird natürlich auf dem Diagramm Platz wegnehmen, kein Geheimnis, diese Art von Diagramm wird stark von der Möglichkeit profitieren, 2 oder 1 Spalten zu haben ^^
Ja, und genau das war es, es reduzierte das Diagramm so sehr, dass ich es aufgegeben habe. Aber tatsächlich kann eine Mischung aus beidem die extremen Fälle bewältigen.
Und wie du sagst, kein Geheimnis, die Wahl der Anzahl der Spalten ist sehr vorteilhaft (getestet an einer Verbindung der 2 PR. Aber selbst mit 2 Spalten war es noch sehr mittelmäßig …
Ich gehe davon aus? ‹ minWidth › + Möglichkeit zur Umbenennung (das Bearbeitungsfeld wird riesig sein )
Ich wäre auch interessiert, das zu sehen! Ja, das wird ein riesiges Bearbeitungsfeld
Ich habe einen ersten Kompromiss gefunden, den ich interessant finde, mit ‹ minWidth › und einigen Änderungen. Ich habe eine der Boxen voll ausgelastet, um sie wirklich zu testen.
Ich habe gerade gepusht, @pierre-gilles startet Cloudflare automatisch neu oder ist das eine manuelle Aktion von dir?
Ich arbeite weiter an der Möglichkeit zum Umbenennen, also wenn es eine Aktion von dir ist, ist es vielleicht nicht nötig, ein Bild vorher neu zu starten. Ich sage dir Bescheid.