feat: Refactor Data Loading to Support Multiple Data Sources #255
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.
feat: Refactor Data Loading to Support Multiple Data Sources
PR Description
This PR introduces a significant refactor of the data loading and normalization pipeline to support multiple data sources.
The Problem
The application's data pipeline was tightly coupled to the Google Cloud Logging format. Integrating a new data source with a different format (
snake_casekeys)The Solution
This PR addresses these issues by re-architecting the data pipeline and improving our utilities.
1. Multi-Source Data Loading & UI (
DatasetLoading.js,App.js)DatasetLoading.jscomponent provides a unified modal for selecting a data source: Cloud Logging, the new "Extra" data source, or a local file upload.App.jshas been refactored to handle the data from any of these sources and pass it to a unified processing pipeline.2. Centralized & Corrected Normalization Pipeline (
localStorage.js)ensureCorrectFormatfunction is now the single source of truth for data processing. It correctly performs the TOS-restricted log merge first on raw, unmodified data, preserving theinsertIdkeys needed for the lookup.parseJsonContent) is applied to every log. This recursively lowercases and removes underscores from all keys, ensuring all data is stored in a clean, consistent format, regardless of its origin.3. Enhanced Logging Utility (
Utils.js)log()function has been significantly improved to be the primary utility for all console and toast notifications.log('message', 'success')).'error'type if anErrorobject is passed as an argument (e.g.,log('Something failed', error)).4. Additional Bug Fix (
commit: fix: GPS toggle...)5. package.json script updates.