mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 17:07:36 -02:30
Only show tech preview banner when config.ui_next is true. Use brandName variable in tech preview banner.
This commit is contained in:
committed by
Hao Liu
parent
229dbe0905
commit
41a4551c91
@@ -12,6 +12,8 @@ import {
|
|||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
import { InfoCircleIcon } from '@patternfly/react-icons';
|
import { InfoCircleIcon } from '@patternfly/react-icons';
|
||||||
|
|
||||||
|
import { useConfig } from 'contexts/Config';
|
||||||
|
import useBrandName from 'hooks/useBrandName';
|
||||||
import useRequest from 'hooks/useRequest';
|
import useRequest from 'hooks/useRequest';
|
||||||
import { DashboardAPI } from 'api';
|
import { DashboardAPI } from 'api';
|
||||||
import ScreenHeader from 'components/ScreenHeader';
|
import ScreenHeader from 'components/ScreenHeader';
|
||||||
@@ -42,6 +44,8 @@ const MainPageSection = styled(PageSection)`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
function Dashboard() {
|
function Dashboard() {
|
||||||
|
const config = useConfig();
|
||||||
|
const brandName = useBrandName();
|
||||||
const [activeTabId, setActiveTabId] = useState(0);
|
const [activeTabId, setActiveTabId] = useState(0);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -71,15 +75,16 @@ function Dashboard() {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Banner variant="info">
|
{config?.ui_next && (
|
||||||
<Trans>
|
<Banner variant="info">
|
||||||
<p>
|
<Trans>
|
||||||
<InfoCircleIcon /> A tech preview of the new Ansible Automation
|
<p>
|
||||||
Platform user interface can be found{' '}
|
<InfoCircleIcon /> A tech preview of the new {brandName} user
|
||||||
<a href="/ui_next/dashboard">here</a>.
|
interface can be found <a href="/ui_next/dashboard">here</a>.
|
||||||
</p>
|
</p>
|
||||||
</Trans>
|
</Trans>
|
||||||
</Banner>
|
</Banner>
|
||||||
|
)}
|
||||||
<ScreenHeader
|
<ScreenHeader
|
||||||
streamType="all"
|
streamType="all"
|
||||||
breadcrumbConfig={{ '/home': t`Dashboard` }}
|
breadcrumbConfig={{ '/home': t`Dashboard` }}
|
||||||
|
|||||||
Reference in New Issue
Block a user