redhat_access 2.0.8 → 2.0.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 891c0c523197bcb2b164955aea3caebfc6a3f609
|
4
|
+
data.tar.gz: 1a69a775d400a364bd136a34cba866f067dbc8db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83df1989746684191b483b8ff07a5c12a2affb5a303670c33e9502cc8fdfeff321c40230917917ad622bf214c97ab03ad047aa9d6d83dedca2bc1bfefdea6592
|
7
|
+
data.tar.gz: 5023ca820fa8fdb563923cdeed710d5f3873d28a4b613c342e776cff42eb698596eba4ec7bf93d0736a22540849163f78dc536da3f4b90556d71230f1f3d3019
|
@@ -27,8 +27,8 @@ module RedhatAccess
|
|
27
27
|
:high_percent => percent(rule_counts.error,rule_counts.total),
|
28
28
|
:critical_percent => percent(rule_counts.critical,rule_counts.total)
|
29
29
|
})
|
30
|
-
rescue
|
31
|
-
return error_response("Unable to get risk summary
|
30
|
+
rescue Exception => e
|
31
|
+
return error_response("Unable to get risk summary : #{e}")
|
32
32
|
end
|
33
33
|
# return {:critical_count => 10,
|
34
34
|
# :system_count => 100,
|
@@ -42,8 +42,8 @@ module RedhatAccess
|
|
42
42
|
def rules_stat_summary
|
43
43
|
begin
|
44
44
|
http_get_from_json(RULE_STATS_PATH, {}, true)
|
45
|
-
rescue
|
46
|
-
return error_response("Unable to get rule summary
|
45
|
+
rescue Exception => e
|
46
|
+
return error_response("Unable to get rule summary : #{e}")
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -56,7 +56,7 @@ module RedhatAccess
|
|
56
56
|
user_data = weekly_summary_data(user.login)
|
57
57
|
data.push(user_data) unless user_data.nil? || user_data[:data].nil? || user_data[:data].total_systems == 0
|
58
58
|
rescue => e
|
59
|
-
Rails.logger.warn("Unable to get weekly email data for user")
|
59
|
+
Rails.logger.warn("Unable to get weekly email data for user : #{e}")
|
60
60
|
end
|
61
61
|
end
|
62
62
|
data
|
@@ -98,7 +98,7 @@ module RedhatAccess
|
|
98
98
|
if machines.empty?
|
99
99
|
machines = ['NULL_SET']
|
100
100
|
end
|
101
|
-
machines
|
101
|
+
machines.sort
|
102
102
|
end
|
103
103
|
|
104
104
|
def get_current_organization
|
@@ -167,11 +167,18 @@ module RedhatAccess
|
|
167
167
|
options[:payload],
|
168
168
|
nil,
|
169
169
|
options[:use_subsets])
|
170
|
-
|
171
|
-
|
172
|
-
|
170
|
+
if res.key?(:error)
|
171
|
+
raise res[:error]
|
172
|
+
end
|
173
|
+
res[:data]
|
174
|
+
|
175
|
+
end
|
176
|
+
|
177
|
+
def handle_errors(http_code)
|
178
|
+
return if http_code == 200 or http_code == 201
|
179
|
+
case http_code
|
180
|
+
when 401
|
173
181
|
end
|
174
|
-
resp_data
|
175
182
|
end
|
176
183
|
|
177
184
|
def new_api_client(add_user_header)
|
@@ -15,7 +15,8 @@
|
|
15
15
|
<% api = RedhatAccess::Telemetry::MessagingService.new(Organization.current) %>
|
16
16
|
<% data = api.rules_stat_summary %>
|
17
17
|
<% if data.query_error %>
|
18
|
-
<p class="ca"><%= _("There was an error retrieving Insights data
|
18
|
+
<p class="ca"><%= _("There was an error retrieving Insights data:") %></p>
|
19
|
+
<p class="ca"><%= data.query_error %></p>
|
19
20
|
<% else %>
|
20
21
|
<table class="table table-fixed table-striped table-bordered">
|
21
22
|
<thead>
|
@@ -15,7 +15,8 @@
|
|
15
15
|
<% api = RedhatAccess::Telemetry::MessagingService.new(Organization.current) %>
|
16
16
|
<% risk_data = api.risk_summary %>
|
17
17
|
<% if risk_data.query_error %>
|
18
|
-
<p class="ca"><%= _("There was an error retrieving Insights data
|
18
|
+
<p class="ca"><%= _("There was an error retrieving Insights data:") %></p>
|
19
|
+
<p class="ca"><%= risk_data.query_error %></p>
|
19
20
|
<% else %>
|
20
21
|
<table class="table table-fixed table-striped table-bordered">
|
21
22
|
<thead>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redhat_access
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lindani Phiri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redhat_access_lib
|