dashing-contrib 0.1.11 → 0.1.12
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 +4 -4
- data/README.md +1 -1
- data/lib/dashing-contrib/jobs/pingdom_uptime.rb +7 -1
- data/lib/dashing-contrib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c4f833763c66a8d55882aa3148dd0e9f3cd4cd0
|
|
4
|
+
data.tar.gz: 04db4b265177f482a994b6d268229fef6fbdbfdb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6770777c4fa20f77e4937c035f4ca3fa9f7d60ab070f53ddf74c92326c9d5738f076928a7e8d14d79ab87d222fe88135f203abe3d43f09fc6d5c7cb7d4d5e51b
|
|
7
|
+
data.tar.gz: ce75dedd3e3eae470b3871595d7c0b7b85deea78b75516ad1906c32a88d8b9d506a58f945bea821a13952bc68a33f703b529355c73ce3fe0c54cf4ca538a00aa
|
data/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Read each individual widget documentation to use dashing-contrib built-in widget
|
|
|
18
18
|
## Installation
|
|
19
19
|
Requires Ruby >= 1.9.3. Add this line to your Dashing's dashboard Gemfile:
|
|
20
20
|
|
|
21
|
-
gem 'dashing-contrib', '~> 0.1.
|
|
21
|
+
gem 'dashing-contrib', '~> 0.1.12'
|
|
22
22
|
|
|
23
23
|
Update dependencies:
|
|
24
24
|
|
|
@@ -20,6 +20,12 @@ module DashingContrib
|
|
|
20
20
|
second_uptime = client.uptime(id, user_opt[:second_date_range], user_opt[:now])
|
|
21
21
|
status = client.checks(id)
|
|
22
22
|
|
|
23
|
+
if status[:check][:lasterrortime].nil ?
|
|
24
|
+
last_down = "never"
|
|
25
|
+
else
|
|
26
|
+
last_down = ::DashingContrib::Time.readable_diff(::Time.at(status[:check][:lasterrortime]))
|
|
27
|
+
end
|
|
28
|
+
|
|
23
29
|
# returns this dataset
|
|
24
30
|
{
|
|
25
31
|
current: current_uptime.to_s,
|
|
@@ -29,7 +35,7 @@ module DashingContrib
|
|
|
29
35
|
second_title: user_opt[:second_title],
|
|
30
36
|
is_up: status[:check][:status] == 'up',
|
|
31
37
|
current_response_time: status[:check][:lastresponsetime],
|
|
32
|
-
last_downtime:
|
|
38
|
+
last_downtime: last_down
|
|
33
39
|
}
|
|
34
40
|
end
|
|
35
41
|
|