1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

refactor(rbac): migrate access table to react [EE-4710] (#10823)

This commit is contained in:
Chaim Lev-Ari 2024-04-11 09:49:38 +03:00 committed by GitHub
parent 6ff4fd3db2
commit e9ebef15a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 514 additions and 228 deletions

View file

@ -2,9 +2,11 @@ import angular from 'angular';
import { r2a } from '@/react-tools/react2angular';
import { withUIRouter } from '@/react-tools/withUIRouter';
import { withCurrentUser } from '@/react-tools/withCurrentUser';
import { withReactQuery } from '@/react-tools/withReactQuery';
import { NamespacesDatatable } from '@/react/kubernetes/namespaces/ListView/NamespacesDatatable';
import { NamespaceAppsDatatable } from '@/react/kubernetes/namespaces/ItemView/NamespaceAppsDatatable';
import { withCurrentUser } from '@/react-tools/withCurrentUser';
import { NamespaceAccessDatatable } from '@/react/kubernetes/namespaces/AccessView/AccessDatatable';
export const namespacesModule = angular
.module('portainer.kubernetes.react.components.namespaces', [])
@ -23,4 +25,11 @@ export const namespacesModule = angular
'isLoading',
'onRefresh',
])
)
.component(
'namespaceAccessDatatable',
r2a(withUIRouter(withReactQuery(NamespaceAccessDatatable)), [
'dataset',
'onRemove',
])
).name;

View file

@ -112,18 +112,5 @@
</div>
</div>
<div class="row">
<div class="col-sm-12">
<access-datatable
ng-if="ctrl.authorizedUsersAndTeams"
title-text="Namespace access"
title-icon="user-x"
table-key="kubernetes_resourcepool_access"
order-by="Name"
dataset="ctrl.authorizedUsersAndTeams"
remove-action="ctrl.unauthorizeAccess"
>
</access-datatable>
</div>
</div>
<namespace-access-datatable ng-if="ctrl.authorizedUsersAndTeams" dataset="ctrl.authorizedUsersAndTeams" on-remove="(ctrl.unauthorizeAccess)"> </namespace-access-datatable>
</div>