+ {columns.map(({ id }) => (
+
+ {cellCreator?.[id]?.({
+ value: entity[id],
+ entity,
+ }) ?? }
+ |
+ ))}
+
+ setIsActionMenuOpen(!isActionMenuOpen)}
+ toggle={}
+ isOpen={isActionMenuOpen}
+ isPlain
+ dropdownItems={[
+
+ {t('EditProvider')}
+ ,
+
+ {t('DeleteProvider')}
+ ,
+
+ {t('SelectMigrationNetwork')}
+ ,
+ ]}
+ />
+
+ deleteProviderMutation.mutate({
+ metadata: {
+ name: entity.name,
+ namespace: entity.namespace,
+ },
+ spec: { type: entity.type as ProviderType },
+ kind: '',
+ apiVersion: '',
+ })
+ }
+ mutateResult={deleteProviderMutation}
+ title={t('PermanentlyDeleteProvider')}
+ body={t(
+ isTarget(entity.type as ProviderType)
+ ? 'ProviderNoLongerSelectableAsTarget'
+ : 'ProviderNoLongerSelectableAsSource',
+ { type: entity.type, name: entity.name },
+ )}
+ confirmButtonText={t('Delete')}
+ errorText={t('CannotDeleteProvider')}
+ cancelButtonText={t('Cancel')}
+ />
+ |
+
+ );
+};
export default ProviderRow;
diff --git a/src/Providers/ProvidersPage.tsx b/src/Providers/ProvidersPage.tsx
index 5b9102e8b..603ebb3da 100644
--- a/src/Providers/ProvidersPage.tsx
+++ b/src/Providers/ProvidersPage.tsx
@@ -22,17 +22,24 @@ import {
VM_COUNT,
} from 'src/utils/constants';
+import { RedExclamationCircleIcon } from '@openshift-console/dynamic-plugin-sdk';
import {
Button,
+ EmptyState,
+ EmptyStateBody,
+ EmptyStateIcon,
+ EmptyStatePrimary,
Level,
LevelItem,
PageSection,
+ Spinner,
Title,
Toolbar,
ToolbarContent,
ToolbarToggleGroup,
} from '@patternfly/react-core';
import { FilterIcon } from '@patternfly/react-icons';
+import { SearchIcon } from '@patternfly/react-icons';
import { MergedProvider, useProvidersWithInventory } from './data';
import ProviderRow from './ProviderRow';
@@ -155,10 +162,15 @@ export const ProvidersPage = ({ namespace, kind }: ProvidersPageProps) => {
namespace,
});
const [selectedFilters, setSelectedFilters] = useState({});
+ const clearAllFilters = () => setSelectedFilters({});
const [fields, setFields] = useFields(namespace, fieldsMetadata);
console.error('Providers', providers, fields, namespace, kind);
+ const filteredProviders = providers.filter(
+ createMetaMatcher(selectedFilters, fields),
+ );
+
return (
<>