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

refactor: separate V1 cloud storage UI elements from V2 data connectors #3301

Merged
merged 7 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
} from "../../../projectsV2/api/projectV2.enhanced-api";
import type { CloudStorageGetRead } from "../../../projectsV2/api/storagesV2.api";
import type { SessionStartCloudStorageConfiguration } from "../../../sessionsV2/startSessionOptionsV2.types";
import CloudStorageSecretsModal from "../../../sessionsV2/CloudStorageSecretsModal";
import CloudStorageSecretsModal from "../../../sessionsV2/DataConnectorSecretsModal";

import useDataSourceConfiguration from "./useDataSourceConfiguration.hook";
import { Loader } from "../../../../components/Loader";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ import {
Row,
} from "reactstrap";

import { Loader } from "../../../../components/Loader.tsx";
import AddCloudStorageModal from "../../../project/components/cloudStorage/CloudStorageModal.tsx";
import { Loader } from "../../../../components/Loader";
import DataConnectorModal from "../../../dataConnectorsV2/components/DataConnectorModal";
import {
CloudStorageGetRead,
type CloudStorageGetRead,
useDeleteStoragesV2ByStorageIdMutation,
} from "../../../projectsV2/api/storagesV2.api";
import DataSourceCredentialsModal from "./DataSourceCredentialsModal.tsx";
import { DataSourceView } from "./DataSourceView.tsx";
import { ButtonWithMenuV2 } from "../../../../components/buttons/Button.tsx";
import DataSourceCredentialsModal from "./DataSourceCredentialsModal";
import { DataSourceView } from "./DataSourceView";
import { ButtonWithMenuV2 } from "../../../../components/buttons/Button";

interface DataSourceDeleteModalProps {
storage: CloudStorageGetRead;
Expand Down Expand Up @@ -174,12 +174,11 @@ export function DataSourceActions({
isOpen={isDeleteOpen}
toggleModal={toggleDelete}
/>
<AddCloudStorageModal
<DataConnectorModal
currentStorage={storage}
isOpen={isEditOpen}
toggle={toggleEdit}
projectId={projectId}
isV2
/>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
import cx from "classnames";
import { useCallback, useState } from "react";
import { Database, PlusLg } from "react-bootstrap-icons";
import { Loader } from "../../../../components/Loader.tsx";
import AddCloudStorageModal from "../../../project/components/cloudStorage/CloudStorageModal.tsx";
import { Loader } from "../../../../components/Loader";
import DataConnectorModal from "../../../dataConnectorsV2/components/DataConnectorModal";
import { Project } from "../../../projectsV2/api/projectV2.api";
import { useGetStoragesV2Query } from "../../../projectsV2/api/storagesV2.api";
import AccessGuard from "../../utils/AccessGuard.tsx";
import AccessGuard from "../../utils/AccessGuard";
import useProjectAccess from "../../utils/useProjectAccess.hook";
import { DataSourceDisplay } from "./DataSourceDisplay.tsx";
import { DataSourceDisplay } from "./DataSourceDisplay";
import {
Badge,
Button,
Expand Down Expand Up @@ -117,12 +117,11 @@ export function DataSourcesDisplay({ project }: { project: Project }) {
</ListGroup>
)}
</CardBody>
<AddCloudStorageModal
<DataConnectorModal
currentStorage={null}
isOpen={isOpen}
toggle={toggle}
projectId={project.id}
isV2
/>
</Card>
);
Expand Down
Loading
Loading