mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 09:57:35 -02:30
Update migration page
Update migration to add styling. Also, use django template and context to inject variables into the migration page. See: https://github.com/ansible/awx/issues/8355
This commit is contained in:
@@ -262,6 +262,7 @@ TEMPLATES = [
|
|||||||
'DIRS': [
|
'DIRS': [
|
||||||
os.path.join(BASE_DIR, 'templates'),
|
os.path.join(BASE_DIR, 'templates'),
|
||||||
os.path.join(BASE_DIR, 'ui_next', 'build'),
|
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.main',
|
||||||
'awx.api',
|
'awx.api',
|
||||||
'awx.ui',
|
'awx.ui',
|
||||||
|
'awx.ui_next',
|
||||||
'awx.sso',
|
'awx.sso',
|
||||||
'solo'
|
'solo'
|
||||||
]
|
]
|
||||||
|
|||||||
10
awx/ui_next/apps.py
Normal file
10
awx/ui_next/apps.py
Normal 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')
|
||||||
|
|
||||||
@@ -1,25 +1,40 @@
|
|||||||
|
{% load static %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
<head>
|
<head>
|
||||||
<meta
|
<title>{{ title }}</title>
|
||||||
http-equiv="Content-Security-Policy"
|
<meta
|
||||||
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:;"
|
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 charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<script nonce="{{ csp_nonce }}">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
setInterval(function() {
|
<link href="{% static 'css/fonts/assets/RedHatDisplay/RedHatDisplay-Medium.woff' %}" rel="stylesheet" type="application/font-woff" media="all"/>
|
||||||
window.location = '/';
|
<link href="{% static 'css/fonts/assets/RedHatText/RedHatText-Regular.woff' %}" rel="stylesheet" type="application/font-woff" media="all"/>
|
||||||
}, 10000);
|
<link href="{% static 'css/patternfly.min.css' %}" rel="stylesheet" type="text/css" media="all"/>
|
||||||
</script>
|
<script nonce="{{ csp_nonce }}">
|
||||||
</head>
|
setInterval(function() {
|
||||||
<body>
|
window.location = '/';
|
||||||
<div>
|
}, 10000);
|
||||||
<span>
|
</script>
|
||||||
<p>AWX is installing.</p>
|
</head>
|
||||||
<p>This page will refresh when complete.</p>
|
<body>
|
||||||
</span>
|
<div class="pf-l-bullseye pf-m-gutter">
|
||||||
</div>
|
<div class="pf-l-bullseye__item">
|
||||||
</body>
|
<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>
|
</html>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
2
awx/ui_next/public/static/css/patternfly.min.css
vendored
Normal file
2
awx/ui_next/public/static/css/patternfly.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
awx/ui_next/public/static/css/patternfly.min.css.map
Normal file
1
awx/ui_next/public/static/css/patternfly.min.css.map
Normal file
File diff suppressed because one or more lines are too long
@@ -1,6 +1,9 @@
|
|||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.views.generic.base import TemplateView
|
from django.views.generic.base import TemplateView
|
||||||
|
|
||||||
|
from awx.main.utils.common import get_licenser
|
||||||
|
|
||||||
|
|
||||||
class IndexView(TemplateView):
|
class IndexView(TemplateView):
|
||||||
|
|
||||||
@@ -11,6 +14,16 @@ class MigrationsNotran(TemplateView):
|
|||||||
|
|
||||||
template_name = 'installing.html'
|
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'
|
app_name = 'ui_next'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user