kennel 1.57.1 → 1.57.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f4d30f9997028e1fee121bd886dd805b8214a821dfd5221ca8dd934c49fe293
4
- data.tar.gz: 04525ae21540c67f940283b7a1b421610f74ee83ee601bf05125d18c5ab17540
3
+ metadata.gz: edff257eab30fa336ef8a067c7d02a5c4cfdb919b2381cbb88593e7292f4bef7
4
+ data.tar.gz: d166cc4f9bba2c73edf292e5d2a6e1e4e190125a04b608594b0e78055755134c
5
5
  SHA512:
6
- metadata.gz: e1f5b4989277f497061da7530731075d048870305246ce30f5e915925363f42e4e1bd7297c80c052008525a01b4c6e66c772cc2e0ddb7ad8c72eb53e603a6778
7
- data.tar.gz: d1d9151dc9be6ba645ae5e85b6096dd97b7c521ff7d092a65302568b951bd5126cdd1f276916cb3c0afe354ccfd5cb605656234b5f7b602b1ff96bef1b0b7db6
6
+ metadata.gz: b69c79b3ab7b34499bf4760d36ea54401b10e1bd0d68b37e4b39796b0a4fb48909a18fcbd724db619d95abf92f9585f094ec11c5d6c0332c3e4880c52654e977
7
+ data.tar.gz: ec9060115f34e789d1706e0165cd30fd5fb72c1451c6fa4b5df00b57fec18335ed81b960444a03424c5cf727fab6d32184357e0a442b93d86b2405b246f073e5
@@ -15,7 +15,7 @@ module Kennel
15
15
  }.freeze
16
16
  SUPPORTED_DEFINITION_OPTIONS = [:events, :markers, :precision].freeze
17
17
 
18
- settings :id, :title, :description, :definitions, :widgets, :kennel_id, :layout_type
18
+ settings :title, :description, :definitions, :widgets, :layout_type
19
19
 
20
20
  defaults(
21
21
  description: -> { "" },
@@ -4,11 +4,12 @@ module Kennel
4
4
  class Monitor < Record
5
5
  include OptionalValidations
6
6
 
7
- API_LIST_INCOMPLETE = false
8
7
  RENOTIFY_INTERVALS = [0, 10, 20, 30, 40, 50, 60, 90, 120, 180, 240, 300, 360, 720, 1440].freeze # minutes
9
8
  QUERY_INTERVALS = ["1m", "5m", "10m", "15m", "30m", "1h", "2h", "4h", "1d"].freeze
10
9
  OPTIONAL_SERVICE_CHECK_THRESHOLDS = [:ok, :warning].freeze
11
- READONLY_ATTRIBUTES = superclass::READONLY_ATTRIBUTES + [:multi]
10
+ READONLY_ATTRIBUTES = superclass::READONLY_ATTRIBUTES + [
11
+ :multi, :matching_downtimes, :overall_state_modified, :overall_state
12
+ ]
12
13
 
13
14
  # defaults that datadog uses when options are not sent, so safe to leave out if our values match their defaults
14
15
  MONITOR_OPTION_DEFAULTS = {
@@ -21,8 +22,8 @@ module Kennel
21
22
  DEFAULT_ESCALATION_MESSAGE = ["", nil].freeze
22
23
 
23
24
  settings(
24
- :query, :name, :message, :escalation_message, :critical, :kennel_id, :type, :renotify_interval, :warning, :timeout_h, :evaluation_delay,
25
- :ok, :id, :no_data_timeframe, :notify_no_data, :notify_audit, :tags, :critical_recovery, :warning_recovery, :require_full_window,
25
+ :query, :name, :message, :escalation_message, :critical, :type, :renotify_interval, :warning, :timeout_h, :evaluation_delay,
26
+ :ok, :no_data_timeframe, :notify_no_data, :notify_audit, :tags, :critical_recovery, :warning_recovery, :require_full_window,
26
27
  :threshold_windows, :new_host_delay
27
28
  )
28
29
 
@@ -4,18 +4,20 @@ module Kennel
4
4
  class Record < Base
5
5
  LOCK = "\u{1F512}"
6
6
  READONLY_ATTRIBUTES = [
7
- :deleted, :matching_downtimes, :id, :created, :created_at, :creator, :org_id, :modified,
8
- :modified_at, :overall_state_modified, :overall_state, :api_resource
7
+ :deleted, :id, :created, :created_at, :creator, :org_id, :modified, :modified_at, :api_resource
9
8
  ].freeze
10
9
  REQUEST_DEFAULTS = {
11
10
  style: { width: "normal", palette: "dog_classic", type: "solid" },
12
11
  conditional_formats: [],
13
12
  aggregator: "avg"
14
13
  }.freeze
14
+ API_LIST_INCOMPLETE = false
15
15
 
16
16
  class ValidationError < RuntimeError
17
17
  end
18
18
 
19
+ settings :id, :kennel_id
20
+
19
21
  class << self
20
22
  private
21
23
 
@@ -56,6 +58,7 @@ module Kennel
56
58
  attr_reader :project
57
59
 
58
60
  def initialize(project, *args)
61
+ raise ArgumentError, "First argument must be a project, not #{project.class}" unless project.is_a?(Project)
59
62
  @project = project
60
63
  super(*args)
61
64
  end
@@ -3,14 +3,13 @@ module Kennel
3
3
  module Models
4
4
  class Slo < Record
5
5
  READONLY_ATTRIBUTES = superclass::READONLY_ATTRIBUTES + [:type_id, :monitor_tags]
6
- API_LIST_INCOMPLETE = false
7
6
  DEFAULTS = {
8
7
  description: nil,
9
8
  query: nil,
10
9
  monitor_ids: []
11
10
  }.freeze
12
11
 
13
- settings :id, :type, :description, :thresholds, :query, :tags, :monitor_ids, :monitor_tags, :kennel_id, :name
12
+ settings :type, :description, :thresholds, :query, :tags, :monitor_ids, :monitor_tags, :name
14
13
 
15
14
  defaults(
16
15
  id: -> { nil },
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.57.1"
3
+ VERSION = "1.57.2"
4
4
  end
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.57.1
4
+ version: 1.57.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-13 00:00:00.000000000 Z
11
+ date: 2019-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday