Skip to content

NMS-20153: CSV and PDF export for Resource Graphs - #8733

Open
joseanesONMS wants to merge 1 commit into
developfrom
jira/NMS-20153-resource-graph-export
Open

NMS-20153: CSV and PDF export for Resource Graphs#8733
joseanesONMS wants to merge 1 commit into
developfrom
jira/NMS-20153-resource-graph-export

Conversation

@joseanesONMS

Copy link
Copy Markdown

Adds CSV and PDF export to the new /ui Resource Graphs page.

The export reads from the same measurement data the graphs already hold, so it needs no new backend and reflects exactly what is plotted.

  • Each graph gains a CSV button that downloads its data as one column per plotted metric with one ISO-timestamped row per sample, gaps left blank.
  • The page gains a PDF button that renders the loaded graphs — chart image plus legend stats — into a single landscape PDF via jsPDF (new UI dependency, ~100 KB gzip).
  • CSV omits metrics that have no column in the response (rather than emitting blank columns) and neutralizes spreadsheet formula-injection prefixes in header cells.
  • PDF clamps each chart to fit a page, paginates, wraps long legends, and reports how many graphs were exported — only graphs currently mounted are captured, since the page loads them lazily on scroll.
  • Covered by 11 unit tests (buildGraphCsv, safeFileStem, exportGraphsToPdf); full ui suite green.

Each graph gains a CSV button that downloads its data as one column per plotted
metric and one ISO-timestamped row per sample, with gaps left blank. The Resource
Graphs page gains a PDF button that renders every loaded graph — title, chart
image, and legend stats — into a single landscape PDF via jsPDF.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant