Skip to content

Commit

Permalink
Fixes #34803 - Display 0 package counts
Browse files Browse the repository at this point in the history
  • Loading branch information
lfu committed May 9, 2022
1 parent dc4790d commit b82bfb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Expand Up @@ -169,5 +169,13 @@ angular.module('Bastion.content-hosts').controller('ContentHostsController',
nutupane.invalidate();
ContentHostsModalHelper.openTracesModal();
};

$scope.isDebEnabled = function(hostOS) {
return _.isString(hostOS) && hostOS.match(/Debian|Ubuntu/) !== null;
};

$scope.isRpmEnabled = function(hostOS) {
return !$scope.isDebEnabled(hostOS);
};
}]
);
Expand Up @@ -112,7 +112,7 @@ <h2 translate>Content Hosts</h2>
<span class="aligned-errata-count" errata-counts="host.content_facet_attributes.errata_counts"></span>
</a>

<span ng-if="host.content_facet_attributes.upgradable_package_count > 0">
<span ng-if="isRpmEnabled(host.operatingsystem_name)">
<a ui-sref="content-host.packages.applicable({hostId: host.id})">
<span class="aligned-errata-count">
<span class="errata-count"
Expand All @@ -126,7 +126,7 @@ <h2 translate>Content Hosts</h2>
</span>
</a>
</span>
<span ng-if="host.content_facet_attributes.upgradable_deb_count > 0">
<span ng-if="isDebEnabled(host.operatingsystem_name)">
<a ui-sref="content-host.debs.applicable({hostId: host.id})">
<span class="aligned-errata-count">
<span class="errata-count"
Expand Down

0 comments on commit b82bfb5

Please sign in to comment.