Merge pull request #9123 from nixocio/ui_issue_8355

Update migration page

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-02-05 18:38:09 +00:00 committed by GitHub
commit 753749d2b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 65 additions and 22 deletions

View File

@ -262,6 +262,7 @@ TEMPLATES = [
'DIRS': [
os.path.join(BASE_DIR, 'templates'),
os.path.join(BASE_DIR, 'ui_next', 'build'),
os.path.join(BASE_DIR, 'ui_next', 'public')
],
},
]
@ -289,6 +290,7 @@ INSTALLED_APPS = [
'awx.main',
'awx.api',
'awx.ui',
'awx.ui_next',
'awx.sso',
'solo'
]

10
awx/ui_next/apps.py Normal file
View File

@ -0,0 +1,10 @@
# Django
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class UINextConfig(AppConfig):
name = 'awx.ui_next'
verbose_name = _('UI_Next')

View File

@ -1,25 +1,40 @@
{% load static %}
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; connect-src 'self' ws: wss:; style-src 'self' 'nonce-{{ csp_nonce }}'; script-src 'self' 'nonce-{{ csp_nonce }}' *.pendo.io; img-src 'self' *.pendo.io data:;"
/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script nonce="{{ csp_nonce }}">
setInterval(function() {
window.location = '/';
}, 10000);
</script>
</head>
<body>
<div>
<span>
<p>AWX is installing.</p>
<p>This page will refresh when complete.</p>
</span>
</div>
</body>
<head>
<title>{{ title }}</title>
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; connect-src 'self' ws: wss:; style-src 'self' 'nonce-{{ csp_nonce }}'; script-src 'self' 'nonce-{{ csp_nonce }}' *.pendo.io; img-src 'self' *.pendo.io data:;"
/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{% static 'css/fonts/assets/RedHatDisplay/RedHatDisplay-Medium.woff' %}" rel="stylesheet" type="application/font-woff" media="all"/>
<link href="{% static 'css/fonts/assets/RedHatText/RedHatText-Regular.woff' %}" rel="stylesheet" type="application/font-woff" media="all"/>
<link href="{% static 'css/patternfly.min.css' %}" rel="stylesheet" type="text/css" media="all"/>
<script nonce="{{ csp_nonce }}">
setInterval(function() {
window.location = '/';
}, 10000);
</script>
</head>
<body>
<div class="pf-l-bullseye pf-m-gutter">
<div class="pf-l-bullseye__item">
<div class="pf-l-bullseye">
<img src="{% static 'media/logo-header.svg' %}" width="300px" alt={{image_alt}} />
</div>
<div class="pf-l-bullseye">
<span class="pf-c-spinner" role="progressbar" aria-valuetext={{aria_spinner}}>
<span class="pf-c-spinner__clipper"></span>
<span class="pf-c-spinner__lead-ball"></span>
<span class="pf-c-spinner__tail-ball"></span>
</span>
</div>
<h2 class="pf-l-bullseye pf-c-title pf-m-2xl ws-heading ws-title ws-h2">{{message_upgrade}}</h2>
<h2 class="pf-l-bullseye pf-c-title pf-m-2xl ws-heading ws-title ws-h2">{{message_refresh}}</h2>
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,9 @@
from django.conf.urls import url
from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import TemplateView
from awx.main.utils.common import get_licenser
class IndexView(TemplateView):
@ -10,6 +13,16 @@ class IndexView(TemplateView):
class MigrationsNotran(TemplateView):
template_name = 'installing.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
product_name = get_licenser().validate()['product_name']
context['title'] = _('%s Upgrading' % product_name)
context['image_alt'] = _('Logo')
context['aria_spinner'] = _('Loading')
context['message_upgrade'] = _('%s is currently upgrading.' % product_name)
context['message_refresh'] = _('This page will refresh when complete.')
return context
app_name = 'ui_next'