zabbixapi 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
data/lib/zabbixapi.rb
CHANGED
@@ -64,6 +64,13 @@ class ZabbixApi
|
|
64
64
|
width = data[:width] || 200 # default 200
|
65
65
|
vsize = data[:vsize] || (graphids.size/hsize).to_i
|
66
66
|
screenid = get_id(:name => screen_name)
|
67
|
+
|
68
|
+
if ((graphids.size/hsize) / 2) == 0
|
69
|
+
vsize = data[:vsize] || (graphids.size/hsize).to_i
|
70
|
+
else
|
71
|
+
vsize = data[:vsize] || ((graphids.size/hsize)+1).to_i
|
72
|
+
end
|
73
|
+
|
67
74
|
unless screenid
|
68
75
|
# Create screen
|
69
76
|
graphids.each_with_index do |graphid, index|
|
@@ -64,6 +64,13 @@ class ZabbixApi
|
|
64
64
|
width = data[:width] || 200 # default 200
|
65
65
|
vsize = data[:vsize] || (graphids.size/hsize).to_i
|
66
66
|
screenid = get_id(:name => screen_name)
|
67
|
+
|
68
|
+
if ((graphids.size/hsize) / 2) == 0
|
69
|
+
vsize = data[:vsize] || (graphids.size/hsize).to_i
|
70
|
+
else
|
71
|
+
vsize = data[:vsize] || ((graphids.size/hsize)+1).to_i
|
72
|
+
end
|
73
|
+
|
67
74
|
unless screenid
|
68
75
|
# Create screen
|
69
76
|
graphids.each_with_index do |graphid, index|
|
data/lib/zabbixapi/client.rb
CHANGED
@@ -49,7 +49,7 @@ class ZabbixApi
|
|
49
49
|
def http_request(body)
|
50
50
|
uri = URI.parse(@options[:url])
|
51
51
|
|
52
|
-
|
52
|
+
unless @proxy_uri.nil?
|
53
53
|
http = Net::HTTP.Proxy(@proxy_host, @proxy_port, @proxy_user, @proxy_pass).new(uri.host, uri.port)
|
54
54
|
if uri.port == 443
|
55
55
|
http.use_ssl = true
|
data/lib/zabbixapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zabbixapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -111,3 +111,4 @@ summary: Realization for Zabbix API.
|
|
111
111
|
test_files:
|
112
112
|
- spec/localhost.rb
|
113
113
|
- spec/run.rb
|
114
|
+
has_rdoc:
|