lib/doggy/models/dashboard.rb in doggy-2.0.29 vs lib/doggy/models/dashboard.rb in doggy-2.0.30
- old
+ new
@@ -9,9 +9,22 @@
attribute :title, String
attribute :description, String
attribute :graphs, Array[Hash]
attribute :template_variables, Array[Hash]
+ attribute :read_only, Boolean
+
+ def prefix
+ 'dash'
+ end
+
+ def ensure_read_only!
+ self.read_only = true
+ end
+
+ def refute_read_only!
+ self.read_only = false
+ end
def self.resource_url(id = nil)
"https://app.datadoghq.com/api/v1/dash".tap do |base_url|
base_url << "/#{ id }" if id
end