Merge pull request #3389 from quay/joseph.schorr/QUAY-1176/remove-default-support

Remove pre-defined Quay.io specific contact information
This commit is contained in:
Joseph Schorr 2019-02-28 15:54:37 -05:00 committed by GitHub
commit 4a42d782a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View file

@ -90,11 +90,7 @@ class DefaultConfig(ImmutableConfig):
REGISTRY_TITLE = 'Red Hat Quay' REGISTRY_TITLE = 'Red Hat Quay'
REGISTRY_TITLE_SHORT = 'Red Hat Quay' REGISTRY_TITLE_SHORT = 'Red Hat Quay'
CONTACT_INFO = [ CONTACT_INFO = []
'mailto:support@quay.io',
'tel:+1-888-GO-REDHAT',
'https://twitter.com/quayio',
]
# Mail config # Mail config
MAIL_SERVER = '' MAIL_SERVER = ''

View file

@ -108,6 +108,7 @@ def render_page_template(name, route_data=None, **kwargs):
return oauth_config return oauth_config
has_contact = len(app.config.get('CONTACT_INFO', [])) > 0
contact_href = None contact_href = None
if len(app.config.get('CONTACT_INFO', [])) == 1: if len(app.config.get('CONTACT_INFO', [])) == 1:
contact_href = app.config['CONTACT_INFO'][0] contact_href = app.config['CONTACT_INFO'][0]
@ -140,6 +141,7 @@ def render_page_template(name, route_data=None, **kwargs):
aci_conversion=features.ACI_CONVERSION, aci_conversion=features.ACI_CONVERSION,
has_billing=features.BILLING, has_billing=features.BILLING,
contact_href=contact_href, contact_href=contact_href,
has_contact=has_contact,
hostname=app.config['SERVER_HOSTNAME'], hostname=app.config['SERVER_HOSTNAME'],
preferred_scheme=app.config['PREFERRED_URL_SCHEME'], preferred_scheme=app.config['PREFERRED_URL_SCHEME'],
version_number=version_number, version_number=version_number,

View file

@ -152,7 +152,9 @@ mixpanel.init("{{ mixpanel_key }}", { track_pageview : false, debug: {{ is_debug
<li quay-require="['BILLING']"><a href="/privacy" target="_self">Privacy</a></li> <li quay-require="['BILLING']"><a href="/privacy" target="_self">Privacy</a></li>
<li quay-require="['BILLING']"><a href="/security/" target="_self">Security</a></li> <li quay-require="['BILLING']"><a href="/security/" target="_self">Security</a></li>
<li quay-require="['BILLING']"><a href="/about/" target="_self">About</a></li> <li quay-require="['BILLING']"><a href="/about/" target="_self">About</a></li>
{% if has_contact %}
<li><b><a href="{{ contact_href or '/contact/' }}" target="_self">Contact</a></b></li> <li><b><a href="{{ contact_href or '/contact/' }}" target="_self">Contact</a></b></li>
{% endif %}
<li quay-require="['BILLING']"> <li quay-require="['BILLING']">
<span class="quay-service-status"></span> <span class="quay-service-status"></span>
</li> </li>

View file

@ -142,7 +142,6 @@ CONFIG_SCHEMA = {
}, },
'CONTACT_INFO': { 'CONTACT_INFO': {
'type': 'array', 'type': 'array',
'minItems': 1,
'uniqueItems': True, 'uniqueItems': True,
'description': 'If specified, contact information to display on the contact page. ' + 'description': 'If specified, contact information to display on the contact page. ' +
'If only a single piece of contact information is specified, the contact footer will link directly.', 'If only a single piece of contact information is specified, the contact footer will link directly.',