Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROD-2332 dataset page to use the new table component #5130

Merged
merged 12 commits into from
Jul 31, 2024
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ The types of changes are:
- Serve GVL languages as they are requested [#5112](https://github.com/ethyca/fides/pull/5112)
- Changed text on system integrations tab to direct to new integration management [#5097](https://github.com/ethyca/fides/pull/5097)
- Updates to consent experience styling [#5085](https://github.com/ethyca/fides/pull/5085)
- Updated the dataset page to display the new table and support pagination [#5130](https://github.com/ethyca/fides/pull/5130)


### Developer Experience
- Add `.syncignore` to reduce file sync size with new volumes [#5104](https://github.com/ethyca/fides/pull/5104)
Expand Down
1 change: 1 addition & 0 deletions clients/admin-ui/src/features/common/nav/v2/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const SYSTEM_ROUTE = "/systems";
export const EDIT_SYSTEM_ROUTE = "/systems/configure/[id]";
export const CLASSIFY_SYSTEMS_ROUTE = "/classify-systems";
export const DATASET_ROUTE = "/dataset";
export const DATASET_EDIT_ROUTE = "/dataset/[id]";

// Detection and discovery
export const DETECTION_DISCOVERY_ACTIVITY_ROUTE = "/data-discovery/activity";
Expand Down
91 changes: 0 additions & 91 deletions clients/admin-ui/src/features/dataset/DatasetTable.tsx

This file was deleted.

20 changes: 20 additions & 0 deletions clients/admin-ui/src/features/dataset/dataset.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import {
Dataset,
GenerateRequestPayload,
GenerateResponse,
Page_Dataset_,
} from "~/types/api";
import { PaginationQueryParams } from "~/types/common/PaginationQueryParams";
import { SearchQueryParams } from "~/types/common/SearchQueryParams";

import { EditableType } from "./types";

Expand All @@ -27,8 +30,24 @@ interface DatasetDeleteResponse {
resource: Dataset;
}

interface DatasetFiltersQueryParams {
exclude_saas_datasets?: boolean;
only_unlinked_datasets?: boolean;
}

const datasetApi = baseApi.injectEndpoints({
endpoints: (build) => ({
getDatasets: build.query<
Page_Dataset_,
PaginationQueryParams & SearchQueryParams & DatasetFiltersQueryParams
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

>({
query: (params) => ({
method: "GET",
url: `dataset`,
params,
}),
providesTags: () => ["Datasets"],
}),
getAllDatasets: build.query<Dataset[], void>({
query: () => ({ url: `dataset` }),
providesTags: () => ["Datasets"],
Expand Down Expand Up @@ -99,6 +118,7 @@ const datasetApi = baseApi.injectEndpoints({
});

export const {
useGetDatasetsQuery,
useGetAllDatasetsQuery,
useGetAllFilteredDatasetsQuery,
useGetDatasetByKeyQuery,
Expand Down
12 changes: 3 additions & 9 deletions clients/admin-ui/src/features/system/system.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
SystemResponse,
TestStatusMessage,
} from "~/types/api";
import { PaginationQueryParams } from "~/types/common/PaginationQueryParams";
import { SearchQueryParams } from "~/types/common/SearchQueryParams";

interface SystemDeleteResponse {
message: string;
Expand All @@ -23,14 +25,6 @@ interface UpsertResponse {
updated: number;
}

interface PaginationParams {
page: number;
size: number;
}
interface SearchParams {
search?: string;
}

export type ConnectionConfigSecretsRequest = {
systemFidesKey: string;
secrets: {
Expand All @@ -42,7 +36,7 @@ const systemApi = baseApi.injectEndpoints({
endpoints: (build) => ({
getSystems: build.query<
Page_BasicSystemResponse_,
PaginationParams & SearchParams
PaginationQueryParams & SearchQueryParams
>({
query: (params) => ({
method: "GET",
Expand Down
Loading