Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Problem with the time scale display when the dashboard time zone is changed. #303

Open
shale-rims opened this issue May 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@shale-rims
Copy link

shale-rims commented May 25, 2023

What happened:
When you change the dashboard time zone between browser and UTC, the dashboard displays the correct time. When you change the dashboard time zone to any time other than Browser or UTC - the panel shows the time in the Browser timezone.

Timezone settings:
Browser timezone:
UTC Timezone:
Asia Timezone:

What you expected to happen:
The timezone and timeline on the statusmap panel should change according to the change of the dashboard timezone.

How to reproduce (as minimally and accurately as possible):
create a statusmap panel with RandomWalk datasource and change the dashboard timezone.
Or import that dashboard into your grafana instance.

JSON:
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 10,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "cards": {
        "cardHSpacing": 2,
        "cardMinWidth": 5,
        "cardVSpacing": 2
      },
      "color": {
        "cardColor": "#b4ff00",
        "colorScale": "sqrt",
        "colorScheme": "interpolateGnYlRd",
        "defaultColor": "#757575",
        "exponent": 0.5,
        "mode": "spectrum",
        "thresholds": []
      },
      "datasource": {
        "type": "datasource",
        "uid": "grafana"
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "hideBranding": false,
      "highlightCards": true,
      "id": 4,
      "legend": {
        "show": true
      },
      "nullPointMode": "as empty",
      "pageSize": 15,
      "seriesFilterIndex": -1,
      "statusmap": {
        "ConfigVersion": "v1"
      },
      "title": "Panel Title",
      "tooltip": {
        "extraInfo": "",
        "freezeOnClick": true,
        "items": [],
        "show": true,
        "showExtraInfo": false,
        "showItems": false
      },
      "type": "flant-statusmap-panel",
      "useMax": true,
      "usingPagination": false,
      "xAxis": {
        "show": true
      },
      "yAxis": {
        "maxWidth": -1,
        "minWidth": -1,
        "show": true
      },
      "yAxisSort": "metrics",
      "yLabel": {
        "delimiter": "",
        "labelTemplate": "",
        "usingSplitLabel": false
      }
    },
    {
      "datasource": {
        "type": "datasource",
        "uid": "grafana"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "id": 2,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "title": "Test1",
      "type": "timeseries"
    }
  ],
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "Asia/Dili",
  "title": "Test1",
  "uid": "coscpewoeij",
  "version": 2,
  "weekStart": ""
}

Problem detected by tests on different environments:
Environment_1:

  • Grafana version: 9.2.6
  • flant-statusmap-panel version: 0.5.1
  • Data source type and version: irrelevant (tested on prometheus, randomwalk)
  • OS on which Grafana is installed: OL8
  • User's OS and browser: MacOS(Safari, Chrome)/Win10(Firefox, Chrome)
  • Grafana plugins: irrelevant

Environment_2:

  • Grafana version: 9.2.6
  • flant-statusmap-panel version: 0.4.2
  • Data source type and version: irrelevant (tested on prometheus, randomwalk)
  • OS on which Grafana is installed: OL8
  • User's OS and browser: MacOS(Safari, Chrome)/Win10(Firefox, Chrome)
  • Grafana plugins: Irrelevant

Environment_3:

  • Grafana version: 7.5.17
  • flant-statusmap-panel version: 0.5.1
  • Data source type and version: irrelevant (tested on prometheus, randomwalk)
  • OS on which Grafana is installed: OL7.9
  • Operating system and browser: MacOS(Safari, Chrome)/Win10(Firefox, Chrome)
  • Grafana plugins: Irrelevant

Environment_4:

  • Grafana version: 7.5.17
  • flant-statusmap-panel version: 0.4.2
  • Data source type and version: irrelevant (tested on prometheus, randomwalk)
  • OS on which Grafana is installed: OL7.9
  • Operating system and browser: MacOS(Safari, Chrome)/Win10(Firefox, Chrome)
  • Grafana plugins: Irrelevant
@shale-rims shale-rims added the bug Something isn't working label May 25, 2023
@headbreaker
Copy link

Do we expect this to be fixed at some point?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants