From b2ff043923f369a8b4eddd5862d86dc62e5516fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Luis=20Monta=C3=B1es=20Ojados?= Date: Mon, 19 Jan 2026 21:49:04 +0100 Subject: [PATCH] feat: Add timestamp to export filename and include network context --- internal/tui/model.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/tui/model.go b/internal/tui/model.go index 6685925..7b4a612 100644 --- a/internal/tui/model.go +++ b/internal/tui/model.go @@ -630,7 +630,8 @@ func (m *Model) updateSubView(msg tea.Msg) (tea.Model, tea.Cmd) { safeCallID = strings.ReplaceAll(safeCallID, ":", "_") safeCallID = strings.ReplaceAll(safeCallID, "\\", "_") - filename := fmt.Sprintf("export_%s.log", safeCallID) + timestamp := time.Now().Format("20060102_150405") + filename := fmt.Sprintf("export_%s_%s.log", timestamp, safeCallID) err := m.exportCallToLog(flow, filename) if err != nil { m.captureError = fmt.Sprintf("Export failed: %v", err) @@ -1480,6 +1481,15 @@ func (m *Model) exportCallToLog(flow *sip.CallFlow, filename string) error { fmt.Fprintf(f, " Destination: %s (%s:%d)\n\n", dstLabel, first.DestIP, first.DestPort) } + // Network Map Context + if len(m.networkMap.Nodes) > 0 { + fmt.Fprintf(f, "Network Context:\n") + for _, node := range m.networkMap.Nodes { + fmt.Fprintf(f, " - %s (%s): %s\n", node.Name, node.Type, node.IP) + } + fmt.Fprintf(f, "\n") + } + // Transaction Flow fmt.Fprintf(f, "Transaction Flow:\n") fmt.Fprintf(f, "-----------------\n")