[Bug fix] handle multiple service status (#2037)
Fixes https://github.com/grafana/grafana-zabbix/issues/2036 ## Before fix <img width="1393" alt="image" src="https://github.com/user-attachments/assets/e698a571-9e4b-4fbb-824e-7d7dc1b77137" /> ## After fix <img width="1397" alt="image" src="https://github.com/user-attachments/assets/99882c1e-926a-4667-86cb-8b0f3468dac7" />
This commit is contained in:
@@ -343,7 +343,7 @@ export function alignFrames(data: MutableDataFrame[]): MutableDataFrame[] {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const frame = data[i];
|
||||
const timeField = frame.fields.find((f) => f.name === TIME_SERIES_TIME_FIELD_NAME);
|
||||
const valueField = frame.fields.find((f) => f.name === TIME_SERIES_VALUE_FIELD_NAME);
|
||||
const valueField = frame.fields.find((f) => f.name === TIME_SERIES_VALUE_FIELD_NAME || f.type === 'number');
|
||||
const firstTs = timeField.values.get(0);
|
||||
|
||||
if (firstTs > minTimestamp) {
|
||||
|
||||
Reference in New Issue
Block a user