Skip to content

Commit

Permalink
Remove tech preview
Browse files Browse the repository at this point in the history
  • Loading branch information
ZitaNemeckova committed Aug 22, 2024
1 parent ffcba36 commit 46841f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 103 deletions.
11 changes: 0 additions & 11 deletions cypress/e2e/awx/overview/awx-overview.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ import { awxAPI } from '../../../support/formatApiPathForAwx';

cyLabel(['upstream'], () => {
describe('AWX Overview', () => {
it('verifies the tech preview banner title in the new UI and the working links to and from the old UI', () => {
cy.navigateTo('awx', 'overview');
cy.get('.pf-v5-c-banner')
.should(
'contain',
'You are currently viewing a tech preview of the new AWX user interface. To return to the original interface, click here.'
)
.should('be.visible');
cy.get('[data-cy="tech-preview"] a').should('contain', 'here').click();
});

it('clicking on Cog icon opens the Manage Dashboard modal', () => {
cy.navigateTo('awx', 'overview');
cy.clickButton('Manage view');
Expand Down
2 changes: 0 additions & 2 deletions framework/PageEmptyStates/PageNotImplemented.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
Button,
EmptyState,
EmptyStateBody,
EmptyStateIcon,
Stack,
EmptyStateActions,
Expand All @@ -22,7 +21,6 @@ export function PageNotImplemented() {
icon={<EmptyStateIcon icon={WrenchIcon} />}
headingLevel="h2"
/>
<EmptyStateBody>{t('This page is not yet available in the tech preview.')}</EmptyStateBody>
<EmptyStateFooter>
<EmptyStateActions>
<Stack hasGutter>
Expand Down
32 changes: 4 additions & 28 deletions frontend/awx/overview/AwxOverview.tsx
Original file line number Diff line number Diff line change
@@ -1,58 +1,34 @@
/* eslint-disable i18next/no-literal-string */
import { Banner, Bullseye, Button, PageSection, Spinner } from '@patternfly/react-core';
import { CogIcon, InfoCircleIcon } from '@patternfly/react-icons';
import { useEffect } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { Bullseye, Button, PageSection, Spinner } from '@patternfly/react-core';
import { CogIcon } from '@patternfly/react-icons';
import { useTranslation } from 'react-i18next';
import useSWR from 'swr';
import { PageHeader, PageLayout, usePageDialog } from '../../../framework';
import { PageHeader, PageLayout } from '../../../framework';
import { PageDashboard } from '../../../framework/PageDashboard/PageDashboard';
import { awxAPI } from '../common/api/awx-utils';
import { useAwxConfig } from '../common/useAwxConfig';
import { WelcomeModal } from './WelcomeModal';
import { AwxCountsCard } from './cards/AwxCountsCard';
import { AwxJobActivityCard } from './cards/AwxJobActivityCard';
import { AwxRecentInventoriesCard } from './cards/AwxRecentInventoriesCard';
import { AwxRecentJobsCard } from './cards/AwxRecentJobsCard';
import { AwxRecentProjectsCard } from './cards/AwxRecentProjectsCard';
import { useManagedAwxDashboard } from './hooks/useManagedAwxDashboard';

const HIDE_WELCOME_MESSAGE = 'hide-welcome-message';
type Resource = { id: string; name: string };

export function AwxOverview() {
const { t } = useTranslation();
const { openManageDashboard, managedResources } = useManagedAwxDashboard();
const product: string = process.env.PRODUCT ?? t('AWX');
const config = useAwxConfig();
const [_, setDialog] = usePageDialog();
const welcomeMessageSetting = localStorage.getItem(HIDE_WELCOME_MESSAGE);
const hideWelcomeMessage = welcomeMessageSetting ? welcomeMessageSetting === 'true' : false;
function renderCustomizeControls() {
return (
<Button icon={<CogIcon />} variant="link" onClick={openManageDashboard}>
{t('Manage view')}
</Button>
);
}
useEffect(() => {
if (config?.ui_next && !hideWelcomeMessage) {
setDialog(<WelcomeModal />);
}
}, [config?.ui_next, hideWelcomeMessage, setDialog]);

return (
<PageLayout>
{config?.ui_next && (
<Banner data-cy="tech-preview" variant="blue">
<p>
<InfoCircleIcon />{' '}
<Trans>
You are currently viewing a tech preview of the new {{ product }} user interface. To
return to the original interface, click <a href="/">here</a>.
</Trans>
</p>
</Banner>
)}
<PageHeader
title={t(`Welcome to {{product}}`, { product })}
description={t('Define, operate, scale, and delegate automation across your enterprise.')}
Expand Down
62 changes: 0 additions & 62 deletions frontend/awx/overview/WelcomeModal.tsx

This file was deleted.

0 comments on commit 46841f6

Please sign in to comment.