elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.61k stars 8.21k forks source link

[Dashboards] Vega visualization is reporting unsaved changes #196954

Open nickpeihl opened 2 weeks ago

nickpeihl commented 2 weeks ago

A dashboard containing a Vega visualization is erroneously reporting unsaved changes.

To see the error

  1. Add the web logs sample data
  2. Open the [Logs] Web Traffic dashboard
  3. Change a control or size of a panel and Save changes.
  4. Go to the Dashboard listing page and re-open the [Logs] Web Traffic dashboard
  5. Notice that an Unsaved changes badge appears despite not having changed anything.

To debug this, log the unsavedPanelState by adding a console log statement here.

e.g.

]).subscribe(([dashboardChanges, unsavedPanelState, controlGroupChanges]) => {
      // calculate unsaved changes
      console.log(`unsavedPanelState`, unsavedPanelState);
      const hasUnsavedChanges =
        Object.keys(omit(dashboardChanges, keysNotConsideredUnsavedChanges)).length > 0 ||
        unsavedPanelState !== undefined ||
        controlGroupChanges !== undefined;

When opening the dashboard the following unsaved panel state is logged to the console.

{
    "8e59c7cf-6e42-4343-a113-c4a255fcf2ce": {
        "savedObjectId": "cb099a20-ea66-11eb-9425-113343a037e3"
    }
}
elasticmachine commented 2 weeks ago

Pinging @elastic/kibana-presentation (Team:Presentation)

elasticmachine commented 2 weeks ago

Pinging @elastic/kibana-visualizations (Team:Visualizations)

nickofthyme commented 1 week ago

Possibly related to changes in https://github.com/elastic/kibana/pull/194330

nreese commented 1 week ago

Removing label Team:Presentation. Issue is in visualize embeddable.