Skip to content

Commit f61dbdf

Browse files
authored
Refactor + Fix for making table headers (#45)
Issue: In the query response, not all keys may be present, leading to columns in the displayed table having mismatching headers, as these headers are derived from the keys of the first record. Fix: Determining headers on two scenarios: 1. When the query includes '*', indicating the selection of all columns, headers are generated from the schema by mapping parseable data types to Grafana's own data types. Any gaps are filled by iterating over the generated data frame. 2. If the query selectively chooses columns, headers are created from the first record, assuming that the SQL query results fill any gaps.
1 parent 3bef4ef commit f61dbdf

16 files changed

+250
-175
lines changed

dist/MANIFEST.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.

dist/module.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change

releases/parseable-datasource-1.2.1.sha1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
42.4 MB
Binary file not shown.

src/components/QueryEditor.tsx

Lines changed: 75 additions & 72 deletions
Original file line numberDiff line numberDiff line change

src/datasource.ts

Lines changed: 150 additions & 79 deletions
Original file line numberDiff line numberDiff line change

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change

0 commit comments

Comments
 (0)