Skip to content

Commit 08f6925

Browse files
committed
Remove deprecated synclist, including 2.4 synclist deprecation notice
1 parent afc7d40 commit 08f6925

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
@@ -25,7 +25,6 @@ export { LegacyNamespaceAPI } from './legacy-namespace';
2525
export { LegacyRoleAPI } from './legacy-role';
2626
export { LegacySyncAPI } from './legacy-sync';
2727
export { MyNamespaceAPI } from './my-namespace';
28-
export { MySyncListAPI } from './my-synclist';
2928
export { NamespaceAPI } from './namespace';
3029
export { PulpAPI } from './pulp';
3130
export { AnsibleRemoteType } from './response-types/ansible-remote';
@@ -74,7 +73,6 @@ export { PulpStatus } from './response-types/pulp';
7473
export { RemoteType } from './response-types/remote';
7574
export { GroupRoleType, RoleType } from './response-types/role';
7675
export { SettingsType } from './response-types/settings';
77-
export { SyncListType } from './response-types/synclists';
7876
export { TaskType } from './response-types/task';
7977
export {
8078
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
@@ -4,7 +4,6 @@ import {
44
Button,
55
Card,
66
CardBody,
7-
CardFooter,
87
CardHeader,
98
Text,
109
TextContent,
@@ -26,7 +25,6 @@ import { convertContentSummaryCounts, namespaceTitle } from 'src/utilities';
2625

2726
interface IProps extends CollectionVersionSearch {
2827
displaySignatures: boolean;
29-
footer?: ReactNode;
3028
menu?: ReactNode;
3129
}
3230

@@ -62,7 +60,6 @@ export const CollectionCard = ({
6260
is_signed,
6361
displaySignatures,
6462
menu,
65-
footer,
6663
}: IProps) => {
6764
const nsTitle = namespaceTitle(
6865
namespace || { name: collection_version.namespace },
@@ -135,7 +132,6 @@ export const CollectionCard = ({
135132
renderTypeCount(k, contentSummary.contents[k]),
136133
)}
137134
</CardBody>
138-
{footer && <CardFooter>{footer}</CardFooter>}
139135
</Card>
140136
);
141137
};

src/components/collection-list-item.tsx

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

@@ -49,7 +48,6 @@ export const CollectionListItem = ({
4948
displaySignatures,
5049
dropdownMenu,
5150
showNamespace,
52-
synclistSwitch,
5351
uploadButton,
5452
}: IProps) => {
5553
const cells = [];
@@ -136,7 +134,6 @@ export const CollectionListItem = ({
136134
direction={{ default: 'column' }}
137135
alignItems={{ default: 'alignItemsFlexStart' }}
138136
>
139-
{synclistSwitch && <FlexItem>{synclistSwitch}</FlexItem>}
140137
{uploadButton || dropdownMenu ? (
141138
<FlexItem>
142139
{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/core/macro';
2-
import { Button, DataList, Switch } from '@patternfly/react-core';
3-
import { Component, type ReactNode } from 'react';
2+
import { Button, DataList } from '@patternfly/react-core';
3+
import { 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) {
@@ -310,10 +302,6 @@ class Search extends Component<RouteProps, IState> {
310302
<CollectionCard
311303
key={i}
312304
{...c}
313-
footer={this.renderSyncToogle(
314-
c.collection_version.name,
315-
c.collection_version.namespace,
316-
)}
317305
menu={this.renderMenu(false, c)}
318306
displaySignatures={
319307
(this.context as IAppContextType).featureFlags
@@ -426,24 +414,6 @@ class Search extends Component<RouteProps, IState> {
426414
return dropdownMenu;
427415
}
428416

429-
private renderSyncToogle(name: string, namespace: string): ReactNode {
430-
const { synclist } = this.state;
431-
432-
if (!synclist) {
433-
return null;
434-
}
435-
436-
return (
437-
<Switch
438-
id={namespace + '.' + name}
439-
className='sync-toggle'
440-
label={t`Sync`}
441-
isChecked={this.isCollectionSynced(name, namespace)}
442-
onChange={() => this.toggleCollectionSync(name, namespace)}
443-
/>
444-
);
445-
}
446-
447417
private checkUploadPrivilleges(collection) {
448418
const addAlert = () => {
449419
this.setState({
@@ -479,34 +449,6 @@ class Search extends Component<RouteProps, IState> {
479449
});
480450
}
481451

482-
private toggleCollectionSync(name: string, namespace: string) {
483-
const synclist = { ...this.state.synclist };
484-
485-
const colIndex = synclist.collections.findIndex(
486-
(el) => el.name === name && el.namespace === namespace,
487-
);
488-
489-
if (colIndex < 0) {
490-
synclist.collections.push({ name: name, namespace: namespace });
491-
} else {
492-
synclist.collections.splice(colIndex, 1);
493-
}
494-
495-
MySyncListAPI.update(synclist.id, synclist).then((response) => {
496-
this.setState({ synclist: response.data });
497-
MySyncListAPI.curate(synclist.id).then(() => null);
498-
});
499-
}
500-
501-
private isCollectionSynced(name: string, namespace: string): boolean {
502-
const { synclist } = this.state;
503-
const found = synclist.collections.find(
504-
(el) => el.name === name && el.namespace === namespace,
505-
);
506-
507-
return synclist.policy === 'include' ? !!found : !found;
508-
}
509-
510452
private renderList(collections) {
511453
return (
512454
<div className='list-container'>
@@ -521,10 +463,6 @@ class Search extends Component<RouteProps, IState> {
521463
.display_signatures
522464
}
523465
showNamespace
524-
synclistSwitch={this.renderSyncToogle(
525-
c.collection_version.name,
526-
c.collection_version.namespace,
527-
)}
528466
{...this.renderMenu(true, c)}
529467
/>
530468
))}
@@ -534,20 +472,6 @@ class Search extends Component<RouteProps, IState> {
534472
);
535473
}
536474

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

src/containers/token/token-insights.tsx

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