Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gaugePanel reduceOptions undefined. #575

Open
tiansu-yu-idealo opened this issue Mar 16, 2023 · 1 comment
Open

gaugePanel reduceOptions undefined. #575

tiansu-yu-idealo opened this issue Mar 16, 2023 · 1 comment

Comments

@tiansu-yu-idealo
Copy link

tiansu-yu-idealo commented Mar 16, 2023

What you expected to happen?

After I set GaugePanel.calcs to be one of the options, e.g. GAUGE_CALC_MEAN = 'mean' it should return me a correct GaugePanel json.

What happened?

The GaugePanel is mal-formatted. I got the error message from frontend that TypeError: undefined is not an object (evaluating 'e.reduceOptions.values'). After I compare the differences between the code-generated Json and the json generated from UI editor, I notice the following schema difference:

The reduce function in the code-genereted json (grafanalib) one is

"fieldConfig": {
          "defaults": {
            "calcs": [
              "lastNotNull"
            ],
...

and the one generated from UI (my grafana cluster) is

"options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
...

You can clearly see a shift where the calcs are located between these two are different.

And one more thing I noticed that the param reduceCalc in Stat behaves correctly, which files calcs under options.reduceOptions instead of fieldConfig. So I suspect this to be a bug (un-synced components).

@tiansu-yu-idealo tiansu-yu-idealo changed the title guagePanel reductionOptions undefined. guagePanel reduceOptions undefined. Mar 16, 2023
@cPu1 cPu1 changed the title guagePanel reduceOptions undefined. gaugePanel reduceOptions undefined. Mar 20, 2023
@tulzke
Copy link

tulzke commented Apr 15, 2024

+1
Option showThresholdLabels does not work now for the same reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants