foreman_omaha 0.0.3 → 1.0.0
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 +5 -5
- data/README.md +5 -2
- data/app/assets/javascripts/foreman_omaha/application.js +1 -0
- data/app/assets/stylesheets/foreman_omaha/version_breakdown.scss +13 -0
- data/app/controllers/api/v2/omaha_groups_controller.rb +29 -0
- data/app/controllers/api/v2/omaha_reports_controller.rb +9 -7
- data/app/controllers/omaha_groups_controller.rb +28 -0
- data/app/controllers/omaha_hosts_controller.rb +42 -0
- data/app/controllers/omaha_reports_controller.rb +0 -11
- data/app/helpers/concerns/foreman_omaha/hosts_helper_extensions.rb +15 -6
- data/app/helpers/foreman_omaha/application_helper.rb +7 -0
- data/app/helpers/foreman_omaha/omaha_groups_helper.rb +52 -0
- data/app/helpers/omaha_hosts_helper.rb +43 -0
- data/app/models/concerns/foreman_omaha/host_extensions.rb +16 -2
- data/app/models/concerns/foreman_omaha/omaha_facet_host_extensions.rb +23 -0
- data/app/models/foreman_omaha/omaha_facet.rb +40 -0
- data/app/models/foreman_omaha/omaha_group.rb +34 -0
- data/app/models/foreman_omaha/omaha_report.rb +13 -21
- data/app/models/host_status/omaha_status.rb +6 -16
- data/app/services/foreman_omaha/charts/oem_distribution.rb +24 -0
- data/app/services/foreman_omaha/charts/status_distribution.rb +57 -0
- data/app/services/foreman_omaha/charts/version_distribution.rb +24 -0
- data/app/services/foreman_omaha/container_linux_config_transpiler.rb +33 -0
- data/app/services/foreman_omaha/fact_parser.rb +19 -3
- data/app/services/foreman_omaha/group_version_breakdown.rb +30 -0
- data/app/services/foreman_omaha/omaha_report_importer.rb +52 -3
- data/app/services/foreman_omaha/renderer_methods.rb +7 -0
- data/app/services/foreman_omaha/status_mapper.rb +53 -0
- data/app/views/api/v2/omaha_groups/base.json.rabl +3 -0
- data/app/views/api/v2/omaha_groups/index.json.rabl +3 -0
- data/app/views/api/v2/omaha_groups/main.json.rabl +5 -0
- data/app/views/api/v2/omaha_groups/show.json.rabl +3 -0
- data/app/views/application/foreman_omaha/_toolbar.html.erb +11 -0
- data/app/views/foreman_omaha/api/v2/omaha_facets/base.json.rabl +5 -0
- data/app/views/foreman_omaha/api/v2/omaha_facets/base_with_root.json.rabl +3 -0
- data/app/views/foreman_omaha/api/v2/omaha_facets/show.json.rabl +3 -0
- data/app/views/hosts/_omaha_tab.html.erb +29 -0
- data/app/views/omaha_groups/index.html.erb +34 -0
- data/app/views/omaha_groups/show.html.erb +196 -0
- data/app/views/omaha_hosts/index.html.erb +51 -0
- data/app/views/omaha_hosts/welcome.html.erb +12 -0
- data/app/views/omaha_reports/_details.html.erb +5 -3
- data/app/views/omaha_reports/_list.html.erb +2 -2
- data/app/views/omaha_reports/show.html.erb +1 -1
- data/app/views/omaha_reports/welcome.html.erb +1 -1
- data/config/routes.rb +14 -1
- data/db/migrate/20160812083100_add_omaha_fields_to_reports.foreman_omaha.rb +1 -1
- data/db/migrate/20171101204100_create_omaha_facets.foreman_omaha.rb +22 -0
- data/db/seeds.d/200_omaha_groups.rb +6 -0
- data/lib/foreman_omaha/engine.rb +74 -21
- data/lib/foreman_omaha/version.rb +1 -1
- data/lib/tasks/foreman_omaha_tasks.rake +2 -4
- data/test/factories/feature.rb +1 -1
- data/test/factories/foreman_omaha_factories.rb +16 -1
- data/test/factories/host.rb +21 -0
- data/test/factories/smart_proxy.rb +1 -1
- data/test/functional/api/v2/omaha_groups_controller_test.rb +32 -0
- data/test/functional/api/v2/omaha_reports_controller_test.rb +24 -24
- data/test/functional/omaha_groups_controller_test.rb +18 -0
- data/test/functional/omaha_hosts_controller_test.rb +11 -0
- data/test/functional/omaha_reports_controller_test.rb +13 -13
- data/test/test_plugin_helper.rb +3 -3
- data/test/unit/charts/oem_distribution_test.rb +26 -0
- data/test/unit/charts/status_distribution_test.rb +28 -0
- data/test/unit/charts/version_distribution_test.rb +28 -0
- data/test/unit/group_version_breakdown_test.rb +65 -0
- data/test/unit/host_status/omaha_status_test.rb +19 -0
- data/test/unit/host_test.rb +55 -0
- data/test/unit/omaha_fact_parser_test.rb +77 -0
- data/test/unit/omaha_report_test.rb +63 -17
- data/test/unit/renderer_test.rb +21 -0
- metadata +80 -9
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="container-fluid">
|
2
|
+
<div class="row toolbar-pf">
|
3
|
+
<div class="col-sm-12">
|
4
|
+
<div class="row toolbar-pf-results">
|
5
|
+
<div class="col-sm-12">
|
6
|
+
<h5><%= n_('%s Result', '%s Results', count) % count %></h5>
|
7
|
+
</div><!-- /col -->
|
8
|
+
</div><!-- /row -->
|
9
|
+
</div><!-- /col -->
|
10
|
+
</div><!-- /row -->
|
11
|
+
</div><!-- /container -->
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<table class="<%= table_css_classes %> table-fixed">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th colspan="2"><%= _('Omaha') %></th>
|
5
|
+
</tr>
|
6
|
+
</thead>
|
7
|
+
<tbody>
|
8
|
+
<tr>
|
9
|
+
<td><%= _('Last checkin') %></td>
|
10
|
+
<td><%= @host.omaha_facet.last_report.to_formatted_s(:long_ordinal) %></td>
|
11
|
+
</tr>
|
12
|
+
<tr>
|
13
|
+
<td><%= _('Version') %></td>
|
14
|
+
<td><%= @host.omaha_facet.version %></td>
|
15
|
+
</tr>
|
16
|
+
<tr>
|
17
|
+
<td><%= _('Group') %></td>
|
18
|
+
<td><%= link_to_if_authorized(@host.omaha_facet.omaha_group.try(:name), hash_for_omaha_group_path(@host.omaha_facet.omaha_group)) %></td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<td><%= _('OEM') %></td>
|
22
|
+
<td><%= @host.omaha_facet.oem %></td>
|
23
|
+
</tr>
|
24
|
+
<tr>
|
25
|
+
<td><%= _('Machine ID') %></td>
|
26
|
+
<td class="ellipsis"><%= @host.omaha_facet.machineid %></td>
|
27
|
+
</tr>
|
28
|
+
</tbody>
|
29
|
+
</table>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<% title _('Omaha Groups') %>
|
2
|
+
|
3
|
+
<%= render partial: 'application/foreman_omaha/toolbar', locals: { count: @omaha_groups.count} %>
|
4
|
+
|
5
|
+
<div class="container-fluid">
|
6
|
+
<div class="list-group list-view-pf list-view-pf-view" style="max-height: initial;">
|
7
|
+
<% @omaha_groups.each do |group| %>
|
8
|
+
<div class="list-group-item">
|
9
|
+
<div class="list-view-pf-main-info" style="padding: 0;">
|
10
|
+
<div class="list-view-pf-actions">
|
11
|
+
<%= link_to_if_authorized(_("View"), hash_for_omaha_group_path(group), :class => 'btn btn-default') %>
|
12
|
+
</div>
|
13
|
+
<div class="list-view-pf-left">
|
14
|
+
<%= icon_text('ticket', '', :kind => 'fa', :class => 'list-view-pf-icon-sm') %>
|
15
|
+
</div>
|
16
|
+
<div class="list-view-pf-body">
|
17
|
+
<div class="list-view-pf-description">
|
18
|
+
<div class="list-group-item-heading">
|
19
|
+
<%= group.name %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="list-view-pf-additional-info">
|
23
|
+
<div class="list-view-pf-additional-info-item" style="white-space: nowrap;">
|
24
|
+
<%= icon_text('screen', '', :kind => 'pficon') %>
|
25
|
+
<strong><%= link_to(facets_count(:omaha_facet).fetch(group.id, 0), hosts_path(:search => "omaha_group = #{group}")) %></strong>
|
26
|
+
<%= n_('Host', 'Hosts', facets_count(:omaha_facet).fetch(group.id, 0)) %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
34
|
+
</div>
|
@@ -0,0 +1,196 @@
|
|
1
|
+
<% javascript 'foreman_omaha/application' %>
|
2
|
+
<% javascript 'charts' %>
|
3
|
+
<div class="container-fluid">
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-md-12">
|
6
|
+
<ol class="breadcrumb">
|
7
|
+
<li class="breadcrumb-item"><%= link_to_if_authorized(_("Omaha Groups"), hash_for_omaha_groups_path) %></li>
|
8
|
+
<li class="breadcrumb-item active"><strong><%= @omaha_group.name %></strong></li>
|
9
|
+
</ol>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<div class="container-fluid container-cards-pf">
|
14
|
+
<!-- status cards -->
|
15
|
+
<div class="row row-cards-pf">
|
16
|
+
<div class="col-xs-12 col-md-6">
|
17
|
+
<div class="card-pf card-pf-accented card-pf-aggregate-status">
|
18
|
+
<h2 class="card-pf-title">
|
19
|
+
<%= icon_text('cube', '', :kind => 'fa') %>
|
20
|
+
<%= _('Latest Version') %>
|
21
|
+
</h2>
|
22
|
+
<div class="card-pf-body">
|
23
|
+
<p class="card-pf-aggregate-status-notifications">
|
24
|
+
<span class="card-pf-aggregate-status-notification">
|
25
|
+
<% if @latest_operatingsystem %>
|
26
|
+
<%= link_to_if_authorized(@latest_operatingsystem.release, hash_for_edit_operatingsystem_path(@latest_operatingsystem)) %>
|
27
|
+
<% else %>
|
28
|
+
<%= _('N/A') %>
|
29
|
+
<% end %>
|
30
|
+
</span>
|
31
|
+
</p>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<div class="col-xs-12 col-md-6">
|
36
|
+
<div class="card-pf card-pf-accented card-pf-aggregate-status">
|
37
|
+
<h2 class="card-pf-title">
|
38
|
+
<%= link_to(hosts_path(:search => "omaha_group = #{@omaha_group}")) do %>
|
39
|
+
<%= icon_text('screen', '', :kind => 'pficon') %>
|
40
|
+
<span class="card-pf-aggregate-status-count"><%= @omaha_group.hosts.count %></span>
|
41
|
+
<%= n_('Host', 'Hosts', @omaha_group.hosts.count) %>
|
42
|
+
<% end %>
|
43
|
+
</h2>
|
44
|
+
<div class="card-pf-body">
|
45
|
+
<p class="card-pf-aggregate-status-notifications">
|
46
|
+
<% @status_distribution.to_a.each do |status| %>
|
47
|
+
<span class="card-pf-aggregate-status-notification">
|
48
|
+
<%= link_to(hosts_path(:search => "omaha_group = #{@omaha_group} and omaha_status = #{status[:status]}"), :title => status[:label]) do %>
|
49
|
+
<span class="<%= iconclass_for_omaha_status(status[:status]) %>"></span>
|
50
|
+
<%= status[:count] %>
|
51
|
+
<% end %>
|
52
|
+
</span>
|
53
|
+
<% end %>
|
54
|
+
</p>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
<% if @omaha_group.hosts.count > 0 %>
|
60
|
+
<!-- statistics cards -->
|
61
|
+
<div class="row row-cards-pf">
|
62
|
+
<div class="col-xs-12 col-md-12">
|
63
|
+
<div class="card-pf card-pf-accented card-pf-utilization">
|
64
|
+
<div class="card-pf-heading">
|
65
|
+
<h2 class="card-pf-title">
|
66
|
+
<%= _('Statistics') %>
|
67
|
+
</h2>
|
68
|
+
</div>
|
69
|
+
<div class="card-pf-body">
|
70
|
+
<div class="row">
|
71
|
+
<div class="col-xs-12 col-sm-4 col-md-4">
|
72
|
+
<h3 class="card-pf-subtitle"><%= _('Version Distribution') %></h3>
|
73
|
+
<%=
|
74
|
+
flot_pie_chart(
|
75
|
+
'omaha_status_distribution_chart',
|
76
|
+
_('Version Distribution'),
|
77
|
+
@version_distribution.to_chart_data,
|
78
|
+
:class => 'statistics-pie small',
|
79
|
+
:search => "omaha_group = #{@omaha_group} and omaha_version = ~VAL~"
|
80
|
+
)
|
81
|
+
%>
|
82
|
+
</div>
|
83
|
+
<div class="col-xs-12 col-sm-4 col-md-4">
|
84
|
+
<h3 class="card-pf-subtitle"><%= _('Host Upgrade Progress') %></h3>
|
85
|
+
<%=
|
86
|
+
flot_pie_chart(
|
87
|
+
'omaha_status_distribution_chart',
|
88
|
+
_('Version Distribution'),
|
89
|
+
@status_distribution.to_chart_data,
|
90
|
+
:class => 'statistics-pie small'
|
91
|
+
)
|
92
|
+
%>
|
93
|
+
</div>
|
94
|
+
<div class="col-xs-12 col-sm-4 col-md-4">
|
95
|
+
<h3 class="card-pf-subtitle"><%= _('OEM Distribution') %></h3>
|
96
|
+
<%=
|
97
|
+
flot_pie_chart(
|
98
|
+
'omaha_oem_distribution_chart',
|
99
|
+
_('OEM Distribution'),
|
100
|
+
@oem_distribution.to_chart_data,
|
101
|
+
:class => 'statistics-pie small',
|
102
|
+
:search => "omaha_group = #{@omaha_group} and omaha_oem = ~VAL~"
|
103
|
+
)
|
104
|
+
%>
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<!-- version breakdown bar card -->
|
112
|
+
<div class="row row-cards-pf">
|
113
|
+
<div class="col-xs-12 col-md-12">
|
114
|
+
<div class="card-pf card-pf-accented">
|
115
|
+
<div class="card-pf-heading">
|
116
|
+
<h2 class="card-pf-title">
|
117
|
+
<%= _('Version Distribution') %>
|
118
|
+
</h2>
|
119
|
+
</div>
|
120
|
+
<div class="card-pf-body">
|
121
|
+
<%= omaha_version_breakdown_bar(@omaha_group) %>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
<!-- out of sync hosts cards -->
|
127
|
+
<div class="row row-cards-pf">
|
128
|
+
<div class="col-xs-12 col-md-12">
|
129
|
+
<div class="card-pf card-pf-accented">
|
130
|
+
<div class="card-pf-heading">
|
131
|
+
<h2 class="card-pf-title">
|
132
|
+
<%= _('Out of Sync Hosts') %>
|
133
|
+
</h2>
|
134
|
+
</div>
|
135
|
+
<div class="card-pf-body">
|
136
|
+
<% if @out_of_sync.count > 0 %>
|
137
|
+
<table class="table table-striped table-condensed table-fixed">
|
138
|
+
<thead>
|
139
|
+
<tr>
|
140
|
+
<th><%= _('Host') %></th>
|
141
|
+
<th><%= _('Last check-in') %></th>
|
142
|
+
</tr>
|
143
|
+
</thead>
|
144
|
+
<tbody>
|
145
|
+
<% @out_of_sync.each do |facet| %>
|
146
|
+
<tr>
|
147
|
+
<td class="ellipsis"><%= link_to_if_authorized(facet.host.name, hash_for_host_path(id: facet.host)) %></td>
|
148
|
+
<td><%= _('%s ago') % time_ago_in_words(facet.last_report) %></td>
|
149
|
+
</tr>
|
150
|
+
<% end %>
|
151
|
+
</tbody>
|
152
|
+
</table>
|
153
|
+
<% else %>
|
154
|
+
<em><%= _('All Hosts have checked in within the last %s minutes.') % (30 + Setting[:outofsync_interval]) %></em>
|
155
|
+
<% end %>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
<% else %>
|
161
|
+
<!-- empty state -->
|
162
|
+
<div class="row row-cards-pf">
|
163
|
+
<div class="col-xs-12 col-md-12">
|
164
|
+
<div class="card-pf card-pf-accented">
|
165
|
+
<div class="card-pf-heading">
|
166
|
+
<h2 class="card-pf-title">
|
167
|
+
<%= _('Empty Group') %>
|
168
|
+
</h2>
|
169
|
+
</div>
|
170
|
+
<div class="card-pf-body">
|
171
|
+
<div class="blank-slate-pf">
|
172
|
+
<div class="blank-slate-pf-icon">
|
173
|
+
<span class="pficon pficon pficon-add-circle-o"></span>
|
174
|
+
</div>
|
175
|
+
<h1>
|
176
|
+
<%= _('No Hosts') %>
|
177
|
+
</h1>
|
178
|
+
<p>
|
179
|
+
<%= _('You do not seem to have any CoreOS Hosts in the %s group configured to send update requests to Foreman.') % @omaha_group.name %>
|
180
|
+
</p>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
</div>
|
185
|
+
<% end %>
|
186
|
+
</div>
|
187
|
+
<script>
|
188
|
+
$(document).on('ContentLoad', function () {
|
189
|
+
refreshCharts();
|
190
|
+
// matchHeight the contents of each .card-pf and then the .card-pf itself
|
191
|
+
$(".row-cards-pf > [class*='col'] > .card-pf .card-pf-title").matchHeight();
|
192
|
+
$(".row-cards-pf > [class*='col'] > .card-pf > .card-pf-body").matchHeight();
|
193
|
+
$(".row-cards-pf > [class*='col'] > .card-pf > .card-pf-footer").matchHeight();
|
194
|
+
$(".row-cards-pf > [class*='col'] > .card-pf").matchHeight();
|
195
|
+
});
|
196
|
+
</script>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<% title _('Omaha Hosts') %>
|
2
|
+
|
3
|
+
<%= render partial: 'application/foreman_omaha/toolbar', locals: { count: @hosts.count} %>
|
4
|
+
|
5
|
+
<div class="container-fluid">
|
6
|
+
<div class="list-group list-view-pf list-view-pf-equalized-column" style="max-height: initial;">
|
7
|
+
<% @hosts.each do |host| %>
|
8
|
+
<div class="list-group-item">
|
9
|
+
<div class="list-view-pf-main-info">
|
10
|
+
<div class="list-view-pf-left">
|
11
|
+
<span class="<%= list_view_class_for_omaha_status(host.omaha_facet.status) %>" title="<%= _(host.omaha_facet.to_status_label) %>"></span>
|
12
|
+
</div>
|
13
|
+
<div class="list-view-pf-body">
|
14
|
+
<div class="list-view-pf-description">
|
15
|
+
<div class="list-group-item-heading">
|
16
|
+
<%= link_to_if_authorized(host, hash_for_host_path(host)) %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="list-view-pf-additional-info">
|
20
|
+
<% if host.operatingsystem %>
|
21
|
+
<div class="list-view-pf-additional-info-item">
|
22
|
+
<%= icon(host.operatingsystem, :size => '16x16') %>
|
23
|
+
<%= link_to_if_authorized(host.operatingsystem.release, hash_for_edit_operatingsystem_path(host.operatingsystem)) %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
<div class="list-view-pf-additional-info-item" style="white-space: nowrap;">
|
27
|
+
<%= icon_text('clock-o', '', :kind => 'fa') %>
|
28
|
+
<%= last_omaha_report_column(host) %>
|
29
|
+
</div>
|
30
|
+
<div class="list-view-pf-additional-info-item" style="white-space: nowrap;">
|
31
|
+
<% if host.omaha_facet.omaha_group %>
|
32
|
+
<%= icon_text('ticket', '', :kind => 'fa') %>
|
33
|
+
<%= link_to_if_authorized(host.omaha_facet.omaha_group, hash_for_omaha_group_path(host.omaha_facet.omaha_group)) %>
|
34
|
+
<% end %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
<% end %>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
<script>
|
44
|
+
// Equalize column width
|
45
|
+
$(document).ready(function () {
|
46
|
+
var widest = 0;
|
47
|
+
$('.list-view-pf-equalized-column .list-view-pf-additional-info-item').each( function() {
|
48
|
+
widest = $(this).width() > widest ? $(this).width() : widest;
|
49
|
+
}).width(widest);
|
50
|
+
});
|
51
|
+
</script>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% content_for(:title, _("Hosts")) %>
|
2
|
+
<div class="blank-slate-pf">
|
3
|
+
<div class="blank-slate-pf-icon">
|
4
|
+
<%= icon_text('screen', '', :kind => 'pficon') %>
|
5
|
+
</div>
|
6
|
+
<h1><%= _('Omaha Hosts') %></h1>
|
7
|
+
<p><%= _("You don't have any visible hosts that have reported to Foreman. CoreOS Hosts can be added and provisioned from Foreman and configured to report to Foreman.") %></p>
|
8
|
+
<p><%= link_to _('Learn more about this in the documentation.'), 'https://github.com/theforeman/foreman_omaha', :rel => 'external' %></p>
|
9
|
+
<div class="blank-slate-pf-main-action">
|
10
|
+
<%= new_link(_('Create Host'), { :controller => :hosts, :action => :new }, { :class => 'btn-lg' }) %>
|
11
|
+
</div>
|
12
|
+
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="col-xs-6 col-sm-4 col-md-4">
|
4
4
|
<div class="card-pf card-pf-accented card-pf-aggregate-status">
|
5
5
|
<h2 class="card-pf-title">
|
6
|
-
<span class="fa fa-cube"></span
|
6
|
+
<span class="fa fa-cube"></span><%= _('Version') %>
|
7
7
|
</h2>
|
8
8
|
<div class="card-pf-body">
|
9
9
|
<p class="card-pf-aggregate-status-notifications">
|
@@ -15,11 +15,13 @@
|
|
15
15
|
<div class="col-xs-6 col-sm-4 col-md-4">
|
16
16
|
<div class="card-pf card-pf-accented card-pf-aggregate-status">
|
17
17
|
<h2 class="card-pf-title">
|
18
|
-
<span class="fa fa-download"></span
|
18
|
+
<span class="fa fa-download"></span><%= _('Status') %>
|
19
19
|
</h2>
|
20
20
|
<div class="card-pf-body">
|
21
21
|
<p class="card-pf-aggregate-status-notifications">
|
22
|
-
|
22
|
+
<span class="card-pf-aggregate-status-notification" title="<%= description %>">
|
23
|
+
<span class="<%= iconclass_for_omaha_status(status) %>"></span> <%= label %>
|
24
|
+
</span>
|
23
25
|
</p>
|
24
26
|
</div>
|
25
27
|
</div>
|
@@ -21,8 +21,8 @@
|
|
21
21
|
<% end %>
|
22
22
|
<% end %>
|
23
23
|
<td><%= display_link_if_authorized(_("%s ago") % time_ago_in_words(report.reported_at), hash_for_omaha_report_path(:id => report.id)) %></td>
|
24
|
-
<td><%= report.operatingsystem.present? ? operatingsystem_link(report.operatingsystem) : _('
|
25
|
-
<td><span class="<%= iconclass_for_omaha_status(report.status) %>"></span> <%= report.to_label %></td>
|
24
|
+
<td><%= report.operatingsystem.present? ? operatingsystem_link(report.operatingsystem) : _('CoreOS %s') % report.omaha_version %></td>
|
25
|
+
<td title="<%= report.to_description(report.omaha_version) %>"><span class="<%= iconclass_for_omaha_status(report.status) %>"></span> <%= report.to_label %></td>
|
26
26
|
<td>
|
27
27
|
<%= action_buttons(display_delete_if_authorized hash_for_omaha_report_path(:id => report).merge(:auth_object => report, :authorizer => authorizer),
|
28
28
|
:confirm => _("Delete report for %s?") % report.host.try(:name)) %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</div>
|
13
13
|
<% end %>
|
14
14
|
|
15
|
-
<%= render 'details', :label => @omaha_report.to_label, :status => @omaha_report.status, :version => @omaha_report.omaha_version %>
|
15
|
+
<%= render 'details', :label => @omaha_report.to_label, :status => @omaha_report.status, :version => @omaha_report.omaha_version, :description => @omaha_report.to_description(@omaha_report.omaha_version) %>
|
16
16
|
|
17
17
|
<%= title_actions link_to(_('Back'), :back, :class => 'btn btn-default'),
|
18
18
|
display_delete_if_authorized(hash_for_omaha_report_path(:id => @omaha_report), :class=> "btn btn-danger"),
|
@@ -9,6 +9,6 @@
|
|
9
9
|
<%= link_to _("the documentation"), 'https://github.com/timogoebel/foreman_omaha', :rel => "external" %>.
|
10
10
|
</p>
|
11
11
|
<div class="blank-slate-pf-main-action">
|
12
|
-
<%= link_to _('Documentation'), 'https://github.com/
|
12
|
+
<%= link_to _('Documentation'), 'https://github.com/theforeman/foreman_omaha', :rel => 'external', :class => 'btn btn-primary btn-lg' %>
|
13
13
|
</div>
|
14
14
|
</div>
|
data/config/routes.rb
CHANGED
@@ -3,11 +3,12 @@ Rails.application.routes.draw do
|
|
3
3
|
scope '(:apiv)', :module => :v2,
|
4
4
|
:defaults => { :apiv => 'v2' },
|
5
5
|
:apiv => /v1|v2/,
|
6
|
-
:constraints => ApiConstraints.new(:version => 2) do
|
6
|
+
:constraints => ApiConstraints.new(:version => 2, :default => true) do
|
7
7
|
constraints(:id => /[^\/]+/) do
|
8
8
|
resources :omaha_reports, :only => [:index, :show, :destroy] do
|
9
9
|
get :last, :on => :collection
|
10
10
|
end
|
11
|
+
resources :omaha_groups, :only => [:index, :show]
|
11
12
|
end
|
12
13
|
resources :omaha_reports, :only => [:create]
|
13
14
|
end
|
@@ -19,6 +20,18 @@ Rails.application.routes.draw do
|
|
19
20
|
end
|
20
21
|
end
|
21
22
|
|
23
|
+
resources :omaha_groups, :only => [:index, :show] do
|
24
|
+
collection do
|
25
|
+
get 'auto_complete_search'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
resources :omaha_hosts, only: :index do
|
30
|
+
collection do
|
31
|
+
get 'auto_complete_search'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
22
35
|
constraints(:id => /[^\/]+/) do
|
23
36
|
resources :hosts do
|
24
37
|
constraints(:host_id => /[^\/]+/) do
|