sensu-plugins-microsoft-teams 1.2.0 → 1.2.1

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
  SHA1:
3
- metadata.gz: 44ad2e0791a48adffce592b044e16e02f40c3a62
4
- data.tar.gz: e4070f9475851f4582d61caea1d46304333415e0
3
+ metadata.gz: cddaaf6d9c10924404d6d755fd56e4ccdb9dd62e
4
+ data.tar.gz: 3b6299665fd701fc0598048104b0a408c1445ac6
5
5
  SHA512:
6
- metadata.gz: b05e2076dc399815dcbb59125e5fbb5aa43502523fb4251550a7f50f580743ad8d875115edaafe7109e01d4eec6c8cbd660886bfcc791a1642df0a3bae643929
7
- data.tar.gz: e10a2bec44e3e73d203bc80809de4edd801cb5b872d812a49288e7373986d4cba8d3a10c474fd561617ac1a643522a04a51413d50f86c6a9a12890e2d02450ff
6
+ metadata.gz: 55eb85e5bbf0fdfa43d83f01bdff63a52587524e0ad1c9154712473e7f9108dfd6497989e920a0b0dd8afbde55d769481b00d9e21ea8974e8455455140d5094c
7
+ data.tar.gz: 783f10b7a6f3ac983468adc7f9feb2be9845a20944af9769f8dd208ce3c962b3bd956b2fcb305b515bc63f70209ec48df7186f1f2080c2c959608ab4f134036b
@@ -71,10 +71,6 @@ class MicrosoftTeams < Sensu::Handler
71
71
  get_setting('template') || get_setting('message_template')
72
72
  end
73
73
 
74
- def fields
75
- get_setting('fields')
76
- end
77
-
78
74
  def proxy_address
79
75
  get_setting('proxy_address')
80
76
  end
@@ -172,28 +168,12 @@ class MicrosoftTeams < Sensu::Handler
172
168
  end
173
169
 
174
170
  def payload(notice)
175
- client_fields = []
176
-
177
- unless fields.nil?
178
- fields.each do |field|
179
- # arbritary based on what I feel like
180
- # -vjanelle
181
- is_short = true unless @event['client'].key?(field) && @event['client'][field].length > 50
182
- client_fields << {
183
- title: field,
184
- value: @event['client'][field],
185
- short: is_short
186
- }
187
- end
188
- end
189
-
190
171
  {
191
172
  themeColor: color,
192
173
  text: "#{@event['client']['address']} - #{translate_status}",
193
174
  sections: [{
194
175
  activityImage: teams_icon_url ? teams_icon_url : 'https://raw.githubusercontent.com/sensu/sensu-logo/master/sensu1_flat%20white%20bg_png.png',
195
- text: [teams_message_prefix, notice].compact.join(' '),
196
- fields: client_fields
176
+ text: [teams_message_prefix, notice].compact.join(' ')
197
177
  }],
198
178
  potentialAction: [{
199
179
  '@type': teams_action_type ? teams_action_type : "OpenUri",
@@ -2,7 +2,7 @@ module SensuPluginsMicrosoftTeams
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-microsoft-teams
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors