dashing-contrib 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54c08ada19918a56e1b5813aa54e656058ba7c4e
4
- data.tar.gz: b78bd41925b940c6f7143e8cbb9f65697843c4d5
3
+ metadata.gz: 5820f515b1c2fd4924839d2a6f8f3039083d783d
4
+ data.tar.gz: fe75d0fec65c2b6eabe3bd4af9333bfdb5471496
5
5
  SHA512:
6
- metadata.gz: 0eedeeca051780e9fa7f218893219f186c675a2ab4dfeff79a96a0a1e74abaf5d7cb4f80383e8d860300e652f63fd11735bdddb97cb2aa01cd527afba257d362
7
- data.tar.gz: fb0e73ea919028bae5fdd0d3f02d0fbcd81245c99b8c264a11f11681cae0e3c84e2c154cc7d49d48fcee83f69ec24dc3280e7f6bd089c405913b73367a8e4c0e
6
+ metadata.gz: 5dc883da911bdafd0498936ac68d80cb8aad1667c8c93f866e955a22d8be55322c4ce86b785384d2fa39e15de0167e361e8915acdc44fadec4f5e4c4969cd6d2
7
+ data.tar.gz: e8881573eff68336c43051163408bc307e0eb77201b83e2aa8db489d032cf6df81e682de9e9f5ab7a130a4601ee42575dc546c4a6cb865667ccbdaae7d7d751e
@@ -1,8 +1,8 @@
1
1
  class Dashing.NagiosList extends Dashing.Widget
2
2
  @accessor 'hasCritical', ->
3
- if (@get('critical').length > 0) then true else false
3
+ if (@get('critical') && @get('critical').length > 0) then true else false
4
4
  @accessor 'hasWarning', ->
5
- if (@get('warning').length > 0) then true else false
5
+ if (@get('warning') && @get('warning').length > 0) then true else false
6
6
 
7
7
  @accessor 'criticalMap', ->
8
8
  @_groupBy(@get('critical'))
@@ -23,6 +23,7 @@ class Dashing.NagiosList extends Dashing.Widget
23
23
 
24
24
  _groupBy: (items) ->
25
25
  maps = {}
26
+ items = items || []
26
27
  for item, index in items
27
28
  item.last_check = @_parseTime(item.last_check)
28
29
  if !maps[item.host]
@@ -1,3 +1,3 @@
1
1
  module DashingContrib
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dashing-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jing Dong
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-14 00:00:00.000000000 Z
11
+ date: 2014-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv