Skip to content

Commit

Permalink
refactor: separate V1 cloud storage UI elements from V2 data connecto…
Browse files Browse the repository at this point in the history
…rs (#3301)
  • Loading branch information
ciyer committed Sep 18, 2024
1 parent a1d8ebc commit 14a4b1c
Show file tree
Hide file tree
Showing 12 changed files with 884 additions and 353 deletions.
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

0 comments on commit 14a4b1c

Please sign in to comment.