Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36756 - Add a banner warning about RHEL lifecycle EOS per content host #10747

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div uib-alert ng-class='"alert-" + (type || "warning")' ng-mouseover="cancelFade()">
<button ng-show="closeable" type="button" class="close" aria-hidden="true" ng-click="close()">
<button ng-show="closeable" type="button" class="close" aria-hidden="true" data-dismiss="alert">
<span class="pficon pficon-close"></span>
</button>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="lifecycle-expire-soon-banner" bst-alert="warning" ng-if="host.rhelLifecycleExpireSoon()" close>
<span translate>
{{ host.rhel_lifecycle_status_label }}
</span>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

<nav data-block="navigation">
<div content-access-mode-banner></div>
<div data-extend-template="common/views/rhel-lifecycle-notice.html"></div>
<ul class="nav nav-tabs">
<li ng-class="{active: isState('content-host.info')}">
<a translate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ angular.module('Bastion.hosts').factory('Host',
return _.isString(this.operatingsystem_name) && (this.operatingsystem_name.indexOf("Debian") >= 0 || this.operatingsystem_name.indexOf("Ubuntu") >= 0);
};

resource.prototype.rhelLifecycleExpireSoon = function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you like this format better or the React way of doing things?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React is easier to understand to me.

return _.isString(this.rhel_lifecycle_status_label) && (this.rhel_lifecycle_status_label.indexOf("Approaching end of") >= 0);
};

return resource;
}]
);
Loading