flapjack 0.8.3 → 0.8.4

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: 0ce6f0286611137f8e6d18bcbef9ffd1b91684aa
4
- data.tar.gz: 6aeb2801bc9d8e29975976840a1d2011bcb15123
3
+ metadata.gz: 00e9afa87734c98245ef9b370a726bd5e5e4a9d7
4
+ data.tar.gz: 4852d02b41ec46f45bfe2fbb44cd18e4ad95a0a5
5
5
  SHA512:
6
- metadata.gz: 37798bf1be6e3edc8fb3d8d2a19f3a85232e462b12f110d9d821664089204d9f3dab505c6ed8c13e39f80c5a160f1da1394e9af31933c6a5bd2fb586f760e42c
7
- data.tar.gz: 6c3645d45731fe5bc4c699e1460ed13524a169611d24ca19b7ab8902a9b3ba23ab701ddb97fce3db8609acfc410e5ecf159f5c4a09842b569504297b74eca6e2
6
+ metadata.gz: d938e90fe44d654985e9bba3ec644f43a71bc172efb7e2cce39ae0dd38239fc164741ae4f4d2a57b0d88f85dd87f0ac4a699ea9fa30740ee6224b9186f738b6e
7
+ data.tar.gz: f37d7d6a16fd859fb2011cbc48fa5e0f8c82ec994e9238844921f4a49be28b267923beabf98723e1e1a5ccfc824a98d4cb8c3736b3dbe68844ff93e8b15f51a3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Flapjack Changelog
2
2
 
3
+ # 0.8.4 - 2014-01-31
4
+ - Bug: The scheduled maintenance periods table on the checks page is messed up gh-427 (@jswoods)
5
+ - Bug: api current check state shows check summary and details from last state change gh-431 (@ali-graham)
6
+
3
7
  # 0.8.3 - 2014-01-24
4
8
  - Feature: Fix background color for failing events for entity page gh-425 (@jswoods)
5
9
  - Feature: Enabled sort and filter options in the flapjack UI gh-418 (@jswoods)
@@ -486,13 +486,11 @@ module Flapjack
486
486
  end
487
487
 
488
488
  def summary
489
- timestamp = @redis.lindex("#{@key}:states", -1)
490
- @redis.get("#{@key}:#{timestamp}:summary")
489
+ @redis.hget("check:#{@key}", 'summary')
491
490
  end
492
491
 
493
492
  def details
494
- timestamp = @redis.lindex("#{@key}:states", -1)
495
- @redis.get("#{@key}:#{timestamp}:details")
493
+ @redis.hget("check:#{@key}", 'details')
496
494
  end
497
495
 
498
496
  # Returns a list of states for this entity check, sorted by timestamp.
@@ -306,9 +306,9 @@
306
306
  <% end %>
307
307
  </td>
308
308
  </tr>
309
+ <% end %>
309
310
  </table>
310
311
  </div><!-- col-md-12 -->
311
- <% end %>
312
312
  <% else %>
313
313
  <p>No maintenance is scheduled</p>
314
314
  <% end %>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  module Flapjack
4
- VERSION = "0.8.3"
4
+ VERSION = "0.8.4"
5
5
  end
@@ -440,13 +440,15 @@ describe Flapjack::Data::EntityCheck, :redis => true do
440
440
 
441
441
  it "does not update state with a repeated state value" do
442
442
  ec = Flapjack::Data::EntityCheck.for_entity_name(name, check, :redis => @redis)
443
- ec.update_state('critical', :summary => 'small problem')
443
+ ec.update_state('critical', :summary => 'small problem', :details => 'none')
444
444
  changed_at = @redis.hget("check:#{name}:#{check}", 'last_change')
445
- summary = @redis.hget("check:#{name}:#{check}", 'summary')
445
+ summary = ec.summary
446
+ details = ec.details
446
447
 
447
- ec.update_state('critical', :summary => 'big problem')
448
+ ec.update_state('critical', :summary => 'big problem', :details => 'some')
448
449
  new_changed_at = @redis.hget("check:#{name}:#{check}", 'last_change')
449
- new_summary = @redis.hget("check:#{name}:#{check}", 'summary')
450
+ new_summary = ec.summary
451
+ new_details = ec.details
450
452
 
451
453
  expect(changed_at).not_to be_nil
452
454
  expect(new_changed_at).not_to be_nil
@@ -457,6 +459,12 @@ describe Flapjack::Data::EntityCheck, :redis => true do
457
459
  expect(new_summary).not_to eq(summary)
458
460
  expect(summary).to eq('small problem')
459
461
  expect(new_summary).to eq('big problem')
462
+
463
+ expect(details).not_to be_nil
464
+ expect(new_details).not_to be_nil
465
+ expect(new_details).not_to eq(details)
466
+ expect(details).to eq('none')
467
+ expect(new_details).to eq('some')
460
468
  end
461
469
 
462
470
  def time_before(t, min, sec = 0)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flapjack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lindsay Holmwood
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-01-24 00:00:00.000000000 Z
13
+ date: 2014-01-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dante