Skip to content

Feature: Improve & Cleanup Export Manager - #3696

Merged
mergify[bot] merged 45 commits into
mainfrom
feature/export-fields
Nov 8, 2026
Merged

mergify[bot] merged 45 commits into
mainfrom
feature/export-fields

Conversation

@BornToBeRoot

@BornToBeRoot BornToBeRoot commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Description

See commits

Ref #3609

Type of change

  • 🐛 Bug fix
  • 🧹 Refactoring / maintenance (no functional change)

BornToBeRoot and others added 22 commits November 8, 2026 22:21
Every export defines its columns once as ExportField<T> and is written by
one generic writer (ExportManager.Export<T>), which also holds the common
format rules (invariant culture, RFC 4180 quoting, dates, MAC addresses,
lists, JSON types). Lookup (OUI / Port) uses it first, output unchanged.
Adds ExportTestHelper and tests for the format rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WiFiNetworkExportField removed, list renamed to WiFiNetworkInfoExportFields.
JSON: bools and numbers native, XML: time spans like CSV, CSV: invariant
culture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetFields / GetFieldNames / ExportField replaced by
GetIPScannerHostInfoExportFields(options) (the header no longer needs a
placeholder host). The port fields are defined once (PortInfoExportFields,
ExportList). Ping time as number (ms), time / TTL / bytes empty without a
reply. Tests moved to Tests/Export, new tests for ping values and ports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change is empty (JSON null) without a change, like IP Scanner / WiFi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Times as number (ms), time / TTL / bytes empty without a reply, like the
IP Scanner. Ping Monitor hostname quoted in the CSV file. Tests added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MAC address as AA:BB:CC:DD:EE:FF (JSON: no longer {}), status as text,
DHCP lease in the common date format (empty without DHCP), lists with
"; ", name / description / DNS suffix quoted, new Profile column. Empty
lists are empty values in all exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DNS Lookup text quoted in the CSV file (TXT records with commas). SNTP
offset / round trip delay as numbers (s / ms) with a decimal point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er (E8)

Neighbor Table MAC address as AA:BB:CC:DD:EE:FF like shown in the grid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Text quoted in the CSV file. Management, ChassisId, LocalConnection and
LocalInterface (shown, not exported) appended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… writer (E10)

IP Geolocation: latitude / longitude with a decimal point, text quoted.
Hosts File Editor: hostname / comment quoted. Firewall: output unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ter (E11)

Bit Calculator values with a decimal point, SNMP data quoted. All
exports now use ExportField<T> and the shared writer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the exports used it, they export the time as number now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New FAQ page with the format shared by all exports (columns, empty
values, numbers / units, dates, MAC addresses, lists, CSV quoting).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Columns may be reordered so related values are next to each other (like
shown in the tool); scripts read them by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Profile after Speed instead of at the end, IPv6 link-local before the
IPv6 address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Network, security, channel, signal, access point, other values, change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Host, ping, port scan, NetBIOS, web page, SNMP, Windows, change since
the previous scan - instead of new columns appended at the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Management and ChassisId after IPAddress instead of at the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IsEnabled first (like the Hosts File Editor), address before port,
program after the remote port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IP Geolocation in the order shown (Query / Reverse before the network,
Hosting / Proxy / Mobile like Traceroute). Traceroute exports the region
name shown in the grid in addition to the region code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Status, time, TTL, bytes instead of bytes, time, TTL, status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
General note that exports changed and scripts should be checked (read
columns by name), tool entries merged and in application order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 8, 2026 21:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added this to the next-release milestone Nov 8, 2026
@mergify

mergify Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BornToBeRoot and others added 22 commits November 8, 2026 22:56
GetItemsInViewOrder / GetSelectedItemsInViewOrder (filtered, sorted,
grouped) replace the own helpers of WiFi, IP Scanner and Port Scanner.
Tests run on Windows only (WPF), the test project uses WPF now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exports the rows shown (search) in the order shown, selected rows in
the order shown; the file is written in the background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hops in the order shown (sorted by hop), also the selected hops.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Export rows of the tools link the export format, FAQ explains which
results are exported, WiFi columns in the new order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lone CR at the end of the file (no final line break) prevented git from
normalizing it, so it was stored with CRLF since E3. Content unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both were calculated with integer (long) division: the offset in whole
seconds, the delay in whole milliseconds. Now double, rounded to 1 ms /
0.01 ms. Converter names match their type (Double...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SNTP Lookup times are UTC (also in the grid); the export format said
local time for all dates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetItemsInViewOrder<T>(all, selectedItems) replaces the copied
ExportAll ? ... : ... block in 15 view models.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The history was added on the ping thread while the export copied it on
the UI thread (List not thread-safe). It is updated in the dispatcher
callback now (after the session check), the export copies it and writes
the file in the background like the other tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s (final review #1, #2)

DateTime.UtcNow instead of DateTime.Now.ToUniversalTime() (ambiguous in
the repeated hour), UdpClient disposed also if Send / Receive throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Server time minus local time (positive if the local clock is behind), like
NTP tools and the IP Scanner WindowsTimeOffset (host minus local).
Documented in sntp-lookup.md, breaking change in the changelog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BeaconInterval in ms, Uptime in whole seconds instead of time span text,
like every other duration of the exports (FAQ: number in a fixed unit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A control character (e.g. in SNMP data) made XDocument.Save throw, so the
whole XML export failed. The XML writer removes invalid characters (valid
surrogate pairs are kept), CSV / JSON are unchanged. Test added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…final review #5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#1, #2, #7)

- IP Scanner CSV Ports: Port/Protocol/State (service / description are
  free text with / and ;), ExportList gets its CSV fields; JSON / XML keep
  all fields
- An empty value stays empty in a quoted CSV column, an empty text is "",
  like null / "" in JSON
- CSV written line by line with a StreamWriter
- FAQ: CSV formula warning (values are exported as they are)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tiny negative offset rounded to 0 was shown / exported as -0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two equal items (e.g. records) are still two rows; only the selected one
is returned. Test added (Windows only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mergify
mergify Bot merged commit 84a58ab into main Nov 8, 2026
5 checks passed
@mergify
mergify Bot deleted the feature/export-fields branch November 8, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants