Giter Club home page Giter Club logo

Comments (6)

simPod avatar simPod commented on June 6, 2024

This is how original datasource worked and we did not change it. So the behaviour is correct.

I agree having a way to issue also a /query request is handy but currently I don't see a way to do so without breaking the original behaviour.

from grafanajsondatasource.

HaaLeo avatar HaaLeo commented on June 6, 2024

Well then I think this is still no the correct behaviour, but a bug in the original datasource, too. Since the InfluxDB datasource plugin seems to resolve the query correctly:

from grafanajsondatasource.

simPod avatar simPod commented on June 6, 2024

InfluxDB datasource has AFAIK only one entry via query. We have 5. So it cannot be compared. And people have found use cases for current behaviour (see older issues) so now it's feature anyway.

from grafanajsondatasource.

andig avatar andig commented on June 6, 2024

InfluxDB datasource has AFAIK only one entry via query. We have 5. So it cannot be compared. And people have found use cases for current behaviour (see older issues) so now it's feature anyway.

Not sure this is addressing the core of the question. Imho:

/search retrieves the metrics, /query the data. The query editor's metric selection is wired to findMetrics:

<div ng-if="!ctrl.target.rawQuery">
  <div class="gf-form">
    <label class="gf-form-label width-5 query-keyword">Metric</label>
    <gf-form-dropdown model="ctrl.target.target"
      allow-custom="true"
      lookup-text="true"
      get-options="ctrl.findMetrics($query)"
      on-change="ctrl.onChangeInternal()">
    </gf-form-dropdown>
  </div>
</div>

The behaviour of query variables is imho controlled by Grafana, not by this plugin, anyway variables are.

So not an issue here but with Grafana.

from grafanajsondatasource.

HaaLeo avatar HaaLeo commented on June 6, 2024

@andig thanks for your reply. But doesn't this plugin not controll whether the /search or /query route is triggered when creating a Query-variable?

from grafanajsondatasource.

simPod avatar simPod commented on June 6, 2024

Seems like @andig is right. I did a quick check out of curiosity https://github.com/simPod/grafana-json-datasource/search?q=findMetrics&unscoped_q=findMetrics We do not call it explicitly.

from grafanajsondatasource.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.