This is an automated email from the ASF dual-hosted git repository.

miao pushed a commit to branch grafana_plugin
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/grafana_plugin by this push:
     new 31c86b3da5e Fixed the issue where the Grafana plugin does not display 
data when there is no time value
31c86b3da5e is described below

commit 31c86b3da5eadd2727449d5d4cf86e4069c537aa
Author: luke.miao <[email protected]>
AuthorDate: Thu Jul 25 19:34:28 2024 +0800

    Fixed the issue where the Grafana plugin does not display data when there 
is no time value
---
 iotdb-connector/grafana-plugin/pkg/plugin/plugin.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/iotdb-connector/grafana-plugin/pkg/plugin/plugin.go 
b/iotdb-connector/grafana-plugin/pkg/plugin/plugin.go
index a8a7eac7215..eea05bf3885 100644
--- a/iotdb-connector/grafana-plugin/pkg/plugin/plugin.go
+++ b/iotdb-connector/grafana-plugin/pkg/plugin/plugin.go
@@ -291,6 +291,7 @@ func (d *IoTDBDataSource) query(cxt context.Context, pCtx 
backend.PluginContext,
        }
        // create data frame response.
        frame := data.NewFrame("response")
+       times := nil
        for i := 0; i < len(queryDataResp.Expressions); i++ {
                if queryDataResp.Timestamps != nil && 
len(queryDataResp.Timestamps) > 0 {
                        times := make([]time.Time, 
len(queryDataResp.Timestamps))

Reply via email to