feat: Add call duration to call detail view
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user