mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 07:19:41 +02:00
refactor(namespace): migrate namespace access view to react [r8s-141] (#87)
This commit is contained in:
parent
8ed7cd80cb
commit
e9fc6d5598
62 changed files with 1018 additions and 610 deletions
39
app/react/kubernetes/namespaces/AccessView/AccessView.tsx
Normal file
39
app/react/kubernetes/namespaces/AccessView/AccessView.tsx
Normal file
|
@ -0,0 +1,39 @@
|
|||
import { useCurrentStateAndParams } from '@uirouter/react';
|
||||
|
||||
import { useUnauthorizedRedirect } from '@/react/hooks/useUnauthorizedRedirect';
|
||||
|
||||
import { PageHeader } from '@@/PageHeader';
|
||||
|
||||
import { NamespaceDetailsWidget } from './NamespaceDetailsWidget';
|
||||
import { AccessDatatable } from './AccessDatatable/AccessDatatable';
|
||||
import { CreateAccessWidget } from './CreateAccessWidget/CreateAccessWidget';
|
||||
|
||||
export function AccessView() {
|
||||
const {
|
||||
params: { id: namespaceName },
|
||||
} = useCurrentStateAndParams();
|
||||
useUnauthorizedRedirect(
|
||||
{ authorizations: ['K8sResourcePoolDetailsW'] },
|
||||
{ to: 'kubernetes.resourcePools' }
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<PageHeader
|
||||
title="Namespace access management"
|
||||
breadcrumbs={[
|
||||
{ label: 'Namespaces', link: 'kubernetes.resourcePools' },
|
||||
{
|
||||
label: namespaceName,
|
||||
link: 'kubernetes.resourcePools.resourcePool',
|
||||
linkParams: { id: namespaceName },
|
||||
},
|
||||
'Access management',
|
||||
]}
|
||||
reload
|
||||
/>
|
||||
<NamespaceDetailsWidget />
|
||||
<CreateAccessWidget />
|
||||
<AccessDatatable />
|
||||
</>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue