Compare commits

...

2 Commits

Author SHA1 Message Date
Kia Lam
e77f89e01f Add banner to dashboard page. 2023-02-21 17:39:55 -08:00
Kia Lam
68f56570ae Django changes to serve ansible-ui. 2023-02-02 11:14:39 -08:00
3 changed files with 18 additions and 3 deletions

View File

@@ -290,7 +290,7 @@ TEMPLATES = [
],
'builtins': ['awx.main.templatetags.swagger'],
},
'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'ui', 'build'), os.path.join(BASE_DIR, 'ui', 'public')],
'DIRS': [os.path.join(BASE_DIR, 'templates'), '/var/lib/awx/public/static/controller/', os.path.join(BASE_DIR, 'ui', 'build'), os.path.join(BASE_DIR, 'ui', 'public')],
},
]

View File

@@ -1,14 +1,16 @@
import React, { useCallback, useEffect, useState } from 'react';
import styled from 'styled-components';
import { t } from '@lingui/macro';
import { t, Trans } from '@lingui/macro';
import {
Banner,
Card,
PageSection,
Tabs,
Tab,
TabTitleText,
} from '@patternfly/react-core';
import { InfoCircleIcon } from '@patternfly/react-icons';
import useRequest from 'hooks/useRequest';
import { DashboardAPI } from 'api';
@@ -69,6 +71,15 @@ function Dashboard() {
}
return (
<>
<Banner variant="info">
<Trans>
<p>
<InfoCircleIcon /> A tech preview of the new Ansible Automation
Platform user interface can be found{' '}
<a href="/controller/dashboard">here</a>.
</p>
</Trans>
</Banner>
<ScreenHeader
streamType="all"
breadcrumbConfig={{ '/home': t`Dashboard` }}

View File

@@ -9,6 +9,10 @@ class IndexView(TemplateView):
template_name = 'index.html'
class ControllerView(TemplateView):
template_name = 'index_controller.html'
class MigrationsNotran(TemplateView):
@@ -27,4 +31,4 @@ class MigrationsNotran(TemplateView):
app_name = 'ui'
urlpatterns = [re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^migrations_notran/$', MigrationsNotran.as_view(), name='migrations_notran')]
urlpatterns = [re_path(r'^$', IndexView.as_view(), name='index'), re_path(r'^controller/.*$', ControllerView.as_view(), name='index'), re_path(r'^migrations_notran/$', MigrationsNotran.as_view(), name='migrations_notran')]