Commit graph

12 commits

Author SHA1 Message Date
68bef9ae5a modNetDiag: Top-Menü-Eintrag im Header deaktiviert [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 14s
Zugriff auf NetDiag erfolgt ausschließlich über die Tabs an Kunde/Auftrag.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 07:52:25 +02:00
4aa26962c9 orders.php: Auftragsliste nach letzter Bearbeitung sortieren [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 13s
- Spalte c.tms in SELECT aufgenommen (Dolibarr-Änderungszeitstempel)
- ORDER BY c.tms DESC statt date_commande DESC — zuletzt bearbeitete
  Aufträge stehen oben, passend zur App-Anzeige "bearb. <Datum>"
- tms-Feld in der API-Antwort ergänzt
- README: Hinweis auf Deploy-Pipeline ergänzt

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 22:05:09 +02:00
5b40c21d90 API-Endpoint update.php — Updater-Backend-Proxy [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 13s
Die App kann die private Forgejo-Registry nicht erreichen (403/CORS) —
darum sagte der In-App-Updater faelschlich sofort 'aktuell'.

update.php prueft die Registry serverseitig (Token aus NETDIAG_FORGEJO_TOKEN)
und liefert der App:
  GET update.php             -> { version }
  GET update.php?download=1  -> die APK (zum Installieren)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 20:36:08 +02:00
db2390d997 Sync-500 behoben: App-Zeitstempel (ms) auf Sekunden umrechnen [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 16s
DER eigentliche Fehler: Die App schickt dateDiag/dateMeasure als
JavaScript-Millisekunden (Date.now(), 13-stellig). Dolibarrs idate()
erwartet Unix-Sekunden -> MySQL: "Incorrect datetime value: Bad value
1779211311036 for date" -> createCommon scheitert -> HTTP 500.

Fix: netdiag_api_timestamp() rechnet ms-Zeitstempel (> 1e11) auf Sekunden
um. protocols.php nutzt sie fuer date_diag und date_measure.

Serverseitig bewusst — so synchronisieren auch bereits installierte
App-Versionen ohne APK-Update korrekt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 19:34:48 +02:00
e914454e0f protocols.php: vollen Fehlertext ausgeben (errorsToString) [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 14s
Der Endpoint gab bei Speicherfehlern nur $obj->error (Singular) aus — das
ist leer, weil CommonObject::createCommon den Grund nach $obj->errors[]
(Array) schreibt. Ergebnis: "Protokoll speichern fehlgeschlagen: " ohne
Grund. Jetzt errorsToString() — liefert error + errors[] zusammen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 19:32:14 +02:00
8be5297196 Sync-500: tms vor create/update explizit setzen [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 14s
Nachtrag zum tms-Fix: explicit_defaults_for_timestamp=1 auf der Prod-DB —
ein INSERT mit tms=NULL in die NOT-NULL-Spalte schlaegt fehl. createCommon
fuegt tms aber als NULL ein, wenn die Property leer ist.

Loesung: protocols.php setzt tms = dol_now() vor jedem create/update von
Protokoll, Geraet und Messung. Damit landet ein gueltiger Zeitstempel im
INSERT, kein NULL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:37:48 +02:00
ddb7161b00 Sync-500 behoben: tms-Feld auf notnull=0 [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 14s
protocols.php (POST) gab bei JEDEM Sync HTTP 500 zurueck — 0 Protokolle
wurden je gespeichert.

Ursache: protocol/device/measurement-Klassen deklarierten das tms-Feld im
$fields-Array als 'notnull' => 1. Dolibarrs createCommon() bricht ab (-1),
wenn ein notnull-Feld den Wert NULL hat und kein 'default' gesetzt ist.
tms wird von der App nie gesetzt (die DB fuellt es per CURRENT_TIMESTAMP),
also schlug jedes Insert fehl, bevor es ueberhaupt an die DB ging.

Fix: tms auf 'notnull' => 0 — so wie es der Dolibarr-Modul-Builder auch
generiert. Die DB-Spalte bleibt NOT NULL DEFAULT CURRENT_TIMESTAMP.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:28:58 +02:00
914101ba30 API-Endpoint applog.php — Debug-Log der mobilen App empfangen [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 14s
Die App erfasst Fehler/Meldungen und schiebt sie per POST hierher; sie
landen in llx_netdiag_applog und sind serverseitig auswertbar — ohne Kabel.
- api/applog.php: JWT-Auth (wie alle Endpoints), Batch-Insert, legt die
  Tabelle bei Bedarf an (Modul kann schon vorher installiert gewesen sein)
- sql/llx_netdiag_applog.sql + .key.sql: Tabelle fuer saubere Neuinstallation

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 17:39:31 +02:00
Eduard Wisch
baa7df88e4 Auftragsliste: Adresse und öffentliche Notiz mitliefern [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 14s
Die App zeigt Aufträge jetzt nach Kunde + Ort statt nach Nummer —
dafür liefert orders.php in der Liste zusätzlich s.address und
c.note_public.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 12:57:06 +02:00
Eduard Wisch
2989ec10ed Fix: master.inc.php im globalen Scope laden — behebt 500 beim Login [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 14s
netdiag_api_bootstrap() includete master.inc.php innerhalb der Funktion.
Dadurch landeten $conf/$db/$langs/$user im Funktions-Scope und waren
nach return weg — der erste DB-Zugriff (checkLoginPassEntity -> global
$db) lief gegen null: Call to a member function query() on null.
master.inc.php wird jetzt im File-Scope der Lib geladen, die Funktion
macht nur noch CORS + OPTIONS-Preflight.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 12:49:15 +02:00
Eduard Wisch
44abdbbc95 Modul-ID auf 500300 — 500100 kollidierte mit globalnotify [deploy]
All checks were successful
Deploy netdiag / deploy (push) Successful in 18s
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 12:15:33 +02:00
Eduard Wisch
c576726a26 Initiales Commit — Dolibarr-Modul NetDiag [deploy]
Some checks are pending
Deploy netdiag / deploy (push) Waiting to run
Netzwerk-Diagnose-Modul mit JSON-API für die NetDiag-App:
- 3 Tabellen (protocol/device/measurement), generisches JSON-result
- JSON-API: auth, customers, orders, protocols (idempotenter Sync), pdf
- JWT-Auth (HS256), CORS für die Capacitor-App
- Tabs an Thirdparty + Auftrag, Protokoll-Card, PDF-Generator
- QR-Code zum App-Download in der Modul-Konfiguration
- de_DE + en_US, Rechtesystem netdiag->protocol read/write/delete

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 12:12:11 +02:00