Skip to content

State persistence

sanke1 edited this page Dec 4, 2018 · 5 revisions

Grafana's Save button for save dashboard doesn't affect analytics state: everything what is in Analytics tab and all your labelings.

We did it because work with analytics state was confusing. For example:

  • when you create an analytic unit but don't save the dashboard - it disappears
  • when you create segments and don't save the dashboard - they stay saved

Now everything connected to analytics is stored on hastic-server. Thus, you cannot cancel anything just by refreshing the page. You should do the reverse action.

Analytics state is associated with a panel URL (e.g. http://localhost:3000/d/gKmjfNAmk/hastic?panelId=2) which is unique for every panel.

Analytics state example:

{
  "analyticUnits": [
    {
      "name": "peak",
      "color": "#FF99FF",
      "type": "PEAK",
      "id": "1XQGI3Mm6gS3Srz9",
      "visible": true
    },
    {
      "name": "drop",
      "color": "#82B5D8",
      "type": "DROP",
      "id": "d2KD33KoCmm2xp4",
      "visible": false
    }
  ]
}