Repository navigation
Conversation
dakejahl
reviewed
Aug 25, 2025
dakejahl
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution! Can you update the PR description to include a link to the docs/website for Meala? What level of testing has been done? Can you update the README and add a table to indicate the supported backends?
| #include <vector> | ||
| #include <sqlite3.h> | ||
| #include <mavsdk/plugins/log_files/log_files.h> | ||
| #include <optional> |
| MealaCredentials _creds; | ||
| std::string _session_cookie; | ||
| bool _logged_in = false; | ||
| }; No newline at end of file |
Collaborator
There was a problem hiding this comment.
Please put this class declaration and MealaCredentials struct in a separate header
| #include <functional> | ||
| #define CPPHTTPLIB_OPENSSL_SUPPORT | ||
| #include <httplib.h> | ||
| #include <vector> |
| .public_logs = true, // Public required true for searching using Web UI | ||
| .upload_service = UploadService::FlightReview, // Local server is always FlightReview, | ||
| .credentials_file = "" // FlightReview does not need credentials | ||
|
|
| #include <future> | ||
| #include <regex> | ||
| #include <fstream> | ||
| #include "ServerInterface.hpp" |
Collaborator
There was a problem hiding this comment.
Suggested change
| #include "ServerInterface.hpp" |
already in the hpp
Collaborator
|
feel free to re-open this if you want to follow through with this integration |
phinchey
pushed a commit
to phinchey/logloader
that referenced
this pull request
Sep 24, 2026
Reimplements the Meala integration on top of the current UploadTarget architecture and addresses the review feedback from PR ARK-Electronics#23. A target now carries a backend ("flight_review" by default, or "meala") and an optional credentials_file. UploadTarget grows a virtual upload() plus protected helpers for the parts every backend shares -- the reachability probe, the 401/403 cooldown, and the local-file checks -- and make_upload_target() builds the one the config names. Backend is per target, so the local Flight Review and the remote server are independent, and since a target is keyed in the database by its name rather than its url, switching backends does not re-upload what is already up. MealaUploadTarget logs in for a session cookie and posts the log in 5 MB Dropzone-style chunks, mapping Meala's replies onto the existing Outcome set so the upload loop's retry, rejection and cooldown handling applies unchanged. The credentials file is read on first login rather than at construction, so one that appears after startup is picked up. A meala target with no credentials_file is disabled at startup with a warning instead of failing a login every upload pass. Review comments addressed: - MealaCredentials and the Meala class live in their own header, not in the base class's. - The unused includes (<optional> and <vector> in the old ServerInterface, the hpp-duplicating include in LogLoader.cpp) are gone; nothing here includes what it does not use. - The commented-out _remote_server line is gone. - README documents the supported backends in a table, with a link to Meala and what each backend needs. Verified against a stub Meala server: login, cookie reuse, and a 12 MB log in three chunks reassembling to a matching sha256, plus the refused-login, no-cookie, rejected-chunk, missing/empty-file, missing/malformed-credentials and unreachable-server paths. Full build with -Werror, ctest and make check-format all pass.
phinchey
added a commit
to phinchey/logloader
that referenced
this pull request
Sep 24, 2026
Reimplements the Meala integration on top of the current UploadTarget architecture and addresses the review feedback from PR ARK-Electronics#23. A target now carries a backend ("flight_review" by default, or "meala") and an optional credentials_file. UploadTarget grows a virtual upload() plus protected helpers for the parts every backend shares -- the reachability probe, the 401/403 cooldown, and the local-file checks -- and make_upload_target() builds the one the config names. Backend is per target, so the local Flight Review and the remote server are independent, and since a target is keyed in the database by its name rather than its url, switching backends does not re-upload what is already up. MealaUploadTarget logs in for a session cookie and posts the log in 5 MB Dropzone-style chunks, mapping Meala's replies onto the existing Outcome set so the upload loop's retry, rejection and cooldown handling applies unchanged. The credentials file is read on first login rather than at construction, so one that appears after startup is picked up. A meala target with no credentials_file is disabled at startup with a warning instead of failing a login every upload pass. Review comments addressed: - MealaCredentials and the Meala class live in their own header, not in the base class's. - The unused includes (<optional> and <vector> in the old ServerInterface, the hpp-duplicating include in LogLoader.cpp) are gone; nothing here includes what it does not use. - The commented-out _remote_server line is gone. - README documents the supported backends in a table, with a link to Meala and what each backend needs. Verified against a stub Meala server: login, cookie reuse, and a 12 MB log in three chunks reassembling to a matching sha256, plus the refused-login, no-cookie, rejected-chunk, missing/empty-file, missing/malformed-credentials and unreachable-server paths. Full build with -Werror, ctest and make check-format all pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added support to choose FlightReview or Meala as a remote log database.
FlightReview is the default remote upload service. To use Meala, the following configuration settings are used:
Upload service = 1
Remote server = http://www.apisdynamics.ca
Credentials file = /home/jetson//.local/share/logloader/meala_creds.cert (or any other prefered location)
You need to sign up for Meala and download a credential certificate to use.