knightss27 / grafana-network-weathermap

A fully featured and customizable network weathermap plugin for Grafana (9.0+).
https://grafana.com/grafana/plugins/knightss27-weathermap-panel/
Apache License 2.0
139 stars 7 forks source link

No Name in Query #29

Closed nixahnung closed 1 year ago

nixahnung commented 1 year ago

Hello,

I wanted to test your plugin tonight. I use https://github.com/sni/grafana-pnp-datasource as data source. Apparently there is no name there in the DataFrame, which is probably why the query selection only says "No label".

Maybe you can integrate the refId as an alternative name?

knightss27 commented 1 year ago

Hey there, can you tell me what Grafana shows the labels to be if you have the same data source on a normal time series graph panel? (I.e what the graph's key looks like)

nixahnung commented 1 year ago

[ { "schema": { "refId": "A", "fields": [ { "name": "Time", "type": "time", "config": {} }, { "name": "Port-channel1_in_bps", "type": "number", "config": {} } ] }, "data": { "values": [ [ ....

I think you mean the name. This is the field that appears as the column name in the data frame. That would of course also be a possible field.

knightss27 commented 1 year ago

That's actually the name of the field and not the name of the data frame (that's separate). I'm about to push a new update which deals with this in a different way though, by reconstructing query names the same way Grafana does. This is why I was wondering if you would mind just sending what Grafana shows for their own internal panels.

nixahnung commented 1 year ago

image Ich dachte das hätte ich getan :) ?

nixahnung commented 1 year ago

Sry. Translation lost.

I thought I did that :) ?

knightss27 commented 1 year ago

Hmm, that's odd actually. Would you mind sending the entirety of the JSON you sent above, and I'll get back to you on this.

nixahnung commented 1 year ago

here it comes but previously only the values ​​were missing.

I reduced them anyway.

[
  {
    "schema": {
      "refId": "A",
      "fields": [
        {
          "name": "Time",
          "type": "time",
          "config": {}
        },
        {
          "name": "Port-channel1_in_bps",
          "type": "number",
          "config": {}
        }
      ]
    },
    "data": {
      "values": [
        [
          1666373640000,
          1666373700000,
          1666373760000,
          1666373820000,
          1666373880000,
          1666373940000,
          1666374000000,
          1666374060000,
          1666374120000
        ],
        [
          112858.00238,
          112858.00238,
          112858.00238,
          111547.28333,
          111547.28333,
          111547.28333,
          111547.28333,
          111547.28333,
          111547.28333
        ]
      ]
    }
  }
]
knightss27 commented 1 year ago

Fixed with v0.3.3.