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

Fixed an issue that produced State timeline panel tooltip error when data was not in sync. #39438

Merged
merged 2 commits into from Sep 27, 2021

Conversation

zoltanbedi
Copy link
Member

What this PR does / why we need it:

This PR resolves the issue around state timeline panel's tooltip when data is out of sync.

statetimeline-bug.mp4
statetimeline-fix.mp4

Which issue(s) this PR fixes:

Fixes https://github.com/grafana/support-escalations/issues/932

Special notes for your reviewer:

Repro step:
I've used the tns-demo to generate data.

  1. Add a state timeline panel with 2 queries from Loki
  2. Set auto refresh to 10s
  3. Hover over panel data
Panel json
{
  "id": 23763571993,
  "gridPos": {
    "h": 8,
    "w": 12,
    "x": 0,
    "y": 0
  },
  "type": "state-timeline",
  "title": "Panel Title",
  "datasource": "tns-loki",
  "fieldConfig": {
    "defaults": {
      "custom": {
        "lineWidth": 5,
        "fillOpacity": 76
      },
      "color": {
        "mode": "thresholds"
      },
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          },
          {
            "color": "#EAB839",
            "value": 0.1
          },
          {
            "color": "#6ED0E0",
            "value": 0.2
          }
        ]
      },
      "mappings": []
    },
    "overrides": []
  },
  "options": {
    "mergeValues": true,
    "showValue": "auto",
    "alignValue": "left",
    "rowHeight": 0.9,
    "legend": {
      "displayMode": "list",
      "placement": "bottom"
    },
    "tooltip": {
      "mode": "single"
    }
  },
  "targets": [
    {
      "expr": "rate({job=\"tns/db\"}[$__interval])",
      "legendFormat": "A",
      "refId": "A"
    },
    {
      "expr": "rate({job=\"monitoring/node_exporter\"}[$__interval])",
      "hide": false,
      "legendFormat": "B",
      "refId": "B"
    }
  ]
}

@zoltanbedi zoltanbedi added this to In progress in [Deprecated] B I Squad via automation Sep 20, 2021
@zoltanbedi zoltanbedi requested a review from a team September 20, 2021 15:54
@zoltanbedi zoltanbedi self-assigned this Sep 20, 2021
@zoltanbedi zoltanbedi requested review from jackw and leeoniya and removed request for a team and jackw September 20, 2021 15:54
@zoltanbedi zoltanbedi added area/panel/state-timeline old backport v8.1.x Mark PR for automatic backport to v8.1.x old backport v8.2.x Mark PR for automatic backport to v8.2.x type/bug labels Sep 20, 2021
@zoltanbedi zoltanbedi added this to the 8.2.0 milestone Sep 20, 2021
@zoltanbedi zoltanbedi merged commit 24475cf into main Sep 27, 2021
[Deprecated] B I Squad automation moved this from In progress to Done Sep 27, 2021
@zoltanbedi zoltanbedi deleted the zoltan/statetimelien-tooltip-fix branch September 27, 2021 07:46
grafanabot pushed a commit that referenced this pull request Sep 27, 2021
)

* Fix: State timeline panel tooltip error when data is not in sync

* Move check from tooltip to panel

(cherry picked from commit 24475cf)
grafanabot pushed a commit that referenced this pull request Sep 27, 2021
)

* Fix: State timeline panel tooltip error when data is not in sync

* Move check from tooltip to panel

(cherry picked from commit 24475cf)
zoltanbedi added a commit that referenced this pull request Sep 27, 2021
) (#39633)

* Fix: State timeline panel tooltip error when data is not in sync

* Move check from tooltip to panel

(cherry picked from commit 24475cf)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
zoltanbedi added a commit that referenced this pull request Sep 27, 2021
) (#39634)

* Fix: State timeline panel tooltip error when data is not in sync

* Move check from tooltip to panel

(cherry picked from commit 24475cf)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
@achatterjee-grafana achatterjee-grafana changed the title Fix: State timeline panel tooltip error when data is not in sync Fixed an issue that produced State timeline panel tooltip error when data was not in sync. Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend area/panel/state-timeline old backport v8.1.x Mark PR for automatic backport to v8.1.x old backport v8.2.x Mark PR for automatic backport to v8.2.x type/bug
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants