From 43a63af44c2b45371300a158028b7d40d7aa719c Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 24 Oct 2016 15:37:25 -0400 Subject: [PATCH] Add banner bar message when license has expired or is invalid --- endpoints/common.py | 3 ++- templates/base.html | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/endpoints/common.py b/endpoints/common.py index d00c4bc64..30b1f0463 100644 --- a/endpoints/common.py +++ b/endpoints/common.py @@ -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 @@ -225,6 +225,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' diff --git a/templates/base.html b/templates/base.html index d5f03c88b..a213020a5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -235,8 +235,16 @@ mixpanel.init("{{ mixpanel_key }}", { track_pageview : false, debug: {{ is_debug {% endif %} + + {% if license_insufficient %} +
+ The Quay Enterprise license has expired or is insufficient for this installation. Please contact your administrator. +
+ {% endif %} +
+