diff --git a/public/app/core/utils/file_export.ts b/public/app/core/utils/file_export.ts index c3959aec12f..ec8a604c1c2 100644 --- a/public/app/core/utils/file_export.ts +++ b/public/app/core/utils/file_export.ts @@ -34,41 +34,4 @@ export function exportTableDataToCsv(table) { export function saveSaveBlob(payload, fname) { var blob = new Blob([payload], { type: "text/csv;charset=utf-8" }); window.saveAs(blob, fname); -}; - -/* -export default function flatten(target, opts): any { - opts = opts || {}; - - var delimiter = opts.delimiter || '.'; - var maxDepth = opts.maxDepth || 3; - var currentDepth = 1; - var output = {}; - - function step(object, prev) { - Object.keys(object).forEach(function(key) { - var value = object[key]; - var isarray = opts.safe && Array.isArray(value); - var type = Object.prototype.toString.call(value); - var isobject = type === "[object Object]"; - - var newKey = prev ? prev + delimiter + key : key; - - if (!opts.maxDepth) { - maxDepth = currentDepth + 1; - } - - if (!isarray && isobject && Object.keys(value).length && currentDepth < maxDepth) { - ++currentDepth; - return step(value, newKey); - } - - output[newKey] = value; - }); - } - - step(target, null); - - return output; -} -*/ \ No newline at end of file +}; \ No newline at end of file