jackson/internal-ui/src/dsync/DirectoryWebhookLogs.tsx

188 lines
4.9 KiB
TypeScript
Raw Normal View History

Add `@boxyhq/internal-ui` (#2305) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * Add `--legacy-peer-deps` to prevent installing peer dependencies * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-02-27 22:12:39 +00:00
import useSWR from 'swr';
import { useState } from 'react';
import { useTranslation } from 'next-i18next';
New OIDC fed (#2336) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * WIP * Add new components and hooks for directory sync * WIP * lint fix * updated swr * WIP * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * IdP selection screen changes * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * check app's redirectUrl, TODO: save app info into session to read later * Add query parameters to API URLs in DirectoryGroups * working saml login via IdP select. TODO: oidc login via IdP select and saml + oidc login with 1 connection * oidc IdP working with selection * working oidc fed -> saml flow * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * updated peer-deps * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * updated federated app creation page * updated federated app edit page * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * lint fix * updated package-lock * add jose npm to dev dep * added missing strings * added missing strings * locale strings fix * locale strings cleanup * tweaks to icon imports * replaced textarea with list of inputs for Federated Apps redirect url * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * updated package-lock * Add `--legacy-peer-deps` to prevent installing peer dependencies * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * allow selective subdomain globbing * removed duplicate jose lib * updated package-lock * updated swagger doc * SAML Federation -> Identity Federation * fixed locale strings * turn off autocomplete for tags input --------- Co-authored-by: Kiran K <mailtokirankk@gmail.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-03-05 16:57:02 +00:00
import EyeIcon from '@heroicons/react/24/outline/EyeIcon';
Add `@boxyhq/internal-ui` (#2305) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * Add `--legacy-peer-deps` to prevent installing peer dependencies * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-02-27 22:12:39 +00:00
import type { WebhookEventLog } from '../types';
import { fetcher, addQueryParamsToPath } from '../utils';
import { DirectoryTab } from '../dsync';
import { usePaginate, useDirectory } from '../hooks';
import { TableBodyType } from '../shared/Table';
import {
Loading,
Table,
EmptyState,
Error,
Pagination,
PageHeader,
pageLimit,
Internal UI : Setup Link & SSO Tracer (#2354) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * wip * Add `--legacy-peer-deps` to prevent installing peer dependencies * wip * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * Add new dependencies for @next/swc package * Fix translation keys and import types * Update SSOTracers component and common.json localization * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose * wip * wip setuplink * Add delete link * Add exclusion for node_modules in files.exclude * Add error handling and additional functionality to SetupLinks component * Refactor SetupLinks component and add missing translations * Add missing translations and update setup link messages * Remove comment * update localization strings * Remove unused key * Update SSOTracerInfo component title * Refactor ConfirmationModal component button styling * Update package.json and ConfirmationModal.tsx * Update dep * Refactor setup links API and UI to use query parameters for pagination * Refactor deleteLink API endpoint and SetupLinks component * Update package.json paths * Update dep * Refactor setup link forms and add new fields * Update dep * Update import paths and add new setup links tests * wip * Refactor CreateDirectory and DirectoryInfo components * Add new fields to setup link and directory sync APIs * Cleanup * Update package-lock * Fix link regeneration * updated package-lock * Fix and add e2e tests * Update API documentation with new parameters for setup link creation and update * Revert * Update postcss.config.js and SSOForm.tsx --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-03-01 17:00:38 +00:00
ConfirmationModal,
Add `@boxyhq/internal-ui` (#2305) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * Add `--legacy-peer-deps` to prevent installing peer dependencies * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-02-27 22:12:39 +00:00
} from '../shared';
import { ButtonDanger } from '../shared/ButtonDanger';
import { useRouter } from '../hooks';
export const DirectoryWebhookLogs = ({
urls,
onView,
onDelete,
}: {
urls: { getEvents: string; getDirectory: string; tabBase: string; deleteEvents?: string };
onView?: (event: WebhookEventLog) => void;
onDelete?: () => void;
}) => {
const { router } = useRouter();
const { t } = useTranslation('common');
const [delModalVisible, setDelModalVisible] = useState(false);
const { paginate, setPaginate, pageTokenMap } = usePaginate(router!);
const params = {
Pagination fixes (#2347) * `offset` -> `pageOffset`, `limit`-> `pageLimit` * Be backward compatible in API * Cleanup types and handle pagination qs * Cleanup unused code * Import type * Cleanup and fix lint error * Align params for sso-tracer * Move parsing to a common util function * pageLimit shouldn't be optional * Cap pageLimit to max value, split the boolean * Revert typings and assert non null * Refactor var name * Use util function to normalize pagination params across getAll and getByIndex * Normalize offset/limit for dynamo/mongo * Update query params in `FederatedSAMLApps` * Cap to max limit if passed limit is 0 * Sync lock file * Add a 3rd record and supply opts.pageLimit * Normalize offset/limit for mem/redis * Save the 3rd record in the store * Fix getAll tests * Give precedence to standard params over legacy * Use util function * Parse using util function * Refactor * Standardise pagination for `api/v1/dsync/events` * Standardise pagination for api/admin/connections * Standardise pagination for api/admin/directory-sync * Standardise pagination for `api/v1/dsync/groups` * Standardise pagination for `v1/dsync/users`, `v1/dsync/product` * Standardise pagination in fetchByProduct APIs * Update swagger for groups * Fix pagination params definition, add the params for users api * More swagger updates * Swagger spec update for dsync events * Add pagination params to apis fetching by product * Update qs in internal-ui * Remove type assertion * [Swagger WIP] Fix response format for paginated APIs * Add dsync events to swagger spec * Fix swagger spec for sso tracer * Fix swagger spec for federated-saml apps of a product * Update pageLimit to 50 * Use pageLimit value from internal-ui * Update UI SDK * Cleanup local pagination component * Update swagger version * Remove unused keys from locale * Fix tag for trace api spec * Fix param name for swagger * Fix swagger tag for trace * updated package-lock * updated package-lock --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2024-03-06 20:14:14 +00:00
pageOffset: paginate.offset,
pageLimit,
Add `@boxyhq/internal-ui` (#2305) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * Add `--legacy-peer-deps` to prevent installing peer dependencies * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-02-27 22:12:39 +00:00
};
// For DynamoDB
if (paginate.offset > 0 && pageTokenMap[paginate.offset - pageLimit]) {
params['pageToken'] = pageTokenMap[paginate.offset - pageLimit];
}
const getUrl = addQueryParamsToPath(urls.getEvents, params);
const { directory, isLoadingDirectory, directoryError } = useDirectory(urls.getDirectory);
const { data, isLoading, error } = useSWR<{ data: WebhookEventLog[] }>(getUrl, fetcher);
if (isLoading || isLoadingDirectory) {
return <Loading />;
}
if (error || directoryError) {
return <Error message={error.message || directoryError.message} />;
}
if (!data || !directory) {
return null;
}
const events = data?.data || [];
const noEvents = events.length === 0 && paginate.offset === 0;
const noMoreResults = events.length === 0 && paginate.offset > 0;
const columns = [
{
key: 'webhook_endpoint',
label: t('bui-dsync-webhook-endpoint'),
wrap: true,
dataIndex: 'webhook_endpoint',
},
{
key: 'status_code',
label: t('bui-dsync-status-code'),
wrap: true,
dataIndex: 'status_code',
},
{
key: 'created_at',
label: t('bui-dsync-sent-at'),
wrap: true,
dataIndex: 'created_at',
},
{
key: 'actions',
label: t('bui-dsync-actions'),
wrap: true,
dataIndex: null,
},
];
const cols = columns.map(({ label }) => label);
const body: TableBodyType[] = events.map((event) => {
return {
id: event.id,
cells: columns.map((column) => {
const dataIndex = column.dataIndex as keyof typeof event;
if (dataIndex === null) {
return {
actions: [
{
text: t('bui-dsync-view'),
onClick: () => onView?.(event),
icon: <EyeIcon className='w-5' />,
},
],
};
}
if (dataIndex === 'status_code') {
return {
badge: {
text: event[dataIndex] as any,
color: event[dataIndex] === 200 ? 'success' : 'error',
},
};
}
return {
wrap: column.wrap,
text: event[dataIndex] as string,
};
}),
};
});
const removeEvents = async () => {
if (!urls.deleteEvents) {
return;
}
await fetch(urls.deleteEvents, {
method: 'DELETE',
});
onDelete?.();
};
return (
<>
<PageHeader title={directory.name} />
<DirectoryTab activeTab='events' baseUrl={urls.tabBase} />
{noEvents ? (
<EmptyState title={t('bui-dsync-no-events')} />
) : (
<>
{urls.deleteEvents && (
<>
<div className='py-2 flex justify-end'>
<ButtonDanger onClick={() => setDelModalVisible(true)}>
{t('bui-dsync-remove-events')}
</ButtonDanger>
</div>
Internal UI : Setup Link & SSO Tracer (#2354) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * wip * Add `--legacy-peer-deps` to prevent installing peer dependencies * wip * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * Add new dependencies for @next/swc package * Fix translation keys and import types * Update SSOTracers component and common.json localization * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose * wip * wip setuplink * Add delete link * Add exclusion for node_modules in files.exclude * Add error handling and additional functionality to SetupLinks component * Refactor SetupLinks component and add missing translations * Add missing translations and update setup link messages * Remove comment * update localization strings * Remove unused key * Update SSOTracerInfo component title * Refactor ConfirmationModal component button styling * Update package.json and ConfirmationModal.tsx * Update dep * Refactor setup links API and UI to use query parameters for pagination * Refactor deleteLink API endpoint and SetupLinks component * Update package.json paths * Update dep * Refactor setup link forms and add new fields * Update dep * Update import paths and add new setup links tests * wip * Refactor CreateDirectory and DirectoryInfo components * Add new fields to setup link and directory sync APIs * Cleanup * Update package-lock * Fix link regeneration * updated package-lock * Fix and add e2e tests * Update API documentation with new parameters for setup link creation and update * Revert * Update postcss.config.js and SSOForm.tsx --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-03-01 17:00:38 +00:00
<ConfirmationModal
Add `@boxyhq/internal-ui` (#2305) * add WellKnownURLs * Fix translation keys * Update dependencies and add IdP Configuration * Update common.json with new translations * wip * Update @boxyhq/internal-ui version to 0.0.5 * add internal ui folder * Fix imports and build * Refactor internal-ui package structure * wip shared UI * Fix the build * Add new components and hooks for directory sync * lint fix * updated swr * users * Refactor shared components and fix API endpoints*** ***Update directory user page and add new federated SAML app * Fix lint * wip * Add new files and update existing files * Refactor DirectoryGroups and DirectoryInfo components * Update localization strings for directory UI * Update Google Auth URL description in common.json * Refactor directory tab and add delete functionality to webhook logs * Delete unused files and update dependencies * Fix column declaration * Add internal-ui/dist to .gitignore * Update page limit and add new dependencies * wip * Refactor directory search in user API endpoint * wip * Refactor directory retrieval logic in user and group API handlers * Add API endpoints for retrieving webhook events * Add query parameters to API URLs in DirectoryGroups * Add Google authorization status badge and handle pagination in FederatedSAMLApps * Add router prop to AppsList component and update page header titles * UI changes * Add new files and export functions * Remove unused router prop * Add PencilIcon to FederatedSAMLApps * Refactor FederatedSAMLApps and NewFederatedSAMLApp components * lint fix * add jose npm to dev dep * added missing strings * locale strings fix * locale strings cleanup * update package-lock * Add prepublish step * Build and publish npm and internal ui * Refactor install step * Run npm install (for local) inside internal ui automatically using prepare * Remove eslint setup for internal-ui * Add `--legacy-peer-deps` to prevent installing peer dependencies * Fix the types import path * wip * wip * Fix the types * Format * Update package-lock * Cleanup * Try adding jose library version 5.2.2 * COPY internal-ui before npm install * COPY internal-ui in builder stage * fixed sort order for jose --------- Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com> Co-authored-by: Aswin V <vaswin91@gmail.com>
2024-02-27 22:12:39 +00:00
title={t('bui-dsync-delete-events-title')}
description={t('bui-dsync-delete-events-desc')}
visible={delModalVisible}
onConfirm={() => removeEvents()}
onCancel={() => setDelModalVisible(false)}
/>
</>
)}
<Table noMoreResults={noMoreResults} cols={cols} body={body} />
<Pagination
itemsCount={events.length}
offset={paginate.offset}
onPrevClick={() => {
setPaginate({
offset: paginate.offset - pageLimit,
});
}}
onNextClick={() => {
setPaginate({
offset: paginate.offset + pageLimit,
});
}}
/>
</>
)}
</>
);
};