From caefedf0a493d42b360669499283b149debc77b5 Mon Sep 17 00:00:00 2001 From: Shaiah Emigh-Doyle Date: Thu, 15 Jun 2023 11:50:31 -0400 Subject: [PATCH 1/3] use v3 namespaces api --- frontend/hub/namespaces/HubNamespaces.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/hub/namespaces/HubNamespaces.tsx b/frontend/hub/namespaces/HubNamespaces.tsx index f234e8cdf3..8aeb7722b4 100644 --- a/frontend/hub/namespaces/HubNamespaces.tsx +++ b/frontend/hub/namespaces/HubNamespaces.tsx @@ -42,7 +42,7 @@ export function Namespaces() { } export function AllNamespaces() { - return ; + return ; } export function MyNamespaces() { From a1a34f55f2e6e627de0b57500955ebf94e1014ab Mon Sep 17 00:00:00 2001 From: Shaiah Emigh-Doyle Date: Thu, 15 Jun 2023 14:34:10 -0400 Subject: [PATCH 2/3] usePulpView for namespaces resolved ordering param issue --- frontend/hub/namespaces/HubNamespace.tsx | 31 +++++++++++++++++++++-- frontend/hub/namespaces/HubNamespaces.tsx | 4 +-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/frontend/hub/namespaces/HubNamespace.tsx b/frontend/hub/namespaces/HubNamespace.tsx index cb5e6d40b0..d0d0215a7e 100644 --- a/frontend/hub/namespaces/HubNamespace.tsx +++ b/frontend/hub/namespaces/HubNamespace.tsx @@ -1,17 +1,44 @@ +export interface LinksType { + name: string; + url: string; +} + +export interface LatestMetadataType { + pulp_href: string; + name: string; + company: string; + email: string; + description: string; + resources: string; + links: LinksType[]; + avatar_sha256: string | null; + avatar_url: string | null; + metadata_sha256: string; + groups: string[]; + task: string | null; +} + export interface HubNamespace { pulp_href: string; + pulp_created: string; id: number; name: string; company: string; email: string; avatar_url: string; description: string; + num_collections: number; groups: [ { id: number; name: string; - object_roles: string[]; + object_permissions: string[]; + pulp_href?: string; } ]; - related_fields: object; + resources: string; + owners: string[]; + links: LinksType[]; + my_permissions: string[]; + latest_metadata: LatestMetadataType; } diff --git a/frontend/hub/namespaces/HubNamespaces.tsx b/frontend/hub/namespaces/HubNamespaces.tsx index 8aeb7722b4..ae8015da4d 100644 --- a/frontend/hub/namespaces/HubNamespaces.tsx +++ b/frontend/hub/namespaces/HubNamespaces.tsx @@ -2,7 +2,7 @@ import { useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; import { PageHeader, PageLayout, PageTab, PageTable, PageTabs } from '../../../framework'; import { RouteObj } from '../../Routes'; -import { idKeyFn, useHubView } from '../useHubView'; +import { idKeyFn, usePulpView } from '../usePulpView'; import { HubNamespace } from './HubNamespace'; import { useHubNamespaceActions } from './hooks/useHubNamespaceActions'; import { useHubNamespaceFilters } from './hooks/useHubNamespaceFilters'; @@ -56,7 +56,7 @@ export function CommonNamespaces(props: { url: string }) { const tableColumns = useHubNamespacesColumns(); const toolbarActions = useHubNamespaceToolbarActions(); const rowActions = useHubNamespaceActions(); - const view = useHubView(props.url, idKeyFn, toolbarFilters, tableColumns); + const view = usePulpView(props.url, idKeyFn, toolbarFilters, tableColumns); return ( toolbarFilters={toolbarFilters} From e8ee745174623301ccec716b6fc449b78b68f6a0 Mon Sep 17 00:00:00 2001 From: Shaiah Emigh-Doyle Date: Tue, 20 Jun 2023 11:45:36 -0400 Subject: [PATCH 3/3] use my_permissions query for my-namespaces filter --- frontend/hub/namespaces/HubNamespaces.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/hub/namespaces/HubNamespaces.tsx b/frontend/hub/namespaces/HubNamespaces.tsx index ae8015da4d..040347950b 100644 --- a/frontend/hub/namespaces/HubNamespaces.tsx +++ b/frontend/hub/namespaces/HubNamespaces.tsx @@ -46,7 +46,9 @@ export function AllNamespaces() { } export function MyNamespaces() { - return ; + return ( + + ); } export function CommonNamespaces(props: { url: string }) {