()
| 45 | } |
| 46 | |
| 47 | export function getCurrentConnectionExportData() { |
| 48 | const connection = state.connections[state.selectedConnectionId]; |
| 49 | if (!connection) { |
| 50 | return null; |
| 51 | } |
| 52 | |
| 53 | const messages = getVisibleMessages(connection.messages); |
| 54 | |
| 55 | return { |
| 56 | connection: getConnectionExportInfo(connection), |
| 57 | messages: messages.map(msg => ({ |
| 58 | id: msg.id, |
| 59 | eventType: msg.eventType, |
| 60 | data: msg.data, |
| 61 | lastEventId: msg.lastEventId, |
| 62 | timestamp: formatTimestampForExport(msg.timestamp) |
| 63 | })), |
| 64 | exportedAt: new Date().toISOString(), |
| 65 | totalMessages: messages.length, |
| 66 | appliedFilters: getAppliedFiltersMetadata() |
| 67 | }; |
| 68 | } |
| 69 | |
| 70 | export function getAllConnectionsExportData() { |
| 71 | const connections = Object.values(state.connections); |
no test coverage detected