MCPcopy Index your code
hub / github.com/apache/caldera / downloadJson

Function downloadJson

static/js/shared.js:222–230  ·  view source on GitHub ↗
(filename, data)

Source from the content-addressed store, hash-verified

220}
221
222function downloadJson(filename, data) {
223 let dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(data, null, 2));
224 let downloadAnchorNode = document.createElement('a');
225 downloadAnchorNode.setAttribute("href", dataStr);
226 downloadAnchorNode.setAttribute("download", filename + ".json");
227 document.body.appendChild(downloadAnchorNode);
228 downloadAnchorNode.click();
229 downloadAnchorNode.remove();
230}
231
232function downloadReport(endpoint, filename, data = {}, jsonifyData = false) {
233 function downloadObjectAsJson(data) {

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected