kennel 2.25.1 → 2.25.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/kennel/api.rb +5 -4
- data/lib/kennel/models/dashboard.rb +7 -4
- data/lib/kennel/models/monitor.rb +3 -0
- data/lib/kennel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f2cb4bf99e57210d3e70a8642a3cd237a602258aef16e6d5088364b8f6ece58
|
|
4
|
+
data.tar.gz: 9ff11bbd6c84da450974a55563d6dd4cd1334588a8d7be137ccb347a60a66bdc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5278beab310e5e76a5532c015e9cd3ed1bf182add67ad51c59348e87c27b056f3a6e8fd04329df885f0d3e9241eba52eb1465f4105fa3ea3902f0f291b9f2d70
|
|
7
|
+
data.tar.gz: 817497d96ea33181481059069c4b3848e6cb18ba8d9949a8a0c22edb51ed2c79d36d54d8175d61f5ebd9094e507b6b10352bc705feee0f122c0f673a95698e50
|
data/lib/kennel/api.rb
CHANGED
|
@@ -123,12 +123,13 @@ module Kennel
|
|
|
123
123
|
end
|
|
124
124
|
|
|
125
125
|
# yield each widget with a key built from its group optional title and its own title
|
|
126
|
-
# untitled widgets (e.g. images) are keyed by their
|
|
127
|
-
#
|
|
126
|
+
# untitled widgets (e.g. images) are keyed by their url or content, their other attributes are
|
|
127
|
+
# randomly changed by the UI and positions change when widgets are reordered
|
|
128
|
+
# widgets with no stable key are matched by position as a last resort
|
|
128
129
|
def each_widget_with_title(widgets, prefix: nil, &block)
|
|
129
|
-
widgets.
|
|
130
|
+
widgets.each_with_index do |widget, index|
|
|
130
131
|
title = widget.dig(:definition, :title)
|
|
131
|
-
title = (
|
|
132
|
+
title = widget.dig(:definition, :url) || widget.dig(:definition, :content) || index if title.to_s.empty?
|
|
132
133
|
key = prefix ? [prefix, title] : [title]
|
|
133
134
|
yield key, widget
|
|
134
135
|
if (nested = widget.dig(:definition, :widgets))
|
|
@@ -102,7 +102,7 @@ module Kennel
|
|
|
102
102
|
ignore_default expected, actual, DEFAULTS
|
|
103
103
|
ignore_default expected, actual, reflow_type: "auto" if expected[:layout_type] == "ordered"
|
|
104
104
|
|
|
105
|
-
dry_up_dashboard_tabs(actual)
|
|
105
|
+
dry_up_dashboard_tabs(expected, actual)
|
|
106
106
|
|
|
107
107
|
widgets_pairs(expected, actual).each do |pair|
|
|
108
108
|
pair.each { |w| sort_conditional_formats w }
|
|
@@ -114,9 +114,12 @@ module Kennel
|
|
|
114
114
|
|
|
115
115
|
private
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
# we never want to update or compare tab ids that, see api.rb
|
|
118
|
+
def dry_up_dashboard_tabs(*dashboards)
|
|
119
|
+
dashboards.each do |dashboard|
|
|
120
|
+
next unless (tabs = dashboard[:tabs])
|
|
121
|
+
tabs.each { |t| t.delete :id }
|
|
122
|
+
end
|
|
120
123
|
end
|
|
121
124
|
|
|
122
125
|
# conditional_formats ordering is randomly changed by datadog, compare a stable ordering
|
|
@@ -129,6 +129,9 @@ module Kennel
|
|
|
129
129
|
# Datadog requires only either new_group_delay or new_host_delay, never both
|
|
130
130
|
options.delete(options[:new_group_delay] ? :new_host_delay : :new_group_delay)
|
|
131
131
|
|
|
132
|
+
# composite monitors do not support timeout_h
|
|
133
|
+
options.delete(:timeout_h) if type == "composite"
|
|
134
|
+
|
|
132
135
|
if (duration = group_retention_duration)
|
|
133
136
|
options[:group_retention_duration] = duration
|
|
134
137
|
end
|
data/lib/kennel/version.rb
CHANGED