foreman_abrt 0.0.4 → 0.0.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 +4 -4
- data/README.md +34 -26
- data/app/controllers/abrt_reports_controller.rb +3 -3
- data/app/helpers/abrt_reports_helper.rb +64 -3
- data/app/models/setting/abrt.rb +14 -13
- data/app/views/abrt_reports/_basic_auth_modal.html.erb +50 -0
- data/app/views/abrt_reports/_host_tab.html.erb +1 -1
- data/app/views/abrt_reports/_host_tab_pane.html.erb +2 -2
- data/app/views/abrt_reports/_list.html.erb +1 -1
- data/app/views/abrt_reports/_show_response.html.erb +5 -17
- data/app/views/abrt_reports/index.html.erb +1 -1
- data/app/views/abrt_reports/show.html.erb +46 -6
- data/app/views/dashboard/_foreman_abrt_widget.html.erb +1 -1
- data/lib/foreman_abrt/engine.rb +2 -2
- data/lib/foreman_abrt/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ba5743bcf41e5dbeca1b9c7a9a25f6debe2d72d
|
4
|
+
data.tar.gz: 7a4fdd1f2fe0956d8db1cc5ff9c0f03a96168428
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2230f87529777ebcff809981e9811d03fc5deade1f0c0715ab5c9ccb45d9202dceb97b7c1ad151dd6f6cc972258be6b0d15fb799b396af5713017a360257d596
|
7
|
+
data.tar.gz: 58fb70f4094a7395e3f699467bdd03d35a9e789d68a842e156f51ca4e327171f9a335aa99dbee801e2d0ffeda9db84ae66555eb4d1d0add825c7244511abd621
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# ForemanAbrt
|
2
2
|
|
3
|
-
This plugin allows your Foreman instance to receive
|
4
|
-
your hosts by [ABRT](https://github.com/abrt/abrt) (Automatic Bug Reporting
|
5
|
-
Tool). These reports can be inspected and eventually
|
6
|
-
|
3
|
+
This plugin allows your Foreman instance to receive problem reports generated
|
4
|
+
on your hosts by [ABRT](https://github.com/abrt/abrt) (Automatic Bug Reporting
|
5
|
+
Tool). These reports can be inspected and eventually sent to the ABRT server
|
6
|
+
for analysis.
|
7
7
|
|
8
8
|
## Overview
|
9
9
|
|
@@ -18,28 +18,26 @@ server.
|
|
18
18
|
instance of set of similar reports from a host is sent, together with
|
19
19
|
number of the reports in the set.
|
20
20
|
3. Foreman receives the aggregated report and stores it to the database. The
|
21
|
-
reports can be inspected and forwarded
|
22
|
-
responds with additional information about the report,
|
23
|
-
trackers or suggested solutions, it is displayed
|
21
|
+
reports can be inspected and forwarded ("sent for analysis") to the ABRT
|
22
|
+
server. If the server responds with additional information about the report,
|
23
|
+
such as links to bug trackers or suggested solutions, it is displayed
|
24
|
+
alongside the report.
|
24
25
|
|
25
26
|

|
26
27
|
|
27
28
|
## Installation
|
28
29
|
|
29
|
-
To be able to see ABRT
|
30
|
+
To be able to see ABRT problem reports in your Foreman instance, you need to
|
30
31
|
install the plugin itself, install ABRT plugin for your smart proxies and
|
31
|
-
configure your hosts to send the
|
32
|
+
configure your hosts to send the problem reports to their smart proxy.
|
32
33
|
|
33
34
|
Both plugins are available as RPMs in [Foreman YUM repositories](http://yum.theforeman.org/).
|
34
35
|
|
35
36
|
### Prerequisites
|
36
37
|
|
37
|
-
The plugins require both Foreman and smart-proxy to be version 1.
|
38
|
+
The plugins require both Foreman and smart-proxy to be version 1.7 or later.
|
38
39
|
|
39
|
-
The plugins have been tested on Fedora 19, RHEL 6 and RHEL 7.
|
40
|
-
version of `rubygem-ffi` the smart-proxy plugin does not work on RHEL 6 unless
|
41
|
-
you set the option `aggregate_reports` to `false` in
|
42
|
-
`/etc/foreman-proxy/settings.d/abrt.yml`.
|
40
|
+
The plugins have been tested on Fedora 19, RHEL 6 and RHEL 7.
|
43
41
|
|
44
42
|
To have hosts automatically send ureports to Foreman, you need to have ABRT
|
45
43
|
2.1.11 or higher installed on them. RHEL 7 and Fedora 19 and higher satisfy
|
@@ -55,6 +53,8 @@ instructions](http://projects.theforeman.org/projects/foreman/wiki/How_to_Instal
|
|
55
53
|
You need to install the `rubygem-foreman_abrt` package (or
|
56
54
|
`ruby193-rubygem-foreman_abrt` on RHEL/CentOS).
|
57
55
|
|
56
|
+
After installing the plugin, restart Foreman with `touch /usr/share/foreman/tmp/restart.txt`.
|
57
|
+
|
58
58
|
### Setting up smart proxies
|
59
59
|
|
60
60
|
Follow the [smart-proxy plugin installation
|
@@ -80,12 +80,20 @@ The plugin needs some configuration in order to work correctly.
|
|
80
80
|
:enabled: true
|
81
81
|
```
|
82
82
|
|
83
|
-
-
|
83
|
+
- After installing and configuring the plugin, smart-proxy has to be restarted.
|
84
|
+
```
|
85
|
+
service foreman-proxy restart
|
86
|
+
```
|
87
|
+
|
88
|
+
- Cron is used to transfer the captured problem reports to Foreman in batches.
|
84
89
|
Ensure that the `smart-proxy-abrt-send` command is run periodically. The
|
85
90
|
provided RPM package contains a cron snippet that runs the command every 30
|
86
91
|
minutes.
|
87
92
|
|
88
|
-
### Configuring hosts to send
|
93
|
+
### Configuring hosts to send problem reports to Foreman
|
94
|
+
|
95
|
+
This setup needs to be performed on every host that you wish to report its
|
96
|
+
crashes to Foreman.
|
89
97
|
|
90
98
|
- Make sure that ABRT is installed and running.
|
91
99
|
```
|
@@ -151,20 +159,20 @@ make sure not to actually report this to `sleep` maintainers, though:
|
|
151
159
|
|
152
160
|
## Usage
|
153
161
|
|
154
|
-
The list of received
|
155
|
-
link in the *Monitor* menu. To see detailed information for a report,
|
156
|
-
its reported date.
|
162
|
+
The list of received problem reports can be accessed by clicking on *Problem
|
163
|
+
reports* link in the *Monitor* menu. To see detailed information for a report,
|
164
|
+
click on its reported date.
|
157
165
|
|
158
|
-
List of
|
159
|
-
with the details about the host in the *
|
166
|
+
List of problem reports coming from a particular host is also displayed on the
|
167
|
+
page with the details about the host in the *Problem reports* tab on the left.
|
160
168
|
|
161
169
|
### Forwarding the report to the ABRT server
|
162
170
|
|
163
|
-
On the
|
164
|
-
ABRT server by clicking the *
|
165
|
-
respond with some information it knows about the bug, such as the list of
|
166
|
-
related to the bug (e.g. Bugzilla link) and list of possible solutions to
|
167
|
-
problem that caused the bug to occur.
|
171
|
+
On the problem report details page you can forward the problem report to an
|
172
|
+
actual ABRT server by clicking the *Send for analysis* button. The ABRT server
|
173
|
+
may respond with some information it knows about the bug, such as the list of
|
174
|
+
URLs related to the bug (e.g. Bugzilla link) and list of possible solutions to
|
175
|
+
the problem that caused the bug to occur.
|
168
176
|
|
169
177
|
The forwarding functionality may have to be configured in *Abrt* tab of the
|
170
178
|
configuration screen (*Administer*->*Settings*).
|
@@ -30,7 +30,7 @@ class AbrtReportsController < ApplicationController
|
|
30
30
|
# DELETE /abrt_reports/42
|
31
31
|
def destroy
|
32
32
|
if @abrt_report.destroy
|
33
|
-
notice _("Successfully deleted
|
33
|
+
notice _("Successfully deleted problem report.")
|
34
34
|
else
|
35
35
|
error @abrt_reports.errors.full_messages.join("<br/>")
|
36
36
|
end
|
@@ -42,7 +42,7 @@ class AbrtReportsController < ApplicationController
|
|
42
42
|
redirect_to abrt_report_url(@abrt_report)
|
43
43
|
|
44
44
|
begin
|
45
|
-
response = send_to_abrt_server @abrt_report
|
45
|
+
response = send_to_abrt_server @abrt_report, params[:username], params[:password]
|
46
46
|
rescue => e
|
47
47
|
error _("Server rejected our report: #{e.message}") and return
|
48
48
|
end
|
@@ -53,7 +53,7 @@ class AbrtReportsController < ApplicationController
|
|
53
53
|
error _("Cannot process server response: #{e.message}") and return
|
54
54
|
end
|
55
55
|
|
56
|
-
notice _("Report
|
56
|
+
notice _("Report sent for analysis")
|
57
57
|
end
|
58
58
|
|
59
59
|
private
|
@@ -39,7 +39,7 @@ module AbrtReportsHelper
|
|
39
39
|
attr_reader :path, :content_type
|
40
40
|
end
|
41
41
|
|
42
|
-
def send_to_abrt_server(abrt_report)
|
42
|
+
def send_to_abrt_server(abrt_report, username = nil, password = nil)
|
43
43
|
request_params = {
|
44
44
|
:timeout => 60,
|
45
45
|
:open_timeout => 10,
|
@@ -56,13 +56,22 @@ module AbrtReportsHelper
|
|
56
56
|
request_params[:ssl_client_key] = OpenSSL::PKey::RSA.new(File.read(Setting[:abrt_server_ssl_priv_key]))
|
57
57
|
end
|
58
58
|
|
59
|
+
# basic auth
|
60
|
+
if !Setting[:abrt_server_basic_auth_username].empty? && !Setting[:abrt_server_basic_auth_password].empty?
|
61
|
+
request_params[:user] = Setting[:abrt_server_basic_auth_username]
|
62
|
+
request_params[:password] = Setting[:abrt_server_basic_auth_password]
|
63
|
+
elsif username && password
|
64
|
+
request_params[:user] = username
|
65
|
+
request_params[:password] = password
|
66
|
+
end
|
67
|
+
|
59
68
|
resource = RestClient::Resource.new(Setting[:abrt_server_url], request_params)
|
60
69
|
report_file = StringIOWithPath.new(abrt_report.json, '*buffer*', 'application/json')
|
61
70
|
response = resource['reports/new/'].post({ :file => report_file, :multipart => true }, :content_type => :json, :accept => :json)
|
62
71
|
|
63
72
|
if response.code != 202
|
64
|
-
logger.error "Failed to
|
65
|
-
raise ::Foreman::Exception.new(N_('Failed to forward
|
73
|
+
logger.error "Failed to send the report for analysis: #{response.code}: #{response.to_str}"
|
74
|
+
raise ::Foreman::Exception.new(N_('Failed to forward problem report: %s: %s', response.code, response.to_str))
|
66
75
|
end
|
67
76
|
|
68
77
|
JSON.parse(response.body)
|
@@ -75,4 +84,56 @@ module AbrtReportsHelper
|
|
75
84
|
reason
|
76
85
|
end
|
77
86
|
end
|
87
|
+
|
88
|
+
def using_redhat_server?
|
89
|
+
match = %r{^https://[^/]*access\.redhat\.com/}.match(Setting[:abrt_server_url])
|
90
|
+
!!match
|
91
|
+
end
|
92
|
+
|
93
|
+
def ask_for_auth?
|
94
|
+
if !Setting[:abrt_server_basic_auth_username].empty? && !Setting[:abrt_server_basic_auth_password].empty?
|
95
|
+
false
|
96
|
+
elsif Setting[:abrt_server_basic_auth_required] || using_redhat_server?
|
97
|
+
true
|
98
|
+
else
|
99
|
+
false
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def display_forward_button(abrt_report)
|
104
|
+
if ask_for_auth?
|
105
|
+
button_tag _('Send for analysis'), :id => 'forward_auth_button', :class => 'btn btn-success'
|
106
|
+
else
|
107
|
+
options = { :class => 'btn btn-success', :method => :post }
|
108
|
+
if abrt_report.forwarded_at
|
109
|
+
options[:confirm] = _('The report has already been sent. Sending it again will overwrite the previous response.')
|
110
|
+
end
|
111
|
+
link_to _('Send for analysis'), forward_abrt_report_path(abrt_report), options
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
def forward_auth_title
|
116
|
+
if using_redhat_server?
|
117
|
+
_('Please provide Red Hat Customer Portal credentials')
|
118
|
+
else
|
119
|
+
_('Please provide ABRT server credentials')
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
def forward_auth_login
|
124
|
+
if using_redhat_server?
|
125
|
+
_('Red Hat Login')
|
126
|
+
else
|
127
|
+
_('Login')
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
def forward_auth_text
|
132
|
+
if using_redhat_server?
|
133
|
+
_('The problem report will be sent to Red Hat in order to determine if a solution exists. '\
|
134
|
+
'You need to provide your Red Hat Customer Portal login and password in order to proceed.')
|
135
|
+
else
|
136
|
+
_('Your ABRT server is configured to require login and password.')
|
137
|
+
end
|
138
|
+
end
|
78
139
|
end
|
data/app/models/setting/abrt.rb
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
class Setting::Abrt < ::Setting
|
2
|
+
BLANK_ATTRS << "abrt_server_ssl_certificate"
|
3
|
+
BLANK_ATTRS << "abrt_server_ssl_priv_key"
|
4
|
+
BLANK_ATTRS << "abrt_server_ssl_ca_file"
|
5
|
+
BLANK_ATTRS << "abrt_server_basic_auth_username"
|
6
|
+
BLANK_ATTRS << "abrt_server_basic_auth_password"
|
7
|
+
URI_ATTRS << "abrt_server_url"
|
2
8
|
|
3
9
|
def self.load_defaults
|
4
10
|
return unless super
|
5
11
|
|
6
|
-
fqdn = Facter.value(:fqdn) || SETTINGS[:fqdn]
|
7
|
-
lower_fqdn = fqdn.downcase
|
8
|
-
|
9
|
-
# Try taking the provisioning SSL setup for default
|
10
|
-
ssl_cert = Setting[:ssl_certificate] || "#{SETTINGS[:puppetvardir]}/ssl/certs/#{lower_fqdn}.pem"
|
11
|
-
ssl_ca_file = Setting[:ssl_ca_file] || "#{SETTINGS[:puppetvardir]}/ssl/certs/ca.pem"
|
12
|
-
ssl_priv_key = Setting[:ssl_priv_key] || "#{SETTINGS[:puppetvardir]}/ssl/private_keys/#{lower_fqdn}.pem"
|
13
|
-
|
14
12
|
Setting.transaction do
|
15
13
|
[
|
16
|
-
self.set('abrt_server_url', N_('URL of the ABRT server to
|
14
|
+
self.set('abrt_server_url', N_('URL of the ABRT server to send reports to'), 'https://localhost/faf'),
|
17
15
|
self.set('abrt_server_verify_ssl', N_('Verify ABRT server certificate?'), true),
|
18
|
-
self.set('abrt_server_ssl_certificate', N_('SSL certificate path that Foreman would use to communicate with ABRT server'),
|
19
|
-
self.set('abrt_server_ssl_priv_key', N_('SSL private key path that Foreman would use to communicate with ABRT server'),
|
20
|
-
self.set('abrt_server_ssl_ca_file', N_('SSL CA file that Foreman will use to communicate with ABRT server'),
|
21
|
-
self.set('abrt_automatically_forward', N_('Automatically
|
16
|
+
self.set('abrt_server_ssl_certificate', N_('SSL certificate path that Foreman would use to communicate with ABRT server'), ''),
|
17
|
+
self.set('abrt_server_ssl_priv_key', N_('SSL private key path that Foreman would use to communicate with ABRT server'), ''),
|
18
|
+
self.set('abrt_server_ssl_ca_file', N_('SSL CA file that Foreman will use to communicate with ABRT server'), ''),
|
19
|
+
self.set('abrt_automatically_forward', N_('Automatically send every report to an ABRT server for analysis?'), false),
|
20
|
+
self.set('abrt_server_basic_auth_required', N_('Does the server require authentication through username and password?'), false),
|
21
|
+
self.set('abrt_server_basic_auth_username', N_('User name for server authentication'), ''),
|
22
|
+
self.set('abrt_server_basic_auth_password', N_('Password for server authentication. WARNING: visible to anyone with access to settings'), ''),
|
22
23
|
].compact.each { |s| self.create s.update(:category => 'Setting::Abrt') }
|
23
24
|
end
|
24
25
|
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<div id="forward_auth" class="modal fade hide">
|
2
|
+
<div class="modal-dialog modal-sm">
|
3
|
+
<div class="modal-content">
|
4
|
+
<div class="modal-header">
|
5
|
+
<%= alert_close('modal') %>
|
6
|
+
<h4 class="modal-title"><%= forward_auth_title %></h4>
|
7
|
+
</div>
|
8
|
+
<div class="modal-body">
|
9
|
+
<% if forward_auth_text %>
|
10
|
+
<p><%= forward_auth_text %></p><br>
|
11
|
+
<% end %>
|
12
|
+
<%= form_tag forward_abrt_report_path(@abrt_report), :class => 'form form-horizontal' do %>
|
13
|
+
<div class="form-group">
|
14
|
+
<%= label_tag :username, forward_auth_login, :class => 'col-sm-3 control-label' %>
|
15
|
+
<div class="col-sm-9">
|
16
|
+
<%= text_field_tag :username, nil, :class => 'form-control' %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="form-group">
|
20
|
+
<%= label_tag :password, _("Password"), :class => 'col-sm-3 control-label' %>
|
21
|
+
<div class="col-sm-9">
|
22
|
+
<%= password_field_tag :password, nil, :class => 'form-control' %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<% if defined? ::RedhatAccess %>
|
26
|
+
<div class="form-group" id="redhat_access_alert_use" style="display: none;">
|
27
|
+
<div class="col-sm-offset-3 col-sm-9">
|
28
|
+
<%= link_to _("Use Red Hat Access credentials"), '#', :id => 'redhat_access_fill' %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<div class="alert alert-info" id="redhat_access_alert_login">
|
32
|
+
<%= (_("You can log into %s to avoid typing your credentials.") % link_to('Red Hat Access', ::RedhatAccess::Engine.routes.url_helpers.search_index_path)).html_safe %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
35
|
+
<% if @abrt_report.forwarded_at %>
|
36
|
+
<div class="alert alert-warning">
|
37
|
+
<%= _('The report has already been sent. Sending it again will overwrite the previous response.') %>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
<div class="form-group">
|
41
|
+
<div class="col-sm-offset-3 col-sm-9">
|
42
|
+
<%= submit_tag _('Send for analysis'), :class => 'btn btn-success' %>
|
43
|
+
<%= modal_close 'modal', _('Cancel') %>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
<% end %>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</div>
|
@@ -1 +1 @@
|
|
1
|
-
<li><a href="#abrt" data-toggle="tab"><%= _("
|
1
|
+
<li><a href="#abrt" data-toggle="tab"><%= _("Problems") %></a></li>
|
@@ -14,8 +14,8 @@
|
|
14
14
|
</tr>
|
15
15
|
<% end %>
|
16
16
|
</table>
|
17
|
-
<%= link_to _('All
|
17
|
+
<%= link_to _('All reports for this host'), host_abrt_reports_path(@host), :class => 'btn btn-default' %>
|
18
18
|
<% else %>
|
19
|
-
<div class="alert alert-success"> <%= _('No
|
19
|
+
<div class="alert alert-success"> <%= _('No problem reports for this host in the last month') %> </div>
|
20
20
|
<% end %>
|
21
21
|
</div>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<td> <%= checked_icon !abrt_report.forwarded_at.nil? %> </td>
|
25
25
|
<td align="right">
|
26
26
|
<%= display_delete_if_authorized hash_for_abrt_report_path(:id => abrt_report.id).merge(:auth_object => abrt_report, :authorizer => authorizer),
|
27
|
-
:confirm => _('Delete
|
27
|
+
:confirm => _('Delete problem report for %s?') % abrt_report.host.try(:name) %>
|
28
28
|
</td>
|
29
29
|
</tr>
|
30
30
|
<% end %>
|
@@ -1,27 +1,15 @@
|
|
1
1
|
<div class="row">
|
2
2
|
<div class="col-md-12">
|
3
|
-
<p><%= _('The report has been
|
4
|
-
|
5
|
-
</
|
6
|
-
|
7
|
-
<div class="row">
|
8
|
-
<div class="col-md-12">
|
9
|
-
<table class="table table-bordered table-striped">
|
10
|
-
<tr>
|
11
|
-
<th><%= _('Known problem') %></th>
|
12
|
-
<td><%= @abrt_report.response_known %></td>
|
13
|
-
</tr>
|
14
|
-
<tr>
|
15
|
-
<th><%= _('Message') %></th>
|
16
|
-
<td><%= simple_format_if_multiline @abrt_report.response_message %></td>
|
17
|
-
</tr>
|
18
|
-
</table>
|
3
|
+
<p><%= _('The report has been sent for analysis on %s.') % @abrt_report.forwarded_at.getlocal %></p>
|
4
|
+
<% if !params[:show_bthash].nil? %>
|
5
|
+
<p> <%= _('bthash: %s') % @abrt_report.response_bthash %> </p>
|
6
|
+
<% end %>
|
19
7
|
</div>
|
20
8
|
</div>
|
21
9
|
|
22
10
|
<div class="row">
|
23
11
|
<div class="col-md-6">
|
24
|
-
<h3>
|
12
|
+
<h3>Reports</h3>
|
25
13
|
<% if !@abrt_report.abrt_report_response_destinations.empty? %>
|
26
14
|
<table class="table table-bordered table-striped">
|
27
15
|
<% @abrt_report.abrt_report_response_destinations.each do |destination| %>
|
@@ -1,12 +1,48 @@
|
|
1
|
+
<%= javascript_tag do %>
|
2
|
+
$(function () {
|
3
|
+
// basic http auth modal dialog setup
|
4
|
+
var button = $("#forward_auth_button")
|
5
|
+
var dialog = $("#forward_auth")
|
6
|
+
|
7
|
+
dialog.modal({
|
8
|
+
backdrop: 'static',
|
9
|
+
show: false
|
10
|
+
})
|
11
|
+
|
12
|
+
button.on('click', function () {
|
13
|
+
dialog.modal('show')
|
14
|
+
});
|
15
|
+
|
16
|
+
// filling the dialog with redhat_access credentials
|
17
|
+
var token = localStorage.getItem('rhAuthToken');
|
18
|
+
var rhUser = '';
|
19
|
+
var rhPass = '';
|
20
|
+
if (token) {
|
21
|
+
try {
|
22
|
+
decoded = atob(token);
|
23
|
+
colonPos = decoded.indexOf(':');
|
24
|
+
if (colonPos != -1) {
|
25
|
+
rhUser = decoded.substring(0, colonPos);
|
26
|
+
rhPass = decoded.substring(colonPos+1);
|
27
|
+
$("#redhat_access_alert_login").hide();
|
28
|
+
$("#redhat_access_alert_use").show();
|
29
|
+
}
|
30
|
+
} catch(err) {}
|
31
|
+
}
|
32
|
+
|
33
|
+
$("#redhat_access_fill").on('click', function (e) {
|
34
|
+
e.preventDefault();
|
35
|
+
$("#username").val(rhUser);
|
36
|
+
$("#password").val(rhPass);
|
37
|
+
});
|
38
|
+
});
|
39
|
+
<% end %>
|
40
|
+
|
1
41
|
<% title @abrt_report.host.to_s %>
|
2
42
|
|
3
43
|
<%= title_actions link_to(_('Host details'), @abrt_report.host),
|
4
44
|
link_to(_('Other reports for this host'), host_abrt_reports_path(@abrt_report.host)),
|
5
|
-
|
6
|
-
forward_abrt_report_path(@abrt_report),
|
7
|
-
:class => 'btn btn-success',
|
8
|
-
:method => :post,
|
9
|
-
:confirm => @abrt_report.forwarded_at ? _('The report has already been sent to the ABRT server. Send again and overwrite the previous response?') : nil),
|
45
|
+
display_forward_button(@abrt_report),
|
10
46
|
display_delete_if_authorized(hash_for_abrt_report_path(:id => @abrt_report), :class => 'btn btn-danger')
|
11
47
|
%>
|
12
48
|
|
@@ -36,7 +72,11 @@
|
|
36
72
|
<% else %>
|
37
73
|
<div class="row">
|
38
74
|
<div class="col-md-12">
|
39
|
-
<p><%= _("The report hasn't been
|
75
|
+
<p><%= _("The report hasn't been sent for analysis.") %></p>
|
40
76
|
</div>
|
41
77
|
</div>
|
42
78
|
<% end %>
|
79
|
+
|
80
|
+
<% if ask_for_auth? %>
|
81
|
+
<%= render :partial => 'basic_auth_modal' %>
|
82
|
+
<% end %>
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<h4 style="text-align: center;"><%= _('
|
1
|
+
<h4 style="text-align: center;"><%= _('Problem report distribution in last 14 days') %></h4>
|
2
2
|
<%= render_abrt_graph(@abrt_reports, :class => 'statistics-bar') %>
|
data/lib/foreman_abrt/engine.rb
CHANGED
@@ -36,12 +36,12 @@ module ForemanAbrt
|
|
36
36
|
#add menu entry
|
37
37
|
menu :top_menu, :template,
|
38
38
|
:url_hash => {:controller => :'abrt_reports', :action => :index},
|
39
|
-
:caption => _('
|
39
|
+
:caption => _('Problem reports'),
|
40
40
|
:parent => :monitor_menu,
|
41
41
|
:after => :reports
|
42
42
|
|
43
43
|
# add dashboard widget
|
44
|
-
widget 'foreman_abrt_widget', :name => N_('
|
44
|
+
widget 'foreman_abrt_widget', :name => N_('Problem report chart'), :sizex => 6, :sizey => 1
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
data/lib/foreman_abrt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_abrt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Milata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description: Foreman plugin that allows you to see
|
27
|
+
description: Foreman plugin that allows you to see problem reports submitted by Automatic
|
28
28
|
Bug Reporting Tool.
|
29
29
|
email:
|
30
30
|
- mmilata@redhat.com
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- app/assets/javascripts/abrt_reports.js
|
38
38
|
- app/views/abrt_reports/_host_tab_pane.html.erb
|
39
39
|
- app/views/abrt_reports/_host_tab.html.erb
|
40
|
+
- app/views/abrt_reports/_basic_auth_modal.html.erb
|
40
41
|
- app/views/abrt_reports/index.html.erb
|
41
42
|
- app/views/abrt_reports/_show_response.html.erb
|
42
43
|
- app/views/abrt_reports/_list.html.erb
|