snuids / grafana-radar-panel

A radar graph panel for Grafana
MIT License
24 stars 12 forks source link

Postgresql as data source #4

Closed shizacat closed 6 years ago

shizacat commented 6 years ago

Hello Can I use a chart with a Postgres source? What are the requirements for this?

Thank you!

snuids commented 6 years ago

@shizacat

Never tried. I use Elastic and InfluxDB. Did you try ? It could work, I will try to check if I find some time this week-end.

shizacat commented 6 years ago

Yes, I tried, but did not draw. Example: https://ibb.co/ih5nzb

Maybe I'm doing something wrong. I have the latest version of grafana: v4.6.2 (commit: 8db5f08)

It would be great if you could check

snuids commented 6 years ago

@shizacat I made a version 1.4 that is working for me. Can you check on your side ?

Cheers,

shizacat commented 6 years ago

@snuids You have different content of the folder "src" and "dist". In "dist" still version 1.3 If I replace files manual, the following message pops up:

Plugin Error
Unable to dynamically transpile ES module A loader plugin needs to be configured via `SystemJS.config({ transpiler: 'transpiler-module' })`. 
Instantiating http://10.211.55.103:3000/public/plugins/snuids-radar-panel/module.js Loading plugins/snuids-radar-panel/module
shizacat commented 6 years ago

I built from "grunt" and all worked.

Edited the 242 line in the file radargraph_ctrl.js: if (fulldata[i].datapoints.length >= 1) { Otherwise, the graph did not show rows from one element

Can I somehow give the names of the charts, instead of A, B?

snuids commented 6 years ago

@shizacat I made a version 1.4.1 that has the >= lien 242 which fixes the single value series problem. Concerning the series name, PostGreSQL support is quite new, I suppose that they will add series alias as for the other datasources in the next versions. Thanks for helping with the code.

shizacat commented 6 years ago

Thank you!