How to use the @influxdata/giraffe.newTable function in @influxdata/giraffe

To help you get started, we’ve selected a few @influxdata/giraffe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github influxdata / influxdb / ui / src / shared / utils / fromFlux.legacy.ts View on Github external
export default function fromFluxLegacy(csv: string): FromFluxResult {
  const parsedFlux = fromFlux(csv)

  return {
    table: Object.entries(parsedFlux.table.columns).reduce(
      (table, [key, column]) => {
        return table.addColumn(
          key,
          column.type,
          column.data as string[],
          column.name
        )
      },
      newTable(parsedFlux.table.length)
    ),
    fluxGroupKeyUnion: parsedFlux.fluxGroupKeyUnion,
    schema: {},
  }
}

@influxdata/giraffe

[![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://www.influxdata.com/slack)

MIT
Latest version published 2 years ago

Package Health Score

61 / 100
Full package analysis