feat: Add call duration to call detail view

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-19 15:02:27 +01:00
parent bdd6cbf72a
commit 854cf926ed
3 changed files with 18 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"strconv"
"strings"
"time"
"telephony-inspector/internal/capture"
"telephony-inspector/internal/config"
@@ -713,6 +714,11 @@ func (m Model) renderCallDetail() string {
b.WriteString(fmt.Sprintf("From: %s\n", flow.From))
b.WriteString(fmt.Sprintf("To: %s\n", flow.To))
b.WriteString(fmt.Sprintf("State: %s\n", flow.State))
// Calculate and display duration
duration := flow.EndTime.Sub(flow.StartTime)
b.WriteString(fmt.Sprintf("Duration: %s\n", duration.Round(time.Millisecond)))
b.WriteString(fmt.Sprintf("Packets: %d\n\n", len(flow.Packets)))
// Network Summary Section