Skip to content

Admin interface should display Minor Trace Chemistry data #383

Description

@kbighorse

Summary

Add a read-only admin interface for the legacy NMA_MinorTraceChemistry table in starlette-admin.

Background

The Minor and Trace Chemistry data is legacy data imported from the AMPAPI system. It contains analytical results for various chemical elements and compounds, linked to ChemistrySampleInfo records.

Implementation

  • Read-only view: Create, edit, and delete operations are disabled since this is legacy data
  • Parent association: Uses HasOne field to link to the parent ChemistrySampleInfo record
  • List view: Shows key columns (GlobalID, Chemistry Sample Info, Analyte, Sample Value, Units, Symbol, Analysis Date, Agency)
  • Search: Searchable by analyte, symbol, analysis method, notes, and agency
  • Pagination: 50 records per page with options for 25, 50, 100, 200

Files Changed

  • admin/views/minor_trace_chemistry.py - New admin view class
  • admin/views/__init__.py - Export MinorTraceChemistryAdmin
  • admin/config.py - Register view with admin
  • features/admin/minor_trace_chemistry_admin.feature - BDD feature file
  • tests/test_admin_minor_trace_chemistry.py - Unit tests (14 tests)

Testing

  • All 14 unit tests pass
  • Tests verify: registration, read-only restrictions, list/form field configuration, labels

Related

  • Parent model: ChemistrySampleInfo
  • Similar views: RadionuclidesAdmin, HydraulicsDataAdmin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions