foreman_omaha 1.0.0 → 2.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 +4 -4
- data/README.md +1 -0
- data/app/controllers/omaha_groups_controller.rb +0 -2
- data/app/controllers/omaha_reports_controller.rb +1 -0
- data/app/models/foreman_omaha/omaha_group.rb +10 -1
- data/app/services/foreman_omaha/fact_parser.rb +1 -1
- data/app/views/omaha_groups/show.html.erb +2 -11
- data/app/views/omaha_hosts/index.html.erb +1 -1
- data/app/views/omaha_hosts/welcome.html.erb +1 -1
- data/app/views/omaha_reports/index.html.erb +16 -0
- data/app/views/omaha_reports/show.html.erb +1 -0
- data/app/views/omaha_reports/welcome.html.erb +3 -3
- data/lib/foreman_omaha/engine.rb +2 -16
- data/lib/foreman_omaha/version.rb +1 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d8c9488f648e7425b5ba2acf08a407e653a670247f2d2f0d1e523ed5269f5ca
|
4
|
+
data.tar.gz: 340dae98a746ac79888fb44cb939545bf971e97941034d6edeb0aee250b97a28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: accbd7e167c73ed028e36f493fe740cc3a1df3ae175c55c278288d5db23c194ce24b0adbbc37d21c1044a32d0ab3c41a43c656d40c70b079d3ae4d140394fdc8
|
7
|
+
data.tar.gz: 837d798f8867213463f2140b70c20e76b16f21ea88cba53b687547bcde42a41fe02c45ab1f12c91970c3e8f4a87be52912f1f213b96f1bda6f8da2b7e18f5176
|
data/README.md
CHANGED
@@ -22,7 +22,12 @@ module ForemanOmaha
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def latest_operatingsystem
|
25
|
-
|
25
|
+
case database_adapter_type
|
26
|
+
when :postgresql
|
27
|
+
operatingsystems.reorder('').order('major::text::integer DESC').order('minor::text::float DESC').limit(1).last
|
28
|
+
else
|
29
|
+
operatingsystems.reorder('').order(:major, :minor).last
|
30
|
+
end
|
26
31
|
end
|
27
32
|
|
28
33
|
private
|
@@ -30,5 +35,9 @@ module ForemanOmaha
|
|
30
35
|
def ensure_uuid
|
31
36
|
self.uuid ||= SecureRandom.uuid
|
32
37
|
end
|
38
|
+
|
39
|
+
def database_adapter_type
|
40
|
+
ActiveRecord::Base.connection.adapter_name.downcase.to_sym
|
41
|
+
end
|
33
42
|
end
|
34
43
|
end
|
@@ -1,15 +1,6 @@
|
|
1
1
|
<% javascript 'foreman_omaha/application' %>
|
2
2
|
<% javascript 'charts' %>
|
3
|
-
|
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>
|
3
|
+
<% title @omaha_group.name %>
|
13
4
|
<div class="container-fluid container-cards-pf">
|
14
5
|
<!-- status cards -->
|
15
6
|
<div class="row row-cards-pf">
|
@@ -134,7 +125,7 @@
|
|
134
125
|
</div>
|
135
126
|
<div class="card-pf-body">
|
136
127
|
<% if @out_of_sync.count > 0 %>
|
137
|
-
<table class="
|
128
|
+
<table class="<%=table_css_classes 'table-condensed table-fixed' %>">
|
138
129
|
<thead>
|
139
130
|
<tr>
|
140
131
|
<th><%= _('Host') %></th>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<% if host.operatingsystem %>
|
21
21
|
<div class="list-view-pf-additional-info-item">
|
22
22
|
<%= icon(host.operatingsystem, :size => '16x16') %>
|
23
|
-
<%= link_to_if_authorized(host.
|
23
|
+
<%= link_to_if_authorized(host.omaha_facet.version, hash_for_edit_operatingsystem_path(host.operatingsystem)) %>
|
24
24
|
</div>
|
25
25
|
<% end %>
|
26
26
|
<div class="list-view-pf-additional-info-item" style="white-space: nowrap;">
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= icon_text('screen', '', :kind => 'pficon') %>
|
5
5
|
</div>
|
6
6
|
<h1><%= _('Omaha Hosts') %></h1>
|
7
|
-
<p><%= _("You don't have any visible hosts that have reported to Foreman.
|
7
|
+
<p><%= _("You don't have any visible hosts that have reported to Foreman. Container Linux Hosts can be added and provisioned from Foreman or just configured to report to Foreman.") %></p>
|
8
8
|
<p><%= link_to _('Learn more about this in the documentation.'), 'https://github.com/theforeman/foreman_omaha', :rel => 'external' %></p>
|
9
9
|
<div class="blank-slate-pf-main-action">
|
10
10
|
<%= new_link(_('Create Host'), { :controller => :hosts, :action => :new }, { :class => 'btn-lg' }) %>
|
@@ -1,2 +1,18 @@
|
|
1
|
+
<%= breadcrumbs(
|
2
|
+
items: [
|
3
|
+
{
|
4
|
+
caption: _('Hosts'),
|
5
|
+
url: (url_for(hosts_path) if authorized_for(hash_for_hosts_path))
|
6
|
+
},
|
7
|
+
{
|
8
|
+
caption: @host.name,
|
9
|
+
url: (host_path(@host) if authorized_for(hash_for_host_path(@host)))
|
10
|
+
},
|
11
|
+
{
|
12
|
+
caption: _('Omaha Reports'),
|
13
|
+
url: url_for(host_omaha_reports_path(@host))
|
14
|
+
},
|
15
|
+
]
|
16
|
+
) if @host %>
|
1
17
|
<% title _("Omaha Reports") %>
|
2
18
|
<%= render :partial => 'list' %>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
</div>
|
5
5
|
<h1><%= _('Omaha Reports') %></h1>
|
6
6
|
<p>
|
7
|
-
<%= _("You don't seem to have any
|
8
|
-
<%= _('If you wish to configure
|
9
|
-
<%= link_to _("the documentation"), 'https://github.com/
|
7
|
+
<%= _("You don't seem to have any Omaha reports.") %></br>
|
8
|
+
<%= _('If you wish to configure Container Linux to forward reports to Foreman, please follow') %>
|
9
|
+
<%= link_to _("the documentation"), 'https://github.com/theforeman/foreman_omaha', :rel => 'external' %>.
|
10
10
|
</p>
|
11
11
|
<div class="blank-slate-pf-main-action">
|
12
12
|
<%= link_to _('Documentation'), 'https://github.com/theforeman/foreman_omaha', :rel => 'external', :class => 'btn btn-primary btn-lg' %>
|
data/lib/foreman_omaha/engine.rb
CHANGED
@@ -18,7 +18,7 @@ module ForemanOmaha
|
|
18
18
|
|
19
19
|
initializer 'foreman_omaha.register_plugin', :before => :finisher_hook do |_app|
|
20
20
|
Foreman::Plugin.register :foreman_omaha do
|
21
|
-
requires_foreman '>= 1.
|
21
|
+
requires_foreman '>= 1.18'
|
22
22
|
|
23
23
|
apipie_documented_controllers ["#{ForemanOmaha::Engine.root}/app/controllers/api/v2/*.rb"]
|
24
24
|
|
@@ -114,20 +114,6 @@ module ForemanOmaha
|
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
117
|
-
# Precompile any JS, Stylesheet or Image files under app/assets/
|
118
|
-
assets_to_precompile =
|
119
|
-
Dir.chdir(root) do
|
120
|
-
Dir['app/assets/javascripts/**/*', 'app/assets/images/**/*', 'app/assets/stylesheets/**/*'].map do |f|
|
121
|
-
f.split(File::SEPARATOR, 4).last
|
122
|
-
end
|
123
|
-
end
|
124
|
-
initializer 'foreman_omaha.assets.precompile' do |app|
|
125
|
-
app.config.assets.precompile += assets_to_precompile
|
126
|
-
end
|
127
|
-
initializer 'foreman_omaha.configure_assets', group: :assets do
|
128
|
-
SETTINGS[:foreman_omaha] = { assets: { precompile: assets_to_precompile } }
|
129
|
-
end
|
130
|
-
|
131
117
|
rake_tasks do
|
132
118
|
Rake::Task['db:seed'].enhance do
|
133
119
|
ForemanOmaha::Engine.load_seed
|
@@ -135,7 +121,7 @@ module ForemanOmaha
|
|
135
121
|
end
|
136
122
|
|
137
123
|
initializer 'foreman_omaha.register_gettext', after: :load_config_initializers do |_app|
|
138
|
-
locale_dir = File.join(File.expand_path('
|
124
|
+
locale_dir = File.join(File.expand_path('../..', __dir__), 'locale')
|
139
125
|
locale_domain = 'foreman_omaha'
|
140
126
|
Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
|
141
127
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_omaha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Goebel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jquery-matchheight-rails
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.54.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.54.0
|
55
55
|
description: This plug-in adds support for the Omaha procotol to The Foreman. It allows
|
56
56
|
you to better manage and update your CoreOS servers.
|
57
57
|
email:
|
@@ -174,22 +174,22 @@ signing_key:
|
|
174
174
|
specification_version: 4
|
175
175
|
summary: This plug-in adds support for the Omaha procotol to The Foreman.
|
176
176
|
test_files:
|
177
|
-
- test/
|
178
|
-
- test/
|
179
|
-
- test/factories/host.rb
|
180
|
-
- test/factories/smart_proxy.rb
|
181
|
-
- test/functional/api/v2/omaha_groups_controller_test.rb
|
182
|
-
- test/functional/api/v2/omaha_reports_controller_test.rb
|
183
|
-
- test/functional/omaha_groups_controller_test.rb
|
184
|
-
- test/functional/omaha_hosts_controller_test.rb
|
185
|
-
- test/functional/omaha_reports_controller_test.rb
|
186
|
-
- test/test_plugin_helper.rb
|
177
|
+
- test/unit/omaha_fact_parser_test.rb
|
178
|
+
- test/unit/charts/version_distribution_test.rb
|
187
179
|
- test/unit/charts/oem_distribution_test.rb
|
188
180
|
- test/unit/charts/status_distribution_test.rb
|
189
|
-
- test/unit/charts/version_distribution_test.rb
|
190
181
|
- test/unit/group_version_breakdown_test.rb
|
191
|
-
- test/unit/host_status/omaha_status_test.rb
|
192
182
|
- test/unit/host_test.rb
|
193
|
-
- test/unit/
|
194
|
-
- test/unit/omaha_report_test.rb
|
183
|
+
- test/unit/host_status/omaha_status_test.rb
|
195
184
|
- test/unit/renderer_test.rb
|
185
|
+
- test/unit/omaha_report_test.rb
|
186
|
+
- test/factories/smart_proxy.rb
|
187
|
+
- test/factories/feature.rb
|
188
|
+
- test/factories/host.rb
|
189
|
+
- test/factories/foreman_omaha_factories.rb
|
190
|
+
- test/test_plugin_helper.rb
|
191
|
+
- test/functional/omaha_groups_controller_test.rb
|
192
|
+
- test/functional/omaha_hosts_controller_test.rb
|
193
|
+
- test/functional/api/v2/omaha_groups_controller_test.rb
|
194
|
+
- test/functional/api/v2/omaha_reports_controller_test.rb
|
195
|
+
- test/functional/omaha_reports_controller_test.rb
|