Fix: slaid is missing error (#2077)
In order to reproduce this you need to create a Service and an SLO. The bug appears when an SLO is not set. Fixes #1784
This commit is contained in:
@@ -670,6 +670,9 @@ export class Zabbix implements ZabbixConnector {
|
||||
}
|
||||
|
||||
const slaIds = slas.map((s) => s.slaid);
|
||||
if (slaIds.length === 0) {
|
||||
return [];
|
||||
}
|
||||
if (slaIds.length > 1) {
|
||||
const sliQueries = slaIds?.map((slaId) => this.zabbixAPI.getSLI(slaId, itServiceIds, timeRange, options));
|
||||
const results = await Promise.all(sliQueries);
|
||||
|
||||
Reference in New Issue
Block a user