Enhanced Textual TUI with proper API usage and documentation
- Fixed DataTable row selection and event handling - Added explicit column keys to prevent auto-generated keys - Implemented row-to-flow mapping for reliable selection tracking - Converted left metrics panel to horizontal top bar - Fixed all missing FlowStats/EnhancedAnalysisData attributes - Created comprehensive Textual API documentation in Documentation/textual/ - Added validation checklist to prevent future API mismatches - Preserved cursor position during data refreshes - Fixed RowKey type handling and event names The TUI now properly handles flow selection, displays metrics in a compact top bar, and correctly correlates selected rows with the details pane.
This commit is contained in:
@@ -53,6 +53,10 @@ class EnhancedAnalysisData:
|
||||
# Decoded Frame Data Storage
|
||||
sample_decoded_fields: Dict[str, any] = field(default_factory=dict) # Sample of actual decoded fields for display
|
||||
available_field_names: List[str] = field(default_factory=list) # List of all available field names from decoder
|
||||
field_count: int = 0 # Total number of fields decoded
|
||||
frame_types: Set[str] = field(default_factory=set) # Set of unique frame types encountered
|
||||
timing_accuracy: float = 0.0 # Timing accuracy percentage
|
||||
signal_quality: float = 0.0 # Signal quality percentage
|
||||
|
||||
@dataclass
|
||||
class FlowStats:
|
||||
@@ -75,4 +79,8 @@ class FlowStats:
|
||||
protocols: Set[str] = field(default_factory=set)
|
||||
detected_protocol_types: Set[str] = field(default_factory=set) # Enhanced protocol detection (CH10, PTP, IENA, etc)
|
||||
frame_types: Dict[str, FrameTypeStats] = field(default_factory=dict) # Per-frame-type statistics
|
||||
enhanced_analysis: EnhancedAnalysisData = field(default_factory=EnhancedAnalysisData) # Enhanced decoder analysis
|
||||
enhanced_analysis: EnhancedAnalysisData = field(default_factory=EnhancedAnalysisData) # Enhanced decoder analysis
|
||||
first_seen: float = 0.0 # Timestamp of the first frame in this flow
|
||||
last_seen: float = 0.0 # Timestamp of the last frame in this flow
|
||||
duration: float = 0.0 # Duration of the flow in seconds
|
||||
jitter: float = 0.0 # Network jitter measurement
|
||||
Reference in New Issue
Block a user