Skip to content

Commit 12b8dff

Browse files
committed
Remove deprecated synclist, including 2.4 synclist deprecation notice
No-Issue
1 parent f0fb683 commit 12b8dff

File tree

11 files changed

+2
-123
lines changed

11 files changed

+2
-123
lines changed

src/api/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export { LegacyNamespaceAPI } from './legacy-namespace';
2424
export { LegacyRoleAPI } from './legacy-role';
2525
export { LegacySyncAPI } from './legacy-sync';
2626
export { MyNamespaceAPI } from './my-namespace';
27-
export { MySyncListAPI } from './my-synclist';
2827
export { NamespaceAPI } from './namespace';
2928
export { PulpAPI } from './pulp';
3029
export { AnsibleRemoteType } from './response-types/ansible-remote';
@@ -73,7 +72,6 @@ export { PulpStatus } from './response-types/pulp';
7372
export { RemoteType } from './response-types/remote';
7473
export { GroupRoleType, RoleType } from './response-types/role';
7574
export { SettingsType } from './response-types/settings';
76-
export { SyncListType } from './response-types/synclists';
7775
export { TaskType } from './response-types/task';
7876
export {
7977
GroupType,

src/api/my-synclist.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/api/response-types/synclists.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/components/collection-card.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
Button,
44
Card,
55
CardBody,
6-
CardFooter,
76
CardHeader,
87
Text,
98
TextContent,
@@ -25,7 +24,6 @@ import { convertContentSummaryCounts, namespaceTitle } from 'src/utilities';
2524

2625
interface IProps extends CollectionVersionSearch {
2726
displaySignatures: boolean;
28-
footer?: ReactNode;
2927
menu?: ReactNode;
3028
}
3129

@@ -61,7 +59,6 @@ export const CollectionCard = ({
6159
is_signed,
6260
displaySignatures,
6361
menu,
64-
footer,
6562
}: IProps) => {
6663
const nsTitle = namespaceTitle(
6764
namespace || { name: collection_version.namespace },
@@ -134,7 +131,6 @@ export const CollectionCard = ({
134131
renderTypeCount(k, contentSummary.contents[k]),
135132
)}
136133
</CardBody>
137-
{footer && <CardFooter>{footer}</CardFooter>}
138134
</Card>
139135
);
140136
};

src/components/collection-list-item.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ interface IProps {
3333
displaySignatures: boolean;
3434
dropdownMenu?: ReactNode | null;
3535
showNamespace?: boolean;
36-
synclistSwitch?: ReactNode | null;
3736
uploadButton?: ReactNode | null;
3837
}
3938

@@ -48,7 +47,6 @@ export const CollectionListItem = ({
4847
displaySignatures,
4948
dropdownMenu,
5049
showNamespace,
51-
synclistSwitch,
5250
uploadButton,
5351
}: IProps) => {
5452
const cells = [];
@@ -135,7 +133,6 @@ export const CollectionListItem = ({
135133
direction={{ default: 'column' }}
136134
alignItems={{ default: 'alignItemsFlexStart' }}
137135
>
138-
{synclistSwitch && <FlexItem>{synclistSwitch}</FlexItem>}
139136
{uploadButton || dropdownMenu ? (
140137
<FlexItem>
141138
{uploadButton}

src/components/collection-list.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { ParamHelper } from 'src/utilities';
1212
interface IProps {
1313
collectionControls: (collection) => {
1414
dropdownMenu?: ReactNode | null;
15-
synclistSwitch?: ReactNode | null;
1615
uploadButton?: ReactNode | null;
1716
};
1817
collections: CollectionVersionSearch[];

src/containers/search/search.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
margin-top: -17px;
3737
margin-bottom: -17px;
3838
}
39-
40-
.sync-toggle {
41-
margin-right: 10px;
42-
}
4339
}
4440

4541
.empty {

src/containers/search/search.tsx

Lines changed: 2 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { t } from '@lingui/macro';
2-
import { Button, DataList, Switch } from '@patternfly/react-core';
3-
import React, { Component, type ReactNode } from 'react';
2+
import { Button, DataList } from '@patternfly/react-core';
3+
import React, { Component } from 'react';
44
import { Navigate } from 'react-router-dom';
55
import {
66
CollectionAPI,
77
CollectionVersionAPI,
88
type CollectionVersionSearch,
99
MyNamespaceAPI,
10-
MySyncListAPI,
11-
type SyncListType,
1210
} from 'src/api';
1311
import {
1412
AlertList,
@@ -55,7 +53,6 @@ interface IState {
5553
namespace?: string;
5654
};
5755
loading: boolean;
58-
synclist: SyncListType;
5956
alerts: AlertType[];
6057
updateCollection: CollectionVersionSearch;
6158
showImportModal: boolean;
@@ -99,7 +96,6 @@ class Search extends Component<RouteProps, IState> {
9996
params,
10097
count: 0,
10198
loading: true,
102-
synclist: undefined,
10399
alerts: [],
104100
updateCollection: null,
105101
showImportModal: false,
@@ -118,10 +114,6 @@ class Search extends Component<RouteProps, IState> {
118114

119115
private load() {
120116
this.queryCollections();
121-
122-
if (IS_INSIGHTS) {
123-
this.getSynclist();
124-
}
125117
}
126118

127119
private addAlert(alert: AlertType) {
@@ -306,10 +298,6 @@ class Search extends Component<RouteProps, IState> {
306298
<CollectionCard
307299
key={i}
308300
{...c}
309-
footer={this.renderSyncToogle(
310-
c.collection_version.name,
311-
c.collection_version.namespace,
312-
)}
313301
menu={this.renderMenu(false, c)}
314302
displaySignatures={
315303
(this.context as IAppContextType).featureFlags
@@ -422,24 +410,6 @@ class Search extends Component<RouteProps, IState> {
422410
return dropdownMenu;
423411
}
424412

425-
private renderSyncToogle(name: string, namespace: string): ReactNode {
426-
const { synclist } = this.state;
427-
428-
if (!synclist) {
429-
return null;
430-
}
431-
432-
return (
433-
<Switch
434-
id={namespace + '.' + name}
435-
className='sync-toggle'
436-
label={t`Sync`}
437-
isChecked={this.isCollectionSynced(name, namespace)}
438-
onChange={() => this.toggleCollectionSync(name, namespace)}
439-
/>
440-
);
441-
}
442-
443413
private checkUploadPrivilleges(collection) {
444414
const addAlert = () => {
445415
this.setState({
@@ -475,34 +445,6 @@ class Search extends Component<RouteProps, IState> {
475445
});
476446
}
477447

478-
private toggleCollectionSync(name: string, namespace: string) {
479-
const synclist = { ...this.state.synclist };
480-
481-
const colIndex = synclist.collections.findIndex(
482-
(el) => el.name === name && el.namespace === namespace,
483-
);
484-
485-
if (colIndex < 0) {
486-
synclist.collections.push({ name: name, namespace: namespace });
487-
} else {
488-
synclist.collections.splice(colIndex, 1);
489-
}
490-
491-
MySyncListAPI.update(synclist.id, synclist).then((response) => {
492-
this.setState({ synclist: response.data });
493-
MySyncListAPI.curate(synclist.id).then(() => null);
494-
});
495-
}
496-
497-
private isCollectionSynced(name: string, namespace: string): boolean {
498-
const { synclist } = this.state;
499-
const found = synclist.collections.find(
500-
(el) => el.name === name && el.namespace === namespace,
501-
);
502-
503-
return synclist.policy === 'include' ? !!found : !found;
504-
}
505-
506448
private renderList(collections) {
507449
return (
508450
<div className='list-container'>
@@ -517,10 +459,6 @@ class Search extends Component<RouteProps, IState> {
517459
.display_signatures
518460
}
519461
showNamespace
520-
synclistSwitch={this.renderSyncToogle(
521-
c.collection_version.name,
522-
c.collection_version.namespace,
523-
)}
524462
{...this.renderMenu(true, c)}
525463
/>
526464
))}
@@ -530,20 +468,6 @@ class Search extends Component<RouteProps, IState> {
530468
);
531469
}
532470

533-
private getSynclist() {
534-
MySyncListAPI.list().then((result) => {
535-
// ignore results if more than 1 is returned
536-
// TODO: should we throw an error for this or just ignore it?
537-
if (result.data.meta.count === 1) {
538-
this.setState({ synclist: result.data.data[0] });
539-
} else {
540-
console.error(
541-
`my-synclist returned ${result.data.meta.count} synclists`,
542-
);
543-
}
544-
});
545-
}
546-
547471
private queryCollections() {
548472
this.setState({ loading: true }, () => {
549473
CollectionVersionAPI.list({

src/containers/token/token-insights.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,6 @@ class TokenInsights extends Component<RouteProps, IState> {
159159
</Trans>
160160
</p>
161161
<CopyURL url={getRepoURL('validated')} />
162-
<p style={{ paddingTop: 'var(--pf-v5-global--spacer--md)' }}>
163-
<Trans>
164-
Synclists are deprecated in AAP 2.4 and will be removed in a
165-
future release, use client-side <code>requirements.yml</code>{' '}
166-
instead.
167-
</Trans>
168-
</p>
169162
</section>
170163
<section className='body'>
171164
<h2>{t`SSO URL`}</h2>

src/utilities/translate-locked-role.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export const translateLockedRole = (name, description) =>
1717
'galaxy.execution_environment_namespace_owner': t`Create and update execution environments under existing container namespaces.`,
1818
'galaxy.execution_environment_publisher': t`Push and change execution environments.`,
1919
'galaxy.group_admin': t`View, add, remove and change groups.`,
20-
'galaxy.synclist_owner': t`View, add, remove and change synclists.`,
2120
'galaxy.task_admin': t`View and cancel any task.`,
2221
'galaxy.user_admin': t`View, add, remove and change users.`,
2322
})[name] || description;

0 commit comments

Comments
 (0)