+ Are you sure you want to delete {item.label}? +
++ {item.domain} +
++ This will remove remote RSD and all related entries too! +
+ > + } + onCancel={onCancel} + onDelete={onDelete} + /> + ) +} diff --git a/frontend/components/admin/remote-rsd/apiRemoteRsd.ts b/frontend/components/admin/remote-rsd/apiRemoteRsd.ts new file mode 100644 index 000000000..19a6705b1 --- /dev/null +++ b/frontend/components/admin/remote-rsd/apiRemoteRsd.ts @@ -0,0 +1,189 @@ +// SPDX-FileCopyrightText: 2024 Dusan Mijatovic (Netherlands eScience Center) +// SPDX-FileCopyrightText: 2024 Netherlands eScience Center +// +// SPDX-License-Identifier: Apache-2.0 + +import {extractCountFromHeader} from '~/utils/extractCountFromHeader' +import {createJsonHeaders, extractReturnMessage, getBaseUrl} from '~/utils/fetchHelpers' +import logger from '~/utils/logger' +import {paginationUrlParams} from '~/utils/postgrestUrl' + +export type EditRemoteRsd={ + id: string + label: string, + domain: string, + active: boolean, + scrape_interval_minutes: number +} + +export type RemoteRsd = EditRemoteRsd & { + scraped_at: string | null + last_err_msg: string | null + created_at: string + updated_at: string +} + +export type NewRemoteRsd=Omit