Skip to content

Commit

Permalink
feat: Remove admin selector (#2153)
Browse files Browse the repository at this point in the history
* feat: Remove admin selector

* fixup! feat: Remove admin selector
  • Loading branch information
aleixhub authored Sep 19, 2024
1 parent 9fe971a commit b21ee0c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 93 deletions.
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

0 comments on commit b21ee0c

Please sign in to comment.