diff --git a/app/portainer/react/components/settings.ts b/app/portainer/react/components/settings.ts index 1e9811e33..47abf601f 100644 --- a/app/portainer/react/components/settings.ts +++ b/app/portainer/react/components/settings.ts @@ -6,11 +6,8 @@ import { InternalAuth } from '@/react/portainer/settings/AuthenticationView/Inte import { r2a } from '@/react-tools/react2angular'; import { withReactQuery } from '@/react-tools/withReactQuery'; import { withUIRouter } from '@/react-tools/withUIRouter'; -import { ApplicationSettingsPanel } from '@/react/portainer/settings/SettingsView/ApplicationSettingsPanel'; -import { KubeSettingsPanel } from '@/react/portainer/settings/SettingsView/KubeSettingsPanel'; -import { HelmCertPanel } from '@/react/portainer/settings/SettingsView/HelmCertPanel'; -import { HiddenContainersPanel } from '@/react/portainer/settings/SettingsView/HiddenContainersPanel/HiddenContainersPanel'; -import { SSLSettingsPanelWrapper } from '@/react/portainer/settings/SettingsView/SSLSettingsPanel/SSLSettingsPanel'; +import { LDAPUsersTable } from '@/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPUsersTable'; +import { LDAPGroupsTable } from '@/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPGroupsTable'; export const settingsModule = angular .module('portainer.app.react.components.settings', []) @@ -23,20 +20,5 @@ export const settingsModule = angular 'internalAuth', r2a(InternalAuth, ['onSaveSettings', 'isLoading', 'value', 'onChange']) ) - .component( - 'applicationSettingsPanel', - r2a(withReactQuery(ApplicationSettingsPanel), ['onSuccess', 'settings']) - ) - .component( - 'sslSettingsPanel', - r2a(withReactQuery(SSLSettingsPanelWrapper), []) - ) - .component('helmCertPanel', r2a(withReactQuery(HelmCertPanel), [])) - .component( - 'hiddenContainersPanel', - r2a(withUIRouter(withReactQuery(HiddenContainersPanel)), []) - ) - .component( - 'kubeSettingsPanel', - r2a(withUIRouter(withReactQuery(KubeSettingsPanel)), ['settings']) - ).name; + .component('ldapUsersDatatable', r2a(LDAPUsersTable, ['dataset'])) + .component('ldapGroupsDatatable', r2a(LDAPGroupsTable, ['dataset'])).name; diff --git a/app/portainer/settings/authentication/ldap/index.js b/app/portainer/settings/authentication/ldap/index.js index fae32a5a1..986ee9d25 100644 --- a/app/portainer/settings/authentication/ldap/index.js +++ b/app/portainer/settings/authentication/ldap/index.js @@ -6,7 +6,6 @@ import { ldapSettingsCustom } from './ldap-settings-custom'; import { ldapSettingsOpenLdap } from './ldap-settings-openldap'; import { ldapConnectivityCheck } from './ldap-connectivity-check'; -import { ldapGroupsDatatable } from './ldap-groups-datatable'; import { ldapGroupSearch } from './ldap-group-search'; import { ldapGroupSearchItem } from './ldap-group-search-item'; import { ldapUserSearch } from './ldap-user-search'; @@ -18,7 +17,6 @@ import { ldapCustomAdminGroup } from './ldap-custom-admin-group'; import { ldapSettingsSecurity } from './ldap-settings-security'; import { ldapSettingsTestLogin } from './ldap-settings-test-login'; import { ldapCustomUserSearch } from './ldap-custom-user-search'; -import { ldapUsersDatatable } from './ldap-users-datatable'; import { LDAPService } from './ldap.service'; import { LDAP } from './ldap.rest'; @@ -27,7 +25,6 @@ export default angular .service('LDAPService', LDAPService) .service('LDAP', LDAP) .component('ldapConnectivityCheck', ldapConnectivityCheck) - .component('ldapGroupsDatatable', ldapGroupsDatatable) .component('ldapSettings', ldapSettings) .component('adSettings', adSettings) .component('ldapGroupSearch', ldapGroupSearch) @@ -42,5 +39,4 @@ export default angular .component('ldapSettingsOpenLdap', ldapSettingsOpenLdap) .component('ldapSettingsSecurity', ldapSettingsSecurity) .component('ldapSettingsTestLogin', ldapSettingsTestLogin) - .component('ldapCustomUserSearch', ldapCustomUserSearch) - .component('ldapUsersDatatable', ldapUsersDatatable).name; + .component('ldapCustomUserSearch', ldapCustomUserSearch).name; diff --git a/app/portainer/settings/authentication/ldap/ldap-custom-group-search/ldap-custom-group-search.html b/app/portainer/settings/authentication/ldap/ldap-custom-group-search/ldap-custom-group-search.html index 25ea00c9a..9583a476e 100644 --- a/app/portainer/settings/authentication/ldap/ldap-custom-group-search/ldap-custom-group-search.html +++ b/app/portainer/settings/authentication/ldap/ldap-custom-group-search/ldap-custom-group-search.html @@ -67,8 +67,4 @@ -
- |
-
- |
- |||
---|---|---|---|---|
- {{ item.Name }} - | -
- {{ group }} - |
- |||
Loading... | -||||
No groups found. | -
- |
- ||||
---|---|---|---|---|
- {{ item }} - | -||||
Loading... | -||||
No users found. | -
+ {g} +
+ ))} + > + ), + }), + ]; +} diff --git a/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPUsersTable.tsx b/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPUsersTable.tsx new file mode 100644 index 000000000..c394d46e4 --- /dev/null +++ b/app/react/portainer/settings/AuthenticationView/LDAPAuth/LDAPUsersTable.tsx @@ -0,0 +1,37 @@ +import { Users } from 'lucide-react'; + +import { Datatable } from '@@/datatables'; +import { useTableStateWithoutStorage } from '@@/datatables/useTableState'; + +const columns = getColumns(); + +interface Value { + value: string; +} + +export function LDAPUsersTable({ dataset }: { dataset?: string[] }) { + const tableState = useTableStateWithoutStorage(); + const items = dataset?.map((value) => ({ value })); + + return ( +