Skip to content

Commit

Permalink
Fixes #36756 - Add a banner warning about RHEL lifecycle EOS per cont…
Browse files Browse the repository at this point in the history
…ent host
  • Loading branch information
lfu committed Sep 20, 2023
1 parent 506c528 commit b02739c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ angular.module('Bastion.components').directive('bstAlert', ['$animate', '$timeou
}
};

// Automatically fade out success alerts
if (scope.type === 'success') {
scope.closeit = function () {
scope.fadePrevented = false;
scope.startFade();
};

// Automatically fade out success alerts
if (scope.type === 'success') {
scope.closeit();
}
}
};
Expand Down
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" ng-click="closeit()">
<span class="pficon pficon-close"></span>
</button>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<section>
<p bst-alert="warning" ng-show="host.rhelLifecycleExpireSoon()" close>
<span translate>
{{ host.rhel_lifecycle_status_label }}
</span>
</p>
</section>
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() {
return _.isString(this.rhel_lifecycle_status_label) && (this.rhel_lifecycle_status_label.indexOf("Approaching end of") >= 0);
};

return resource;
}]
);

0 comments on commit b02739c

Please sign in to comment.