Skip to content

Conditionally show File Path and Page Size columns/fields based on connector capabilities #352

@JayVDZ

Description

@JayVDZ

Problem

The Run Profiles tab shows File Path and Page Size columns/fields regardless of whether the connector supports them. Additionally, the Create Run Profile dialog shows the File Path field for all connectors when the run type is an import or export.

  • File Path is only relevant for file-based connectors (e.g. CSV/File Connector). Call-based connectors (e.g. LDAP) ignore it entirely.
  • Page Size is only meaningful for call-based connectors that support pagination. File-based connectors always import/export everything in a single batch.

Current Behaviour

Run Profiles table: File Path and Page Size columns are always shown, even when they're not relevant to the connector type. This adds visual clutter (File Path shows "-" for all LDAP run profiles, Page Size is meaningless for CSV connectors).

Create Run Profile dialog: File Path field visibility is based purely on run type, not connector type:

@if (_newRunProfile.RunType == ConnectedSystemRunType.FullImport ||
     _newRunProfile.RunType == ConnectedSystemRunType.DeltaImport ||
     _newRunProfile.RunType == ConnectedSystemRunType.Export)

Proposed Solution

Add capability flags to IConnectorCapabilities and ConnectorDefinition:

  • SupportsFilePath (or IsFileBased) — true for file-based connectors, false for call-based
  • Consider whether PageSize needs its own flag, or if it's simply the inverse of SupportsFilePath

Changes required:

  1. Model/interface — Add new property to IConnectorCapabilities and ConnectorDefinition
  2. DB migration — Add column to ConnectorDefinitions table
  3. Seed data — Set flag appropriately for built-in connectors (File: true, LDAP: false)
  4. All connector implementations — Implement new capability property
  5. Run Profiles table — Conditionally show/hide File Path and Page Size columns (same pattern as the Partition column, which already uses ConnectedSystem.ConnectorDefinition.SupportsPartitions)
  6. Create Run Profile dialog — Check both run type and capability flag before showing File Path/Page Size fields

Note on Partition column

The Partition column has already been updated to conditionally show/hide based on ConnectorDefinition.SupportsPartitions — this issue extends the same pattern to File Path and Page Size.

Locations

  • src/JIM.Web/Pages/Admin/Components/ConnectedSystemRunProfilesTab.razor
  • src/JIM.Models/Interfaces/IConnectorCapabilities.cs
  • src/JIM.Models/Staging/ConnectorDefinition.cs
  • src/JIM.Connectors/File/FileConnector.cs
  • src/JIM.Connectors/LDAP/LdapConnector.cs
  • src/JIM.PostgresData/ (migration)
  • src/JIM.Application/Servers/SeedingServer.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions