10000 Synclist deprecation by ShaiahWren · Pull Request #3708 · ansible/ansible-hub-ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Synclist deprecation #3708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/2335.task
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ajdust UI messages to reflect synclist deprecation.
25 changes: 11 additions & 14 deletions src/containers/token/token-insights.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Trans, t } from '@lingui/macro';
import { Button, ClipboardCopyVariant } from '@patternfly/react-core';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { MyDistributionAPI } from 'src/api';
import {
AlertList,
Expand All @@ -12,7 +11,6 @@ import {
closeAlertMixin,
} from 'src/components';
import { AppContext } from 'src/loaders/app-context';
import { Paths, formatPath } from 'src/paths';
import { RouteProps, withRouter } from 'src/utilities';
import { errorMessage, getRepoURL } from 'src/utilities';

Expand Down Expand Up @@ -96,16 +94,10 @@ class TokenInsights extends React.Component<RouteProps, IState> {
<h2>{t`Connect Private Automation Hub`}</h2>
<p>
<Trans>
Use the{' '}
<Link to={formatPath(Paths.ansibleRepositories)}>
Repositories
</Link>{' '}
page to sync collections curated by your organization to the Red
Hat Certified repository in your private Automation Hub. Users
with the correct permissions can use the sync toggles on the{' '}
<Link to={formatPath(Paths.collections)}>Collections</Link> page
to control which collections are added to their
organization&apos;s sync repository.
Use the Server URL below to sync certified collections to the
Red Hat Certified repository in your private Automation Hub. If
you wish to sync validated content, you can add a remote with a
server url pointed to the validated repo.
</Trans>
</p>
</section>
Expand Down Expand Up 10000 @@ -183,10 +175,15 @@ class TokenInsights extends React.Component<RouteProps, IState> {
<p>
<Trans>
Use this URL to configure the API endpoints that clients need to
download content from Automation Hub.
download certified content from Automation Hub. Synclists are
deprecated in AAP 2.4 and will be removed in a future release,
instead use client-side requirements.yml, see AAP 2.4
documentation.
</Trans>
</p>
<ClipboardCopy isReadOnly>{getRepoURL('published')}</ClipboardCopy>
<ClipboardCopy isReadOnly>
{getRepoURL('published', true)}
</ClipboardCopy>
</section>
<section className='body pf-c-content'>
<h2>{t`SSO URL`}</h2>
Expand Down
7 changes: 0 additions & 7 deletions src/loaders/insights/loader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import '../app.scss';
import { t } from '@lingui/macro';
import { Alert } from '@patternfly/react-core';
import useChrome from '@redhat-cloud-services/frontend-components/useChrome';
import React, { useEffect, useState } from 'react';
import { FeatureFlagsType, SettingsType, UserType } from 'src/api';
Expand Down Expand Up @@ -59,11 +57,6 @@ const App = (_props) => {
),
}}
>
<Alert
isInline
variant='info'
title={t`The Automation Hub sync toggle is now only supported in AAP 2.0. Previous versions of AAP will continue automatically syncing all collections.`}
/>
<InsightsRoutes />
<UIVersion />
</AppContext.Provider>
Expand Down
4 changes: 2 additions & 2 deletions src/utilities/get-repo-url.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Returns the API path for a specific repository
export function getRepoURL(distribution_base_path) {
export function getRepoURL(distribution_base_path, view_published = false) {
// If the api is hosted on another URL, use API_HOST as the host part of the URL.
// Otherwise use the host that the UI is served from
const host = API_HOST ? API_HOST : window.location.origin;

// repo/distro "published" is special; not related to repo pipeline type
if (distribution_base_path === 'published') {
if (distribution_base_path === 'published' && view_published === false) {
return `${host}${API_BASE_PATH}`;
}

Expand Down
0