Skip to content

Graph more stable against deleted assets #2132

Description

@nhoening

My asset has this in sensors_to_show, in one of the plots dicts: {"asset": 3935, "flex-model": "state-of-charge"}

Asset 3935 doesn't exist (anymore), so both the chart and chart_data endpoints fail with

{
  "message": [
    "No asset found with ID 3935."
  ],
  "result": "Rejected",
  "status": "UNPROCESSABLE_ENTITY"
}

Which means no graphs are visible.

The endpoints should ignore missing assets.
The graph dialogue should be more robust also - it should show the available plots, and tell user that some plots do not work anymore (as an not available). Right now, it also stops showing plots once the assets/3935 endpoint fails.

Please reproduce this first, then propse a fix.

Metadata

Metadata

Assignees

Labels

UIbugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions