Skip to content

Commit

Permalink
resolve errors after rebase main
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-code committed Oct 28, 2024
1 parent fd62a0e commit e13b884
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
8 changes: 2 additions & 6 deletions client/src/features/dashboardV2/DashboardV2Sessions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import { SerializedError } from "@reduxjs/toolkit";
import { FetchBaseQueryError, skipToken } from "@reduxjs/toolkit/query";
import cx from "classnames";
import { useMemo } from "react";
import { Link, generatePath } from "react-router-dom-v5-compat";
import { Col, ListGroup, Row } from "reactstrap";

Expand Down Expand Up @@ -107,7 +106,7 @@ function DashboardSession({ session }: DashboardSessionProps) {
const displayModal = useAppSelector(
({ display }) => display.modals.sessionLogs
);
const { image, project_id: projectId, launcherId } = session;
const { image, project_id: projectId, launcher_id: launcherId } = session;
const { data: project } = useGetProjectsByProjectIdQuery(
projectId ? { projectId } : skipToken
);
Expand All @@ -122,10 +121,7 @@ function DashboardSession({ session }: DashboardSessionProps) {
id: projectId,
})
: ABSOLUTE_ROUTES.v2.root;
const sessionHash =
project && launcherId
? `launcher-${launcherId}`
: "";
const sessionHash = project && launcherId ? `launcher-${launcherId}` : "";
const showSessionUrl = project
? generatePath(ABSOLUTE_ROUTES.v2.projects.show.sessions.show, {
namespace: project.namespace,
Expand Down
12 changes: 1 addition & 11 deletions client/src/features/sessionsV2/SessionView/SessionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ import { skipToken } from "@reduxjs/toolkit/query";
import cx from "classnames";
import { ReactNode, useCallback, useMemo, useState } from "react";
import {
Boxes,
CircleFill,
Clock,
Database,
ExclamationTriangleFill,
FileCode,
Globe2,
Pencil,
} from "react-bootstrap-icons";
import {
Expand Down Expand Up @@ -56,9 +54,9 @@ import { useGetProjectsByProjectIdDataConnectorLinksQuery } from "../../projects
import { SessionRowResourceRequests } from "../../session/components/SessionsList";
import { SessionV2Actions, getShowSessionUrlByProject } from "../SessionsV2";
import StartSessionButton from "../StartSessionButton";
import UpdateSessionLauncherModal from "../UpdateSessionLauncherModal";
import ActiveSessionButton from "../components/SessionButton/ActiveSessionButton";
import { ModifyResourcesLauncherModal } from "../components/SessionModals/ModifyResourcesLauncher";
import UpdateSessionLauncherModal from "../components/SessionModals/UpdateSessionLauncherModal";
import {
SessionBadge,
SessionStatusV2Description,
Expand All @@ -68,11 +66,6 @@ import {
import { DEFAULT_URL } from "../session.constants";
import { SessionLauncher, SessionV2 } from "../sessionsV2.types";
import { EnvironmentCard } from "./EnvironmentCard";
import { useGetDataConnectorsListByDataConnectorIdsQuery } from "../../dataConnectorsV2/api/data-connectors.enhanced-api";
import {
useGetProjectsByProjectIdDataConnectorLinksQuery,
useGetProjectsByProjectIdMembersQuery,
} from "../../projectsV2/api/projectV2.enhanced-api";

interface SessionCardContentProps {
color: string;
Expand Down Expand Up @@ -217,9 +210,6 @@ export function SessionView({
setModifyResourcesOpen((open) => !open);
}, []);
const permissions = useProjectPermissions({ projectId: project.id });
const { data: members } = useGetProjectsByProjectIdMembersQuery({
projectId: project.id,
});
const environment = launcher?.environment;

const { data: dataConnectorLinks } =
Expand Down
6 changes: 0 additions & 6 deletions client/src/features/sessionsV2/SessionsV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ import {
useGetSessionsQuery as useGetSessionsQueryV2,
} from "./sessionsV2.api";
import { SessionLauncher, SessionV2 } from "./sessionsV2.types";
import SessionItem from "./SessionList/SessionItem";
import { ButtonWithMenuV2 } from "../../components/buttons/Button";

// Required for logs formatting
import "../../notebooks/Notebooks.css";
Expand Down Expand Up @@ -239,10 +237,6 @@ interface OrphanSessionProps {
}

function OrphanSession({ session, project }: OrphanSessionProps) {
const sessions = {
[session.name]: session,
};

const [hash, setHash] = useLocationHash();
const sessionHash = useMemo(
() => `orphan-session-${session.name}`,
Expand Down

0 comments on commit e13b884

Please sign in to comment.