@oronts/vendure-data-hub-plugin 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +6 -2
- package/dashboard/gql/gql.ts +6 -6
- package/dashboard/gql/graphql.ts +9 -4
- package/dashboard/hooks/api/use-pipeline-runs.ts +1 -0
- package/dashboard/hooks/api/use-queues.ts +1 -0
- package/dist/dashboard/components/common/ConnectionConfigEditor.tsx +589 -0
- package/dist/dashboard/components/common/HeadersEditor.tsx +90 -0
- package/dist/dashboard/components/common/ValidationFeedback.tsx +17 -0
- package/dist/dashboard/components/common/index.ts +10 -0
- package/dist/dashboard/components/pipelines/PipelineEditor.tsx +504 -0
- package/dist/dashboard/components/pipelines/PipelineExport.tsx +63 -0
- package/dist/dashboard/components/pipelines/PipelineImport.tsx +87 -0
- package/dist/dashboard/components/pipelines/ReactFlowPipelineEditor.tsx +539 -0
- package/dist/dashboard/components/pipelines/shared/NodePropertiesPanel.tsx +146 -0
- package/dist/dashboard/components/pipelines/shared/PipelineNode.tsx +155 -0
- package/dist/dashboard/components/pipelines/shared/PipelineSettingsPanel.tsx +392 -0
- package/dist/dashboard/components/pipelines/shared/StepListItem.tsx +144 -0
- package/dist/dashboard/components/pipelines/shared/index.ts +33 -0
- package/dist/dashboard/components/pipelines/shared/visual-node-config.ts +169 -0
- package/dist/dashboard/components/shared/LoadMoreButton.tsx +18 -0
- package/dist/dashboard/components/shared/entity-selector/EntitySelector.tsx +59 -0
- package/dist/dashboard/components/shared/entity-selector/index.ts +1 -0
- package/dist/dashboard/components/shared/error-boundary/ErrorBoundary.tsx +90 -0
- package/dist/dashboard/components/shared/error-boundary/index.ts +1 -0
- package/dist/dashboard/components/shared/feedback/EmptyState.tsx +36 -0
- package/dist/dashboard/components/shared/feedback/ErrorState.tsx +69 -0
- package/dist/dashboard/components/shared/feedback/LoadingState.tsx +104 -0
- package/dist/dashboard/components/shared/feedback/ValidationErrorDisplay.tsx +29 -0
- package/dist/dashboard/components/shared/feedback/index.ts +4 -0
- package/dist/dashboard/components/shared/file-dropzone/FileDropzone.tsx +167 -0
- package/dist/dashboard/components/shared/file-dropzone/index.ts +1 -0
- package/dist/dashboard/components/shared/filter-conditions-editor/FilterConditionsEditor.tsx +226 -0
- package/dist/dashboard/components/shared/filter-conditions-editor/index.ts +1 -0
- package/dist/dashboard/components/shared/index.ts +45 -0
- package/dist/dashboard/components/shared/schema-form/SchemaFormRenderer.tsx +248 -0
- package/dist/dashboard/components/shared/schema-form/fields/BooleanField.tsx +26 -0
- package/dist/dashboard/components/shared/schema-form/fields/FieldWrapper.tsx +28 -0
- package/dist/dashboard/components/shared/schema-form/fields/FileUploadField.tsx +171 -0
- package/dist/dashboard/components/shared/schema-form/fields/JsonField.tsx +132 -0
- package/dist/dashboard/components/shared/schema-form/fields/NumberField.tsx +33 -0
- package/dist/dashboard/components/shared/schema-form/fields/SelectField.tsx +70 -0
- package/dist/dashboard/components/shared/schema-form/fields/StringField.tsx +36 -0
- package/dist/dashboard/components/shared/schema-form/fields/TextareaField.tsx +31 -0
- package/dist/dashboard/components/shared/schema-form/fields/index.ts +23 -0
- package/dist/dashboard/components/shared/schema-form/index.ts +2 -0
- package/dist/dashboard/components/shared/schema-form/utils.ts +3 -0
- package/dist/dashboard/components/shared/selectable-card/SelectableCard.tsx +65 -0
- package/dist/dashboard/components/shared/selectable-card/index.ts +1 -0
- package/dist/dashboard/components/shared/stat-card/StatCard.tsx +121 -0
- package/dist/dashboard/components/shared/stat-card/index.ts +1 -0
- package/dist/dashboard/components/shared/step-config/AdapterRequiredWarning.tsx +25 -0
- package/dist/dashboard/components/shared/step-config/AdapterSelector.tsx +109 -0
- package/dist/dashboard/components/shared/step-config/AdvancedEditors.tsx +634 -0
- package/dist/dashboard/components/shared/step-config/EnrichConfigComponent.tsx +295 -0
- package/dist/dashboard/components/shared/step-config/ExtractTestResults.tsx +143 -0
- package/dist/dashboard/components/shared/step-config/GateConfigComponent.tsx +127 -0
- package/dist/dashboard/components/shared/step-config/LoadTestResults.tsx +104 -0
- package/dist/dashboard/components/shared/step-config/OperatorCard.tsx +266 -0
- package/dist/dashboard/components/shared/step-config/OperatorCheatSheetButton.tsx +54 -0
- package/dist/dashboard/components/shared/step-config/OperatorFieldInput.tsx +209 -0
- package/dist/dashboard/components/shared/step-config/RetrySettingsComponent.tsx +111 -0
- package/dist/dashboard/components/shared/step-config/RouteConfigComponent.tsx +125 -0
- package/dist/dashboard/components/shared/step-config/StepConfigPanel.tsx +564 -0
- package/dist/dashboard/components/shared/step-config/StepTester.tsx +165 -0
- package/dist/dashboard/components/shared/step-config/TestResultContainer.tsx +57 -0
- package/dist/dashboard/components/shared/step-config/TransformTestResults.tsx +130 -0
- package/dist/dashboard/components/shared/step-config/ValidateConfigComponent.tsx +334 -0
- package/dist/dashboard/components/shared/step-config/index.ts +29 -0
- package/dist/dashboard/components/shared/step-config/step-test-handlers.ts +297 -0
- package/dist/dashboard/components/shared/trigger-config/TriggerForm.tsx +478 -0
- package/dist/dashboard/components/shared/trigger-config/index.ts +1 -0
- package/dist/dashboard/components/shared/triggers-panel/TriggersPanel.tsx +281 -0
- package/dist/dashboard/components/shared/triggers-panel/index.ts +1 -0
- package/dist/dashboard/components/shared/wizard/ConfigurationNameCard.tsx +59 -0
- package/dist/dashboard/components/shared/wizard/SummaryCard.tsx +53 -0
- package/dist/dashboard/components/shared/wizard/WizardFooter.tsx +47 -0
- package/dist/dashboard/components/shared/wizard/WizardProgressBar.tsx +78 -0
- package/dist/dashboard/components/shared/wizard/index.ts +4 -0
- package/dist/dashboard/components/shared/wizard-trigger/TriggerSchemaFields.tsx +128 -0
- package/dist/dashboard/components/shared/wizard-trigger/TriggerSelector.tsx +33 -0
- package/dist/dashboard/components/shared/wizard-trigger/index.ts +2 -0
- package/dist/dashboard/components/templates/TemplateGallery.tsx +210 -0
- package/dist/dashboard/components/templates/TemplatePreview.tsx +214 -0
- package/dist/dashboard/components/templates/index.ts +4 -0
- package/dist/dashboard/components/wizards/export-wizard/DestinationStep.tsx +207 -0
- package/dist/dashboard/components/wizards/export-wizard/ExportWizard.tsx +221 -0
- package/dist/dashboard/components/wizards/export-wizard/FieldsStep.tsx +159 -0
- package/dist/dashboard/components/wizards/export-wizard/FormatStep.tsx +246 -0
- package/dist/dashboard/components/wizards/export-wizard/ReviewStep.tsx +231 -0
- package/dist/dashboard/components/wizards/export-wizard/SourceStep.tsx +154 -0
- package/dist/dashboard/components/wizards/export-wizard/TriggerStep.tsx +234 -0
- package/dist/dashboard/components/wizards/export-wizard/constants.ts +73 -0
- package/dist/dashboard/components/wizards/export-wizard/index.ts +2 -0
- package/dist/dashboard/components/wizards/export-wizard/types.ts +39 -0
- package/dist/dashboard/components/wizards/import-wizard/ImportWizard.tsx +350 -0
- package/dist/dashboard/components/wizards/import-wizard/MappingStep.tsx +286 -0
- package/dist/dashboard/components/wizards/import-wizard/PreviewStep.tsx +79 -0
- package/dist/dashboard/components/wizards/import-wizard/ReviewStep.tsx +266 -0
- package/dist/dashboard/components/wizards/import-wizard/SourceStep.tsx +537 -0
- package/dist/dashboard/components/wizards/import-wizard/StrategyStep.tsx +328 -0
- package/dist/dashboard/components/wizards/import-wizard/TargetStep.tsx +76 -0
- package/dist/dashboard/components/wizards/import-wizard/TemplateStep.tsx +116 -0
- package/dist/dashboard/components/wizards/import-wizard/TransformStep.tsx +666 -0
- package/dist/dashboard/components/wizards/import-wizard/TriggerStep.tsx +51 -0
- package/dist/dashboard/components/wizards/import-wizard/constants.ts +104 -0
- package/dist/dashboard/components/wizards/import-wizard/index.ts +3 -0
- package/dist/dashboard/components/wizards/import-wizard/types.ts +35 -0
- package/dist/dashboard/components/wizards/index.ts +7 -0
- package/dist/dashboard/components/wizards/shared/WizardStepContainer.tsx +27 -0
- package/dist/dashboard/components/wizards/shared/constants.ts +16 -0
- package/dist/dashboard/components/wizards/shared/index.ts +10 -0
- package/dist/dashboard/constants/colors.ts +25 -0
- package/dist/dashboard/constants/connection-defaults.ts +7 -0
- package/dist/dashboard/constants/connection-types.ts +1 -0
- package/dist/dashboard/constants/defaults.ts +18 -0
- package/dist/dashboard/constants/editor.ts +69 -0
- package/dist/dashboard/constants/enum-maps.ts +18 -0
- package/dist/dashboard/constants/fallbacks.ts +44 -0
- package/dist/dashboard/constants/file-format-registry.ts +206 -0
- package/dist/dashboard/constants/index.ts +24 -0
- package/dist/dashboard/constants/navigation.ts +29 -0
- package/dist/dashboard/constants/permissions.ts +41 -0
- package/dist/dashboard/constants/placeholders.ts +77 -0
- package/dist/dashboard/constants/routes.ts +12 -0
- package/dist/dashboard/constants/run-status.ts +1 -0
- package/dist/dashboard/constants/sentinel-values.ts +12 -0
- package/dist/dashboard/constants/step-configs.ts +9 -0
- package/dist/dashboard/constants/step-mappings.ts +170 -0
- package/dist/dashboard/constants/steps.ts +37 -0
- package/dist/dashboard/constants/toast-messages.ts +149 -0
- package/dist/dashboard/constants/triggers.ts +5 -0
- package/dist/dashboard/constants/ui-config.ts +139 -0
- package/dist/dashboard/constants/ui-dimensions.ts +145 -0
- package/dist/dashboard/constants/ui-states.ts +28 -0
- package/dist/dashboard/constants/ui-types.ts +85 -0
- package/dist/dashboard/constants/validation-patterns.ts +26 -0
- package/dist/dashboard/gql/gql.ts +370 -0
- package/dist/dashboard/gql/graphql.ts +10383 -0
- package/dist/dashboard/gql/index.ts +1 -0
- package/dist/dashboard/hooks/api/index.ts +115 -0
- package/dist/dashboard/hooks/api/mutation-helpers.ts +34 -0
- package/dist/dashboard/hooks/api/use-adapters.ts +92 -0
- package/dist/dashboard/hooks/api/use-config-options.ts +513 -0
- package/dist/dashboard/hooks/api/use-connections.ts +84 -0
- package/dist/dashboard/hooks/api/use-entity-field-schemas.ts +99 -0
- package/dist/dashboard/hooks/api/use-entity-loaders.ts +45 -0
- package/dist/dashboard/hooks/api/use-hooks.ts +68 -0
- package/dist/dashboard/hooks/api/use-logs.ts +102 -0
- package/dist/dashboard/hooks/api/use-pipeline-runs.ts +222 -0
- package/dist/dashboard/hooks/api/use-pipelines.ts +279 -0
- package/dist/dashboard/hooks/api/use-queues.ts +142 -0
- package/dist/dashboard/hooks/api/use-secrets.ts +75 -0
- package/dist/dashboard/hooks/api/use-settings.ts +55 -0
- package/dist/dashboard/hooks/api/use-step-tester.ts +79 -0
- package/dist/dashboard/hooks/index.ts +13 -0
- package/dist/dashboard/hooks/use-adapter-catalog.ts +253 -0
- package/dist/dashboard/hooks/use-export-templates.ts +80 -0
- package/dist/dashboard/hooks/use-import-templates.ts +139 -0
- package/dist/dashboard/hooks/use-load-more.ts +29 -0
- package/dist/dashboard/hooks/use-stable-keys.ts +54 -0
- package/dist/dashboard/hooks/use-trigger-types.ts +100 -0
- package/dist/dashboard/hooks/use-wizard-navigation.ts +128 -0
- package/dist/dashboard/index.tsx +55 -0
- package/dist/dashboard/routes/adapters/AdapterCard.tsx +102 -0
- package/dist/dashboard/routes/adapters/AdapterConstants.tsx +20 -0
- package/dist/dashboard/routes/adapters/AdapterDetail.tsx +208 -0
- package/dist/dashboard/routes/adapters/AdapterTypeSection.tsx +105 -0
- package/dist/dashboard/routes/adapters/AdaptersPage.tsx +276 -0
- package/dist/dashboard/routes/adapters/AdaptersTable.tsx +107 -0
- package/dist/dashboard/routes/adapters/index.ts +1 -0
- package/dist/dashboard/routes/connections/ConnectionDetail.tsx +218 -0
- package/dist/dashboard/routes/connections/ConnectionsList.tsx +34 -0
- package/dist/dashboard/routes/connections/index.ts +2 -0
- package/dist/dashboard/routes/hooks/Hooks.tsx +425 -0
- package/dist/dashboard/routes/hooks/hook-stages.ts +52 -0
- package/dist/dashboard/routes/hooks/index.ts +1 -0
- package/dist/dashboard/routes/index.ts +8 -0
- package/dist/dashboard/routes/logs/Logs.tsx +93 -0
- package/dist/dashboard/routes/logs/components/LogDetailDrawer.tsx +118 -0
- package/dist/dashboard/routes/logs/components/LogExplorerTab.tsx +367 -0
- package/dist/dashboard/routes/logs/components/LogLevelBadge.tsx +34 -0
- package/dist/dashboard/routes/logs/components/LogTableRow.tsx +70 -0
- package/dist/dashboard/routes/logs/components/LogsOverviewTab.tsx +178 -0
- package/dist/dashboard/routes/logs/components/RealtimeLogTab.tsx +122 -0
- package/dist/dashboard/routes/logs/index.ts +1 -0
- package/dist/dashboard/routes/pipelines/ErrorAuditList.tsx +39 -0
- package/dist/dashboard/routes/pipelines/ExportWizardPage.tsx +96 -0
- package/dist/dashboard/routes/pipelines/ImportWizardPage.tsx +104 -0
- package/dist/dashboard/routes/pipelines/PipelineDetail.tsx +211 -0
- package/dist/dashboard/routes/pipelines/PipelineRunsBlock.tsx +377 -0
- package/dist/dashboard/routes/pipelines/PipelinesList.tsx +87 -0
- package/dist/dashboard/routes/pipelines/RetryPatchHelper.tsx +51 -0
- package/dist/dashboard/routes/pipelines/RunDetailsPanel.tsx +238 -0
- package/dist/dashboard/routes/pipelines/RunErrorsList.tsx +116 -0
- package/dist/dashboard/routes/pipelines/StepCounters.tsx +24 -0
- package/dist/dashboard/routes/pipelines/StepSummaryTable.tsx +36 -0
- package/dist/dashboard/routes/pipelines/components/DryRunDialog.tsx +341 -0
- package/dist/dashboard/routes/pipelines/components/PipelineActionButtons.tsx +201 -0
- package/dist/dashboard/routes/pipelines/components/PipelineEditorToggle.tsx +116 -0
- package/dist/dashboard/routes/pipelines/components/PipelineFormFields.tsx +156 -0
- package/dist/dashboard/routes/pipelines/components/PipelineWebhookInfo.tsx +111 -0
- package/dist/dashboard/routes/pipelines/components/ReviewActionsPanel.tsx +342 -0
- package/dist/dashboard/routes/pipelines/components/ValidationPanel.tsx +121 -0
- package/dist/dashboard/routes/pipelines/components/VersionHistoryDialog.tsx +131 -0
- package/dist/dashboard/routes/pipelines/components/index.ts +25 -0
- package/dist/dashboard/routes/pipelines/hooks/index.ts +1 -0
- package/dist/dashboard/routes/pipelines/hooks/use-pipeline-validation.ts +114 -0
- package/dist/dashboard/routes/pipelines/index.ts +4 -0
- package/dist/dashboard/routes/pipelines/utils/index.ts +1 -0
- package/dist/dashboard/routes/pipelines/utils/pipeline-conversion.ts +261 -0
- package/dist/dashboard/routes/queues/ConsumersTable.tsx +134 -0
- package/dist/dashboard/routes/queues/DeadLettersTable.tsx +118 -0
- package/dist/dashboard/routes/queues/FailedRunsTable.tsx +74 -0
- package/dist/dashboard/routes/queues/QueuesPage.tsx +290 -0
- package/dist/dashboard/routes/queues/index.ts +1 -0
- package/dist/dashboard/routes/queues/types.ts +22 -0
- package/dist/dashboard/routes/secrets/SecretDetail.tsx +278 -0
- package/dist/dashboard/routes/secrets/SecretsList.tsx +34 -0
- package/dist/dashboard/routes/secrets/index.ts +2 -0
- package/dist/dashboard/routes/settings/Settings.tsx +343 -0
- package/dist/dashboard/routes/settings/index.ts +1 -0
- package/dist/dashboard/types/index.ts +89 -0
- package/dist/dashboard/types/pipeline.ts +51 -0
- package/dist/dashboard/types/ui-types.ts +400 -0
- package/dist/dashboard/types/wizard.ts +235 -0
- package/dist/dashboard/utils/adapter-grouping.ts +43 -0
- package/dist/dashboard/utils/column-analysis.ts +11 -0
- package/dist/dashboard/utils/field-preparation.ts +31 -0
- package/dist/dashboard/utils/form-validation.ts +373 -0
- package/dist/dashboard/utils/formatters.ts +92 -0
- package/dist/dashboard/utils/icon-resolver.ts +35 -0
- package/dist/dashboard/utils/index.ts +60 -0
- package/dist/dashboard/utils/query-key-factory.ts +54 -0
- package/dist/dashboard/utils/step-helpers.ts +32 -0
- package/dist/dashboard/utils/string-helpers.ts +4 -0
- package/dist/dashboard/utils/template-helpers.ts +26 -0
- package/dist/dashboard/utils/trigger-sync.ts +138 -0
- package/dist/dashboard/utils/wizard-to-pipeline.ts +569 -0
- package/dist/shared/types/adapter-config.types.d.ts +254 -11
- package/dist/shared/types/adapter-config.types.d.ts.map +1 -1
- package/dist/shared/types/index.d.ts +1 -1
- package/dist/shared/types/index.d.ts.map +1 -1
- package/dist/shared/types/index.js.map +1 -1
- package/dist/shared/utils/error.d.ts +5 -0
- package/dist/shared/utils/error.d.ts.map +1 -1
- package/dist/shared/utils/error.js +11 -0
- package/dist/shared/utils/error.js.map +1 -1
- package/dist/src/api/schema/pipeline.schema.d.ts +1 -1
- package/dist/src/api/schema/pipeline.schema.d.ts.map +1 -1
- package/dist/src/api/schema/pipeline.schema.js +2 -0
- package/dist/src/api/schema/pipeline.schema.js.map +1 -1
- package/dist/src/bootstrap/initialization.d.ts.map +1 -1
- package/dist/src/bootstrap/initialization.js +6 -0
- package/dist/src/bootstrap/initialization.js.map +1 -1
- package/dist/src/entities/data/error-record.entity.d.ts +1 -0
- package/dist/src/entities/data/error-record.entity.d.ts.map +1 -1
- package/dist/src/entities/data/error-record.entity.js +4 -0
- package/dist/src/entities/data/error-record.entity.js.map +1 -1
- package/dist/src/gql/generated.d.ts +5 -0
- package/dist/src/gql/generated.d.ts.map +1 -1
- package/dist/src/gql/generated.js.map +1 -1
- package/dist/src/loaders/inventory/inventory.loader.d.ts.map +1 -1
- package/dist/src/loaders/inventory/inventory.loader.js +1 -2
- package/dist/src/loaders/inventory/inventory.loader.js.map +1 -1
- package/dist/src/runtime/executor-types.d.ts +3 -2
- package/dist/src/runtime/executor-types.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/asset-handler.js +1 -1
- package/dist/src/runtime/executors/loaders/asset-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/asset-import-handler.js +1 -1
- package/dist/src/runtime/executors/loaders/asset-import-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/channel-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/channel-handler.js +14 -1
- package/dist/src/runtime/executors/loaders/channel-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/collection-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/collection-handler.js +22 -3
- package/dist/src/runtime/executors/loaders/collection-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/customer-group-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/customer-group-handler.js +8 -1
- package/dist/src/runtime/executors/loaders/customer-group-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/customer-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/customer-handler.js +33 -2
- package/dist/src/runtime/executors/loaders/customer-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/facet-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/facet-handler.js +34 -2
- package/dist/src/runtime/executors/loaders/facet-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/graphql-mutation-handler.js +1 -1
- package/dist/src/runtime/executors/loaders/graphql-mutation-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/inventory-adjust-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/inventory-adjust-handler.js +8 -1
- package/dist/src/runtime/executors/loaders/inventory-adjust-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/inventory-handler.js +3 -3
- package/dist/src/runtime/executors/loaders/inventory-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/loader-handler-registry.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/loader-handler-registry.js +35 -10
- package/dist/src/runtime/executors/loaders/loader-handler-registry.js.map +1 -1
- package/dist/src/runtime/executors/loaders/order-handler.d.ts +1 -1
- package/dist/src/runtime/executors/loaders/order-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/order-handler.js +7 -4
- package/dist/src/runtime/executors/loaders/order-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/payment-method-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/payment-method-handler.js +14 -1
- package/dist/src/runtime/executors/loaders/payment-method-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/product-handler.d.ts +6 -0
- package/dist/src/runtime/executors/loaders/product-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/product-handler.js +31 -13
- package/dist/src/runtime/executors/loaders/product-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/promotion-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/promotion-handler.js +21 -2
- package/dist/src/runtime/executors/loaders/promotion-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/rest-handler.js +1 -1
- package/dist/src/runtime/executors/loaders/rest-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/shared-lookups.d.ts +28 -1
- package/dist/src/runtime/executors/loaders/shared-lookups.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/shared-lookups.js +136 -0
- package/dist/src/runtime/executors/loaders/shared-lookups.js.map +1 -1
- package/dist/src/runtime/executors/loaders/shipping-method-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/shipping-method-handler.js +8 -1
- package/dist/src/runtime/executors/loaders/shipping-method-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/stock-location-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/stock-location-handler.js +8 -1
- package/dist/src/runtime/executors/loaders/stock-location-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/tax-rate-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/tax-rate-handler.js +14 -1
- package/dist/src/runtime/executors/loaders/tax-rate-handler.js.map +1 -1
- package/dist/src/runtime/executors/loaders/types.d.ts +2 -0
- package/dist/src/runtime/executors/loaders/types.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/variant-handler.d.ts +24 -2
- package/dist/src/runtime/executors/loaders/variant-handler.d.ts.map +1 -1
- package/dist/src/runtime/executors/loaders/variant-handler.js +190 -44
- package/dist/src/runtime/executors/loaders/variant-handler.js.map +1 -1
- package/dist/src/runtime/executors/sink-handler-registry.js +2 -2
- package/dist/src/runtime/executors/sink-handler-registry.js.map +1 -1
- package/dist/src/services/data/record-error.service.d.ts +1 -1
- package/dist/src/services/data/record-error.service.d.ts.map +1 -1
- package/dist/src/services/data/record-error.service.js +4 -1
- package/dist/src/services/data/record-error.service.js.map +1 -1
- package/dist/src/services/logger/execution-logger.d.ts +1 -1
- package/dist/src/services/logger/execution-logger.d.ts.map +1 -1
- package/dist/src/services/logger/execution-logger.js +8 -4
- package/dist/src/services/logger/execution-logger.js.map +1 -1
- package/dist/src/services/pipeline/pipeline-runner.service.d.ts.map +1 -1
- package/dist/src/services/pipeline/pipeline-runner.service.js +3 -3
- package/dist/src/services/pipeline/pipeline-runner.service.js.map +1 -1
- package/dist/src/utils/error.utils.d.ts +1 -1
- package/dist/src/utils/error.utils.d.ts.map +1 -1
- package/dist/src/utils/error.utils.js +2 -1
- package/dist/src/utils/error.utils.js.map +1 -1
- package/dist/src/utils/url-security.utils.d.ts +5 -3
- package/dist/src/utils/url-security.utils.d.ts.map +1 -1
- package/dist/src/utils/url-security.utils.js +20 -4
- package/dist/src/utils/url-security.utils.js.map +1 -1
- package/docs/reference/loaders.md +39 -2
- package/package.json +2 -2
- package/shared/types/adapter-config.types.ts +278 -9
- package/shared/types/index.ts +13 -0
- package/shared/utils/error.ts +11 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Input } from '@vendure/dashboard';
|
|
3
|
+
|
|
4
|
+
export function RetryPatchHelper({ onChange }: { onChange: (p: Record<string, unknown>) => void }) {
|
|
5
|
+
const [values, setValues] = React.useState<Record<string, unknown>>({});
|
|
6
|
+
|
|
7
|
+
const handleFieldChange = React.useCallback((key: string, value: string) => {
|
|
8
|
+
setValues(prev => {
|
|
9
|
+
const next = { ...prev, [key]: value };
|
|
10
|
+
onChange(next);
|
|
11
|
+
return next;
|
|
12
|
+
});
|
|
13
|
+
}, [onChange]);
|
|
14
|
+
|
|
15
|
+
const handleSlugChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
|
|
16
|
+
handleFieldChange('slug', e.target.value);
|
|
17
|
+
}, [handleFieldChange]);
|
|
18
|
+
|
|
19
|
+
const handleSkuChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
|
|
20
|
+
handleFieldChange('sku', e.target.value);
|
|
21
|
+
}, [handleFieldChange]);
|
|
22
|
+
|
|
23
|
+
const handleCodeChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
|
|
24
|
+
handleFieldChange('code', e.target.value);
|
|
25
|
+
}, [handleFieldChange]);
|
|
26
|
+
|
|
27
|
+
const handleNameChange = React.useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
|
|
28
|
+
handleFieldChange('name', e.target.value);
|
|
29
|
+
}, [handleFieldChange]);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className="grid grid-cols-2 md:grid-cols-4 gap-2">
|
|
33
|
+
<div>
|
|
34
|
+
<label htmlFor="retry-slug" className="text-xs text-muted-foreground">slug</label>
|
|
35
|
+
<Input id="retry-slug" value={String(values.slug ?? '')} onChange={handleSlugChange} />
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<label htmlFor="retry-sku" className="text-xs text-muted-foreground">sku</label>
|
|
39
|
+
<Input id="retry-sku" value={String(values.sku ?? '')} onChange={handleSkuChange} />
|
|
40
|
+
</div>
|
|
41
|
+
<div>
|
|
42
|
+
<label htmlFor="retry-code" className="text-xs text-muted-foreground">code</label>
|
|
43
|
+
<Input id="retry-code" value={String(values.code ?? '')} onChange={handleCodeChange} />
|
|
44
|
+
</div>
|
|
45
|
+
<div>
|
|
46
|
+
<label htmlFor="retry-name" className="text-xs text-muted-foreground">name</label>
|
|
47
|
+
<Input id="retry-name" value={String(values.name ?? '')} onChange={handleNameChange} />
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Dialog,
|
|
5
|
+
DialogContent,
|
|
6
|
+
DialogDescription,
|
|
7
|
+
DialogFooter,
|
|
8
|
+
DialogHeader,
|
|
9
|
+
DialogTitle,
|
|
10
|
+
PermissionGuard,
|
|
11
|
+
Json,
|
|
12
|
+
} from '@vendure/dashboard';
|
|
13
|
+
import { Link } from '@tanstack/react-router';
|
|
14
|
+
import { toast } from 'sonner';
|
|
15
|
+
import { ScrollText } from 'lucide-react';
|
|
16
|
+
import { formatDateTime } from '../../utils';
|
|
17
|
+
import { DATAHUB_PERMISSIONS, RUN_STATUS, ROUTES, TOAST_PIPELINE } from '../../constants';
|
|
18
|
+
import {
|
|
19
|
+
usePipelineRun,
|
|
20
|
+
useRunErrors,
|
|
21
|
+
useRetryError,
|
|
22
|
+
useApproveGate,
|
|
23
|
+
useRejectGate,
|
|
24
|
+
handleMutationError,
|
|
25
|
+
} from '../../hooks';
|
|
26
|
+
import { StepCounters } from './StepCounters';
|
|
27
|
+
import { StepSummaryTable } from './StepSummaryTable';
|
|
28
|
+
import { RunErrorsList } from './RunErrorsList';
|
|
29
|
+
import type {
|
|
30
|
+
IndividualRunMetrics,
|
|
31
|
+
StepMetricsDetail,
|
|
32
|
+
RunDetailsPanelProps,
|
|
33
|
+
} from '../../types';
|
|
34
|
+
|
|
35
|
+
function findPausedGateStep(metrics: IndividualRunMetrics): string | undefined {
|
|
36
|
+
const details = metrics.details;
|
|
37
|
+
if (!Array.isArray(details)) return undefined;
|
|
38
|
+
const gateStep = details.find(
|
|
39
|
+
(d: StepMetricsDetail) => d.type === 'GATE' && (d as Record<string, unknown>).paused === true,
|
|
40
|
+
);
|
|
41
|
+
return gateStep?.stepKey;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function RunDetailsPanel({ runId, initialData, onCancel, onRerun, isCancelling }: RunDetailsPanelProps) {
|
|
45
|
+
const [cancelDialogOpen, setCancelDialogOpen] = React.useState(false);
|
|
46
|
+
const { data: runData, refetch, isFetching } = usePipelineRun(runId);
|
|
47
|
+
const { data: errors } = useRunErrors(runId);
|
|
48
|
+
const retryError = useRetryError();
|
|
49
|
+
const approveGate = useApproveGate();
|
|
50
|
+
const rejectGate = useRejectGate();
|
|
51
|
+
|
|
52
|
+
const run = runData;
|
|
53
|
+
const status = run?.status ?? initialData.status;
|
|
54
|
+
const metrics: IndividualRunMetrics = (run?.metrics as IndividualRunMetrics) ?? initialData.metrics ?? {};
|
|
55
|
+
const processed = Number(metrics.processed ?? 0);
|
|
56
|
+
const succeeded = Number(metrics.succeeded ?? 0);
|
|
57
|
+
const failed = Number(metrics.failed ?? 0);
|
|
58
|
+
const summary = `${processed} processed • ${succeeded} succeeded • ${failed} failed`;
|
|
59
|
+
|
|
60
|
+
const pausedGateStepKey = status === RUN_STATUS.PAUSED ? findPausedGateStep(metrics) : undefined;
|
|
61
|
+
|
|
62
|
+
const handleRetry = React.useCallback(async (errorId: string, patch: Record<string, unknown>) => {
|
|
63
|
+
try {
|
|
64
|
+
await retryError.mutateAsync({ errorId, patch });
|
|
65
|
+
toast.success(TOAST_PIPELINE.RECORD_RETRY_QUEUED);
|
|
66
|
+
} catch (err) {
|
|
67
|
+
handleMutationError('retry record', err);
|
|
68
|
+
}
|
|
69
|
+
}, [retryError.mutateAsync]);
|
|
70
|
+
|
|
71
|
+
const handleCancel = React.useCallback(() => {
|
|
72
|
+
setCancelDialogOpen(true);
|
|
73
|
+
}, []);
|
|
74
|
+
|
|
75
|
+
const handleConfirmCancel = React.useCallback(() => {
|
|
76
|
+
onCancel(run?.id ?? runId);
|
|
77
|
+
setCancelDialogOpen(false);
|
|
78
|
+
}, [onCancel, run?.id, runId]);
|
|
79
|
+
|
|
80
|
+
const handleRerun = React.useCallback(() => {
|
|
81
|
+
const pipelineId = run?.pipeline?.id;
|
|
82
|
+
if (pipelineId) {
|
|
83
|
+
onRerun(String(pipelineId));
|
|
84
|
+
}
|
|
85
|
+
}, [onRerun, run?.pipeline?.id]);
|
|
86
|
+
|
|
87
|
+
const handleApproveGate = React.useCallback(async () => {
|
|
88
|
+
if (!pausedGateStepKey) return;
|
|
89
|
+
try {
|
|
90
|
+
const result = await approveGate.mutateAsync({ runId: run?.id ?? runId, stepKey: pausedGateStepKey });
|
|
91
|
+
if (result?.success) {
|
|
92
|
+
toast.success(TOAST_PIPELINE.GATE_APPROVED);
|
|
93
|
+
} else {
|
|
94
|
+
toast.error(result?.message ?? TOAST_PIPELINE.GATE_APPROVE_ERROR);
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
handleMutationError('approve gate', err);
|
|
98
|
+
}
|
|
99
|
+
}, [approveGate.mutateAsync, run?.id, runId, pausedGateStepKey]);
|
|
100
|
+
|
|
101
|
+
const handleRejectGate = React.useCallback(async () => {
|
|
102
|
+
if (!pausedGateStepKey) return;
|
|
103
|
+
try {
|
|
104
|
+
const result = await rejectGate.mutateAsync({ runId: run?.id ?? runId, stepKey: pausedGateStepKey });
|
|
105
|
+
if (result?.success) {
|
|
106
|
+
toast.success(TOAST_PIPELINE.GATE_REJECTED);
|
|
107
|
+
} else {
|
|
108
|
+
toast.error(result?.message ?? TOAST_PIPELINE.GATE_REJECT_ERROR);
|
|
109
|
+
}
|
|
110
|
+
} catch (err) {
|
|
111
|
+
handleMutationError('reject gate', err);
|
|
112
|
+
}
|
|
113
|
+
}, [rejectGate.mutateAsync, run?.id, runId, pausedGateStepKey]);
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<div className="p-4 space-y-4" data-testid="datahub-run-details-panel">
|
|
117
|
+
<div className="flex items-center justify-between">
|
|
118
|
+
<div className="text-sm">Status: {status}</div>
|
|
119
|
+
<Button variant="ghost" size="sm" onClick={() => refetch()} disabled={isFetching} data-testid="datahub-run-details-refresh-button">
|
|
120
|
+
Refresh
|
|
121
|
+
</Button>
|
|
122
|
+
</div>
|
|
123
|
+
<div className="text-sm text-muted-foreground">{summary}</div>
|
|
124
|
+
<div className="flex items-center justify-between">
|
|
125
|
+
<div className="text-xs text-muted-foreground">Started by: {run?.startedByUserId ?? '—'}</div>
|
|
126
|
+
<Button variant="outline" size="sm" className="gap-1.5" asChild>
|
|
127
|
+
<Link to={`${ROUTES.LOGS}?runId=${runId}`} aria-label="View logs for this run">
|
|
128
|
+
<ScrollText className="h-3.5 w-3.5" />
|
|
129
|
+
View Logs
|
|
130
|
+
</Link>
|
|
131
|
+
</Button>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
{status === RUN_STATUS.PAUSED && pausedGateStepKey && (
|
|
135
|
+
<div className="rounded-md border border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-950/30 p-3 space-y-2" data-testid="datahub-gate-approval-panel">
|
|
136
|
+
<div className="text-sm font-medium text-amber-800 dark:text-amber-400">
|
|
137
|
+
Gate step "{pausedGateStepKey}" is awaiting approval
|
|
138
|
+
</div>
|
|
139
|
+
<div className="flex gap-2">
|
|
140
|
+
<PermissionGuard requires={[DATAHUB_PERMISSIONS.RUN_PIPELINE]}>
|
|
141
|
+
<Button
|
|
142
|
+
variant="default"
|
|
143
|
+
size="sm"
|
|
144
|
+
onClick={handleApproveGate}
|
|
145
|
+
disabled={approveGate.isPending || rejectGate.isPending}
|
|
146
|
+
data-testid="datahub-gate-approve-button"
|
|
147
|
+
>
|
|
148
|
+
{approveGate.isPending ? 'Approving...' : 'Approve & Resume'}
|
|
149
|
+
</Button>
|
|
150
|
+
<Button
|
|
151
|
+
variant="destructive"
|
|
152
|
+
size="sm"
|
|
153
|
+
onClick={handleRejectGate}
|
|
154
|
+
disabled={approveGate.isPending || rejectGate.isPending}
|
|
155
|
+
data-testid="datahub-gate-reject-button"
|
|
156
|
+
>
|
|
157
|
+
{rejectGate.isPending ? 'Rejecting...' : 'Reject & Cancel'}
|
|
158
|
+
</Button>
|
|
159
|
+
</PermissionGuard>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
)}
|
|
163
|
+
|
|
164
|
+
<StepCounters metrics={metrics} />
|
|
165
|
+
<StepSummaryTable metrics={metrics} />
|
|
166
|
+
|
|
167
|
+
<div>
|
|
168
|
+
<div className="text-sm font-medium mb-1">Metrics</div>
|
|
169
|
+
<Json value={run?.metrics ?? initialData.metrics ?? {}} />
|
|
170
|
+
</div>
|
|
171
|
+
<div className="text-sm">
|
|
172
|
+
<div className="text-sm font-medium mb-1">Started</div>
|
|
173
|
+
<div>{formatDateTime(run?.startedAt ?? initialData.startedAt)}</div>
|
|
174
|
+
</div>
|
|
175
|
+
<div className="text-sm">
|
|
176
|
+
<div className="text-sm font-medium mb-1">Finished</div>
|
|
177
|
+
<div>{formatDateTime(run?.finishedAt ?? initialData.finishedAt)}</div>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
{run?.error && (
|
|
181
|
+
<div className="text-sm">
|
|
182
|
+
<div className="text-sm font-medium mb-1">Error</div>
|
|
183
|
+
<pre className="bg-muted p-3 rounded text-xs overflow-auto">{String(run.error)}</pre>
|
|
184
|
+
</div>
|
|
185
|
+
)}
|
|
186
|
+
|
|
187
|
+
{(status === RUN_STATUS.RUNNING || status === RUN_STATUS.PENDING) && (
|
|
188
|
+
<Button variant="secondary" onClick={handleCancel} disabled={isCancelling} data-testid="datahub-run-details-cancel-button">
|
|
189
|
+
Cancel run
|
|
190
|
+
</Button>
|
|
191
|
+
)}
|
|
192
|
+
|
|
193
|
+
{run?.pipeline?.id && (
|
|
194
|
+
<Button variant="outline" onClick={handleRerun} data-testid="datahub-run-details-rerun-button">
|
|
195
|
+
Re-run
|
|
196
|
+
</Button>
|
|
197
|
+
)}
|
|
198
|
+
|
|
199
|
+
<div className="mt-4">
|
|
200
|
+
<div className="text-sm font-medium mb-1">Record errors</div>
|
|
201
|
+
<div className="text-sm text-muted-foreground mb-2">Failed records captured during this run</div>
|
|
202
|
+
<PermissionGuard requires={[DATAHUB_PERMISSIONS.VIEW_QUARANTINE]}>
|
|
203
|
+
<RunErrorsList
|
|
204
|
+
runId={runId}
|
|
205
|
+
items={errors ?? []}
|
|
206
|
+
onRetry={handleRetry}
|
|
207
|
+
/>
|
|
208
|
+
</PermissionGuard>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<Dialog open={cancelDialogOpen} onOpenChange={setCancelDialogOpen}>
|
|
212
|
+
<DialogContent className="max-w-md">
|
|
213
|
+
<DialogHeader>
|
|
214
|
+
<DialogTitle>Cancel Pipeline Run</DialogTitle>
|
|
215
|
+
<DialogDescription>
|
|
216
|
+
This will request cancellation of the running pipeline. This action cannot be undone.
|
|
217
|
+
</DialogDescription>
|
|
218
|
+
</DialogHeader>
|
|
219
|
+
<DialogFooter>
|
|
220
|
+
<Button
|
|
221
|
+
variant="outline"
|
|
222
|
+
onClick={() => setCancelDialogOpen(false)}
|
|
223
|
+
>
|
|
224
|
+
Keep Running
|
|
225
|
+
</Button>
|
|
226
|
+
<Button
|
|
227
|
+
variant="destructive"
|
|
228
|
+
onClick={handleConfirmCancel}
|
|
229
|
+
disabled={isCancelling}
|
|
230
|
+
>
|
|
231
|
+
{isCancelling ? 'Cancelling...' : 'Cancel Run'}
|
|
232
|
+
</Button>
|
|
233
|
+
</DialogFooter>
|
|
234
|
+
</DialogContent>
|
|
235
|
+
</Dialog>
|
|
236
|
+
</div>
|
|
237
|
+
);
|
|
238
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
PermissionGuard,
|
|
5
|
+
Json,
|
|
6
|
+
} from '@vendure/dashboard';
|
|
7
|
+
import { toast } from 'sonner';
|
|
8
|
+
import { DATAHUB_PERMISSIONS, TOAST_PIPELINE } from '../../constants';
|
|
9
|
+
import { RetryPatchHelper } from './RetryPatchHelper';
|
|
10
|
+
import { ErrorAuditList } from './ErrorAuditList';
|
|
11
|
+
import type { RunErrorsListProps } from '../../types';
|
|
12
|
+
|
|
13
|
+
interface ErrorRowProps {
|
|
14
|
+
item: { id: string; stepKey?: string | null; message?: string | null; payload?: unknown };
|
|
15
|
+
onStartEditing: (itemId: string) => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function ErrorRow({ item, onStartEditing }: ErrorRowProps) {
|
|
19
|
+
const handleClick = React.useCallback(() => {
|
|
20
|
+
onStartEditing(item.id);
|
|
21
|
+
}, [onStartEditing, item.id]);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<tr className="border-t align-top">
|
|
25
|
+
<td className="px-2 py-1 font-mono text-muted-foreground">{item.stepKey}</td>
|
|
26
|
+
<td className="px-2 py-1">{item.message}</td>
|
|
27
|
+
<td className="px-2 py-1 align-top">
|
|
28
|
+
<Json value={item.payload} />
|
|
29
|
+
<ErrorAuditList errorId={item.id} />
|
|
30
|
+
</td>
|
|
31
|
+
<td className="px-2 py-1 align-top">
|
|
32
|
+
<PermissionGuard requires={[DATAHUB_PERMISSIONS.REPLAY_RECORD]}>
|
|
33
|
+
<Button variant="outline" size="sm" onClick={handleClick} data-testid="datahub-error-retry-button">
|
|
34
|
+
Retry with patch
|
|
35
|
+
</Button>
|
|
36
|
+
</PermissionGuard>
|
|
37
|
+
</td>
|
|
38
|
+
</tr>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function RunErrorsList({ runId: _runId, items, onRetry }: RunErrorsListProps) {
|
|
43
|
+
const [editing, setEditing] = React.useState<{ id: string; patch: string } | null>(null);
|
|
44
|
+
|
|
45
|
+
const handleStartEditing = React.useCallback((itemId: string) => {
|
|
46
|
+
setEditing({ id: itemId, patch: '{}' });
|
|
47
|
+
}, []);
|
|
48
|
+
|
|
49
|
+
const handlePatchChange = React.useCallback((e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
|
50
|
+
setEditing(prev => prev ? { ...prev, patch: e.target.value } : null);
|
|
51
|
+
}, []);
|
|
52
|
+
|
|
53
|
+
const handlePatchHelperChange = React.useCallback((p: Record<string, unknown>) => {
|
|
54
|
+
setEditing(prev => prev ? { ...prev, patch: JSON.stringify(p, null, 2) } : null);
|
|
55
|
+
}, []);
|
|
56
|
+
|
|
57
|
+
const handleRetryClick = React.useCallback(async () => {
|
|
58
|
+
if (!editing) return;
|
|
59
|
+
try {
|
|
60
|
+
const patch = JSON.parse(editing.patch);
|
|
61
|
+
await onRetry(editing.id, patch);
|
|
62
|
+
setEditing(null);
|
|
63
|
+
} catch {
|
|
64
|
+
toast.error(TOAST_PIPELINE.INVALID_JSON_PATCH);
|
|
65
|
+
}
|
|
66
|
+
}, [editing, onRetry]);
|
|
67
|
+
|
|
68
|
+
const handleCancelEditing = React.useCallback(() => {
|
|
69
|
+
setEditing(null);
|
|
70
|
+
}, []);
|
|
71
|
+
|
|
72
|
+
if (items.length === 0) {
|
|
73
|
+
return <div className="text-sm text-muted-foreground">No record errors</div>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div className="space-y-2">
|
|
78
|
+
<table className="w-full text-sm">
|
|
79
|
+
<thead>
|
|
80
|
+
<tr className="bg-muted">
|
|
81
|
+
<th className="text-left px-2 py-1">Step</th>
|
|
82
|
+
<th className="text-left px-2 py-1">Message</th>
|
|
83
|
+
<th className="text-left px-2 py-1">Payload</th>
|
|
84
|
+
<th className="text-left px-2 py-1">Actions</th>
|
|
85
|
+
</tr>
|
|
86
|
+
</thead>
|
|
87
|
+
<tbody>
|
|
88
|
+
{items.map(item => (
|
|
89
|
+
<ErrorRow
|
|
90
|
+
key={item.id}
|
|
91
|
+
item={item}
|
|
92
|
+
onStartEditing={handleStartEditing}
|
|
93
|
+
/>
|
|
94
|
+
))}
|
|
95
|
+
</tbody>
|
|
96
|
+
</table>
|
|
97
|
+
{editing && (
|
|
98
|
+
<div className="border rounded p-2 space-y-2">
|
|
99
|
+
<div className="text-sm font-medium">Patch JSON</div>
|
|
100
|
+
<textarea
|
|
101
|
+
className="w-full h-32 font-mono p-2 border rounded"
|
|
102
|
+
value={editing.patch}
|
|
103
|
+
onChange={handlePatchChange}
|
|
104
|
+
/>
|
|
105
|
+
<RetryPatchHelper onChange={handlePatchHelperChange} />
|
|
106
|
+
<div className="flex items-center gap-2">
|
|
107
|
+
<Button size="sm" onClick={handleRetryClick}>
|
|
108
|
+
Retry
|
|
109
|
+
</Button>
|
|
110
|
+
<Button variant="ghost" size="sm" onClick={handleCancelEditing}>Cancel</Button>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
)}
|
|
114
|
+
</div>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { IndividualRunMetrics, StepMetricsDetail } from '../../types';
|
|
3
|
+
|
|
4
|
+
export function StepCounters({ metrics }: { metrics: IndividualRunMetrics }) {
|
|
5
|
+
const details: StepMetricsDetail[] = Array.isArray(metrics?.details) ? metrics.details : [];
|
|
6
|
+
const countersObj = details.find(x => x && typeof x === 'object' && x.counters);
|
|
7
|
+
if (!countersObj?.counters) return null;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className="mt-2">
|
|
11
|
+
<div className="text-sm font-medium mb-1">Counters</div>
|
|
12
|
+
<table className="text-sm">
|
|
13
|
+
<tbody>
|
|
14
|
+
{Object.entries(countersObj.counters).map(([k, v]) => (
|
|
15
|
+
<tr key={k}>
|
|
16
|
+
<td className="pr-3 text-muted-foreground">{k}</td>
|
|
17
|
+
<td>{String(v)}</td>
|
|
18
|
+
</tr>
|
|
19
|
+
))}
|
|
20
|
+
</tbody>
|
|
21
|
+
</table>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { IndividualRunMetrics, StepMetricsDetail } from '../../types';
|
|
3
|
+
|
|
4
|
+
export function StepSummaryTable({ metrics }: { metrics: IndividualRunMetrics }) {
|
|
5
|
+
const details: StepMetricsDetail[] = Array.isArray(metrics?.details) ? metrics.details : [];
|
|
6
|
+
if (!details.length) return null;
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<div className="mt-2">
|
|
10
|
+
<div className="text-sm font-medium mb-1">Step summary</div>
|
|
11
|
+
<table className="w-full text-sm">
|
|
12
|
+
<thead>
|
|
13
|
+
<tr className="bg-muted">
|
|
14
|
+
<th className="text-left px-2 py-1">Step</th>
|
|
15
|
+
<th className="text-left px-2 py-1">Type</th>
|
|
16
|
+
<th className="text-left px-2 py-1">Adapter</th>
|
|
17
|
+
<th className="text-left px-2 py-1">Out/OK/Fail</th>
|
|
18
|
+
<th className="text-left px-2 py-1">Duration</th>
|
|
19
|
+
</tr>
|
|
20
|
+
</thead>
|
|
21
|
+
<tbody>
|
|
22
|
+
{/* stepKey is unique within a run, safe to use as key */}
|
|
23
|
+
{details.map((s) => (
|
|
24
|
+
<tr key={s.stepKey} className="border-t">
|
|
25
|
+
<td className="px-2 py-1 font-mono text-muted-foreground">{s.stepKey}</td>
|
|
26
|
+
<td className="px-2 py-1">{s.type}</td>
|
|
27
|
+
<td className="px-2 py-1">{s.adapterCode ?? '—'}</td>
|
|
28
|
+
<td className="px-2 py-1">{s.ok ?? 0}{typeof s.fail === 'number' ? ` / ${s.fail}` : ''}</td>
|
|
29
|
+
<td className="px-2 py-1">{typeof s.durationMs === 'number' ? `${s.durationMs} ms` : '—'}</td>
|
|
30
|
+
</tr>
|
|
31
|
+
))}
|
|
32
|
+
</tbody>
|
|
33
|
+
</table>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|