-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add units to number visualization #21339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I remove the unit of a metric and try to save the dashboard, I get this error from the backend:
{
"type": "RequestError",
"message": "Error at \"state.d90f73b7-a11b-46c3-b724-5a15204caadd.widgets.[0].units.took_ms.unit_type\" [1, 520]: Must be of type String",
"line": 1,
"column": 520,
"path": "state.d90f73b7-a11b-46c3-b724-5a15204caadd.widgets.[0].units.took_ms.unit_type",
"reference_path": "org.graylog.plugins.views.search.views.$AutoValue_ViewDTO$Builder[\"state\"]->java.util.LinkedHashMap[\"d90f73b7-a11b-46c3-b724-5a15204caadd\"]->org.graylog.plugins.views.search.views.$AutoValue_ViewStateDTO$Builder[\"widgets\"]->java.util.HashSet[0]->org.graylog.plugins.views.search.views.widgets.aggregation.AutoValue_AggregationConfigDTO$Builder[\"units\"]->java.util.LinkedHashMap[\"took_ms\"]->org.graylog.plugins.formatting.units.model.UnitId[\"unit_type\"]"
}
This is how the units
attribute looks like in the view state:
{
"took_ms": {}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, works fine. Issue is fixed in separate PR.
Description
This PR adds units to a single number widget as we have on other idgets
Motivation and Context
fix: #20965
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: