-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #38097 - Add packages count to new All Hosts page
- Loading branch information
1 parent
cf57e55
commit 26d9ea9
Showing
5 changed files
with
40 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
object @resource | ||
|
||
@resource ||= @object | ||
|
||
attributes :id, :name, :description | ||
|
||
node :operatingsystem_family do |resource| | ||
resource.operatingsystem&.family | ||
end | ||
|
||
node :operatingsystem_major do |resource| | ||
resource.operatingsystem&.major | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require 'katello_test_helper' | ||
|
||
module Katello | ||
class HostsViewTest < ActiveSupport::TestCase | ||
def setup | ||
@host = FactoryBot.build(:host, :with_operatingsystem, | ||
:compute_resource_id => compute_resources(:one).id) | ||
end | ||
|
||
def test_base | ||
render_rabl('katello/api/v2/hosts/base.json', @host) | ||
end | ||
|
||
def test_show | ||
render_rabl('katello/api/v2/hosts/show.json', @host) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters