Skip to content
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

feat: Remove admin selector #2153

Merged
merged 2 commits into from
Sep 19, 2024
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
9 changes: 6 additions & 3 deletions catalog/ui/src/app/Admin/CatalogIncidentsAlertList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ const CatalogIncidentsAlertList: React.FC = () => {
if (catalogItemsArr && catalogIncidents) {
return catalogIncidents.items.map(i => {
const ci = catalogItemsArr.find(c => c.metadata.labels?.['gpte.redhat.com/asset-uuid'] === i.asset_uuid && getStageFromK8sObject(c) === i.stage);
ci.metadata.annotations[`${BABYLON_DOMAIN}/incident`] = JSON.stringify(i);
return ci;
});
if (ci) {
ci.metadata.annotations[`${BABYLON_DOMAIN}/incident`] = JSON.stringify(i);
return ci;
}
return null;
}).filter(Boolean);
}
return [];
}, [catalogItemsArr, catalogIncidents]);
Expand Down
88 changes: 0 additions & 88 deletions catalog/ui/src/app/Catalog/AdminSelector.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions catalog/ui/src/app/Catalog/Catalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ import CatalogLabelSelector from './CatalogLabelSelector';
import CatalogNamespaceSelect from './CatalogNamespaceSelect';
import CatalogContent from './CatalogContent';
import IncidentsBanner from '@app/components/IncidentsBanner';
import AdminSelector from './AdminSelector';
import useInterfaceConfig from '@app/utils/useInterfaceConfig';

import './catalog.css';
Expand Down Expand Up @@ -558,7 +557,6 @@ const Catalog: React.FC<{ userHasRequiredPropertiesToAccess: boolean }> = ({ use
onSelect={onSelectLabels}
selected={selectedLabels}
/>
{isAdmin ? <AdminSelector onSelect={onSelectAdminFilter} selected={selectedAdminFilter} /> : null}
</SidebarPanel>
<SidebarContent>
<PageSection variant={PageSectionVariants.light} className="catalog__header">
Expand Down
Loading