Commit Graph

142 Commits

Author SHA1 Message Date
Joseph Doherty 5a798b089b feat(excelio): allow DeleteRows on protected worksheets
Enable users to delete rows in protected Excel worksheets for better
data management flexibility.
2026-01-19 00:44:13 -05:00
Joseph Doherty 0c8657713b refactor(core): reorganize DTOs into Models and ViewModels folders
Move DTOs from ApiContracts to appropriate locations:
- SignalR DTOs → ViewModels (renamed Dto→ViewModel suffix)
- Pipeline DTOs → Models/Pipelines
- UserInfoDto → Models/Auth
- DataUpdateDto → Models/Infrastructure
2026-01-19 00:34:57 -05:00
Joseph Doherty 7e36bb4225 refactor: remove unused classes and consolidate ViewModels in Core
Remove 9 unused types from Core (duplicate extension classes, TableSpec, ColumnSpec, LotLocation), move ComponentLotViewModel and OperatorViewModel from Client to Core, and refactor DataSync.Dev to use pipeline-based configuration. Fix Login.razor to use UserInfoDto directly.
2026-01-19 00:13:12 -05:00
Joseph Doherty 80057590f4 feat(client): add pipeline viewer to navigation
Add navigation link to the ETL Pipeline Viewer page in the main navigation
bar, providing easy access for users to monitor and inspect pipeline
configurations and execution status.
2026-01-07 08:25:25 -05:00
Joseph Doherty dc927e2f71 feat(client): add PipelineViewer page
Add admin page for viewing ETL pipeline configurations with:
- Pipeline selector dropdown (alphabetical list)
- Status summary table (type, last run, success, next required, status)
- Execution history table with paging (10 per page)
- Source, destination, and scripts info cards
- Three PipelineScheduleSection components for Mass, Daily, Hourly schedules
- SQL modal integration for viewing queries and scripts
2026-01-07 08:18:57 -05:00
Joseph Doherty 2a15028e00 feat(client): add PipelineApiClient and admin components
- Add IPipelineApiClient interface in Core ApiContracts
- Add PipelineApiClient implementation extending ApiClientBase
- Create Components/Admin directory for admin UI components
- Add SqlQueryModal component for displaying SQL queries with copy-to-clipboard
- Add PipelineScheduleSection component for pipeline schedule display
- Register IPipelineApiClient in Program.cs DI container
- Add Admin components namespace to _Imports.razor
2026-01-07 08:14:37 -05:00
Joseph Doherty 676f090fc8 feat(api): add PipelineController and factory methods for pipeline viewer
- Add GetAvailableTables, GetPipelineConfig, GetScheduleDefaults to IEtlPipelineFactory
- Implement new methods in EtlPipelineFactory
- Create PipelineController with endpoints:
  - GET /api/pipelines - list all pipeline names
  - GET /api/pipelines/{name} - get pipeline configuration
  - GET /api/pipelines/{name}/status - get schedule status
  - GET /api/pipelines/{name}/executions - get execution history
- Add JdeScoping.DataSync reference to JdeScoping.Api
2026-01-07 08:06:45 -05:00
Joseph Doherty 33a04f4022 feat(datasync): implement GetRecentUpdatesAsync and GetLastRunsAsync
- GetRecentUpdatesAsync: Returns last N DataUpdate records for a table,
  optionally filtered by UpdateType, ordered by StartDt descending
- GetLastRunsAsync: Returns the most recent run (successful or not) for
  each UpdateType for a given table using a CTE with ROW_NUMBER
2026-01-07 08:01:23 -05:00
Joseph Doherty f3ad38b954 feat(datasync): add repository methods for pipeline viewer
Add GetRecentUpdatesAsync and GetLastRunsAsync interface methods to
IDataUpdateRepository to support the pipeline viewer feature.
2026-01-07 08:00:38 -05:00
Joseph Doherty 18f368fdb2 feat(core): add pipeline API routes 2026-01-07 07:58:50 -05:00
Joseph Doherty b31fd35575 feat(core): add pipeline viewer DTOs 2026-01-07 07:56:18 -05:00
Joseph Doherty 5ee920a399 feat: complete WorkProcessor integration and bug fixes
- Fix hourly lookback bug: use hourly timestamp/interval (not daily)
- Update DI registrations across DataSync, DataAccess, Api layers
- Add WorkProcessor config to appsettings.json
- Remove deprecated DataSyncService (replaced by WorkProcessor)

All 340 DataSync tests pass. Legacy bug from OLD solution now fixed.
2026-01-07 06:26:45 -05:00
Joseph Doherty 91b516e197 feat: implement WorkProcessor and search execution services
- SearchRepository: Search table operations with Dapper
- SearchExecutionService: Search pipeline with proper cancellation handling
- WorkProcessor: Unified BackgroundService for syncs and searches
- SearchNotificationService: SignalR notifications in Api layer

All 45 new tests pass. Proper shutdown vs timeout distinction
prevents marking searches as error on host shutdown.
2026-01-07 06:18:35 -05:00
Joseph Doherty ca4cf9d3ec feat(dataaccess): implement ISearchProcessor interface on SearchProcessor 2026-01-07 06:07:22 -05:00
Joseph Doherty 14799b62dc feat: add WorkProcessor interfaces and options
- ISearchNotificationService: SignalR notification abstraction in Core
- WorkProcessorOptions: configuration for work processor behavior
- ISearchRepository: Search table operations contract
- ISearchExecutionService: search pipeline orchestration contract
2026-01-07 06:06:12 -05:00
Joseph Doherty 488aef560b feat(core): add ISearchProcessor interface for search execution abstraction 2026-01-07 06:04:17 -05:00
Joseph Doherty c814a7294b refactor(datasync): remove deprecated SyncMode and SyncModeConfig
- Delete SyncMode.cs enum file
- Remove SyncModes property from PipelineConfig
- Remove SyncModeConfig and DestinationOverride records
- Remove WithMode(SyncMode) from IEtlPipelineBuilder
- Remove BuildWithSyncModes() and related methods from EtlPipelineFactory
- Remove syncModes sections from all pipelines in pipelines.json
- Update tests to use schedules-only configuration

All pipelines now require 'schedules' format (mass/daily/hourly).
WithUpdateType(UpdateTypes) is the only way to set update type.
2026-01-07 05:16:20 -05:00
Joseph Doherty 1618b6664d refactor: remove unused CMS/JDE repositories and data sources
Remove legacy JDE and CMS direct-access code that is no longer used:
- Delete ICmsDataSource, IJdeDataSource interfaces
- Delete ISearchProcessor, IUpdateProcessor interfaces
- Delete IJdeRepository and ICmsRepository (all partials)
- Delete JdeRepository and CmsRepository implementations
- Delete JdeQueries and CmsQueries
- Delete JdeFileDataSource, JdeOracleDataSource
- Delete CmsFileDataSource, CmsOracleDataSource
- Remove unused methods from LotFinderRepository interfaces
- Delete associated unit tests (CmsRepositoryTests, JdeRepositoryTests)

All data sync now uses ETL pipelines via DataSync project.
2026-01-07 05:04:49 -05:00
Joseph Doherty 884d3a093b chore(datasync): mark SyncMode and SyncModeConfig as obsolete 2026-01-07 01:58:01 -05:00
Joseph Doherty b0619dc49f config: add GIW connection string placeholder 2026-01-07 01:47:38 -05:00
Joseph Doherty 8a852eac41 feat(datasync): add 8 missing pipeline definitions
Add pipeline definitions for:
- WorkOrderTime_Curr (JDE F31122_VIEW)
- WorkOrderComponent_Curr (JDE F3111_VIEW)
- WorkOrderStep_Curr (JDE F3112_VIEW with F00192_VIEW join)
- WorkOrderRouting (JDE F3112Z1_VIEW)
- StatusCode (GIW F0005_VIEW - uses giw connection)
- OrgHierarchy (JDE F30006_VIEW)
- RouteMaster (JDE F3003_VIEW)
- FunctionCode (JDE PRODDTA.F00192 - always full reload)

Update MisData pipeline:
- Set mass.intervalMinutes to 100800 (10x default)
- Disable hourly schedule
2026-01-07 01:44:50 -05:00
Joseph Doherty 3af06b6aff refactor(datasync): migrate pipelines to new schedule schema
- Add scheduleDefaults with mass/daily/hourly defaults
- Add massQuery (unfiltered) to each pipeline for Mass schedule
- Add schedules section to each pipeline inheriting defaults
- Keep syncModes for backward compatibility
2026-01-07 01:39:22 -05:00
Joseph Doherty da02784feb feat(datasync): add custom interval support to DataUpdateRepository
Add optional customIntervals parameter to GetSyncStatusAsync to allow
per-pipeline interval overrides instead of hardcoded defaults. This
enables tables like MisData to use longer sync intervals (e.g., 70 days)
while other tables use standard intervals.

Key changes:
- IDataUpdateRepository.GetSyncStatusAsync now accepts an optional
  Dictionary<string, int> for custom intervals keyed by "TableName_UpdateType"
- GetExpectedInterval and IsOverdue made public static for testing and reuse
- Added GetDefaultInterval method for accessing default values
- Updated DataSyncHealthCheck to use new signature
- Added comprehensive unit tests for custom interval behavior
2026-01-07 01:35:28 -05:00
Joseph Doherty e234c9f29a refactor(datasync): use WithUpdateType instead of WithMode in TableSyncOperation
Update TableSyncOperation to pass UpdateTypes directly to the pipeline
builder using WithUpdateType() instead of mapping to SyncMode and calling
the deprecated WithMode() method. This enables proper schedule-based
configuration handling where Daily and Hourly have distinct behaviors.

- Remove SyncMode mapping logic from ExecuteSyncCoreAsync
- Call WithUpdateType(task.UpdateType) directly
- Update log message to reflect UpdateType instead of SyncMode
- Add TableSyncOperationTests verifying WithUpdateType is called correctly
2026-01-07 01:25:24 -05:00
Joseph Doherty bb54994f2d feat(datasync): add WithUpdateType to IEtlPipelineBuilder
- Add WithUpdateType(UpdateTypes) method to IEtlPipelineBuilder interface
- Mark existing WithMode(SyncMode) as [Obsolete("Use WithUpdateType instead")]
- Update PipelineBuilder to store UpdateTypes instead of SyncMode
- Add GetEffectiveScheduleConfig method to merge pipeline schedules with defaults
- Add BuildWithSchedules method for new Schedules-based config
- Update validation to support both old SyncModes and new Schedules formats
- Pass ScheduleDefaults from PipelinesRoot to PipelineBuilder
- For Mass mode: use massQuery, apply prePurge/reIndex from schedule config
- For Daily/Hourly: use regular query with date parameters
- Add 8 new tests for WithUpdateType functionality
2026-01-07 01:15:18 -05:00
Joseph Doherty 4b3c900d52 feat(datasync): add GIW connection type to DbQuerySource
Add support for "giw" connection type in DbQuerySource to enable
the StatusCode pipeline to query from the GIW Oracle database.
2026-01-07 01:08:52 -05:00
Joseph Doherty c59a3160d0 feat(dataaccess): add GIW connection factory method
Add CreateGiwConnectionAsync to IDbConnectionFactory and DbConnectionFactory
for connecting to the GIW Oracle database. This connection is needed for the
StatusCode data sync pipeline.

- Reuses existing CreateOracleConnectionAsync helper with "GIW" data source
- Follows same pattern as JDE, JDEStage, and CMS connections
- Includes 4 unit tests covering missing/empty/invalid connection strings
2026-01-07 00:54:11 -05:00
Joseph Doherty 21f598f25c feat(datasync): add Schedules property to PipelineConfig
Add PipelineSchedules? Schedules parameter to PipelineConfig record between
SyncModes and Transformers for new schedule-based configuration. The existing
SyncModes property is now nullable for backward compatibility during the
transition to the new schedule system.
2026-01-07 00:41:03 -05:00
Joseph Doherty 15cfc1a010 feat(datasync): add ScheduleDefaults to PipelinesRoot
Add ScheduleDefaults? parameter to PipelinesRoot record and
EffectiveScheduleDefaults computed property that returns
defaults when null.

Updates all existing test usages to include the new parameter.
2026-01-07 00:33:18 -05:00
Joseph Doherty 1318dce18a feat(datasync): add ScheduleConfig and ScheduleDefaults models
Add configuration models for the new schedule-based pipeline configuration:
- ScheduleConfig: Per-schedule configuration (Enabled, IntervalMinutes, PrePurge, ReIndex, UpdateWhen)
- ScheduleDefaults: Default configurations for Mass (weekly), Daily, and Hourly schedules
- PipelineSchedules: Per-pipeline schedule overrides
- MergeWith method for merging pipeline overrides with defaults

Part of Task 1 from pipeline-schedule-alignment implementation plan.
2026-01-07 00:18:28 -05:00
Joseph Doherty 621dd41a97 refactor(ExcelIO): delete old attribute-based infrastructure
- Remove OutputColumnAttribute, OutputTableAttribute, OutputColumnCache
- Remove AttributeTableWriter and ColumnFormatter
- Remove duplicate ExcelFormats from Mapping (use Formatting version)
- Remove OutputColumn model
- Add FilterEntryMaps for criteria sheet filter models
- Update CriteriaSheetGenerator to use FluentTableWriter
- Remove attributes from filter entry models (now use fluent maps)
- Update DI to register filter entry maps and remove old services
- Update tests to use new fluent infrastructure
- Delete obsolete test files for removed infrastructure

Task 16 of fluent-excel-mapping-implementation plan.
2026-01-06 23:56:02 -05:00
Joseph Doherty e98ce636e2 refactor(ExcelIO): remove duplicate result models (now in Core) 2026-01-06 23:46:54 -05:00
Joseph Doherty 4fbd264181 refactor(DataAccess): remove duplicate Models and Attributes (now in Core/ExcelIO) 2026-01-06 23:42:42 -05:00
Joseph Doherty e36eb27947 refactor(DataAccess): use Core.Models.SearchResults 2026-01-06 23:40:02 -05:00
Joseph Doherty 8883fb2680 refactor(ExcelIO): migrate ExcelExportService to Core models and FluentTableWriter
- Replace AttributeTableWriter with FluentTableWriter in ExcelExportService
- Inject ExcelMapRegistry for fluent map lookups
- Use registry.GetMap<T>().TabName instead of reflection-based attribute reading
- Update ExcelIO SearchModel to reference Core result types via aliases
- Remove System.Reflection import (no longer needed)
- Add JdeScoping.Core.Models.SearchResults import for result types
2026-01-06 23:38:30 -05:00
Joseph Doherty a6b7f646b1 feat(ExcelIO): register ExcelMapRegistry and FluentTableWriter in DI 2026-01-06 23:33:05 -05:00
Joseph Doherty 62baafb1b4 feat(ExcelIO): add FluentTableWriter using map registry 2026-01-06 23:31:26 -05:00
Joseph Doherty ccf70a9857 feat(ExcelIO): add fluent maps for SearchResult models 2026-01-06 23:29:20 -05:00
Joseph Doherty 14fdba2784 feat(Core): add SearchResults models as pure POCOs 2026-01-06 23:27:47 -05:00
Joseph Doherty b48ef586ac feat(ExcelIO): add ExcelMapRegistry for DI integration 2026-01-06 23:23:57 -05:00
Joseph Doherty 45243aa3ca feat(ExcelIO): add ExcelClassMap base class with fluent Map method 2026-01-06 23:23:51 -05:00
Joseph Doherty 48180259d2 feat(ExcelIO): add ColumnBuilder fluent API 2026-01-06 23:22:56 -05:00
Joseph Doherty 6c58394640 feat(ExcelIO): add ExcelFormats constants 2026-01-06 23:22:55 -05:00
Joseph Doherty bfbec425f4 feat(ExcelIO): add ColumnDefinition for fluent mapping 2026-01-06 23:21:28 -05:00
Joseph Doherty 6a8250ef60 docs: update DevEtlRegistry comment for protobuf 2026-01-06 16:44:25 -05:00
Joseph Doherty 81f0c3f289 chore: remove obsolete JSON source files 2026-01-06 16:43:53 -05:00
Joseph Doherty ead3496cdf refactor: migrate all DevEtl files to protobuf source
Replace JsonZstdFileSource with ProtobufZstdFileSource across all 20
DevEtl pipeline files. This removes the need for manually defined
JsonColumnSchema arrays as protobuf files embed their schema.

Changes per file:
- Remove using JdeScoping.DataSync.Dev.Models
- Remove private JsonColumnSchema[] Schema array
- Change CacheFileName from .json.zstd to .pb.zstd
- Change WithSource from JsonZstdFileSource to ProtobufZstdFileSource
2026-01-06 16:42:56 -05:00
Joseph Doherty ca63b674f5 refactor: migrate BranchDevEtl to protobuf source 2026-01-06 16:40:19 -05:00
Joseph Doherty 055406431d feat: add ProtobufZstdFileSource for reading protobuf cache files 2026-01-06 16:39:35 -05:00
Joseph Doherty d503fec7cc deps: add protobuf-net-data to DataSync.Dev 2026-01-06 16:38:47 -05:00