Enhanced TUI with split flow details and timing analysis
- Added ΔT (deltaT), σ (sigma), and outlier count columns to flow table - Split right panel into top (main flow) and bottom (sub-flow) sections - Removed inner panel borders for clean 3-panel layout - Added sub-flow selection logic with detailed timing statistics - Implemented per-frame-type timing analysis in sub-flow details - Color-coded outliers and timing data for quick visual assessment
This commit is contained in:
@@ -19,7 +19,7 @@ import time
|
||||
from .widgets.sparkline import SparklineWidget
|
||||
from .widgets.metric_card import MetricCard
|
||||
from .widgets.flow_table_v2 import EnhancedFlowTable
|
||||
from .widgets.flow_details import FlowDetailsPanel
|
||||
from .widgets.split_flow_details import FlowMainDetailsPanel, SubFlowDetailsPanel
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ...analysis.core import EthernetAnalyzer
|
||||
@@ -90,20 +90,19 @@ class StreamLensAppV2(App):
|
||||
yield MetricCard("Enhanced", f"{self.enhanced_flows}", color="success", id="enhanced-metric")
|
||||
yield MetricCard("Outliers", f"{self.outlier_count}", color="warning" if self.outlier_count > 0 else "normal", id="outliers-metric")
|
||||
|
||||
# Main content area with horizontal split
|
||||
# Main content area with 3 clean panels
|
||||
with Horizontal(id="content-area"):
|
||||
# Left - Enhanced flow table (wider)
|
||||
with Vertical(id="left-panel", classes="panel-wide"):
|
||||
yield EnhancedFlowTable(
|
||||
self.analyzer,
|
||||
id="flow-table"
|
||||
)
|
||||
# Left - Enhanced flow table
|
||||
yield EnhancedFlowTable(
|
||||
self.analyzer,
|
||||
id="flow-table",
|
||||
classes="panel-wide"
|
||||
)
|
||||
|
||||
# Right - Selected flow details
|
||||
with Vertical(id="right-panel", classes="panel"):
|
||||
yield FlowDetailsPanel(
|
||||
id="flow-details"
|
||||
)
|
||||
# Right top - Main flow details
|
||||
with Vertical(id="right-panels"):
|
||||
yield FlowMainDetailsPanel(id="main-flow-details")
|
||||
yield SubFlowDetailsPanel(id="sub-flow-details")
|
||||
|
||||
yield Footer()
|
||||
|
||||
@@ -241,8 +240,13 @@ class StreamLensAppV2(App):
|
||||
def on_enhanced_flow_table_flow_selected(self, event: EnhancedFlowTable.FlowSelected) -> None:
|
||||
"""Handle flow selection events"""
|
||||
if event.flow:
|
||||
details_panel = self.query_one("#flow-details", FlowDetailsPanel)
|
||||
details_panel.update_flow(event.flow)
|
||||
# Update main flow details panel
|
||||
main_panel = self.query_one("#main-flow-details", FlowMainDetailsPanel)
|
||||
main_panel.update_flow(event.flow)
|
||||
|
||||
# Update sub-flow details panel
|
||||
sub_panel = self.query_one("#sub-flow-details", SubFlowDetailsPanel)
|
||||
sub_panel.update_flow(event.flow, event.subflow_type)
|
||||
|
||||
|
||||
def _format_bytes_per_sec(self, bps: float) -> str:
|
||||
|
||||
Reference in New Issue
Block a user