kennel 1.134.0 → 1.135.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kennel/models/dashboard.rb +8 -6
- data/lib/kennel/models/monitor.rb +6 -1
- data/lib/kennel/models/record.rb +1 -1
- data/lib/kennel/tasks.rb +2 -0
- data/lib/kennel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24069caa804f546ea584129a0c300e0ceb974798a3015a7c70a9a0f0b2423da6
|
4
|
+
data.tar.gz: 9fb59fc2d21a839ebd965f5f72b604c75d1bac64e1591cd51614c1ec0f24d947
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b566afcb3f60379a20cce4bcdea77238ec4dcbfc243ce6c1c0c5017710e4037591a55fca1c4dd7963539fa919710cff422d19beb1cc05414572266c7b9a7be1f
|
7
|
+
data.tar.gz: 717abf8426124a8be7d9f36ece88226adf56a3543673f0260a7295d5884748e91269fb0a75babd91ba05d4f8928cf1fe8e8255b95f54919039775f65cd1f601c
|
@@ -72,6 +72,8 @@ module Kennel
|
|
72
72
|
template_variable_presets: nil
|
73
73
|
}.freeze
|
74
74
|
|
75
|
+
TAG_PREFIX = /^team:/
|
76
|
+
|
75
77
|
settings(
|
76
78
|
:title, :description, :definitions, :widgets, :layout_type, :template_variable_presets, :reflow_type,
|
77
79
|
:tags
|
@@ -83,10 +85,7 @@ module Kennel
|
|
83
85
|
widgets: -> { [] },
|
84
86
|
template_variable_presets: -> { DEFAULTS.fetch(:template_variable_presets) },
|
85
87
|
reflow_type: -> { layout_type == "ordered" ? "auto" : nil },
|
86
|
-
tags: ->
|
87
|
-
team = project.team
|
88
|
-
team.tag_dashboards ? team.tags : []
|
89
|
-
end
|
88
|
+
tags: -> { project.team.tags } # ideally project.tags but that causes diffs
|
90
89
|
)
|
91
90
|
|
92
91
|
class << self
|
@@ -154,7 +153,9 @@ module Kennel
|
|
154
153
|
all_widgets = render_definitions(definitions) + widgets
|
155
154
|
expand_q all_widgets
|
156
155
|
tags = tags()
|
157
|
-
|
156
|
+
|
157
|
+
# TODO: remove this once dd UI shows all tags ... maybe remove team tag once that is usable vis UI
|
158
|
+
tags_as_string = (project.team.tag_dashboards && !tags.empty? ? " (#{tags.join(" ")})" : "")
|
158
159
|
|
159
160
|
json = super.merge(
|
160
161
|
layout_type: layout_type,
|
@@ -162,7 +163,8 @@ module Kennel
|
|
162
163
|
description: description,
|
163
164
|
template_variables: render_template_variables,
|
164
165
|
template_variable_presets: template_variable_presets,
|
165
|
-
widgets: all_widgets
|
166
|
+
widgets: all_widgets,
|
167
|
+
tags: tags.grep(TAG_PREFIX)
|
166
168
|
)
|
167
169
|
|
168
170
|
json[:reflow_type] = reflow_type if reflow_type # setting nil breaks create with "ordered"
|
@@ -32,7 +32,7 @@ module Kennel
|
|
32
32
|
settings(
|
33
33
|
:query, :name, :message, :escalation_message, :critical, :type, :renotify_interval, :warning, :timeout_h, :evaluation_delay,
|
34
34
|
:ok, :no_data_timeframe, :notify_no_data, :notify_audit, :tags, :critical_recovery, :warning_recovery, :require_full_window,
|
35
|
-
:threshold_windows, :new_host_delay, :new_group_delay, :priority, :validate_using_links, :variables, :on_missing_data
|
35
|
+
:threshold_windows, :scheduling_options, :new_host_delay, :new_group_delay, :priority, :validate_using_links, :variables, :on_missing_data
|
36
36
|
)
|
37
37
|
|
38
38
|
defaults(
|
@@ -52,6 +52,7 @@ module Kennel
|
|
52
52
|
critical_recovery: -> { nil },
|
53
53
|
warning_recovery: -> { nil },
|
54
54
|
threshold_windows: -> { nil },
|
55
|
+
scheduling_options: -> { nil },
|
55
56
|
priority: -> { MONITOR_DEFAULTS.fetch(:priority) },
|
56
57
|
variables: -> { MONITOR_OPTION_DEFAULTS.fetch(:variables) },
|
57
58
|
on_missing_data: -> { MONITOR_OPTION_DEFAULTS.fetch(:on_missing_data) }
|
@@ -114,6 +115,10 @@ module Kennel
|
|
114
115
|
options[:threshold_windows] = windows
|
115
116
|
end
|
116
117
|
|
118
|
+
if schedule = scheduling_options
|
119
|
+
options[:scheduling_options] = schedule
|
120
|
+
end
|
121
|
+
|
117
122
|
# Datadog requires only either new_group_delay or new_host_delay, never both
|
118
123
|
options.delete(options[:new_group_delay] ? :new_host_delay : :new_group_delay)
|
119
124
|
|
data/lib/kennel/models/record.rb
CHANGED
@@ -151,7 +151,7 @@ module Kennel
|
|
151
151
|
rescue StandardError
|
152
152
|
if unfiltered_validation_errors.empty?
|
153
153
|
@unfiltered_validation_errors = nil
|
154
|
-
raise PrepareError, safe_tracking_id
|
154
|
+
raise PrepareError, safe_tracking_id # FIXME: this makes errors hard to debug when running tests
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
data/lib/kennel/tasks.rb
CHANGED
data/lib/kennel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kennel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.135.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diff-lcs
|