You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the bug?
A clear and concise description of the bug.
Get API returns the "raw" object as contained in .opensearch-observability index/store.
Espcially note selected_date_range, selected_timestamp, selected_fields
const client = new PPLSavedObjectClient(coreRefs.http!);
const res = await client.get({ objectId: metric.savedVisualizationId });
const currentVis = res.observabilityObjectList[0].savedVisualization;
console.log('savedMetricToObservabilityStore', { currentVis });
==>
{
"name": "[Metric] Average ram usage per day by windows os ",
"description": "",
"query": "source = opensearch_dashboards_sample_data_logs | where match(machine.os,'win') | stats avg(machine.ram) by span(timestamp,1d)",
"type": "line",
"selected_date_range": {
"start": "now/y",
"end": "now",
"text": ""
},
"selected_timestamp": {
"name": "timestamp",
"type": "timestamp"
},
"selected_fields": {
"text": "",
"tokens": []
},
"user_configs": "{\"dataConfig\":{\"series\":[{\"label\":\"machine.ram\",\"name\":\"machine.ram\",\"aggregation\":\"avg\",\"customLabel\":\"\"}],\"dimensions\":[],\"span\":{\"time_field\":[{\"name\":\"timestamp\",\"type\":\"timestamp\",\"label\":\"timestamp\"}],\"unit\":[{\"text\":\"Day\",\"value\":\"d\",\"label\":\"Day\"}],\"interval\":\"1\"}}}",
"sub_type": "metric"
}
.update() though requires a different object model, as indicated in the definition :
What is the bug?
A clear and concise description of the bug.
Get API returns the "raw" object as contained in
.opensearch-observability
index/store.Espcially note
selected_date_range
,selected_timestamp
,selected_fields
.update()
though requires a different object model, as indicated in the definition :Especially note, the
params
object is expected differently :timestamp
instead ofselected_timestamp
fields
instead ofselected_fields
dateRange
instead ofselected_date_range
What is the expected behavior?
The following code should work without error :
What is your host/environment?
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: