Merge pull request #2031 from coreos-inc/license-notification

Add banner bar message when license has expired or is invalid
This commit is contained in:
josephschorr 2016-11-07 13:52:53 -05:00 committed by GitHub
commit 9aac68fbeb
2 changed files with 10 additions and 1 deletions

View file

@ -16,7 +16,7 @@ from flask_principal import identity_changed
import endpoints.decorated # Register the various exceptions via decorators.
import features
from app import app, oauth_apps, LoginWrappedDBUser, user_analytics
from app import app, oauth_apps, LoginWrappedDBUser, user_analytics, license_validator
from auth import scopes
from auth.permissions import QuayDeferredPermissionUser
from config import frontend_visible_config
@ -230,6 +230,7 @@ def render_page_template(name, route_data=None, **kwargs):
hostname=app.config['SERVER_HOSTNAME'],
preferred_scheme=app.config['PREFERRED_URL_SCHEME'],
version_number=version_number,
license_insufficient=license_validator.insufficient,
**kwargs))
resp.headers['X-FRAME-OPTIONS'] = 'DENY'

View file

@ -239,8 +239,16 @@ mixpanel.init("{{ mixpanel_key }}", { track_pageview : false, debug: {{ is_debug
{% endif %}
<nav class="navbar navbar-default header-bar co-m-navbar co-fx-box-shadow" role="navigation"></nav>
{% if license_insufficient %}
<div class="co-alert co-alert-danger" style="margin-bottom: 0px;">
The Quay Enterprise license has expired or is insufficient for this installation. Please contact your administrator.
</div>
{% endif %}
<div class="quay-message-bar"></div>
<div class="quay-service-status-bar" quay-require="['BILLING']"></div>
<div id="padding-container">
<div id="co-l-view-container">
<div ng-class="newLayout ? '' : 'main-panel co-fx-box-shadow-heavy'">