kennel 1.151.0 → 1.152.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/importer.rb +9 -1
- data/lib/kennel/models/dashboard.rb +2 -1
- data/lib/kennel/models/slo.rb +8 -3
- 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: 8f5635dc22edc239c198587b72e2b110c2d4e3595415bb43fbb3394be855eec9
|
4
|
+
data.tar.gz: 66c68a5c7c2955505bad98413d5518b4f23dee4485729012ee5172bf12012d3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6879610046903bca19a26982a8b45e7b741ec8504ff25878febb1cebd7d927137edceb807864235e9e16e1998657c26b4b9632d8265ada9bbdba285e99f3912
|
7
|
+
data.tar.gz: de73c7a44cd08eff9ae40f0a55a63054ca803ab079c7546a8dd67434f3c1499d1525ac332caf0c94d0448b14c76fab28ac74f5632154b48a23a3931adcc32009
|
data/lib/kennel/importer.rb
CHANGED
@@ -2,8 +2,15 @@
|
|
2
2
|
|
3
3
|
module Kennel
|
4
4
|
class Importer
|
5
|
+
# title will have the lock symbol we need to remove when re-importing
|
5
6
|
TITLES = [:name, :title].freeze
|
6
|
-
|
7
|
+
|
8
|
+
# bring important fields to the top
|
9
|
+
SORT_ORDER = [
|
10
|
+
*TITLES, :id, :kennel_id, :type, :tags, :query, :sli_specification,
|
11
|
+
*Models::Record.subclasses.flat_map { |k| k::TRACKING_FIELDS },
|
12
|
+
:template_variables
|
13
|
+
].freeze
|
7
14
|
|
8
15
|
def initialize(api)
|
9
16
|
@api = api
|
@@ -19,6 +26,7 @@ module Kennel
|
|
19
26
|
raise(ArgumentError, "#{resource} is not supported")
|
20
27
|
|
21
28
|
data = @api.show(model.api_resource, id)
|
29
|
+
|
22
30
|
id = data.fetch(:id) # keep native value
|
23
31
|
model.normalize({}, data) # removes id
|
24
32
|
data[:id] = id
|
@@ -6,7 +6,8 @@ module Kennel
|
|
6
6
|
include TagsValidation
|
7
7
|
|
8
8
|
READONLY_ATTRIBUTES = superclass::READONLY_ATTRIBUTES + [
|
9
|
-
:author_handle, :author_name, :modified_at, :deleted_at, :url, :is_read_only, :notify_list, :restricted_roles
|
9
|
+
:author_handle, :author_name, :modified_at, :deleted_at, :url, :is_read_only, :notify_list, :restricted_roles,
|
10
|
+
:experience_type
|
10
11
|
]
|
11
12
|
TRACKING_FIELD = :description
|
12
13
|
REQUEST_DEFAULTS = {
|
data/lib/kennel/models/slo.rb
CHANGED
@@ -4,7 +4,10 @@ module Kennel
|
|
4
4
|
class Slo < Record
|
5
5
|
include TagsValidation
|
6
6
|
|
7
|
-
READONLY_ATTRIBUTES =
|
7
|
+
READONLY_ATTRIBUTES = [
|
8
|
+
*superclass::READONLY_ATTRIBUTES,
|
9
|
+
:type_id, :monitor_tags, :target_threshold, :timeframe, :warning_threshold
|
10
|
+
].freeze
|
8
11
|
TRACKING_FIELD = :description
|
9
12
|
DEFAULTS = {
|
10
13
|
description: nil,
|
@@ -14,7 +17,7 @@ module Kennel
|
|
14
17
|
thresholds: []
|
15
18
|
}.freeze
|
16
19
|
|
17
|
-
settings :type, :description, :thresholds, :query, :tags, :monitor_ids, :monitor_tags, :name, :groups
|
20
|
+
settings :type, :description, :thresholds, :query, :tags, :monitor_ids, :monitor_tags, :name, :groups, :sli_specification
|
18
21
|
|
19
22
|
defaults(
|
20
23
|
tags: -> { @project.tags },
|
@@ -35,7 +38,9 @@ module Kennel
|
|
35
38
|
type: type
|
36
39
|
)
|
37
40
|
|
38
|
-
if
|
41
|
+
if type == "time_slice"
|
42
|
+
data[:sli_specification] = sli_specification
|
43
|
+
elsif v = query
|
39
44
|
data[:query] = v
|
40
45
|
end
|
41
46
|
|
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.152.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: 2024-
|
11
|
+
date: 2024-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diff-lcs
|