Skip to content

Commit

Permalink
Update lib/kennel/models/dashboard.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Grosser <michael@grosser.it>
  • Loading branch information
smo921 and grosser committed May 14, 2024
1 parent 59a0c5c commit 139ae12
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/kennel/models/dashboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,10 @@ def resolve_linked_tracking_ids!(id_map, **args)
definition[:slo_id] = resolve(id, :slo, id_map, **args) || id
end
when "timeseries"
if requests = definition[:requests]
requests.map do |request|
next unless queries = request[:queries]
queries.map do |query|
next unless query[:data_source] == "slo"
if id = query[:slo_id]
query[:slo_id] = resolve(id, :slo, id_map, **args) || id
end
definition[:requests]&.each do |request|
request[:queries]&.each do |query|
if query[:data_source] == "slo" && (slo_id = query[:slo_id])
query[:slo_id] = resolve(slo_id, :slo, id_map, **args) || slo_id
end
end
end
Expand Down

0 comments on commit 139ae12

Please sign in to comment.