diff --git a/client/package-lock.json b/client/package-lock.json index ac9c5caea9..75bf7dba8a 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -79,6 +79,7 @@ "xregexp": "^4.4.0" }, "devDependencies": { + "@ianvs/prettier-plugin-sort-imports": "^4.7.0", "@nabla/vite-plugin-eslint": "^2.0.5", "@react-router/dev": "^7.6.2", "@rtk-query/codegen-openapi": "^1.2.0", @@ -2006,6 +2007,41 @@ "deprecated": "Use @eslint/object-schema instead", "dev": true }, + "node_modules/@ianvs/prettier-plugin-sort-imports": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@ianvs/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.7.0.tgz", + "integrity": "sha512-soa2bPUJAFruLL4z/CnMfSEKGznm5ebz29fIa9PxYtu8HHyLKNE1NXAs6dylfw1jn/ilEIfO2oLLN6uAafb7DA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@babel/generator": "^7.26.2", + "@babel/parser": "^7.26.2", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", + "semver": "^7.5.2" + }, + "peerDependencies": { + "@prettier/plugin-oxc": "^0.0.4", + "@vue/compiler-sfc": "2.7.x || 3.x", + "content-tag": "^4.0.0", + "prettier": "2 || 3 || ^4.0.0-0", + "prettier-plugin-ember-template-tag": "^2.1.0" + }, + "peerDependenciesMeta": { + "@prettier/plugin-oxc": { + "optional": true + }, + "@vue/compiler-sfc": { + "optional": true + }, + "content-tag": { + "optional": true + }, + "prettier-plugin-ember-template-tag": { + "optional": true + } + } + }, "node_modules/@iconify/types": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", diff --git a/client/package.json b/client/package.json index e00ed6f171..ebc5e61126 100644 --- a/client/package.json +++ b/client/package.json @@ -120,6 +120,7 @@ "xregexp": "^4.4.0" }, "devDependencies": { + "@ianvs/prettier-plugin-sort-imports": "^4.7.0", "@nabla/vite-plugin-eslint": "^2.0.5", "@react-router/dev": "^7.6.2", "@rtk-query/codegen-openapi": "^1.2.0", @@ -210,5 +211,19 @@ } } ] + }, + "prettier": { + "plugins": [ + "@ianvs/prettier-plugin-sort-imports" + ], + "importOrder": [ + "", + "", + "", + "^(?!.*[.]s?css$)[./].*$", + "", + ".s?css$" + ], + "importOrderCaseSensitive": false } } diff --git a/client/server/app.ts b/client/server/app.ts index a97a6c872f..9c4e5ad4d6 100644 --- a/client/server/app.ts +++ b/client/server/app.ts @@ -1,4 +1,5 @@ import "react-router"; + import { createRequestHandler } from "@react-router/express"; import express from "express"; diff --git a/client/src/App.jsx b/client/src/App.jsx index 52fb8712fe..7fd9ad2fac 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -28,15 +28,16 @@ import { Fragment, useEffect, useRef, useState } from "react"; import { Helmet } from "react-helmet"; import { Route, Routes, useLocation } from "react-router"; import { ToastContainer } from "react-toastify"; + import { LoginHelper } from "./authentication"; import { Loader } from "./components/Loader"; import LazyAdminPage from "./features/admin/LazyAdminPage"; import { Favicon } from "./features/favicon/Favicon"; -import LazyAnonymousHome from "./features/landing/LazyAnonymousHome"; import { FooterNavbar, RenkuNavBar, } from "./features/landing/components/NavBar/NavBar"; +import LazyAnonymousHome from "./features/landing/LazyAnonymousHome"; import LegacyDatasetAddToProject from "./features/legacy/LegacyDatasetAddToProject"; import LegacyDatasets from "./features/legacy/LegacyDatasets"; import LegacyProjectView from "./features/legacy/LegacyProjectView"; diff --git a/client/src/api-client/dataset.js b/client/src/api-client/dataset.js index faa317c74a..c63a8a8028 100644 --- a/client/src/api-client/dataset.js +++ b/client/src/api-client/dataset.js @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { addMarqueeImageToDataset, cleanDatasetId, diff --git a/client/src/api-client/index.js b/client/src/api-client/index.js index 682d435ea9..83be07bde1 100644 --- a/client/src/api-client/index.js +++ b/client/src/api-client/index.js @@ -15,21 +15,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { CoreApiVersionedUrlHelper } from "../utils/helpers/url"; +import { CoreApiVersionedUrlHelper } from "../utils/helpers/url"; import addDatasetMethods from "./dataset"; +import { alertAPIErrors, API_ERRORS, APIError } from "./errors"; import addGraphMethods from "./graph"; import addInstanceMethods from "./instance"; import addJobMethods from "./job"; import addNotebookServersMethods from "./notebook-servers"; +import processPaginationHeaders from "./pagination"; import addPipelineMethods from "./pipeline"; import addProjectMethods from "./project"; import addRepositoryMethods from "./repository"; import addTemplatesMethods from "./templates"; -import addUserMethods from "./user"; -import processPaginationHeaders from "./pagination"; import testClient from "./test-client"; -import { APIError, alertAPIErrors, API_ERRORS } from "./errors"; +import addUserMethods from "./user"; import { renkuFetch, RETURN_TYPES } from "./utils"; const ACCESS_LEVELS = { diff --git a/client/src/api-client/repository.js b/client/src/api-client/repository.js index 07a7657d24..64c5b732d8 100644 --- a/client/src/api-client/repository.js +++ b/client/src/api-client/repository.js @@ -16,7 +16,7 @@ * limitations under the License. */ -import { API_ERRORS, alertAPIErrors } from "./errors"; +import { alertAPIErrors, API_ERRORS } from "./errors"; function addRepositoryMethods(client) { client.postCommit = (projectId, commitPayload) => { diff --git a/client/src/api-client/test-client.js b/client/src/api-client/test-client.js index 01226f239a..f819799d19 100644 --- a/client/src/api-client/test-client.js +++ b/client/src/api-client/test-client.js @@ -16,8 +16,8 @@ * limitations under the License. */ -import * as samples from "./test-samples"; import { carveProject } from "./project"; +import * as samples from "./test-samples"; const methods = { getProjects: { diff --git a/client/src/api-client/test-samples/index.js b/client/src/api-client/test-samples/index.js index 8e36ed8f74..c880e97f5b 100644 --- a/client/src/api-client/test-samples/index.js +++ b/client/src/api-client/test-samples/index.js @@ -1,8 +1,8 @@ import { namespaces } from "./namespaces"; import { - projects, - projectReadme, projectNotebookFile, + projectReadme, + projects, } from "./project-samples"; import { statuspage } from "./statuspage"; import { user } from "./user"; diff --git a/client/src/api-client/utils.ts b/client/src/api-client/utils.ts index 80f4d05544..6a1becb00b 100644 --- a/client/src/api-client/utils.ts +++ b/client/src/api-client/utils.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { APIError, API_ERRORS, throwAPIErrors, throwAuthError } from "./errors"; +import { API_ERRORS, APIError, throwAPIErrors, throwAuthError } from "./errors"; const RETURN_TYPES = { json: "json", diff --git a/client/src/authentication/Authentication.test.js b/client/src/authentication/Authentication.test.js index dcdecd133b..51cb123ba8 100644 --- a/client/src/authentication/Authentication.test.js +++ b/client/src/authentication/Authentication.test.js @@ -22,6 +22,7 @@ * Authentication.test.js * Tests for authentication. */ + import { describe, expect, it, vi } from "vitest"; import { LoginHelper, RenkuQueryParams } from "./Authentication.container"; diff --git a/client/src/components/Alert.jsx b/client/src/components/Alert.jsx index a33db08814..269aeaeafd 100644 --- a/client/src/components/Alert.jsx +++ b/client/src/components/Alert.jsx @@ -21,14 +21,15 @@ * Alert.js * Alert code and presentation. */ + import cx from "classnames"; import { Component } from "react"; -import { Alert } from "reactstrap"; import { CheckCircle, ExclamationTriangle, InfoCircle, } from "react-bootstrap-icons"; +import { Alert } from "reactstrap"; import { ALERT_ICON_SIZE } from "./Alert.constants"; diff --git a/client/src/components/ExternalLinks.tsx b/client/src/components/ExternalLinks.tsx index 3d88d1f0ab..ecb343da0f 100644 --- a/client/src/components/ExternalLinks.tsx +++ b/client/src/components/ExternalLinks.tsx @@ -17,8 +17,8 @@ */ import cx from "classnames"; -import { BoxArrowUpRight } from "react-bootstrap-icons"; import { useRef } from "react"; +import { BoxArrowUpRight } from "react-bootstrap-icons"; import { UncontrolledTooltip } from "reactstrap"; type ExternalLinkButtonProps = Pick< diff --git a/client/src/components/FileExplorer.tsx b/client/src/components/FileExplorer.tsx index 92510d358d..3f53db74d5 100644 --- a/client/src/components/FileExplorer.tsx +++ b/client/src/components/FileExplorer.tsx @@ -1,11 +1,12 @@ import cx from "classnames"; -import React, { Component, useState, useEffect } from "react"; -import { Link } from "react-router"; +import React, { Component, useEffect, useState } from "react"; import { FileEarmarkFill, - FolderFill, Folder2Open, + FolderFill, } from "react-bootstrap-icons"; +import { Link } from "react-router"; + import { Loader } from "./Loader"; type HashElt = { diff --git a/client/src/components/InformativeIcon.tsx b/client/src/components/InformativeIcon.tsx index 81c0b59b8c..ed8a638a70 100644 --- a/client/src/components/InformativeIcon.tsx +++ b/client/src/components/InformativeIcon.tsx @@ -16,10 +16,10 @@ * limitations under the License. */ +import { faInfoCircle } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ReactNode, useRef } from "react"; import { PopoverBody, UncontrolledPopover } from "reactstrap"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faInfoCircle } from "@fortawesome/free-solid-svg-icons"; interface InformativeIconProps { children: string | ReactNode; diff --git a/client/src/components/List.jsx b/client/src/components/List.jsx index 49a36cf025..b428d0aaf0 100644 --- a/client/src/components/List.jsx +++ b/client/src/components/List.jsx @@ -16,11 +16,11 @@ * limitations under the License. */ -import Masonry from "react-masonry-css"; - -import Pagination from "./PaginationLegacy"; import ListBar from "./list/ListBar"; import ListCard from "./list/ListCard"; +import Pagination from "./PaginationLegacy"; + +import Masonry from "react-masonry-css"; /** * This class receives a list of "items" and displays them either in a grid or in classic list. diff --git a/client/src/components/Loader.tsx b/client/src/components/Loader.tsx index cfa09aefd4..7a9f890ead 100644 --- a/client/src/components/Loader.tsx +++ b/client/src/components/Loader.tsx @@ -16,8 +16,9 @@ * limitations under the License. */ -import { useEffect, useRef } from "react"; import cx from "classnames"; +import { useEffect, useRef } from "react"; + import styles from "./Loader.module.scss"; interface LoaderProps { diff --git a/client/src/components/Logs.tsx b/client/src/components/Logs.tsx index 1bcd9efab0..e81dcc2f81 100644 --- a/client/src/components/Logs.tsx +++ b/client/src/components/Logs.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { getSessionStatusStyles } from "~/features/sessionsV2/components/SessionStatus/SessionStatus"; +import { SessionV2 } from "~/features/sessionsV2/sessionsV2.types"; import cx from "classnames"; import React, { createRef, ReactNode, useEffect, useState } from "react"; import { ArrowRepeat, FileEarmarkArrowDown } from "react-bootstrap-icons"; @@ -30,15 +32,14 @@ import { TabContent, TabPane, } from "reactstrap"; -import { getSessionStatusStyles } from "~/features/sessionsV2/components/SessionStatus/SessionStatus"; -import { SessionV2 } from "~/features/sessionsV2/sessionsV2.types"; + import { displaySlice } from "../features/display"; import { NotebooksHelper } from "../notebooks"; -import { LOG_ERROR_KEY } from "../notebooks/Notebooks.state"; import { NotebookAnnotations } from "../notebooks/components/session.types"; -import useGetSessionLogs from "../utils/customHooks/UseGetSessionLogs"; +import { LOG_ERROR_KEY } from "../notebooks/Notebooks.state"; import useAppDispatch from "../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../utils/customHooks/useAppSelector.hook"; +import useGetSessionLogs from "../utils/customHooks/UseGetSessionLogs"; import { capitalizeFirstLetter, generateZip, diff --git a/client/src/components/LogsV2.tsx b/client/src/components/LogsV2.tsx index 42952c5fb2..faa0682458 100644 --- a/client/src/components/LogsV2.tsx +++ b/client/src/components/LogsV2.tsx @@ -18,6 +18,7 @@ import { skipToken } from "@reduxjs/toolkit/query/react"; import { useGetSessionsBySessionIdQuery } from "~/features/sessionsV2/api/sessionsV2.api"; + import { displaySlice } from "../features/display"; import useAppDispatch from "../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../utils/customHooks/useAppSelector.hook"; diff --git a/client/src/components/PageNav.tsx b/client/src/components/PageNav.tsx index e334bacd9f..c84adb8c18 100644 --- a/client/src/components/PageNav.tsx +++ b/client/src/components/PageNav.tsx @@ -15,9 +15,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; import { Eye, Search, Sliders } from "react-bootstrap-icons"; import { Nav, NavItem } from "reactstrap"; + import RenkuNavLinkV2 from "./RenkuNavLinkV2"; export interface PageNavOptions { diff --git a/client/src/components/PrimaryAlert.tsx b/client/src/components/PrimaryAlert.tsx index d79af333b5..85803db9b5 100644 --- a/client/src/components/PrimaryAlert.tsx +++ b/client/src/components/PrimaryAlert.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { Alert } from "reactstrap"; + import styles from "./PrimaryAlert.module.scss"; interface PrimaryAlertProps { diff --git a/client/src/components/RenkuNavLinkV2.tsx b/client/src/components/RenkuNavLinkV2.tsx index 3a6010a2f1..63260b30a1 100644 --- a/client/src/components/RenkuNavLinkV2.tsx +++ b/client/src/components/RenkuNavLinkV2.tsx @@ -21,8 +21,8 @@ import { RefAttributes, useMemo } from "react"; import { matchPath, NavLink as RRNavLink, - type NavLinkProps as RRNavLinkProps, useLocation, + type NavLinkProps as RRNavLinkProps, } from "react-router"; import { NavLink } from "reactstrap"; diff --git a/client/src/components/SelectAutosuggestInput.jsx b/client/src/components/SelectAutosuggestInput.jsx index e51c21fc46..e37c6303c8 100644 --- a/client/src/components/SelectAutosuggestInput.jsx +++ b/client/src/components/SelectAutosuggestInput.jsx @@ -24,8 +24,8 @@ */ import { useState } from "react"; -import { FormGroup, FormText } from "reactstrap"; import Autosuggest from "react-autosuggest"; +import { FormGroup, FormText } from "reactstrap"; import FormLabel from "./form-field/FormLabel"; import { ErrorLabel } from "./formlabels/FormLabels"; diff --git a/client/src/components/TimeCaption.tsx b/client/src/components/TimeCaption.tsx index 136fdf4988..0e34045a0b 100644 --- a/client/src/components/TimeCaption.tsx +++ b/client/src/components/TimeCaption.tsx @@ -20,6 +20,7 @@ import cx from "classnames"; import { DateTime, Duration } from "luxon"; import { ReactNode, useEffect, useRef, useState } from "react"; import { UncontrolledTooltip } from "reactstrap"; + import { ensureDateTime, toHumanDateTime, diff --git a/client/src/components/Tree.tsx b/client/src/components/Tree.tsx index 157d6871c5..ed46bcf4f5 100644 --- a/client/src/components/Tree.tsx +++ b/client/src/components/Tree.tsx @@ -25,13 +25,14 @@ import { } from "react-bootstrap-icons"; import { Link } from "react-router"; import { Col } from "reactstrap"; + import { simpleHash } from "../utils/helpers/HelperFunctions"; -import LinkWithTooltip from "./LinkWithTooltip"; import { EntityChildrenDot } from "./entities/Children"; import EntityCreators, { EntityCreator } from "./entities/Creators"; import EntityDuration from "./entities/Duration"; -import { EntityExecutions } from "./entities/Executions"; import { EntityType, WorkflowType } from "./entities/entities.types"; +import { EntityExecutions } from "./entities/Executions"; +import LinkWithTooltip from "./LinkWithTooltip"; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/client/src/components/buttons/Button.tsx b/client/src/components/buttons/Button.tsx index 087e45e05a..307d045ea8 100644 --- a/client/src/components/buttons/Button.tsx +++ b/client/src/components/buttons/Button.tsx @@ -48,6 +48,7 @@ import { import { simpleHash } from "../../utils/helpers/HelperFunctions"; import { LoadingLabel, SuccessLabel } from "../formlabels/FormLabels"; + import buttonStyles from "./Buttons.module.scss"; type ButtonWithMenuProps = { diff --git a/client/src/components/clamped/ClampedParagraph.tsx b/client/src/components/clamped/ClampedParagraph.tsx index fc6c4a232d..0c3902d7b0 100644 --- a/client/src/components/clamped/ClampedParagraph.tsx +++ b/client/src/components/clamped/ClampedParagraph.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; interface ClampedParagraphProps { diff --git a/client/src/components/commitSelector/CommitSelector.tsx b/client/src/components/commitSelector/CommitSelector.tsx index 12da392034..1be4956e9a 100644 --- a/client/src/components/commitSelector/CommitSelector.tsx +++ b/client/src/components/commitSelector/CommitSelector.tsx @@ -23,8 +23,10 @@ import Autosuggest, { SuggestionSelectedEventData, } from "react-autosuggest"; import { ChevronDown, ChevronUp } from "react-bootstrap-icons"; + import { Loader } from "../Loader"; import { TimeCaption } from "../TimeCaption"; + import "./CommitSelector.scss"; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/client/src/components/commits/Commits.jsx b/client/src/components/commits/Commits.jsx index d71e60cac0..3eea11295a 100644 --- a/client/src/components/commits/Commits.jsx +++ b/client/src/components/commits/Commits.jsx @@ -25,6 +25,7 @@ import cx from "classnames"; import { DateTime } from "luxon"; +import { Folder2Open } from "react-bootstrap-icons"; import { ButtonGroup, Col, @@ -33,13 +34,12 @@ import { Row, UncontrolledTooltip, } from "reactstrap"; -import { Folder2Open } from "react-bootstrap-icons"; import { toHumanDateTime } from "../../utils/helpers/DateTimeUtils"; +import { Clipboard } from "../clipboard/Clipboard"; import { ExternalLink } from "../ExternalLinks"; import { Loader } from "../Loader"; import { TimeCaption } from "../TimeCaption"; -import { Clipboard } from "../clipboard/Clipboard"; import "./Commits.css"; diff --git a/client/src/components/dateFilter/DateFilter.tsx b/client/src/components/dateFilter/DateFilter.tsx index 73bd594c02..366452ce7f 100644 --- a/client/src/components/dateFilter/DateFilter.tsx +++ b/client/src/components/dateFilter/DateFilter.tsx @@ -16,9 +16,9 @@ * limitations under the License. */ +import { DateTime, Duration } from "luxon"; import React, { ChangeEvent, useState } from "react"; import { Input } from "reactstrap"; -import { DateTime, Duration } from "luxon"; export interface DateFilterProps { dates: DatesFilter; diff --git a/client/src/components/entities/Buttons.tsx b/client/src/components/entities/Buttons.tsx index f7d27d0b3a..2afc66c4de 100644 --- a/client/src/components/entities/Buttons.tsx +++ b/client/src/components/entities/Buttons.tsx @@ -25,13 +25,14 @@ import { faCog, faPen, faTrash } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import cx from "classnames"; import { Funnel, FunnelFill } from "react-bootstrap-icons"; import { Link } from "react-router"; import { Button, UncontrolledTooltip } from "reactstrap"; + import SimpleSessionButton from "../../features/session/components/SimpleSessionButton"; import { stylesByItemType } from "../../utils/helpers/HelperFunctions"; import { EntityType } from "./entities.types"; -import cx from "classnames"; export interface EntityButtonProps { type: EntityType; diff --git a/client/src/components/entities/Children.tsx b/client/src/components/entities/Children.tsx index 75f5333428..d55aa0a14f 100644 --- a/client/src/components/entities/Children.tsx +++ b/client/src/components/entities/Children.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Badge, UncontrolledTooltip } from "reactstrap"; import { EntityType } from "./entities.types"; diff --git a/client/src/components/entities/Creators.tsx b/client/src/components/entities/Creators.tsx index 5a95cf45ab..8f2c3a1777 100644 --- a/client/src/components/entities/Creators.tsx +++ b/client/src/components/entities/Creators.tsx @@ -17,6 +17,7 @@ */ import { People, Person } from "react-bootstrap-icons"; + import { stylesByItemType } from "../../utils/helpers/HelperFunctions"; import { EntityType } from "./entities.types"; diff --git a/client/src/components/entities/Description.tsx b/client/src/components/entities/Description.tsx index a25806c658..6937e2ac92 100644 --- a/client/src/components/entities/Description.tsx +++ b/client/src/components/entities/Description.tsx @@ -16,9 +16,9 @@ * limitations under the License. */ +import cx from "classnames"; import { CSSProperties, ReactNode } from "react"; import { Link } from "react-router"; -import cx from "classnames"; import LazyRenkuMarkdown from "../markdown/LazyRenkuMarkdown"; diff --git a/client/src/components/entities/Executions.tsx b/client/src/components/entities/Executions.tsx index 5147f9bf75..9186083c25 100644 --- a/client/src/components/entities/Executions.tsx +++ b/client/src/components/entities/Executions.tsx @@ -16,8 +16,9 @@ * limitations under the License. */ -import { ReactNode, forwardRef, useRef } from "react"; import cx from "classnames"; +import { forwardRef, ReactNode, useRef } from "react"; + import { TimeCaption } from "../TimeCaption"; import { EntityType } from "./entities.types"; diff --git a/client/src/components/entities/Label.tsx b/client/src/components/entities/Label.tsx index 17a18dd9ed..6ad0505396 100644 --- a/client/src/components/entities/Label.tsx +++ b/client/src/components/entities/Label.tsx @@ -17,6 +17,7 @@ */ import { Briefcase, CardList, Diagram3, HddStack } from "react-bootstrap-icons"; + import { EntityType, WorkflowType } from "./entities.types"; /** diff --git a/client/src/components/entities/LinkedEntitiesByItemType.tsx b/client/src/components/entities/LinkedEntitiesByItemType.tsx index 9f1fa9ae01..6c4e59fb44 100644 --- a/client/src/components/entities/LinkedEntitiesByItemType.tsx +++ b/client/src/components/entities/LinkedEntitiesByItemType.tsx @@ -20,9 +20,11 @@ import { ReactNode, useRef } from "react"; import { Briefcase, HddStack } from "react-bootstrap-icons"; import { Link } from "react-router"; import { UncontrolledTooltip } from "reactstrap"; + import { stylesByItemType } from "../../utils/helpers/HelperFunctions"; import { LoadingLabel } from "../formlabels/FormLabels"; import { EntityType } from "./entities.types"; + import "./Entities.css"; /** diff --git a/client/src/components/entityHeader/EntityHeader.tsx b/client/src/components/entityHeader/EntityHeader.tsx index b85d9b9673..9a0c966b38 100644 --- a/client/src/components/entityHeader/EntityHeader.tsx +++ b/client/src/components/entityHeader/EntityHeader.tsx @@ -31,8 +31,6 @@ import { getRunningSession } from "../../features/session/sessions.utils"; import useAppSelector from "../../utils/customHooks/useAppSelector.hook"; import { stylesByItemType } from "../../utils/helpers/HelperFunctions"; import { Url } from "../../utils/helpers/url"; -import { EnvironmentLogs } from "../Logs"; -import { TimeCaption } from "../TimeCaption"; import Creators, { EntityCreator } from "../entities/Creators"; import EntityDescription from "../entities/Description"; import { EntityType } from "../entities/entities.types"; @@ -44,6 +42,8 @@ import Slug from "../entities/Slug"; import EntityTags from "../entities/Tags"; import VisibilityIcon from "../entities/VisibilityIcon"; import PinnedBadge from "../list/PinnedBadge"; +import { EnvironmentLogs } from "../Logs"; +import { TimeCaption } from "../TimeCaption"; import "./EntityHeader.scss"; diff --git a/client/src/components/entitySearchFilter/EntitySearchFilter.tsx b/client/src/components/entitySearchFilter/EntitySearchFilter.tsx index 695ab81e77..6198003675 100644 --- a/client/src/components/entitySearchFilter/EntitySearchFilter.tsx +++ b/client/src/components/entitySearchFilter/EntitySearchFilter.tsx @@ -28,6 +28,7 @@ import { VisibilitiesFilter, VisibilityFilter, } from "../visibilityFilter/VisibilityFilter"; + import "./EntitySearchFilter.css"; /** diff --git a/client/src/components/entityWatermark/EntityWatermark.tsx b/client/src/components/entityWatermark/EntityWatermark.tsx index fc7d7da29a..a7aea19f49 100644 --- a/client/src/components/entityWatermark/EntityWatermark.tsx +++ b/client/src/components/entityWatermark/EntityWatermark.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { People, Person } from "react-bootstrap-icons"; + import styles from "./entityWatermark.module.scss"; interface EntityWatermarkProps { diff --git a/client/src/components/errors/RtkErrorAlert.tsx b/client/src/components/errors/RtkErrorAlert.tsx index e25c5de99f..e7f572221f 100644 --- a/client/src/components/errors/RtkErrorAlert.tsx +++ b/client/src/components/errors/RtkErrorAlert.tsx @@ -19,12 +19,12 @@ import { SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; -import { ErrorAlert, RenkuAlert } from "../Alert"; -import { CoreErrorAlert } from "./CoreErrorAlert"; -import { CoreErrorResponse } from "../../utils/types/coreService.types"; -import { extractTextFromObject } from "../../utils/helpers/TextUtils"; import { UpdateProjectResponse } from "../../features/project/project.types"; import { NotebooksErrorResponse } from "../../features/session/sessions.types"; +import { extractTextFromObject } from "../../utils/helpers/TextUtils"; +import { CoreErrorResponse } from "../../utils/types/coreService.types"; +import { ErrorAlert, RenkuAlert } from "../Alert"; +import { CoreErrorAlert } from "./CoreErrorAlert"; export function extractRkErrorMessage( error: FetchBaseQueryError | SerializedError, diff --git a/client/src/components/form-field/CreatorsInput.tsx b/client/src/components/form-field/CreatorsInput.tsx index d1e85853a7..c3f192620a 100644 --- a/client/src/components/form-field/CreatorsInput.tsx +++ b/client/src/components/form-field/CreatorsInput.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { faUserMinus, faUserPlus } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import React from "react"; import type { FieldError, @@ -23,20 +25,16 @@ import type { Merge, UseFormRegisterReturn, } from "react-hook-form"; -import { FormGroup, Input, Label, Row, Col, Button } from "reactstrap"; +import { Button, Col, FormGroup, Input, Label, Row } from "reactstrap"; -import HelpText from "./HelpText"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faUserMinus, faUserPlus } from "@fortawesome/free-solid-svg-icons"; +import { Creator } from "../../features/project/project.types"; import { ErrorLabel, InputHintLabel, InputLabel, } from "../formlabels/FormLabels"; - -import { Creator } from "../../features/project/project.types"; - import { SetInputsValue } from "./form-field.types"; +import HelpText from "./HelpText"; export type CreatorInputCreator = Creator & { id: number; default?: boolean }; diff --git a/client/src/components/form-field/DropzoneFileUploader.jsx b/client/src/components/form-field/DropzoneFileUploader.jsx index f8d64e6bd5..ea7f4b83bf 100644 --- a/client/src/components/form-field/DropzoneFileUploader.jsx +++ b/client/src/components/form-field/DropzoneFileUploader.jsx @@ -16,7 +16,17 @@ * limitations under the License. */ +import { + faCheck, + faExclamationTriangle, + faSyncAlt, + faTimes, + faTrashAlt, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import Dropzone from "dropzone"; import { useCallback, useContext, useEffect, useState } from "react"; +import { Link } from "react-router"; import { Button, Card, @@ -30,21 +40,11 @@ import { UncontrolledCollapse, UncontrolledTooltip, } from "reactstrap"; -import { Link } from "react-router"; -import Dropzone from "dropzone"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { - faCheck, - faExclamationTriangle, - faSyncAlt, - faTimes, - faTrashAlt, -} from "@fortawesome/free-solid-svg-icons"; +import AppContext from "../../utils/context/appContext"; import { formatBytes, isValidURL } from "../../utils/helpers/HelperFunctions"; import FileExplorer, { getFilesTree } from "../FileExplorer"; import { ErrorLabel, InputLabel } from "../formlabels/FormLabels"; -import AppContext from "../../utils/context/appContext"; const FILE_STATUS = { ADDED: 201, diff --git a/client/src/components/form-field/FileUploaderInput.tsx b/client/src/components/form-field/FileUploaderInput.tsx index 71998466dc..36d65e8e93 100644 --- a/client/src/components/form-field/FileUploaderInput.tsx +++ b/client/src/components/form-field/FileUploaderInput.tsx @@ -19,12 +19,11 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import React, { useContext } from "react"; - import type { FieldError, UseFormRegisterReturn } from "react-hook-form"; -import { IDatasetFiles } from "../../features/project/project.types"; import type { DatasetFormState } from "../../features/project/dataset"; import { setFiles } from "../../features/project/dataset"; +import { IDatasetFiles } from "../../features/project/project.types"; import AppContext from "../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../utils/context/appParams.constants"; import useAppDispatch from "../../utils/customHooks/useAppDispatch.hook"; diff --git a/client/src/components/form-field/FormGeneratorImageInput.jsx b/client/src/components/form-field/FormGeneratorImageInput.jsx index 5352c54077..85f2dd409c 100644 --- a/client/src/components/form-field/FormGeneratorImageInput.jsx +++ b/client/src/components/form-field/FormGeneratorImageInput.jsx @@ -38,7 +38,7 @@ import { Row, } from "reactstrap"; -import { ImageFieldPropertyName as Prop } from "./stockimages"; +import { DESIRABLE_FINAL_IMAGE_SIZE } from "../../project/components/NewProjectAvatar"; import { formatBytes } from "../../utils/helpers/HelperFunctions"; import { ErrorLabel, @@ -46,7 +46,7 @@ import { InputLabel, } from "../formlabels/FormLabels"; import ImageEditor, { CARD_IMAGE_DIMENSIONS } from "../imageEditor/ImageEditor"; -import { DESIRABLE_FINAL_IMAGE_SIZE } from "../../project/components/NewProjectAvatar"; +import { ImageFieldPropertyName as Prop } from "./stockimages"; function userInputOption(options) { let userInput = options.find((o) => o[Prop.STOCK] === false); diff --git a/client/src/components/form-field/FormLabel.tsx b/client/src/components/form-field/FormLabel.tsx index 5bfe431451..59f9c256d7 100644 --- a/client/src/components/form-field/FormLabel.tsx +++ b/client/src/components/form-field/FormLabel.tsx @@ -1,4 +1,5 @@ import { Label } from "reactstrap"; + import { InputLabel } from "../formlabels/FormLabels"; type FormLabelProps = { diff --git a/client/src/components/form-field/KeywordsInput.tsx b/client/src/components/form-field/KeywordsInput.tsx index 6a91c59fd2..6c4e86dfcc 100644 --- a/client/src/components/form-field/KeywordsInput.tsx +++ b/client/src/components/form-field/KeywordsInput.tsx @@ -16,17 +16,15 @@ * limitations under the License. */ +import { faTimes } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import React from "react"; import type { UseFormRegisterReturn } from "react-hook-form"; import { FormGroup, FormText } from "reactstrap"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faTimes } from "@fortawesome/free-solid-svg-icons"; - -import FormLabel from "./FormLabel"; import { ErrorLabel } from "../formlabels/FormLabels"; - import { SetInputsValue } from "./form-field.types"; +import FormLabel from "./FormLabel"; type SetDirtyFunction = (value: boolean) => void; diff --git a/client/src/components/form-field/LazyCkEditor.tsx b/client/src/components/form-field/LazyCkEditor.tsx index 17587357d9..8e647b2433 100644 --- a/client/src/components/form-field/LazyCkEditor.tsx +++ b/client/src/components/form-field/LazyCkEditor.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { ComponentProps, Suspense, lazy } from "react"; +import { ComponentProps, lazy, Suspense } from "react"; + import { Loader } from "../Loader"; const CkEditor = lazy(() => import("./CkEditor")); diff --git a/client/src/components/form-field/TextAreaInput.tsx b/client/src/components/form-field/TextAreaInput.tsx index d283156c1d..59f00b33ad 100644 --- a/client/src/components/form-field/TextAreaInput.tsx +++ b/client/src/components/form-field/TextAreaInput.tsx @@ -17,6 +17,7 @@ */ // TODO: Upgrade to ckeditor5 v6.0.0 to get TS support + import cx from "classnames"; import React from "react"; import { Controller } from "react-hook-form"; @@ -27,11 +28,10 @@ import type { Path, UseFormRegisterReturn, } from "react-hook-form"; -import { Input, FormGroup, FormText, Label } from "reactstrap"; +import { FormGroup, FormText, Input, Label } from "reactstrap"; -import FormLabel from "./FormLabel"; import { ErrorLabel } from "../formlabels/FormLabels"; - +import FormLabel from "./FormLabel"; import LazyCkEditor from "./LazyCkEditor"; type EditMarkdownSwitchProps = { diff --git a/client/src/components/form-field/TextInput.tsx b/client/src/components/form-field/TextInput.tsx index 42376b5439..bd63408b1c 100644 --- a/client/src/components/form-field/TextInput.tsx +++ b/client/src/components/form-field/TextInput.tsx @@ -17,10 +17,10 @@ */ import type { FieldError, UseFormRegisterReturn } from "react-hook-form"; - import { FormGroup, FormText } from "reactstrap"; -import FormLabel from "./FormLabel"; + import { ErrorLabel } from "../formlabels/FormLabels"; +import FormLabel from "./FormLabel"; type TextInputProps = { dataCy?: string; diff --git a/client/src/components/formlabels/FormLabels.tsx b/client/src/components/formlabels/FormLabels.tsx index 5aa293091b..d22dca2cc6 100644 --- a/client/src/components/formlabels/FormLabels.tsx +++ b/client/src/components/formlabels/FormLabels.tsx @@ -23,13 +23,13 @@ * FormLabels components. */ -import { FormText, FormFeedback, Label } from "reactstrap"; -import cx from "classnames"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { - faExclamationTriangle, faCheck, + faExclamationTriangle, } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import cx from "classnames"; +import { FormFeedback, FormText, Label } from "reactstrap"; import { Loader } from "../Loader"; diff --git a/client/src/components/icons/ChevronFlippedIcon.tsx b/client/src/components/icons/ChevronFlippedIcon.tsx index 7258cb727f..8de076ecf1 100644 --- a/client/src/components/icons/ChevronFlippedIcon.tsx +++ b/client/src/components/icons/ChevronFlippedIcon.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { ChevronDown, IconProps } from "react-bootstrap-icons"; + import styles from "./ChevronFlippedIcon.module.scss"; interface ChevronFlippedIconProps extends IconProps { diff --git a/client/src/components/inlineSubmitImageInput/InlineSubmitImageInput.tsx b/client/src/components/inlineSubmitImageInput/InlineSubmitImageInput.tsx index 887bd846bf..d48f193547 100644 --- a/client/src/components/inlineSubmitImageInput/InlineSubmitImageInput.tsx +++ b/client/src/components/inlineSubmitImageInput/InlineSubmitImageInput.tsx @@ -16,12 +16,13 @@ * limitations under the License. */ -import { Button } from "reactstrap"; import { ChangeEvent, useState } from "react"; +import { Button } from "reactstrap"; + import { InlineSubmitButton } from "../buttons/Button"; import ImageInput, { - ImageFieldPropertyName as Prop, ImageInputMode, + ImageFieldPropertyName as Prop, } from "../form-field/FormGeneratorImageInput"; interface OptionType { diff --git a/client/src/components/inlineSubmitInput/InlineSubmitInput.tsx b/client/src/components/inlineSubmitInput/InlineSubmitInput.tsx index 661080588c..1bd792c9e6 100644 --- a/client/src/components/inlineSubmitInput/InlineSubmitInput.tsx +++ b/client/src/components/inlineSubmitInput/InlineSubmitInput.tsx @@ -16,10 +16,11 @@ * limitations under the License. */ -import { Card, CardBody, FormText, Input, Label } from "reactstrap"; import React from "react"; -import { Loader } from "../Loader"; +import { Card, CardBody, FormText, Input, Label } from "reactstrap"; + import { InlineSubmitButton } from "../buttons/Button"; +import { Loader } from "../Loader"; interface InlineInputProps { classNameSubmitButton: string; diff --git a/client/src/components/keywords/KeywordBadge.tsx b/client/src/components/keywords/KeywordBadge.tsx index 01bbc8fe96..2493410c42 100644 --- a/client/src/components/keywords/KeywordBadge.tsx +++ b/client/src/components/keywords/KeywordBadge.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { XCircle } from "react-bootstrap-icons"; + import RenkuBadge from "../renkuBadge/RenkuBadge"; interface KeywordBadgeProps { diff --git a/client/src/components/list/EntityCardSkeleton.tsx b/client/src/components/list/EntityCardSkeleton.tsx index cbd2d6e1ea..665fd9ffc3 100644 --- a/client/src/components/list/EntityCardSkeleton.tsx +++ b/client/src/components/list/EntityCardSkeleton.tsx @@ -17,6 +17,7 @@ */ import cx from "classnames"; + import styles from "./EntityCardSkeleton.module.scss"; interface EntityCardSkeletonProps { diff --git a/client/src/components/list/ListBar.tsx b/client/src/components/list/ListBar.tsx index 102bc4d2da..cf012fc1e4 100644 --- a/client/src/components/list/ListBar.tsx +++ b/client/src/components/list/ListBar.tsx @@ -18,16 +18,17 @@ import cx from "classnames"; import { Link } from "react-router"; + import { EntityType } from "../../features/kgSearch"; import SessionButton from "../../features/session/components/SessionButton"; import { stylesByItemType } from "../../utils/helpers/HelperFunctions"; -import { TimeCaption } from "../TimeCaption"; import EntityCreators from "../entities/Creators"; import EntityDescription from "../entities/Description"; import EntityLabel from "../entities/Label"; import VisibilityIcon from "../entities/VisibilityIcon"; -import PinnedBadge from "./PinnedBadge"; +import { TimeCaption } from "../TimeCaption"; import { ListElementProps } from "./list.types"; +import PinnedBadge from "./PinnedBadge"; import "./ListBar.scss"; diff --git a/client/src/components/list/ListBarSessions.tsx b/client/src/components/list/ListBarSessions.tsx index e0963ba652..3408d9e852 100644 --- a/client/src/components/list/ListBarSessions.tsx +++ b/client/src/components/list/ListBarSessions.tsx @@ -22,6 +22,7 @@ import cx from "classnames"; import { Fragment, useContext, useEffect, useRef, useState } from "react"; import { Link } from "react-router"; import { PopoverBody, PopoverHeader, UncontrolledPopover } from "reactstrap"; + import SessionButton from "../../features/session/components/SessionButton"; import SessionStatusBadge from "../../features/session/components/status/SessionStatusBadge"; import SessionStatusText from "../../features/session/components/status/SessionStatusText"; @@ -30,14 +31,14 @@ import AppContext from "../../utils/context/appContext"; import { toHumanDateTime } from "../../utils/helpers/DateTimeUtils"; import { stylesByItemType } from "../../utils/helpers/HelperFunctions"; import { Clipboard } from "../clipboard/Clipboard"; -import { ExternalLink } from "../ExternalLinks"; -import { TimeCaption } from "../TimeCaption"; import EntityCreators from "../entities/Creators"; import EntityDescription from "../entities/Description"; import EntityLabel from "../entities/Label"; import VisibilityIcon from "../entities/VisibilityIcon"; -import PinnedBadge from "./PinnedBadge"; +import { ExternalLink } from "../ExternalLinks"; +import { TimeCaption } from "../TimeCaption"; import { ListElementProps } from "./list.types"; +import PinnedBadge from "./PinnedBadge"; import "./ListBar.scss"; diff --git a/client/src/components/list/ListCard.tsx b/client/src/components/list/ListCard.tsx index 181e41fc77..241abbcc9d 100644 --- a/client/src/components/list/ListCard.tsx +++ b/client/src/components/list/ListCard.tsx @@ -21,7 +21,6 @@ import type { CSSProperties } from "react"; import { Link } from "react-router"; import { stylesByItemType } from "../../utils/helpers/HelperFunctions"; -import { TimeCaption } from "../TimeCaption"; import { EntityButton } from "../entities/Buttons"; import EntityCreators from "../entities/Creators"; import EntityDescription from "../entities/Description"; @@ -29,8 +28,9 @@ import EntityLabel from "../entities/Label"; import Slug from "../entities/Slug"; import EntityTags from "../entities/Tags"; import VisibilityIcon from "../entities/VisibilityIcon"; -import PinnedBadge from "./PinnedBadge"; +import { TimeCaption } from "../TimeCaption"; import { ListElementProps } from "./list.types"; +import PinnedBadge from "./PinnedBadge"; import "./ListCard.css"; diff --git a/client/src/components/list/PinnedBadge.tsx b/client/src/components/list/PinnedBadge.tsx index 6c383eb189..4a9d76ad91 100644 --- a/client/src/components/list/PinnedBadge.tsx +++ b/client/src/components/list/PinnedBadge.tsx @@ -34,9 +34,9 @@ import { NOTIFICATION_TOPICS } from "../../notifications/Notifications.constants import AppContext from "../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../utils/context/appParams.constants"; import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook"; -import { Loader } from "../Loader"; import { EntityType as AnotherEntityType } from "../entities/entities.types"; import { extractRkErrorMessage } from "../errors/RtkErrorAlert"; +import { Loader } from "../Loader"; interface PinnedBadgeProps { entityType: EntityType | AnotherEntityType; diff --git a/client/src/components/markdown/LazyMarkdownTextExcerpt.tsx b/client/src/components/markdown/LazyMarkdownTextExcerpt.tsx index ba7bd3626c..fe9a4b4fc5 100644 --- a/client/src/components/markdown/LazyMarkdownTextExcerpt.tsx +++ b/client/src/components/markdown/LazyMarkdownTextExcerpt.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { ComponentProps, Suspense, lazy } from "react"; +import { ComponentProps, lazy, Suspense } from "react"; + import { Loader } from "../Loader"; const MarkdownTextExcerpt = lazy(() => diff --git a/client/src/components/markdown/LazyRenkuMarkdown.tsx b/client/src/components/markdown/LazyRenkuMarkdown.tsx index c63ba3f308..e69073fcde 100644 --- a/client/src/components/markdown/LazyRenkuMarkdown.tsx +++ b/client/src/components/markdown/LazyRenkuMarkdown.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { ComponentProps, Suspense, lazy } from "react"; +import { ComponentProps, lazy, Suspense } from "react"; + import { Loader } from "../Loader"; const RenkuMarkdown = lazy(() => diff --git a/client/src/components/markdown/RenkuMarkdown.jsx b/client/src/components/markdown/RenkuMarkdown.jsx index 79ac72db56..131cb43ceb 100644 --- a/client/src/components/markdown/RenkuMarkdown.jsx +++ b/client/src/components/markdown/RenkuMarkdown.jsx @@ -24,6 +24,7 @@ import mermaid from "mermaid"; import { useEffect } from "react"; + import { sanitizedHTMLFromMarkdown } from "../../utils/helpers/markdown.utils"; import RenkuMarkdownWithPathTranslation from "./RenkuMarkdownWithPathTranslation"; diff --git a/client/src/components/markdown/RenkuMarkdownWithPathTranslation.tsx b/client/src/components/markdown/RenkuMarkdownWithPathTranslation.tsx index 1230b0c486..b8652b1abb 100644 --- a/client/src/components/markdown/RenkuMarkdownWithPathTranslation.tsx +++ b/client/src/components/markdown/RenkuMarkdownWithPathTranslation.tsx @@ -1,8 +1,9 @@ import cx from "classnames"; -import { FileEarmarkFill } from "react-bootstrap-icons"; import React, { useCallback, useEffect, useRef, useState } from "react"; +import { FileEarmarkFill } from "react-bootstrap-icons"; import ReactDOMServer from "react-dom/server"; import { Card, CardBody } from "reactstrap"; + import FilePreview from "../../file/FilePreview"; import type { FilePreviewProps } from "../../file/FilePreview"; import { Url } from "../../utils/helpers/url"; diff --git a/client/src/components/navbar/AnonymousNavBar.tsx b/client/src/components/navbar/AnonymousNavBar.tsx index 564e1ab698..24564d2445 100644 --- a/client/src/components/navbar/AnonymousNavBar.tsx +++ b/client/src/components/navbar/AnonymousNavBar.tsx @@ -24,24 +24,24 @@ import { Badge, Collapse, Nav, - NavItem, Navbar, NavbarToggler, + NavItem, } from "reactstrap"; +import { NavBarWarnings } from "../../features/landing/components/NavBar/NavBarWarnings"; import StatusBanner from "../../features/platform/components/StatusBanner"; import SunsetV1Button from "../../features/projectsV2/shared/SunsetV1Button"; -import { NavBarWarnings } from "../../features/landing/components/NavBar/NavBarWarnings"; import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; import AppContext from "../../utils/context/appContext"; import RenkuNavLinkV2 from "../RenkuNavLinkV2"; import AnnounceV2Banner from "./AnnounceV2Banner"; +import { RENKU_LOGO } from "./navbar.constants"; import { RenkuToolbarHelpMenu, RenkuToolbarItemUser, RenkuToolbarNotifications, } from "./NavBarItems"; -import { RENKU_LOGO } from "./navbar.constants"; export default function AnonymousNavBar() { const { params, model, notifications } = useContext(AppContext); diff --git a/client/src/components/navbar/LoggedInNavBar.tsx b/client/src/components/navbar/LoggedInNavBar.tsx index 7f3f9038c7..531d34c090 100644 --- a/client/src/components/navbar/LoggedInNavBar.tsx +++ b/client/src/components/navbar/LoggedInNavBar.tsx @@ -24,17 +24,19 @@ import { Badge, Collapse, Nav, - NavItem, Navbar, NavbarToggler, + NavItem, } from "reactstrap"; + +import { NavBarWarnings } from "../../features/landing/components/NavBar/NavBarWarnings"; import StatusBanner from "../../features/platform/components/StatusBanner"; import SunsetV1Button from "../../features/projectsV2/shared/SunsetV1Button"; -import { NavBarWarnings } from "../../features/landing/components/NavBar/NavBarWarnings"; import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; import AppContext from "../../utils/context/appContext"; import RenkuNavLinkV2 from "../RenkuNavLinkV2"; import AnnounceV2Banner from "./AnnounceV2Banner"; +import { RENKU_LOGO } from "./navbar.constants"; import { RenkuToolbarGitLabMenu, RenkuToolbarHelpMenu, @@ -42,7 +44,6 @@ import { RenkuToolbarItemUser, RenkuToolbarNotifications, } from "./NavBarItems"; -import { RENKU_LOGO } from "./navbar.constants"; export default function LoggedInNavBar() { const { params, model, notifications } = useContext(AppContext); diff --git a/client/src/components/navbar/NavBarItems.tsx b/client/src/components/navbar/NavBarItems.tsx index 1924215465..d4d37408ad 100644 --- a/client/src/components/navbar/NavBarItems.tsx +++ b/client/src/components/navbar/NavBarItems.tsx @@ -31,6 +31,7 @@ import { UncontrolledDropdown, UncontrolledTooltip, } from "reactstrap"; + import { LoginHelper } from "../../authentication"; import { useLoginUrl } from "../../authentication/useLoginUrl.hook"; import AdminDropdownItem from "../../features/landing/components/AdminDropdownItem.tsx"; @@ -45,8 +46,8 @@ import { gitLabUrlFromProfileUrl, } from "../../utils/helpers/HelperFunctions"; import { ExternalDocsLink, ExternalLink } from "../ExternalLinks"; -import { Loader } from "../Loader"; import BootstrapGitLabIcon from "../icons/BootstrapGitLabIcon"; +import { Loader } from "../Loader"; import styles from "./NavBarItem.module.scss"; diff --git a/client/src/components/notebook/LazyNotebookRender.tsx b/client/src/components/notebook/LazyNotebookRender.tsx index 59a6240a81..d36e5ae07e 100644 --- a/client/src/components/notebook/LazyNotebookRender.tsx +++ b/client/src/components/notebook/LazyNotebookRender.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { ComponentProps, Suspense, lazy } from "react"; +import { ComponentProps, lazy, Suspense } from "react"; + import { Loader } from "../Loader"; const NotebookRender = lazy(() => import("./NotebookRender")); diff --git a/client/src/components/progress/ProgressSteps.tsx b/client/src/components/progress/ProgressSteps.tsx index 825f4a439b..af1cc748c5 100644 --- a/client/src/components/progress/ProgressSteps.tsx +++ b/client/src/components/progress/ProgressSteps.tsx @@ -21,7 +21,9 @@ import { SlashCircle, XCircleFill, } from "react-bootstrap-icons"; + import { Loader } from "../Loader"; + import "./Progress.css"; /** diff --git a/client/src/components/quicknav/index.js b/client/src/components/quicknav/index.js index 174a754ba1..47303d4de4 100644 --- a/client/src/components/quicknav/index.js +++ b/client/src/components/quicknav/index.js @@ -17,4 +17,5 @@ */ import { QuickNavContainer as QuickNav } from "./QuickNav.container"; + export default QuickNav; diff --git a/client/src/components/searchResultsContent/SearchResultsContent.tsx b/client/src/components/searchResultsContent/SearchResultsContent.tsx index d6026a5ee0..43318f044b 100644 --- a/client/src/components/searchResultsContent/SearchResultsContent.tsx +++ b/client/src/components/searchResultsContent/SearchResultsContent.tsx @@ -20,7 +20,6 @@ import { faSadCry } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; -import Masonry from "react-masonry-css"; import { Button } from "reactstrap"; import { @@ -33,9 +32,11 @@ import { hasInitialFilterValues, mapSearchResultToEntity, } from "../../utils/helpers/KgSearchFunctions"; +import ListCard from "../list/ListCard"; import { Loader } from "../Loader"; import Pagination from "../Pagination"; -import ListCard from "../list/ListCard"; + +import Masonry from "react-masonry-css"; interface SearchResultProps { data?: ListResponse; diff --git a/client/src/components/searchResultsHeader/SearchResultsHeader.tsx b/client/src/components/searchResultsHeader/SearchResultsHeader.tsx index 8b44936810..455059ff85 100644 --- a/client/src/components/searchResultsHeader/SearchResultsHeader.tsx +++ b/client/src/components/searchResultsHeader/SearchResultsHeader.tsx @@ -16,10 +16,10 @@ * limitations under the License. */ +import { FilterButton } from "../entities/Buttons"; import SortingEntities, { SortingOptions, } from "../sortingEntities/SortingEntities"; -import { FilterButton } from "../entities/Buttons"; interface ResultHeaderProps { total?: number; diff --git a/client/src/components/shareLinkSession/ShareLinkSession.tsx b/client/src/components/shareLinkSession/ShareLinkSession.tsx index fdf0a82ba9..4eb6e2634a 100644 --- a/client/src/components/shareLinkSession/ShareLinkSession.tsx +++ b/client/src/components/shareLinkSession/ShareLinkSession.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { faInfoCircle, faLink } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ChangeEvent, useEffect, useState } from "react"; diff --git a/client/src/components/ssh/ssh.tsx b/client/src/components/ssh/ssh.tsx index 27a4839c3e..73419c0225 100644 --- a/client/src/components/ssh/ssh.tsx +++ b/client/src/components/ssh/ssh.tsx @@ -36,11 +36,11 @@ import AppContext from "../../utils/context/appContext"; import useAppDispatch from "../../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../../utils/customHooks/useAppSelector.hook"; import { cleanGitUrl } from "../../utils/helpers/ProjectFunctions"; -import { Url, apiVersionForMetadataVersion } from "../../utils/helpers/url"; +import { apiVersionForMetadataVersion, Url } from "../../utils/helpers/url"; import { InfoAlert } from "../Alert"; +import { CommandCopy } from "../commandCopy/CommandCopy"; import { ExternalDocsLink } from "../ExternalLinks"; import { Loader } from "../Loader"; -import { CommandCopy } from "../commandCopy/CommandCopy"; const docsIconStyle = { showLinkIcon: true, diff --git a/client/src/components/typeEntityFilter/TypeEntityFilter.tsx b/client/src/components/typeEntityFilter/TypeEntityFilter.tsx index 29102dda69..dfdc0280f7 100644 --- a/client/src/components/typeEntityFilter/TypeEntityFilter.tsx +++ b/client/src/components/typeEntityFilter/TypeEntityFilter.tsx @@ -19,7 +19,9 @@ import { ChangeEvent } from "react"; import { Briefcase, HddStack } from "react-bootstrap-icons"; import { Input } from "reactstrap"; + import "./TypeEntityFilter.css"; + /** * renku-ui * diff --git a/client/src/components/userRolesFilter/UserRolesFilter.tsx b/client/src/components/userRolesFilter/UserRolesFilter.tsx index 5dedfc4f4b..fb5026a7ee 100644 --- a/client/src/components/userRolesFilter/UserRolesFilter.tsx +++ b/client/src/components/userRolesFilter/UserRolesFilter.tsx @@ -18,8 +18,8 @@ import cx from "classnames"; import { ChangeEvent, useCallback } from "react"; - import { Input, Label } from "reactstrap"; + import type { UserRoles } from "./userRolesFilter.types"; type UserRoleKey = keyof UserRoles; diff --git a/client/src/components/visibility/Visibility.tsx b/client/src/components/visibility/Visibility.tsx index f49009fdd2..4d541b1c6c 100644 --- a/client/src/components/visibility/Visibility.tsx +++ b/client/src/components/visibility/Visibility.tsx @@ -16,18 +16,25 @@ * limitations under the License. */ -import { ChangeEvent, ReactNode, useEffect, useRef, useState } from "react"; -import { Input, UncontrolledTooltip } from "reactstrap"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faExclamationCircle, faGlobe, faLock, faUserFriends, } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { ChangeEvent, ReactNode, useEffect, useRef, useState } from "react"; +import { Input, UncontrolledTooltip } from "reactstrap"; import "./Visibility.css"; + +import { IconDefinition } from "@fortawesome/free-brands-svg-icons"; +import cx from "classnames"; +import { FormText } from "reactstrap"; + +import { GitlabLinks } from "../../utils/constants/Docs"; import { computeVisibilities } from "../../utils/helpers/HelperFunctions"; +import { ExternalLink } from "../ExternalLinks"; import { ErrorLabel, HelperLabel, @@ -35,11 +42,6 @@ import { LoadingLabel, RequiredLabel, } from "../formlabels/FormLabels"; -import { ExternalLink } from "../ExternalLinks"; -import { GitlabLinks } from "../../utils/constants/Docs"; -import { FormText } from "reactstrap"; -import cx from "classnames"; -import { IconDefinition } from "@fortawesome/free-brands-svg-icons"; /** * renku-ui diff --git a/client/src/components/visibilityFilter/VisibilityFilter.tsx b/client/src/components/visibilityFilter/VisibilityFilter.tsx index c64215dbdc..634088cd1d 100644 --- a/client/src/components/visibilityFilter/VisibilityFilter.tsx +++ b/client/src/components/visibilityFilter/VisibilityFilter.tsx @@ -19,6 +19,7 @@ import { ChangeEvent } from "react"; import { Globe, Lock, People } from "react-bootstrap-icons"; import { Input } from "reactstrap"; + import "./VisibilityFilter.css"; /** diff --git a/client/src/dataset/Dataset.present.jsx b/client/src/dataset/Dataset.present.jsx index 735ddde8db..1e9a732ac3 100644 --- a/client/src/dataset/Dataset.present.jsx +++ b/client/src/dataset/Dataset.present.jsx @@ -33,13 +33,13 @@ import { } from "reactstrap"; import { ErrorAlert, WarnAlert } from "../components/Alert"; -import { ExternalLink } from "../components/ExternalLinks"; -import FileExplorer from "../components/FileExplorer"; -import { Loader } from "../components/Loader"; import { EntityDeleteButtonButton } from "../components/entities/Buttons"; import EntityHeader from "../components/entityHeader/EntityHeader"; import { CoreErrorAlert } from "../components/errors/CoreErrorAlert"; import { CoreError } from "../components/errors/CoreErrorHelpers"; +import { ExternalLink } from "../components/ExternalLinks"; +import FileExplorer from "../components/FileExplorer"; +import { Loader } from "../components/Loader"; import LazyRenkuMarkdown from "../components/markdown/LazyRenkuMarkdown"; import DeleteDataset from "../project/datasets/delete"; import useLegacySelector from "../utils/customHooks/useLegacySelector.hook"; diff --git a/client/src/dataset/Dataset.state.js b/client/src/dataset/Dataset.state.js index 7201bdc48b..139ff20392 100644 --- a/client/src/dataset/Dataset.state.js +++ b/client/src/dataset/Dataset.state.js @@ -16,8 +16,8 @@ * limitations under the License. */ -import { datasetSchema } from "../model/RenkuModels"; import { API_ERRORS } from "../api-client"; +import { datasetSchema } from "../model/RenkuModels"; import { mapDataset } from "./DatasetFunctions"; /** diff --git a/client/src/dataset/LazyShowDataset.tsx b/client/src/dataset/LazyShowDataset.tsx index 89e5da3096..d1a5055bdb 100644 --- a/client/src/dataset/LazyShowDataset.tsx +++ b/client/src/dataset/LazyShowDataset.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { ComponentProps, Suspense, lazy } from "react"; +import { ComponentProps, lazy, Suspense } from "react"; + import PageLoader from "../components/PageLoader"; const ShowDataset = lazy(() => import("./Dataset.container")); diff --git a/client/src/error-boundary/ErrorBoundary.tsx b/client/src/error-boundary/ErrorBoundary.tsx index fb3ff12107..0850a5e1e5 100644 --- a/client/src/error-boundary/ErrorBoundary.tsx +++ b/client/src/error-boundary/ErrorBoundary.tsx @@ -17,17 +17,17 @@ */ import * as Sentry from "@sentry/react"; +import StyleHandler from "~/features/rootV2/StyleHandler"; import cx from "classnames"; import { ReactNode, useCallback, useContext } from "react"; -import { useLocation } from "react-router"; import { ArrowLeft } from "react-bootstrap-icons"; +import { useLocation } from "react-router"; import rkOopsImg from "../styles/assets/oops.svg"; import rkOopsV2Img from "../styles/assets/oopsV2.svg"; import AppContext from "../utils/context/appContext"; import useLegacySelector from "../utils/customHooks/useLegacySelector.hook"; import { isRenkuLegacy } from "../utils/helpers/HelperFunctionsV2"; -import StyleHandler from "~/features/rootV2/StyleHandler"; interface AppErrorBoundaryProps { children?: ReactNode; diff --git a/client/src/features/ProjectPageV2/LazyProjectPageV2Show.tsx b/client/src/features/ProjectPageV2/LazyProjectPageV2Show.tsx index 7ece9dadd8..60351f5e0d 100644 --- a/client/src/features/ProjectPageV2/LazyProjectPageV2Show.tsx +++ b/client/src/features/ProjectPageV2/LazyProjectPageV2Show.tsx @@ -16,7 +16,8 @@ * limitations under the License */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const ProjectPageV2Show = lazy( diff --git a/client/src/features/ProjectPageV2/ProjectPageContainer/ProjectPageContainer.tsx b/client/src/features/ProjectPageV2/ProjectPageContainer/ProjectPageContainer.tsx index 9163ed3884..4e2bf50455 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContainer/ProjectPageContainer.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContainer/ProjectPageContainer.tsx @@ -26,8 +26,9 @@ import { useParams, } from "react-router"; import { Col, Row } from "reactstrap"; -import { Loader } from "../../../components/Loader"; + import ContainerWrap from "../../../components/container/ContainerWrap"; +import { Loader } from "../../../components/Loader"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import type { Project } from "../../projectsV2/api/projectV2.api"; import { useGetNamespacesByNamespaceProjectsAndSlugQuery } from "../../projectsV2/api/projectV2.enhanced-api"; diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/AddCodeRepositoryModal.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/AddCodeRepositoryModal.tsx index c89fbc123c..5201978385 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/AddCodeRepositoryModal.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/AddCodeRepositoryModal.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; import { useCallback, useEffect, useMemo } from "react"; import { CodeSquare, PlusLg, XLg } from "react-bootstrap-icons"; @@ -33,8 +34,9 @@ import { Row, } from "reactstrap"; -import { Loader } from "../../../../components/Loader"; +import { WarnAlert } from "../../../../components/Alert"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; import { Project } from "../../../projectsV2/api/projectV2.api"; import { usePatchProjectsByProjectIdMutation } from "../../../projectsV2/api/projectV2.enhanced-api"; import { @@ -42,7 +44,6 @@ import { validateCodeRepository, validateNoDuplicatesInCodeRepositories, } from "./repositories.utils"; -import { WarnAlert } from "../../../../components/Alert"; interface AddCodeRepositoryForm { repositoryUrl: string; diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/CodeRepositoryDisplay.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/CodeRepositoryDisplay.tsx index 5a110b96ee..41ed475836 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/CodeRepositoryDisplay.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/CodeRepositoryDisplay.tsx @@ -15,8 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { SerializedError } from "@reduxjs/toolkit"; import { skipToken, type FetchBaseQueryError } from "@reduxjs/toolkit/query"; +import RepositoryGitLabWarnBadge from "~/features/legacy/RepositoryGitLabWarnBadge"; import cx from "classnames"; import { useCallback, useEffect, useMemo, useState } from "react"; import { @@ -48,17 +50,15 @@ import { Row, } from "reactstrap"; -import RepositoryGitLabWarnBadge from "~/features/legacy/RepositoryGitLabWarnBadge"; - import { useLoginUrl } from "../../../../authentication/useLoginUrl.hook"; import { ErrorAlert, RenkuAlert, WarnAlert, } from "../../../../components/Alert"; -import { Loader } from "../../../../components/Loader"; import { ButtonWithMenuV2 } from "../../../../components/buttons/Button"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; import { ABSOLUTE_ROUTES } from "../../../../routing/routes.constants"; import useLegacySelector from "../../../../utils/customHooks/useLegacySelector.hook"; import { safeNewUrl } from "../../../../utils/helpers/safeNewUrl.utils"; @@ -67,8 +67,8 @@ import { useGetOauth2ProvidersQuery, type Provider, } from "../../../connectedServices/api/connectedServices.api"; -import { ConnectButton } from "../../../connectedServices/ConnectedServicesPage"; import { INTERNAL_GITLAB_PROVIDER_ID } from "../../../connectedServices/connectedServices.constants"; +import { ConnectButton } from "../../../connectedServices/ConnectedServicesPage"; import PermissionsGuard from "../../../permissionsV2/PermissionsGuard"; import { Project } from "../../../projectsV2/api/projectV2.api"; import { usePatchProjectsByProjectIdMutation } from "../../../projectsV2/api/projectV2.enhanced-api"; diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/RepositoriesBox.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/RepositoriesBox.tsx index dd44fa9fba..50f22d101f 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/RepositoriesBox.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/CodeRepositories/RepositoriesBox.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; import { useCallback, useState } from "react"; import { FileCode, PlusLg } from "react-bootstrap-icons"; diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/DataConnectors/ProjectConnectDataConnectorsModal.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/DataConnectors/ProjectConnectDataConnectorsModal.tsx index 261e0b2a86..6e72cbe1b6 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/DataConnectors/ProjectConnectDataConnectorsModal.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/DataConnectors/ProjectConnectDataConnectorsModal.tsx @@ -16,6 +16,9 @@ * limitations under the License */ +import DataConnectorModal, { + DataConnectorModalBodyAndFooter, +} from "~/features/dataConnectorsV2/components/DataConnectorModal"; import cx from "classnames"; import { useCallback, useEffect, useMemo, useState } from "react"; import { @@ -36,9 +39,6 @@ import { ModalFooter, } from "reactstrap"; -import DataConnectorModal, { - DataConnectorModalBodyAndFooter, -} from "~/features/dataConnectorsV2/components/DataConnectorModal"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; import { ExternalLink } from "../../../../components/ExternalLinks"; import { Loader } from "../../../../components/Loader"; diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/DataConnectors/ProjectDataConnectorsBox.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/DataConnectors/ProjectDataConnectorsBox.tsx index b2718c6d7c..85c57a1260 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/DataConnectors/ProjectDataConnectorsBox.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/DataConnectors/ProjectDataConnectorsBox.tsx @@ -16,6 +16,15 @@ * limitations under the License */ +import { + type DataConnectorToProjectLink, + type GetProjectsByProjectIdDataConnectorLinksApiResponse, +} from "~/features/dataConnectorsV2/api/data-connectors.api"; +import { + useGetDataConnectorsByDataConnectorIdQuery, + useGetProjectsByProjectIdDataConnectorLinksQuery, + useGetProjectsByProjectIdInaccessibleDataConnectorLinksQuery, +} from "~/features/dataConnectorsV2/api/data-connectors.enhanced-api"; import cx from "classnames"; import { useCallback, useRef, useState } from "react"; import { Database, PlusLg } from "react-bootstrap-icons"; @@ -29,18 +38,9 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { - type DataConnectorToProjectLink, - type GetProjectsByProjectIdDataConnectorLinksApiResponse, -} from "~/features/dataConnectorsV2/api/data-connectors.api"; -import { - useGetDataConnectorsByDataConnectorIdQuery, - useGetProjectsByProjectIdDataConnectorLinksQuery, - useGetProjectsByProjectIdInaccessibleDataConnectorLinksQuery, -} from "~/features/dataConnectorsV2/api/data-connectors.enhanced-api"; import { ErrorAlert } from "../../../../components/Alert"; -import { Loader } from "../../../../components/Loader"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; import DataConnectorBoxListDisplay, { DataConnectorBoxListDisplayPlaceholder, } from "../../../dataConnectorsV2/components/DataConnectorsBoxListDisplay"; diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/Documentation/DocumentationInput.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/Documentation/DocumentationInput.tsx index 02978c7dce..595a8f14b0 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/Documentation/DocumentationInput.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/Documentation/DocumentationInput.tsx @@ -17,7 +17,6 @@ */ import cx from "classnames"; - import { Controller, type Control, diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/LazyProjectPageOverview.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/LazyProjectPageOverview.tsx index 236d60d249..6858633907 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/LazyProjectPageOverview.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/LazyProjectPageOverview.tsx @@ -16,7 +16,8 @@ * limitations under the License */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../../components/PageLoader"; const ProjectOverviewPage = lazy(() => import("./ProjectOverviewPage")); diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/LazyProjectPageSettings.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/LazyProjectPageSettings.tsx index f9175f60a3..4c33fd36b0 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/LazyProjectPageSettings.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/LazyProjectPageSettings.tsx @@ -16,7 +16,8 @@ * limitations under the License */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../../components/PageLoader"; const ProjectPageSettings = lazy(() => import("./Settings/ProjectSettings")); diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/ProjectInformation/ProjectInformation.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/ProjectInformation/ProjectInformation.tsx index 9132058da0..f8b0ddffaa 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/ProjectInformation/ProjectInformation.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/ProjectInformation/ProjectInformation.tsx @@ -17,6 +17,8 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import KeywordBadge from "~/components/keywords/KeywordBadge"; +import KeywordContainer from "~/components/keywords/KeywordContainer"; import cx from "classnames"; import { useMemo } from "react"; import { @@ -28,13 +30,12 @@ import { JournalAlbum, People, } from "react-bootstrap-icons"; -import { Link, generatePath } from "react-router"; +import { generatePath, Link } from "react-router"; import { Badge, Card, CardBody, CardHeader } from "reactstrap"; -import KeywordBadge from "~/components/keywords/KeywordBadge"; -import KeywordContainer from "~/components/keywords/KeywordContainer"; + +import { UnderlineArrowLink } from "../../../../components/buttons/Button"; import { Loader } from "../../../../components/Loader"; import { TimeCaption } from "../../../../components/TimeCaption"; -import { UnderlineArrowLink } from "../../../../components/buttons/Button"; import { ABSOLUTE_ROUTES } from "../../../../routing/routes.constants"; import projectPreviewImg from "../../../../styles/assets/projectImagePreview.svg"; import type { @@ -50,9 +51,10 @@ import { import { useProject } from "../../ProjectPageContainer/ProjectPageContainer"; import { getMemberNameToDisplay, toSortedMembers } from "../../utils/roleUtils"; import useProjectPermissions from "../../utils/useProjectPermissions.hook"; -import styles from "./ProjectInformation.module.scss"; import ProjectInformationButton from "./ProjectInformationButton"; +import styles from "./ProjectInformation.module.scss"; + const MAX_MEMBERS_DISPLAYED = 5; function ProjectCopyTemplateInformationBox({ project }: { project: Project }) { diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/ProjectInformation/ProjectInformationButton.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/ProjectInformation/ProjectInformationButton.tsx index 73338f7654..9e7e392340 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/ProjectInformation/ProjectInformationButton.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/ProjectInformation/ProjectInformationButton.tsx @@ -16,11 +16,11 @@ * limitations under the License. */ +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import cx from "classnames"; import { useCallback, useState } from "react"; import { DropdownItem } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import { SingleButtonWithMenu } from "../../../../components/buttons/Button"; import BootstrapCopyIcon from "../../../../components/icons/BootstrapCopyIcon"; import useLegacySelector from "../../../../utils/customHooks/useLegacySelector.hook"; diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/AddSessionSecretButton.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/AddSessionSecretButton.tsx index 59f21fe9bc..6fbea1bed0 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/AddSessionSecretButton.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/AddSessionSecretButton.tsx @@ -30,16 +30,16 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { Loader } from "../../../../components/Loader"; +import { SuccessAlert } from "../../../../components/Alert"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; +import type { SessionSecretSlot } from "../../../projectsV2/api/projectV2.api"; import { usePostSessionSecretSlotsMutation } from "../../../projectsV2/api/projectV2.enhanced-api"; import { useProject } from "../../ProjectPageContainer/ProjectPageContainer"; import DescriptionField from "./fields/DescriptionField"; -import type { SessionSecretSlot } from "../../../projectsV2/api/projectV2.api"; import FilenameField from "./fields/FilenameField"; import NameField from "./fields/NameField"; import ProvideSessionSecretModalContent from "./ProvideSessionSecretModalContent"; -import { SuccessAlert } from "../../../../components/Alert"; export default function AddSessionSecretButton() { const ref = useRef(null); diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/SecretsMountDirectoryComponent.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/SecretsMountDirectoryComponent.tsx index 6bad05e0c2..516fe8ec05 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/SecretsMountDirectoryComponent.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/SecretsMountDirectoryComponent.tsx @@ -30,14 +30,15 @@ import { ModalHeader, UncontrolledTooltip, } from "reactstrap"; + import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../../components/Loader"; import ScrollableModal from "../../../../components/modal/ScrollableModal"; +import PermissionsGuard from "../../../permissionsV2/PermissionsGuard"; import { usePatchProjectsByProjectIdMutation } from "../../../projectsV2/api/projectV2.enhanced-api"; -import { useProject } from "../../ProjectPageContainer/ProjectPageContainer"; import SecretsMountDirectoryField from "../../../projectsV2/fields/SecretsMountDirectoryField"; +import { useProject } from "../../ProjectPageContainer/ProjectPageContainer"; import useProjectPermissions from "../../utils/useProjectPermissions.hook"; -import PermissionsGuard from "../../../permissionsV2/PermissionsGuard"; export default function SecretsMountDirectoryComponent() { const { project } = useProject(); diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/fields/SelectUserSecretField.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/fields/SelectUserSecretField.tsx index a79e516ac4..583b726acc 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/fields/SelectUserSecretField.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/SessionSecrets/fields/SelectUserSecretField.tsx @@ -17,25 +17,25 @@ */ import cx from "classnames"; +import { ChevronDown } from "react-bootstrap-icons"; import { Controller, type FieldValues } from "react-hook-form"; import Select, { - type SelectComponentsConfig, + components, type ClassNamesConfig, type GroupBase, - components, + type SelectComponentsConfig, } from "react-select"; - import { Input, Label } from "reactstrap"; -import { Loader } from "../../../../../components/Loader"; + import { RtkOrNotebooksError } from "../../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../../components/Loader"; import { - type SecretWithId, useGetUserSecretsQuery, + type SecretWithId, } from "../../../../usersV2/api/users.api"; import type { SessionSecretFormFieldProps } from "./fields.types"; import styles from "./SelectUserSecretField.module.scss"; -import { ChevronDown } from "react-bootstrap-icons"; interface SelectUserSecretFieldProps extends SessionSecretFormFieldProps { diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectKeywordsFormField.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectKeywordsFormField.tsx index ca12b16939..efde08eaf4 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectKeywordsFormField.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectKeywordsFormField.tsx @@ -1,3 +1,5 @@ +import KeywordBadge from "~/components/keywords/KeywordBadge"; +import KeywordContainer from "~/components/keywords/KeywordContainer"; import cx from "classnames"; import { PlusLg } from "react-bootstrap-icons"; import type { @@ -7,8 +9,7 @@ import type { } from "react-hook-form"; import { Controller } from "react-hook-form"; import { Button, FormText, Label } from "reactstrap"; -import KeywordBadge from "~/components/keywords/KeywordBadge"; -import KeywordContainer from "~/components/keywords/KeywordContainer"; + import type { ProjectV2MetadataWithKeyword } from "../../settings/projectSettings.types"; interface ProjectKeywordsFormFieldProps { diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectSettings.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectSettings.tsx index 7931a71f62..0db8bb3010 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectSettings.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectSettings.tsx @@ -16,6 +16,7 @@ * limitations under the License. */ +import SlugFormField from "~/features/projectsV2/fields/SlugFormField"; import cx from "classnames"; import { useCallback, useContext, useEffect, useMemo, useState } from "react"; import { Diagram3Fill, Pencil, Sliders } from "react-bootstrap-icons"; @@ -32,9 +33,10 @@ import { Input, Label, } from "reactstrap"; + import { RenkuAlert, SuccessAlert } from "../../../../components/Alert"; -import { Loader } from "../../../../components/Loader"; import { RtkErrorAlert } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; import { NOTIFICATION_TOPICS } from "../../../../notifications/Notifications.constants"; import { NotificationsManager } from "../../../../notifications/notifications.types"; import { ABSOLUTE_ROUTES } from "../../../../routing/routes.constants"; @@ -57,7 +59,6 @@ import ProjectPageDelete from "./ProjectDelete"; import ProjectKeywordsFormField from "./ProjectKeywordsFormField"; import ProjectPageSettingsMembers from "./ProjectSettingsMembers"; import ProjectUnlinkTemplate from "./ProjectUnlinkTemplate"; -import SlugFormField from "~/features/projectsV2/fields/SlugFormField"; function notificationProjectUpdated( notifications: NotificationsManager, diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectSettingsMembers.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectSettingsMembers.tsx index 4ebe88ce81..030aca3129 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectSettingsMembers.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectSettingsMembers.tsx @@ -17,6 +17,7 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import cx from "classnames"; import React, { useCallback, useMemo, useRef, useState } from "react"; import { PencilSquare, PersonGear, PlusLg, Trash } from "react-bootstrap-icons"; @@ -33,7 +34,6 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import { ButtonWithMenuV2 } from "../../../../components/buttons/Button"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../../components/Loader"; diff --git a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectAutostartRedirectBanner.tsx b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectAutostartRedirectBanner.tsx index 49e4280747..a478baf6dc 100644 --- a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectAutostartRedirectBanner.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectAutostartRedirectBanner.tsx @@ -15,11 +15,12 @@ * See the License for the specific language governing permissions and * limitations under the License */ -import cx from "classnames"; -import { Diagram3Fill } from "react-bootstrap-icons"; import LearnAboutV2Button from "~/features/projectsV2/shared/LearnAboutV2Button"; import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; +import cx from "classnames"; +import { Diagram3Fill } from "react-bootstrap-icons"; + import PrimaryAlert from "../../../components/PrimaryAlert"; import PermissionsGuard from "../../permissionsV2/PermissionsGuard"; import type { Project } from "../../projectsV2/api/projectV2.api"; diff --git a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyBanner.tsx b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyBanner.tsx index b98780b2fe..5b1f689855 100644 --- a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyBanner.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyBanner.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License */ + import cx from "classnames"; import { useCallback, useState } from "react"; import { @@ -22,7 +23,7 @@ import { BoxArrowInRight, Diagram3Fill, } from "react-bootstrap-icons"; -import { Link, generatePath } from "react-router"; +import { generatePath, Link } from "react-router"; import { Button } from "reactstrap"; import { useLoginUrl } from "../../../authentication/useLoginUrl.hook"; diff --git a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyButton.tsx b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyButton.tsx index 401c4963da..086a853a5f 100644 --- a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyButton.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyButton.tsx @@ -16,11 +16,11 @@ * limitations under the License */ +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import cx from "classnames"; import { useCallback, useState } from "react"; import { Button } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import BootstrapCopyIcon from "../../../components/icons/BootstrapCopyIcon"; import { type Project } from "../../projectsV2/api/projectV2.api"; import ProjectCopyModal from "./ProjectCopyModal"; diff --git a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyModal.tsx b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyModal.tsx index d2d83efa2e..525b0aa5d5 100644 --- a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyModal.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectCopyModal.tsx @@ -35,17 +35,16 @@ import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import BootstrapCopyIcon from "../../../components/icons/BootstrapCopyIcon"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import { slugFromTitle } from "../../../utils/helpers/HelperFunctions"; - import { type Project, type Visibility, } from "../../projectsV2/api/projectV2.api"; import { usePostProjectsByProjectIdCopiesMutation } from "../../projectsV2/api/projectV2.enhanced-api"; -import { useGetUserQuery } from "../../usersV2/api/users.api"; import ProjectNameFormField from "../../projectsV2/fields/ProjectNameFormField"; import ProjectNamespaceFormField from "../../projectsV2/fields/ProjectNamespaceFormField"; import ProjectOwnerSlugFormField from "../../projectsV2/fields/ProjectOwnerSlugFormField"; import ProjectVisibilityFormField from "../../projectsV2/fields/ProjectVisibilityFormField"; +import { useGetUserQuery } from "../../usersV2/api/users.api"; interface ProjectCopyModalProps { currentUser: ReturnType["data"]; diff --git a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectPageHeader.tsx b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectPageHeader.tsx index 60a3217aed..3ad95325fa 100644 --- a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectPageHeader.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectPageHeader.tsx @@ -15,18 +15,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; import { generatePath, useLocation } from "react-router"; import { Col, Row } from "reactstrap"; import { UnderlineArrowLink } from "../../../components/buttons/Button"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; +import ProjectGitLabWarnBanner from "../../legacy/ProjectGitLabWarnBanner"; import { Project } from "../../projectsV2/api/projectV2.api"; import { ProjectImageView } from "../ProjectPageContent/ProjectInformation/ProjectInformation"; - import ProjectAutostartRedirectBanner from "./ProjectAutostartRedirectBanner"; import ProjectCopyBanner from "./ProjectCopyBanner"; -import ProjectGitLabWarnBanner from "../../legacy/ProjectGitLabWarnBanner"; import ProjectTemplateInfoBanner from "./ProjectTemplateInfoBanner"; interface ProjectPageHeaderProps { diff --git a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectTemplateInfoBanner.tsx b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectTemplateInfoBanner.tsx index 10c1bb263f..687adf1ccb 100644 --- a/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectTemplateInfoBanner.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageHeader/ProjectTemplateInfoBanner.tsx @@ -15,14 +15,15 @@ * See the License for the specific language governing permissions and * limitations under the License */ + +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import cx from "classnames"; import { useCallback, useState } from "react"; import { Diagram3Fill } from "react-bootstrap-icons"; import { Button, ListGroup, ModalBody, ModalHeader } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; -import PrimaryAlert from "../../../components/PrimaryAlert"; import ScrollableModal from "../../../components/modal/ScrollableModal"; +import PrimaryAlert from "../../../components/PrimaryAlert"; import PermissionsGuard from "../../permissionsV2/PermissionsGuard"; import type { Project } from "../../projectsV2/api/projectV2.api"; import { useGetProjectsByProjectIdCopiesQuery } from "../../projectsV2/api/projectV2.api"; diff --git a/client/src/features/ProjectPageV2/ProjectPageNav/ProjectPageNav.tsx b/client/src/features/ProjectPageV2/ProjectPageNav/ProjectPageNav.tsx index f3da8f4056..e6f0e81ad9 100644 --- a/client/src/features/ProjectPageV2/ProjectPageNav/ProjectPageNav.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageNav/ProjectPageNav.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; import { Eye, Sliders } from "react-bootstrap-icons"; import { generatePath } from "react-router"; diff --git a/client/src/features/ProjectPageV2/settings/ProjectDeleteConfirmation.tsx b/client/src/features/ProjectPageV2/settings/ProjectDeleteConfirmation.tsx index b69fd88f2e..ee250cc3b0 100644 --- a/client/src/features/ProjectPageV2/settings/ProjectDeleteConfirmation.tsx +++ b/client/src/features/ProjectPageV2/settings/ProjectDeleteConfirmation.tsx @@ -32,7 +32,6 @@ import { import { Loader } from "../../../components/Loader"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import AppContext from "../../../utils/context/appContext"; - import { notificationProjectDeleted } from "../../ProjectPageV2/ProjectPageContent/Settings/ProjectDelete"; import type { Project } from "../../projectsV2/api/projectV2.api"; import { useDeleteProjectsByProjectIdMutation } from "../../projectsV2/api/projectV2.enhanced-api"; diff --git a/client/src/features/admin/AddConnectedServiceButton.tsx b/client/src/features/admin/AddConnectedServiceButton.tsx index fe8286bc9a..5380d8379c 100644 --- a/client/src/features/admin/AddConnectedServiceButton.tsx +++ b/client/src/features/admin/AddConnectedServiceButton.tsx @@ -16,6 +16,7 @@ * limitations under the License. */ +import ScrollableModal from "~/components/modal/ScrollableModal"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { PlusLg, XLg } from "react-bootstrap-icons"; @@ -30,7 +31,6 @@ import { ModalHeader, } from "reactstrap"; -import ScrollableModal from "~/components/modal/ScrollableModal"; import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import { Loader } from "../../components/Loader"; import { usePostOauth2ProvidersMutation } from "../connectedServices/api/connectedServices.api"; diff --git a/client/src/features/admin/AddManyUsersToResourcePoolButton.tsx b/client/src/features/admin/AddManyUsersToResourcePoolButton.tsx index 0055b0b69c..f768c0fa72 100644 --- a/client/src/features/admin/AddManyUsersToResourcePoolButton.tsx +++ b/client/src/features/admin/AddManyUsersToResourcePoolButton.tsx @@ -16,6 +16,9 @@ * limitations under the License. */ +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; +import ScrollableModal from "~/components/modal/ScrollableModal"; import cx from "classnames"; import { useCallback, useEffect, useMemo, useState } from "react"; import { @@ -30,10 +33,10 @@ import { Control, Controller, FieldArrayWithId, - UseFormSetValue, - UseFormWatch, useFieldArray, useForm, + UseFormSetValue, + UseFormWatch, } from "react-hook-form"; import { Button, @@ -45,9 +48,7 @@ import { ModalFooter, ModalHeader, } from "reactstrap"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; -import { Loader } from "~/components/Loader"; -import ScrollableModal from "~/components/modal/ScrollableModal"; + import { usePostResourcePoolsByResourcePoolIdUsersMutation, type ResourcePoolWithId, diff --git a/client/src/features/admin/AddResourceClassButton.tsx b/client/src/features/admin/AddResourceClassButton.tsx index 55b15ed36b..7646cb3dae 100644 --- a/client/src/features/admin/AddResourceClassButton.tsx +++ b/client/src/features/admin/AddResourceClassButton.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { PlusLg, TrashFill, XLg } from "react-bootstrap-icons"; @@ -32,8 +34,6 @@ import { ModalHeader, } from "reactstrap"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; -import { Loader } from "~/components/Loader"; import { usePostResourcePoolsByResourcePoolIdClassesMutation, type ResourcePoolWithId, diff --git a/client/src/features/admin/AddResourcePoolButton.tsx b/client/src/features/admin/AddResourcePoolButton.tsx index 8f24446b5c..9ff0d2a8f2 100644 --- a/client/src/features/admin/AddResourcePoolButton.tsx +++ b/client/src/features/admin/AddResourcePoolButton.tsx @@ -16,6 +16,9 @@ * limitations under the License. */ +import { RtkOrNotebooksError } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; +import { toFullHumanDuration } from "~/utils/helpers/DurationUtils"; import cx from "classnames"; import { useCallback, useEffect, useMemo, useState } from "react"; import { PlusLg, XLg } from "react-bootstrap-icons"; @@ -31,9 +34,6 @@ import { ModalHeader, } from "reactstrap"; -import { RtkOrNotebooksError } from "~/components/errors/RtkErrorAlert"; -import { Loader } from "~/components/Loader"; -import { toFullHumanDuration } from "~/utils/helpers/DurationUtils"; import { useGetResourcePoolsQuery, usePostResourcePoolsMutation, diff --git a/client/src/features/admin/AddSessionEnvironmentButton.tsx b/client/src/features/admin/AddSessionEnvironmentButton.tsx index 4556aa5590..c3d41dab79 100644 --- a/client/src/features/admin/AddSessionEnvironmentButton.tsx +++ b/client/src/features/admin/AddSessionEnvironmentButton.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { PlusLg, XLg } from "react-bootstrap-icons"; @@ -29,8 +31,6 @@ import { ModalHeader, } from "reactstrap"; -import { Loader } from "~/components/Loader"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; import { usePostEnvironmentsMutation } from "../sessionsV2/api/sessionLaunchersV2.api"; import { safeParseJSONStringArray } from "../sessionsV2/session.utils"; import SessionEnvironmentFormContent, { diff --git a/client/src/features/admin/AddUserToResourcePoolButton.tsx b/client/src/features/admin/AddUserToResourcePoolButton.tsx index 99e0b2c223..6d23bdeba3 100644 --- a/client/src/features/admin/AddUserToResourcePoolButton.tsx +++ b/client/src/features/admin/AddUserToResourcePoolButton.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; import cx from "classnames"; import { FormEvent, useCallback, useEffect, useState } from "react"; import Autosuggest, { @@ -38,8 +40,6 @@ import { ModalHeader, } from "reactstrap"; -import { Loader } from "~/components/Loader"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; import { usePostResourcePoolsByResourcePoolIdUsersMutation, type ResourcePoolWithId, diff --git a/client/src/features/admin/AdminPage.tsx b/client/src/features/admin/AdminPage.tsx index d17eeaad3a..54c0e6a62b 100644 --- a/client/src/features/admin/AdminPage.tsx +++ b/client/src/features/admin/AdminPage.tsx @@ -16,6 +16,12 @@ * limitations under the License. */ +import { ErrorAlert } from "~/components/Alert"; +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import ChevronFlippedIcon from "~/components/icons/ChevronFlippedIcon"; +import { Loader } from "~/components/Loader"; +import { isFetchBaseQueryError } from "~/utils/helpers/ApiErrors"; +import { toFullHumanDuration } from "~/utils/helpers/DurationUtils"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { CheckLg, PersonFillX, TrashFill, XLg } from "react-bootstrap-icons"; @@ -30,20 +36,14 @@ import { ModalFooter, } from "reactstrap"; -import { ErrorAlert } from "~/components/Alert"; -import { Loader } from "~/components/Loader"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; -import ChevronFlippedIcon from "~/components/icons/ChevronFlippedIcon"; -import { isFetchBaseQueryError } from "~/utils/helpers/ApiErrors"; -import { toFullHumanDuration } from "~/utils/helpers/DurationUtils"; import { - type PoolUserWithId, - type ResourceClassWithId, - type ResourcePoolWithId, useDeleteResourcePoolsByResourcePoolIdMutation, useDeleteResourcePoolsByResourcePoolIdUsersAndUserIdMutation, useGetResourcePoolsByResourcePoolIdUsersQuery, useGetResourcePoolsQuery, + type PoolUserWithId, + type ResourceClassWithId, + type ResourcePoolWithId, } from "../sessionsV2/api/computeResources.api"; import { useGetUsersQuery } from "../usersV2/api/users.api"; import { useGetNotebooksVersionQuery } from "../versions/versions.api"; @@ -51,6 +51,8 @@ import AddManyUsersToResourcePoolButton from "./AddManyUsersToResourcePoolButton import AddResourceClassButton from "./AddResourceClassButton"; import AddResourcePoolButton from "./AddResourcePoolButton"; import AddUserToResourcePoolButton from "./AddUserToResourcePoolButton"; +import { useGetKeycloakUserQuery } from "./adminKeycloak.api"; +import { KeycloakUser } from "./adminKeycloak.types"; import ConnectedServicesSection from "./ConnectedServicesSection"; import DeleteResourceClassButton from "./DeleteResourceClassButton"; import IncidentsAndMaintenanceSection from "./IncidentsAndMaintenanceSection"; @@ -59,8 +61,6 @@ import UpdateResourceClassButton from "./UpdateResourceClassButton"; import UpdateResourcePoolQuotaButton from "./UpdateResourcePoolQuotaButton"; import UpdateResourcePoolRemoteButton from "./UpdateResourcePoolRemoteButton"; import UpdateResourcePoolThresholdsButton from "./UpdateResourcePoolThresholdsButton"; -import { useGetKeycloakUserQuery } from "./adminKeycloak.api"; -import { KeycloakUser } from "./adminKeycloak.types"; import useKeycloakRealm from "./useKeycloakRealm.hook"; export default function AdminPage() { diff --git a/client/src/features/admin/ConnectedServiceFormContent.tsx b/client/src/features/admin/ConnectedServiceFormContent.tsx index 5418e952f4..d353afc58f 100644 --- a/client/src/features/admin/ConnectedServiceFormContent.tsx +++ b/client/src/features/admin/ConnectedServiceFormContent.tsx @@ -16,10 +16,11 @@ * limitations under the License. */ +import { InfoAlert } from "~/components/Alert"; import cx from "classnames"; import { Control, Controller, useWatch } from "react-hook-form"; import { Input, Label } from "reactstrap"; -import { InfoAlert } from "~/components/Alert"; + import type { ProviderForm } from "../connectedServices/api/connectedServices.types"; export interface ConnectedServiceFormContentProps { diff --git a/client/src/features/admin/ConnectedServicesSection.tsx b/client/src/features/admin/ConnectedServicesSection.tsx index 767058227f..ae2f83b025 100644 --- a/client/src/features/admin/ConnectedServicesSection.tsx +++ b/client/src/features/admin/ConnectedServicesSection.tsx @@ -17,6 +17,7 @@ */ import cx from "classnames"; +import { useCallback, useState } from "react"; import { Card, CardBody, @@ -27,7 +28,9 @@ import { Container, Row, } from "reactstrap"; + import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; +import ChevronFlippedIcon from "../../components/icons/ChevronFlippedIcon"; import { Loader } from "../../components/Loader"; import { Provider, @@ -35,8 +38,6 @@ import { useGetOauth2ProvidersQuery, } from "../connectedServices/api/connectedServices.api"; import AddConnectedServiceButton from "./AddConnectedServiceButton"; -import ChevronFlippedIcon from "../../components/icons/ChevronFlippedIcon"; -import { useCallback, useState } from "react"; import DeleteConnectedServiceButton from "./DeleteConnectedServiceButton"; import UpdateConnectedServiceButton from "./UpdateConnectedServiceButton"; diff --git a/client/src/features/admin/DeleteConnectedServiceButton.tsx b/client/src/features/admin/DeleteConnectedServiceButton.tsx index c734eeeb4e..1737147e5a 100644 --- a/client/src/features/admin/DeleteConnectedServiceButton.tsx +++ b/client/src/features/admin/DeleteConnectedServiceButton.tsx @@ -17,14 +17,13 @@ */ import cx from "classnames"; - import { useCallback, useEffect, useState } from "react"; -import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; import { TrashFill, XLg } from "react-bootstrap-icons"; +import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; -import { Provider } from "../connectedServices/api/connectedServices.generated-api"; import { useDeleteOauth2ProvidersByProviderIdMutation } from "../connectedServices/api/connectedServices.api"; +import { Provider } from "../connectedServices/api/connectedServices.generated-api"; interface DeleteConnectedServiceButtonProps { provider: Provider; diff --git a/client/src/features/admin/DeleteResourceClassButton.tsx b/client/src/features/admin/DeleteResourceClassButton.tsx index d5c0ff3332..fd4b88c5a4 100644 --- a/client/src/features/admin/DeleteResourceClassButton.tsx +++ b/client/src/features/admin/DeleteResourceClassButton.tsx @@ -16,12 +16,12 @@ * limitations under the License. */ +import { Loader } from "~/components/Loader"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { CheckLg, TrashFill, XLg } from "react-bootstrap-icons"; import { Button, Modal, ModalBody, ModalFooter } from "reactstrap"; -import { Loader } from "~/components/Loader"; import { useDeleteResourcePoolsByResourcePoolIdClassesAndClassIdMutation, type ResourceClassWithId, diff --git a/client/src/features/admin/DeleteSessionEnvironmentButton.tsx b/client/src/features/admin/DeleteSessionEnvironmentButton.tsx index 2e8263f1c7..f52c2e397b 100644 --- a/client/src/features/admin/DeleteSessionEnvironmentButton.tsx +++ b/client/src/features/admin/DeleteSessionEnvironmentButton.tsx @@ -16,12 +16,12 @@ * limitations under the License. */ +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { TrashFill, XLg } from "react-bootstrap-icons"; import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; import type { Environment as SessionEnvironment } from "../sessionsV2/api/sessionLaunchersV2.api"; import { useDeleteEnvironmentsByEnvironmentIdMutation } from "../sessionsV2/api/sessionLaunchersV2.api"; diff --git a/client/src/features/admin/IncidentsAndMaintenanceSection.tsx b/client/src/features/admin/IncidentsAndMaintenanceSection.tsx index c5ab83fdd3..edec54f705 100644 --- a/client/src/features/admin/IncidentsAndMaintenanceSection.tsx +++ b/client/src/features/admin/IncidentsAndMaintenanceSection.tsx @@ -42,9 +42,9 @@ import { TabPane, } from "reactstrap"; -import { Loader } from "../../components/Loader"; import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import ChevronFlippedIcon from "../../components/icons/ChevronFlippedIcon"; +import { Loader } from "../../components/Loader"; import LazyRenkuMarkdown from "../../components/markdown/LazyRenkuMarkdown"; import { Links } from "../../utils/constants/Docs"; import AppContext from "../../utils/context/appContext"; diff --git a/client/src/features/admin/LazyAdminPage.tsx b/client/src/features/admin/LazyAdminPage.tsx index d456799458..4a327443ce 100644 --- a/client/src/features/admin/LazyAdminPage.tsx +++ b/client/src/features/admin/LazyAdminPage.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const AdminPage = lazy(() => import("./AdminPage")); diff --git a/client/src/features/admin/SessionEnvironmentAdvancedFields.tsx b/client/src/features/admin/SessionEnvironmentAdvancedFields.tsx index 81a6f94277..5ba93a96c5 100644 --- a/client/src/features/admin/SessionEnvironmentAdvancedFields.tsx +++ b/client/src/features/admin/SessionEnvironmentAdvancedFields.tsx @@ -16,11 +16,12 @@ * limitations under the License. */ +import CollapseBody from "~/components/container/CollapseBody"; import cx from "classnames"; import { useCallback, useState } from "react"; import { Control, FieldErrors } from "react-hook-form"; import { Collapse } from "reactstrap"; -import CollapseBody from "~/components/container/CollapseBody"; + import ChevronFlippedIcon from "../../components/icons/ChevronFlippedIcon"; import { AdvancedSettingsFields } from "../sessionsV2/components/SessionForm/AdvancedSettingsFields"; import { SessionEnvironmentForm } from "./SessionEnvironmentFormContent"; diff --git a/client/src/features/admin/SessionEnvironmentsSection.tsx b/client/src/features/admin/SessionEnvironmentsSection.tsx index 49f66cd8f8..3349b7dba5 100644 --- a/client/src/features/admin/SessionEnvironmentsSection.tsx +++ b/client/src/features/admin/SessionEnvironmentsSection.tsx @@ -16,6 +16,11 @@ * limitations under the License. */ +import { CommandCopy } from "~/components/commandCopy/CommandCopy"; +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import { ErrorLabel } from "~/components/formlabels/FormLabels"; +import { Loader } from "~/components/Loader"; +import { TimeCaption } from "~/components/TimeCaption"; import cx from "classnames"; import { Card, @@ -27,11 +32,6 @@ import { Row, } from "reactstrap"; -import { Loader } from "~/components/Loader"; -import { TimeCaption } from "~/components/TimeCaption"; -import { CommandCopy } from "~/components/commandCopy/CommandCopy"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; -import { ErrorLabel } from "~/components/formlabels/FormLabels"; import type { Environment as SessionEnvironment, EnvironmentList as SessionEnvironmentList, diff --git a/client/src/features/admin/UpdateConnectedServiceButton.tsx b/client/src/features/admin/UpdateConnectedServiceButton.tsx index 034f284d31..16ebcabb71 100644 --- a/client/src/features/admin/UpdateConnectedServiceButton.tsx +++ b/client/src/features/admin/UpdateConnectedServiceButton.tsx @@ -16,6 +16,7 @@ * limitations under the License. */ +import ScrollableModal from "~/components/modal/ScrollableModal"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { CheckLg, PencilSquare, XLg } from "react-bootstrap-icons"; @@ -30,9 +31,8 @@ import { ModalHeader, } from "reactstrap"; -import ScrollableModal from "~/components/modal/ScrollableModal"; -import { Loader } from "../../components/Loader"; import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; +import { Loader } from "../../components/Loader"; import { Provider, ProviderKind, diff --git a/client/src/features/admin/UpdateResourceClassButton.tsx b/client/src/features/admin/UpdateResourceClassButton.tsx index c87cb03183..b1731b9642 100644 --- a/client/src/features/admin/UpdateResourceClassButton.tsx +++ b/client/src/features/admin/UpdateResourceClassButton.tsx @@ -16,6 +16,9 @@ * limitations under the License. */ +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; +import ScrollableModal from "~/components/modal/ScrollableModal"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { CheckLg, PlusLg, TrashFill, XLg } from "react-bootstrap-icons"; @@ -31,13 +34,10 @@ import { ModalHeader, } from "reactstrap"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; -import { Loader } from "~/components/Loader"; -import ScrollableModal from "~/components/modal/ScrollableModal"; import { + usePatchResourcePoolsByResourcePoolIdClassesAndClassIdMutation, type ResourceClassWithId, type ResourcePoolWithId, - usePatchResourcePoolsByResourcePoolIdClassesAndClassIdMutation, } from "../sessionsV2/api/computeResources.api"; import { ResourceClassForm } from "./adminComputeResources.types"; diff --git a/client/src/features/admin/UpdateResourcePoolQuotaButton.tsx b/client/src/features/admin/UpdateResourcePoolQuotaButton.tsx index 5bc5f997b0..648666ce10 100644 --- a/client/src/features/admin/UpdateResourcePoolQuotaButton.tsx +++ b/client/src/features/admin/UpdateResourcePoolQuotaButton.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { CheckLg, XLg } from "react-bootstrap-icons"; @@ -31,8 +33,6 @@ import { ModalHeader, } from "reactstrap"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; -import { Loader } from "~/components/Loader"; import { usePatchResourcePoolsByResourcePoolIdMutation, type ResourcePoolWithId, diff --git a/client/src/features/admin/UpdateResourcePoolRemoteButton.tsx b/client/src/features/admin/UpdateResourcePoolRemoteButton.tsx index 249d9bbc88..2c2dc7ee0c 100644 --- a/client/src/features/admin/UpdateResourcePoolRemoteButton.tsx +++ b/client/src/features/admin/UpdateResourcePoolRemoteButton.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { RtkOrNotebooksError } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { CheckLg, XLg } from "react-bootstrap-icons"; @@ -29,8 +31,6 @@ import { ModalHeader, } from "reactstrap"; -import { RtkOrNotebooksError } from "~/components/errors/RtkErrorAlert"; -import { Loader } from "~/components/Loader"; import { usePatchResourcePoolsByResourcePoolIdMutation, type ResourcePoolWithId, diff --git a/client/src/features/admin/UpdateResourcePoolThresholdsButton.tsx b/client/src/features/admin/UpdateResourcePoolThresholdsButton.tsx index c631592ed3..5bad0f3464 100644 --- a/client/src/features/admin/UpdateResourcePoolThresholdsButton.tsx +++ b/client/src/features/admin/UpdateResourcePoolThresholdsButton.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { RtkOrNotebooksError } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { CheckLg, XLg } from "react-bootstrap-icons"; @@ -31,8 +33,6 @@ import { ModalHeader, } from "reactstrap"; -import { RtkOrNotebooksError } from "~/components/errors/RtkErrorAlert"; -import { Loader } from "~/components/Loader"; import { usePatchResourcePoolsByResourcePoolIdMutation, type ResourcePoolWithId, diff --git a/client/src/features/admin/UpdateSessionEnvironmentButton.tsx b/client/src/features/admin/UpdateSessionEnvironmentButton.tsx index 2629a78b52..f33cc21e60 100644 --- a/client/src/features/admin/UpdateSessionEnvironmentButton.tsx +++ b/client/src/features/admin/UpdateSessionEnvironmentButton.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { CheckLg, PencilSquare, XLg } from "react-bootstrap-icons"; @@ -29,8 +31,6 @@ import { ModalHeader, } from "reactstrap"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; -import { Loader } from "~/components/Loader"; import type { Environment as SessionEnvironment } from "../sessionsV2/api/sessionLaunchersV2.api"; import { usePatchEnvironmentsByEnvironmentIdMutation } from "../sessionsV2/api/sessionLaunchersV2.api"; import { safeParseJSONStringArray } from "../sessionsV2/session.utils"; diff --git a/client/src/features/admin/adminKeycloak.api.ts b/client/src/features/admin/adminKeycloak.api.ts index 5a29c21ea7..bb8ff3bfeb 100644 --- a/client/src/features/admin/adminKeycloak.api.ts +++ b/client/src/features/admin/adminKeycloak.api.ts @@ -17,6 +17,7 @@ */ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; + import { KeycloakUser, KeycloakUserQueryParams, diff --git a/client/src/features/admin/forms/ResourcePoolClusterIdInput.tsx b/client/src/features/admin/forms/ResourcePoolClusterIdInput.tsx index bcfc736a8b..b582ae0730 100644 --- a/client/src/features/admin/forms/ResourcePoolClusterIdInput.tsx +++ b/client/src/features/admin/forms/ResourcePoolClusterIdInput.tsx @@ -16,18 +16,17 @@ * limitations under the License. */ +import { ExternalLink } from "~/components/ExternalLinks"; +import { NEW_DOCS_ADMIN_OPERATIONS_REMOTE_CLUSTERS } from "~/utils/constants/NewDocs"; import cx from "classnames"; import { - type Control, Controller, + type Control, type FieldPathByValue, type FieldValues, } from "react-hook-form"; import { FormText, Input, Label } from "reactstrap"; -import { ExternalLink } from "~/components/ExternalLinks"; -import { NEW_DOCS_ADMIN_OPERATIONS_REMOTE_CLUSTERS } from "~/utils/constants/NewDocs"; - const DEFAULT_ERROR_MESSAGE = "Please provide a valid Cluster ID or leave empty."; diff --git a/client/src/features/admin/forms/ResourcePoolRemoteSection.tsx b/client/src/features/admin/forms/ResourcePoolRemoteSection.tsx index 2d6373ed2a..a7d4339fff 100644 --- a/client/src/features/admin/forms/ResourcePoolRemoteSection.tsx +++ b/client/src/features/admin/forms/ResourcePoolRemoteSection.tsx @@ -16,19 +16,19 @@ * limitations under the License. */ +import CollapseBody from "~/components/container/CollapseBody"; +import { ExternalLink } from "~/components/ExternalLinks"; +import { NEW_DOCS_ADMIN_OPERATIONS_REMOTE_SESSIONS } from "~/utils/constants/NewDocs"; import cx from "classnames"; import { - type Control, Controller, + useWatch, + type Control, type FieldPathByValue, type FieldValues, - useWatch, } from "react-hook-form"; import { Collapse, FormText, Input, Label } from "reactstrap"; -import CollapseBody from "~/components/container/CollapseBody"; -import { ExternalLink } from "~/components/ExternalLinks"; -import { NEW_DOCS_ADMIN_OPERATIONS_REMOTE_SESSIONS } from "~/utils/constants/NewDocs"; import type { RemoteConfiguration } from "../adminComputeResources.types"; const DEFAULT_REMOTE_KIND_VALUE: RemoteConfiguration["kind"] = "firecrest"; diff --git a/client/src/features/admin/useKeycloakRealm.hook.ts b/client/src/features/admin/useKeycloakRealm.hook.ts index 920c55a9ff..24f0058ba9 100644 --- a/client/src/features/admin/useKeycloakRealm.hook.ts +++ b/client/src/features/admin/useKeycloakRealm.hook.ts @@ -17,6 +17,7 @@ */ import { useContext, useMemo } from "react"; + import AppContext from "../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../utils/context/appParams.constants"; diff --git a/client/src/features/api-client-v2-compat/ApiClientV2Compat.ts b/client/src/features/api-client-v2-compat/ApiClientV2Compat.ts index 53d0c58aa8..66f240d3f9 100644 --- a/client/src/features/api-client-v2-compat/ApiClientV2Compat.ts +++ b/client/src/features/api-client-v2-compat/ApiClientV2Compat.ts @@ -16,13 +16,13 @@ * limitations under the License. */ +import { API_ERRORS, APIError } from "~/api-client/errors"; +import processPaginationHeaders from "~/api-client/pagination"; import { - RETURN_TYPES, renkuFetch, + RETURN_TYPES, type FetchOptions, } from "~/api-client/utils"; -import { API_ERRORS, APIError } from "~/api-client/errors"; -import processPaginationHeaders from "~/api-client/pagination"; /** * A compatibility layer implementation of the old APIClient supporting only the diff --git a/client/src/features/connectedServices/ConnectedServicesPage.tsx b/client/src/features/connectedServices/ConnectedServicesPage.tsx index 8a52f21a73..20a5d8aa33 100644 --- a/client/src/features/connectedServices/ConnectedServicesPage.tsx +++ b/client/src/features/connectedServices/ConnectedServicesPage.tsx @@ -40,6 +40,7 @@ import { ModalFooter, ModalHeader, } from "reactstrap"; + import { InfoAlert, WarnAlert } from "../../components/Alert"; import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import { ExternalLink } from "../../components/ExternalLinks"; diff --git a/client/src/features/connectedServices/LazyConnectedServicesPage.tsx b/client/src/features/connectedServices/LazyConnectedServicesPage.tsx index 57da26ecfb..f02c7905e5 100644 --- a/client/src/features/connectedServices/LazyConnectedServicesPage.tsx +++ b/client/src/features/connectedServices/LazyConnectedServicesPage.tsx @@ -16,7 +16,7 @@ * limitations under the License */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../../components/PageLoader"; diff --git a/client/src/features/connectedServices/api/connectedServices.api-config.ts b/client/src/features/connectedServices/api/connectedServices.api-config.ts index 7d4e76b82d..f056341168 100644 --- a/client/src/features/connectedServices/api/connectedServices.api-config.ts +++ b/client/src/features/connectedServices/api/connectedServices.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:connectedServices` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { apiFile: "./connectedServices.empty-api.ts", diff --git a/client/src/features/connectedServices/api/connectedServices.generated-api.ts b/client/src/features/connectedServices/api/connectedServices.generated-api.ts index 72677df3ef..e0c27cb3cc 100644 --- a/client/src/features/connectedServices/api/connectedServices.generated-api.ts +++ b/client/src/features/connectedServices/api/connectedServices.generated-api.ts @@ -1,4 +1,5 @@ import { connectedServicesEmptyApi as api } from "./connectedServices.empty-api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getOauth2Providers: build.query< diff --git a/client/src/features/connectedServices/api/connectedServices.types.ts b/client/src/features/connectedServices/api/connectedServices.types.ts index f3eea2ae6d..eb8c4c3c0c 100644 --- a/client/src/features/connectedServices/api/connectedServices.types.ts +++ b/client/src/features/connectedServices/api/connectedServices.types.ts @@ -20,6 +20,7 @@ import type { Pagination as BasePagination, PaginatedResponse, } from "~/utils/types/pagination.types"; + import type { AppInstallation, ProviderPost } from "./connectedServices.api"; export type Pagination = Required< diff --git a/client/src/features/connectedServices/connectedServices.utils.ts b/client/src/features/connectedServices/connectedServices.utils.ts index 3be0c433db..c9fbf663cb 100644 --- a/client/src/features/connectedServices/connectedServices.utils.ts +++ b/client/src/features/connectedServices/connectedServices.utils.ts @@ -17,6 +17,7 @@ */ import { safeNewUrl } from "~/utils/helpers/safeNewUrl.utils"; + import type { Provider } from "./api/connectedServices.api"; type GetSettingsUrlArgs = Pick; diff --git a/client/src/features/dashboard/LazyDashboard.tsx b/client/src/features/dashboard/LazyDashboard.tsx index ece9c1d113..aa0d981cee 100644 --- a/client/src/features/dashboard/LazyDashboard.tsx +++ b/client/src/features/dashboard/LazyDashboard.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const Dashboard = lazy(() => import("./Dashboard")); diff --git a/client/src/features/dashboard/components/DatasetsDashboard.tsx b/client/src/features/dashboard/components/DatasetsDashboard.tsx index bf550a7e8d..b8efb9b6e5 100644 --- a/client/src/features/dashboard/components/DatasetsDashboard.tsx +++ b/client/src/features/dashboard/components/DatasetsDashboard.tsx @@ -15,21 +15,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import cx from "classnames"; import { Fragment } from "react"; import { Search } from "react-bootstrap-icons"; import { Link } from "react-router"; -import { SortingOptions } from "../../../components/sortingEntities/SortingEntities"; -import { - SearchEntitiesQueryParams, - useSearchEntitiesQuery, -} from "../../kgSearch/KgSearchApi"; -import cx from "classnames"; +import SearchEntityIcon from "../../../components/icons/SearchEntityIcon"; import ListDisplay from "../../../components/List"; import { Loader } from "../../../components/Loader"; -import SearchEntityIcon from "../../../components/icons/SearchEntityIcon"; +import { SortingOptions } from "../../../components/sortingEntities/SortingEntities"; import { mapSearchResultToEntity } from "../../../utils/helpers/KgSearchFunctions"; import { Url } from "../../../utils/helpers/url"; +import { + SearchEntitiesQueryParams, + useSearchEntitiesQuery, +} from "../../kgSearch/KgSearchApi"; import { stateToSearchString } from "../../kgSearch/KgSearchState"; interface OtherDatasetsButtonProps { diff --git a/client/src/features/dashboard/components/InactiveKgProjects.tsx b/client/src/features/dashboard/components/InactiveKgProjects.tsx index 2bb0d77f64..ab22d68ad2 100644 --- a/client/src/features/dashboard/components/InactiveKgProjects.tsx +++ b/client/src/features/dashboard/components/InactiveKgProjects.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Link } from "react-router"; import { WarnAlert } from "../../../components/Alert"; diff --git a/client/src/features/dashboard/components/ProjectsDashboard.tsx b/client/src/features/dashboard/components/ProjectsDashboard.tsx index 85ddb329cd..3d919a9f49 100644 --- a/client/src/features/dashboard/components/ProjectsDashboard.tsx +++ b/client/src/features/dashboard/components/ProjectsDashboard.tsx @@ -26,13 +26,13 @@ import { Link } from "react-router"; import { UncontrolledTooltip } from "reactstrap"; import { InfoAlert, WarnAlert } from "../../../components/Alert"; +import { extractRkErrorMessage } from "../../../components/errors/RtkErrorAlert"; import { ExternalLink } from "../../../components/ExternalLinks"; +import SearchEntityIcon from "../../../components/icons/SearchEntityIcon"; import ListDisplay from "../../../components/List"; +import ListBarSession from "../../../components/list/ListBarSessions"; import { Loader } from "../../../components/Loader"; import { EnvironmentLogs } from "../../../components/Logs"; -import { extractRkErrorMessage } from "../../../components/errors/RtkErrorAlert"; -import SearchEntityIcon from "../../../components/icons/SearchEntityIcon"; -import ListBarSession from "../../../components/list/ListBarSessions"; import { SortingOptions } from "../../../components/sortingEntities/SortingEntities"; import { Notebook } from "../../../notebooks/components/session.types"; import { urlMap } from "../../../project/list/ProjectList.container"; diff --git a/client/src/features/dashboardV2/DashboardV2.tsx b/client/src/features/dashboardV2/DashboardV2.tsx index 34aa7cc585..2edbd5bb04 100644 --- a/client/src/features/dashboardV2/DashboardV2.tsx +++ b/client/src/features/dashboardV2/DashboardV2.tsx @@ -15,8 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License */ + import { SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; +import AppContext from "~/utils/context/appContext"; import cx from "classnames"; import { ReactNode, useContext } from "react"; import { @@ -41,7 +43,7 @@ import { ListGroup, Row, } from "reactstrap"; -import AppContext from "~/utils/context/appContext"; + import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import { Loader } from "../../components/Loader"; import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; diff --git a/client/src/features/dashboardV2/DashboardV2Sessions.tsx b/client/src/features/dashboardV2/DashboardV2Sessions.tsx index e9c796bd1d..e2cc819f32 100644 --- a/client/src/features/dashboardV2/DashboardV2Sessions.tsx +++ b/client/src/features/dashboardV2/DashboardV2Sessions.tsx @@ -19,12 +19,12 @@ import { SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError, skipToken } from "@reduxjs/toolkit/query"; import cx from "classnames"; -import { Link, generatePath } from "react-router"; +import { generatePath, Link } from "react-router"; import { Col, ListGroup, Row } from "reactstrap"; +import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import { Loader } from "../../components/Loader"; import EnvironmentLogsV2 from "../../components/LogsV2"; -import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; import { useGetProjectsByProjectIdQuery } from "../projectsV2/api/projectV2.enhanced-api"; import { useGetSessionLaunchersByLauncherIdQuery as useGetProjectSessionLauncherQuery } from "../sessionsV2/api/sessionLaunchersV2.api"; @@ -37,7 +37,6 @@ import { import { SessionList, SessionV2 } from "../sessionsV2/sessionsV2.types"; import styles from "./DashboardV2Sessions.module.scss"; - // Required for logs formatting import "../../notebooks/Notebooks.css"; diff --git a/client/src/features/dashboardV2/HelpV2.tsx b/client/src/features/dashboardV2/HelpV2.tsx index 874c1e02f5..86e859c0b8 100644 --- a/client/src/features/dashboardV2/HelpV2.tsx +++ b/client/src/features/dashboardV2/HelpV2.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License */ + import cx from "classnames"; import { useContext } from "react"; import { @@ -26,6 +27,7 @@ import { } from "react-bootstrap-icons"; import { Route, Routes } from "react-router"; import { Card, CardBody, CardHeader, Col, Nav, NavItem, Row } from "reactstrap"; + import { ExternalIconLink } from "../../components/ExternalLinks"; import RenkuNavLinkV2 from "../../components/RenkuNavLinkV2"; import HelpRelease from "../../help/HelpRelease"; diff --git a/client/src/features/dashboardV2/LazyDashboardV2.tsx b/client/src/features/dashboardV2/LazyDashboardV2.tsx index 2b94952f60..6dca1f4678 100644 --- a/client/src/features/dashboardV2/LazyDashboardV2.tsx +++ b/client/src/features/dashboardV2/LazyDashboardV2.tsx @@ -15,7 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License */ -import { Suspense, lazy } from "react"; + +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const DashboardV2 = lazy(() => import("./DashboardV2")); diff --git a/client/src/features/dashboardV2/LazyHelpV2.tsx b/client/src/features/dashboardV2/LazyHelpV2.tsx index d1f00e10a3..3917446e1c 100644 --- a/client/src/features/dashboardV2/LazyHelpV2.tsx +++ b/client/src/features/dashboardV2/LazyHelpV2.tsx @@ -15,7 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License */ -import { Suspense, lazy } from "react"; + +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const HelpV2 = lazy(() => import("./HelpV2")); diff --git a/client/src/features/dataConnectorsV2/api/data-connectors.api-config.ts b/client/src/features/dataConnectorsV2/api/data-connectors.api-config.ts index 05fc294a49..2509a9c0d0 100644 --- a/client/src/features/dataConnectorsV2/api/data-connectors.api-config.ts +++ b/client/src/features/dataConnectorsV2/api/data-connectors.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:data-connectors` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { // Configure to inject endpoints into the dataConnectorsApi diff --git a/client/src/features/dataConnectorsV2/api/data-connectors.api.ts b/client/src/features/dataConnectorsV2/api/data-connectors.api.ts index 672f4bec7b..2cb2b0fe20 100644 --- a/client/src/features/dataConnectorsV2/api/data-connectors.api.ts +++ b/client/src/features/dataConnectorsV2/api/data-connectors.api.ts @@ -1,4 +1,5 @@ import { dataConnectorsEmptyApi as api } from "./data-connectors.empty-api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getDataConnectors: build.query< diff --git a/client/src/features/dataConnectorsV2/api/doiResolver.api-config.ts b/client/src/features/dataConnectorsV2/api/doiResolver.api-config.ts index f559ccb06a..c6e661d8ee 100644 --- a/client/src/features/dataConnectorsV2/api/doiResolver.api-config.ts +++ b/client/src/features/dataConnectorsV2/api/doiResolver.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:???` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { // Configure to inject endpoints into the dataConnectorsApi diff --git a/client/src/features/dataConnectorsV2/api/doiResolver.generated-api.ts b/client/src/features/dataConnectorsV2/api/doiResolver.generated-api.ts index 58da329d28..a5428ed221 100644 --- a/client/src/features/dataConnectorsV2/api/doiResolver.generated-api.ts +++ b/client/src/features/dataConnectorsV2/api/doiResolver.generated-api.ts @@ -1,4 +1,5 @@ import { doiResolverEmptyApi as api } from "./doiResolver.empty-api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getHandlesByDoi: build.query< diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorActions.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorActions.tsx index 0d9d78bb47..97bf6e2b5a 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorActions.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorActions.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { Lock, NodeMinus, Pencil, Trash, XLg } from "react-bootstrap-icons"; @@ -36,11 +37,9 @@ import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../components/Loader"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; - import PermissionsGuard from "../../permissionsV2/PermissionsGuard"; import useProjectPermissions from "../../ProjectPageV2/utils/useProjectPermissions.hook"; import { useGetNamespacesByNamespaceProjectsAndSlugQuery } from "../../projectsV2/api/projectV2.enhanced-api"; - import type { DataConnectorRead, DataConnectorToProjectLink, @@ -51,7 +50,6 @@ import { useGetDataConnectorsByDataConnectorIdProjectLinksQuery, } from "../api/data-connectors.enhanced-api"; import useDataConnectorPermissions from "../utils/useDataConnectorPermissions.hook"; - import { getDataConnectorScope } from "./dataConnector.utils"; import DataConnectorCredentialsModal from "./DataConnectorCredentialsModal"; diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorCredentialsModal.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorCredentialsModal.tsx index ec3f186722..17066ff115 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorCredentialsModal.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorCredentialsModal.tsx @@ -18,21 +18,20 @@ import cx from "classnames"; import { useCallback, useEffect } from "react"; -import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; import { XLg } from "react-bootstrap-icons"; +import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; import { RtkErrorAlert } from "../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../components/Loader"; +import DataConnectorSecretsModal from "../../sessionsV2/DataConnectorSecretsModal"; +import type { DataConnectorRead } from "../api/data-connectors.api"; import { useDeleteDataConnectorsByDataConnectorIdSecretsMutation, usePatchDataConnectorsByDataConnectorIdSecretsMutation, } from "../api/data-connectors.enhanced-api"; -import type { DataConnectorRead } from "../api/data-connectors.api"; -import DataConnectorSecretsModal from "../../sessionsV2/DataConnectorSecretsModal"; - import useDataConnectorConfiguration, { type DataConnectorConfiguration, } from "./useDataConnectorConfiguration.hook"; -import { Loader } from "../../../components/Loader"; interface DataConnectorCredentialsModalProps { isOpen: boolean; diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorModalBody.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorModalBody.tsx index 1129853210..4271efbbfb 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorModalBody.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorModalBody.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import KeywordBadge from "~/components/keywords/KeywordBadge"; +import KeywordContainer from "~/components/keywords/KeywordContainer"; import cx from "classnames"; import { useCallback, useEffect, useState } from "react"; import { Eye, Globe, Lock, Pencil, PlusLg } from "react-bootstrap-icons"; @@ -29,10 +31,9 @@ import { Label, Row, } from "reactstrap"; -import KeywordBadge from "~/components/keywords/KeywordBadge"; -import KeywordContainer from "~/components/keywords/KeywordContainer"; -import ChevronFlippedIcon from "../../../../components/icons/ChevronFlippedIcon"; + import { ErrorAlert, WarnAlert } from "../../../../components/Alert"; +import ChevronFlippedIcon from "../../../../components/icons/ChevronFlippedIcon"; import { Loader } from "../../../../components/Loader"; import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../../../../utils/customHooks/useAppSelector.hook"; diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorModalFooter.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorModalFooter.tsx index 0ad57d3d75..0230b5cce7 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorModalFooter.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorModalFooter.tsx @@ -25,20 +25,16 @@ import { Button } from "reactstrap"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../../../../utils/customHooks/useAppSelector.hook"; - import AddStorageBreadcrumbNavbar from "../../../project/components/cloudStorage/AddStorageBreadcrumbNavbar"; import { AddCloudStorageState, CloudStorageDetailsOptions, } from "../../../project/components/cloudStorage/projectCloudStorage.types"; - import { findSensitive, hasProviderShortlist, } from "../../../project/utils/projectCloudStorage.utils"; - import type { Project } from "../../../projectsV2/api/projectV2.api"; - import type { DataConnectorRead } from "../../api/data-connectors.api"; import { useGetDataConnectorsByDataConnectorIdSecretsQuery, @@ -48,7 +44,6 @@ import { usePostDataConnectorsMutation, } from "../../api/data-connectors.enhanced-api"; import dataConnectorFormSlice from "../../state/dataConnectors.slice"; - import { dataConnectorPostFromFlattened, dataConnectorToFlattened, diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorSaveCredentialsInfo.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorSaveCredentialsInfo.tsx index c5f0810282..502635e9ed 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorSaveCredentialsInfo.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorModal/DataConnectorSaveCredentialsInfo.tsx @@ -22,7 +22,6 @@ import { Label } from "reactstrap"; import { InfoAlert } from "../../../../components/Alert"; import useAppSelector from "../../../../utils/customHooks/useAppSelector.hook"; - import { DataConnectorMountForm } from "./DataConnectorModalBody"; type DataConnectorSaveCredentialsInfoProps = { diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorModal/dataConnectorModalButtons.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorModal/dataConnectorModalButtons.tsx index 6e26050e6e..5a58358f0d 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorModal/dataConnectorModalButtons.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorModal/dataConnectorModalButtons.tsx @@ -29,21 +29,19 @@ import { import { Button, UncontrolledTooltip } from "reactstrap"; import { SuccessAlert } from "../../../../components/Alert"; -import { Loader } from "../../../../components/Loader"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../../../../utils/customHooks/useAppSelector.hook"; - import { - type PostStorageSchemaTestConnectionApiArg, usePostStorageSchemaTestConnectionMutation, + type PostStorageSchemaTestConnectionApiArg, } from "../../../project/components/cloudStorage/api/projectCloudStorage.api"; import { CLOUD_STORAGE_TOTAL_STEPS } from "../../../project/components/cloudStorage/projectCloudStorage.constants"; import { AddCloudStorageState, CloudStorageDetailsOptions, } from "../../../project/components/cloudStorage/projectCloudStorage.types"; - import dataConnectorFormSlice from "../../state/dataConnectors.slice"; interface DataConnectorModalForwardBackButtonProps {} diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorModal/index.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorModal/index.tsx index 707271f67d..4caf6c50a8 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorModal/index.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorModal/index.tsx @@ -21,6 +21,7 @@ import cx from "classnames"; import { useCallback, useEffect } from "react"; import { Database, XLg } from "react-bootstrap-icons"; import { Button, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; + import { ErrorAlert } from "../../../../components/Alert"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../../components/Loader"; @@ -42,10 +43,11 @@ import { dataConnectorToFlattened, getDataConnectorScope, } from "../dataConnector.utils"; -import styles from "./DataConnectorModal.module.scss"; import DataConnectorModalBody from "./DataConnectorModalBody"; import DataConnectorModalFooter from "./DataConnectorModalFooter"; +import styles from "./DataConnectorModal.module.scss"; + export function DataConnectorModalBodyAndFooter({ dataConnector = null, isOpen, diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorView.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorView.tsx index b31974b25f..25dd9689df 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorView.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorView.tsx @@ -17,6 +17,8 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import KeywordBadge from "~/components/keywords/KeywordBadge"; +import KeywordContainer from "~/components/keywords/KeywordContainer"; import cx from "classnames"; import { useCallback, useMemo, useRef, useState } from "react"; import { @@ -30,15 +32,14 @@ import { Pencil, PersonBadge, } from "react-bootstrap-icons"; -import { Link, generatePath } from "react-router"; +import { generatePath, Link } from "react-router"; import { Button, Offcanvas, OffcanvasBody, UncontrolledTooltip, } from "reactstrap"; -import KeywordBadge from "~/components/keywords/KeywordBadge"; -import KeywordContainer from "~/components/keywords/KeywordContainer"; + import { WarnAlert } from "../../../components/Alert"; import { Clipboard } from "../../../components/clipboard/Clipboard"; import { Loader } from "../../../components/Loader"; diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorsBox.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorsBox.tsx index 14e062d2af..8fb01f093d 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorsBox.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorsBox.tsx @@ -16,6 +16,7 @@ * limitations under the License */ +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import cx from "classnames"; import { useCallback, useEffect, useMemo, useState } from "react"; import { Database, PlusLg } from "react-bootstrap-icons"; @@ -30,10 +31,9 @@ import { ListGroupItem, } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; +import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../components/Loader"; import Pagination from "../../../components/Pagination"; -import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import useGroupPermissions from "../../groupsV2/utils/useGroupPermissions.hook"; import PermissionsGuard from "../../permissionsV2/PermissionsGuard"; import type { NamespaceKind } from "../../projectsV2/api/namespace.api"; diff --git a/client/src/features/dataConnectorsV2/components/DataConnectorsBoxListDisplay.tsx b/client/src/features/dataConnectorsV2/components/DataConnectorsBoxListDisplay.tsx index 557cb9cb3b..ddab2a5977 100644 --- a/client/src/features/dataConnectorsV2/components/DataConnectorsBoxListDisplay.tsx +++ b/client/src/features/dataConnectorsV2/components/DataConnectorsBoxListDisplay.tsx @@ -33,6 +33,7 @@ import { Row, UncontrolledTooltip, } from "reactstrap"; + import { TimeCaption } from "../../../components/TimeCaption"; import useLocationHash from "../../../utils/customHooks/useLocationHash.hook"; import UserAvatar from "../../usersV2/show/UserAvatar"; diff --git a/client/src/features/dataConnectorsV2/components/dataConnector.utils.ts b/client/src/features/dataConnectorsV2/components/dataConnector.utils.ts index 239201209c..83b730036f 100644 --- a/client/src/features/dataConnectorsV2/components/dataConnector.utils.ts +++ b/client/src/features/dataConnectorsV2/components/dataConnector.utils.ts @@ -18,6 +18,7 @@ import { skipToken } from "@reduxjs/toolkit/query"; import { useMemo } from "react"; + import type { PostStorageSchemaTestConnectionApiArg } from "../../project/components/cloudStorage/api/projectCloudStorage.api"; import { CLOUD_STORAGE_SENSITIVE_FIELD_TOKEN, diff --git a/client/src/features/dataConnectorsV2/components/useDataConnectorConfiguration.hook.ts b/client/src/features/dataConnectorsV2/components/useDataConnectorConfiguration.hook.ts index fffb537cd0..99fa4e7253 100644 --- a/client/src/features/dataConnectorsV2/components/useDataConnectorConfiguration.hook.ts +++ b/client/src/features/dataConnectorsV2/components/useDataConnectorConfiguration.hook.ts @@ -19,12 +19,11 @@ import { useMemo } from "react"; import { CLOUD_OPTIONS_OVERRIDE } from "../../project/components/cloudStorage/projectCloudStorage.constants"; +import type { SessionStartDataConnectorConfiguration } from "../../sessionsV2/startSessionOptionsV2.types"; import { RCloneOption } from "../api/data-connectors.api"; import type { DataConnectorRead } from "../api/data-connectors.api"; import { useGetDataConnectorsListSecretsQuery } from "../api/data-connectors.enhanced-api"; -import type { SessionStartDataConnectorConfiguration } from "../../sessionsV2/startSessionOptionsV2.types"; - export interface DataConnectorConfiguration extends Omit { dataConnector: DataConnectorRead; diff --git a/client/src/features/dataConnectorsV2/components/useDataConnectorProjects.hook.ts b/client/src/features/dataConnectorsV2/components/useDataConnectorProjects.hook.ts index 2fff8b54a6..ec68e3c81f 100644 --- a/client/src/features/dataConnectorsV2/components/useDataConnectorProjects.hook.ts +++ b/client/src/features/dataConnectorsV2/components/useDataConnectorProjects.hook.ts @@ -19,11 +19,10 @@ import { skipToken } from "@reduxjs/toolkit/query"; import { useMemo } from "react"; -import type { DataConnectorRead } from "../api/data-connectors.api"; -import { useGetDataConnectorsByDataConnectorIdProjectLinksQuery } from "../api/data-connectors.enhanced-api"; import { useGetProjectsByProjectIdsQuery } from "../../projectsV2/api/projectV2.enhanced-api"; - import type { SessionStartDataConnectorConfiguration } from "../../sessionsV2/startSessionOptionsV2.types"; +import type { DataConnectorRead } from "../api/data-connectors.api"; +import { useGetDataConnectorsByDataConnectorIdProjectLinksQuery } from "../api/data-connectors.enhanced-api"; export interface DataConnectorConfiguration extends Omit { diff --git a/client/src/features/dataConnectorsV2/state/dataConnectors.slice.ts b/client/src/features/dataConnectorsV2/state/dataConnectors.slice.ts index e0b6c47a33..4ef6d65797 100644 --- a/client/src/features/dataConnectorsV2/state/dataConnectors.slice.ts +++ b/client/src/features/dataConnectorsV2/state/dataConnectors.slice.ts @@ -19,6 +19,7 @@ import { createSlice, PayloadAction, SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; +import { EMPTY_CLOUD_STORAGE_STATE } from "../../project/components/cloudStorage/projectCloudStorage.constants"; import { AddCloudStorageState, CloudStorageSchema, @@ -27,13 +28,11 @@ import { getSchemaProviders, hasProviderShortlist, } from "../../project/utils/projectCloudStorage.utils"; - -import { EMPTY_CLOUD_STORAGE_STATE } from "../../project/components/cloudStorage/projectCloudStorage.constants"; -import type { AuxiliaryCommandStatus } from "../components/DataConnectorModal/DataConnectorModalResult"; import { EMPTY_DATA_CONNECTOR_FLAT, type DataConnectorFlat, } from "../components/dataConnector.utils"; +import type { AuxiliaryCommandStatus } from "../components/DataConnectorModal/DataConnectorModalResult"; interface BackendResult { isSuccess: boolean | undefined; diff --git a/client/src/features/dataConnectorsV2/utils/useDataConnectorPermissions.hook.ts b/client/src/features/dataConnectorsV2/utils/useDataConnectorPermissions.hook.ts index 7982ed7d63..d01f1e9bea 100644 --- a/client/src/features/dataConnectorsV2/utils/useDataConnectorPermissions.hook.ts +++ b/client/src/features/dataConnectorsV2/utils/useDataConnectorPermissions.hook.ts @@ -17,14 +17,14 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import { useEffect } from "react"; import { DEFAULT_PERMISSIONS } from "../../permissionsV2/permissions.constants"; import type { Permissions } from "../../permissionsV2/permissions.types"; import { - useGetDataConnectorsByDataConnectorIdPermissionsQuery, dataConnectorsApi, + useGetDataConnectorsByDataConnectorIdPermissionsQuery, } from "../api/data-connectors.enhanced-api"; -import { useEffect } from "react"; interface UseDataConnectorPermissionsArgs { dataConnectorId: string; diff --git a/client/src/features/datasets/datasetsCore.api.ts b/client/src/features/datasets/datasetsCore.api.ts index 71a1d445fc..d76c2c5e46 100644 --- a/client/src/features/datasets/datasetsCore.api.ts +++ b/client/src/features/datasets/datasetsCore.api.ts @@ -17,6 +17,7 @@ */ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; + import { versionedPathForEndpoint } from "../../utils/helpers/url/versionedUrls"; import { AddFiles, diff --git a/client/src/features/display/displaySlice.ts b/client/src/features/display/displaySlice.ts index aa98b9c9fc..418e63adb6 100644 --- a/client/src/features/display/displaySlice.ts +++ b/client/src/features/display/displaySlice.ts @@ -17,6 +17,7 @@ */ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; + import { Display, FaviconStatus, diff --git a/client/src/features/favicon/Favicon.tsx b/client/src/features/favicon/Favicon.tsx index e5a584a06e..819a07b341 100644 --- a/client/src/features/favicon/Favicon.tsx +++ b/client/src/features/favicon/Favicon.tsx @@ -17,6 +17,7 @@ */ import { useEffect } from "react"; + import useAppSelector from "../../utils/customHooks/useAppSelector.hook"; import { FAVICON_BY_SESSION_STATUS } from "../sessionsV2/session.constants"; diff --git a/client/src/features/groupsV2/LazyGroupContainer.tsx b/client/src/features/groupsV2/LazyGroupContainer.tsx index 3695915749..25c99683cd 100644 --- a/client/src/features/groupsV2/LazyGroupContainer.tsx +++ b/client/src/features/groupsV2/LazyGroupContainer.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const GroupV2Container = lazy(() => import("./show/GroupPageContainer")); diff --git a/client/src/features/groupsV2/LazyGroupV2Overview.tsx b/client/src/features/groupsV2/LazyGroupV2Overview.tsx index 0f2adabcb2..561be61c16 100644 --- a/client/src/features/groupsV2/LazyGroupV2Overview.tsx +++ b/client/src/features/groupsV2/LazyGroupV2Overview.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const GroupV2Overview = lazy(() => import("./show/GroupV2Show")); diff --git a/client/src/features/groupsV2/LazyGroupV2Search.tsx b/client/src/features/groupsV2/LazyGroupV2Search.tsx index 8745b3c5a9..29abf7ddbc 100644 --- a/client/src/features/groupsV2/LazyGroupV2Search.tsx +++ b/client/src/features/groupsV2/LazyGroupV2Search.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const GroupV2Search = lazy(() => import("./search/GroupV2Search")); diff --git a/client/src/features/groupsV2/LazyGroupV2Settings.tsx b/client/src/features/groupsV2/LazyGroupV2Settings.tsx index 38eb389994..7d4320267c 100644 --- a/client/src/features/groupsV2/LazyGroupV2Settings.tsx +++ b/client/src/features/groupsV2/LazyGroupV2Settings.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const GroupV2Settings = lazy(() => import("./settings/GroupV2Settings")); diff --git a/client/src/features/groupsV2/members/GroupV2MemberListDisplay.tsx b/client/src/features/groupsV2/members/GroupV2MemberListDisplay.tsx index bbf1db1bcb..fdc490c77b 100644 --- a/client/src/features/groupsV2/members/GroupV2MemberListDisplay.tsx +++ b/client/src/features/groupsV2/members/GroupV2MemberListDisplay.tsx @@ -20,11 +20,11 @@ import cx from "classnames"; import { capitalize } from "lodash-es"; import { useMemo } from "react"; import { People } from "react-bootstrap-icons"; -import { Link, generatePath } from "react-router"; +import { generatePath, Link } from "react-router"; import { Badge } from "reactstrap"; -import { Loader } from "../../../components/Loader"; import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../components/Loader"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import { toSortedMembers } from "../../ProjectPageV2/utils/roleUtils"; import type { ProjectMemberResponse } from "../../projectsV2/api/projectV2.api"; diff --git a/client/src/features/groupsV2/new/GroupNew.tsx b/client/src/features/groupsV2/new/GroupNew.tsx index 5b61f15c2f..5dbdc0efaa 100644 --- a/client/src/features/groupsV2/new/GroupNew.tsx +++ b/client/src/features/groupsV2/new/GroupNew.tsx @@ -16,6 +16,7 @@ * limitations under the License. */ +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import cx from "classnames"; import { useCallback, useEffect } from "react"; import { CheckLg, People, XLg } from "react-bootstrap-icons"; @@ -23,7 +24,6 @@ import { useForm } from "react-hook-form"; import { generatePath, useNavigate } from "react-router"; import { Button, Form, FormGroup, ModalBody, ModalFooter } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../components/Loader"; import LoginAlert from "../../../components/loginAlert/LoginAlert"; diff --git a/client/src/features/groupsV2/search/GroupSearchBar.tsx b/client/src/features/groupsV2/search/GroupSearchBar.tsx index b0b6b03b38..babbcc2c13 100644 --- a/client/src/features/groupsV2/search/GroupSearchBar.tsx +++ b/client/src/features/groupsV2/search/GroupSearchBar.tsx @@ -22,6 +22,7 @@ import { Search, XCircleFill } from "react-bootstrap-icons"; import { Controller, useForm } from "react-hook-form"; import { useSearchParams } from "react-router"; import { Button, Form, InputGroup } from "reactstrap"; + import { useGroupSearch } from "./groupSearch.hook"; import { FILTER_PAGE, FILTER_QUERY } from "./groupsSearch.constants"; diff --git a/client/src/features/groupsV2/search/GroupSearchFilters.tsx b/client/src/features/groupsV2/search/GroupSearchFilters.tsx index 9467383c0c..a3881a3b80 100644 --- a/client/src/features/groupsV2/search/GroupSearchFilters.tsx +++ b/client/src/features/groupsV2/search/GroupSearchFilters.tsx @@ -16,6 +16,9 @@ * limitations under the License. */ +import KeywordBadge from "~/components/keywords/KeywordBadge"; +import { useGetGroupsByGroupSlugMembersQuery } from "~/features/projectsV2/api/namespace.api"; +import UserAvatar from "~/features/usersV2/show/UserAvatar"; import cx from "classnames"; import { useCallback, useMemo, useState } from "react"; import { XCircleFill } from "react-bootstrap-icons"; @@ -32,9 +35,7 @@ import { Row, UncontrolledAccordion, } from "reactstrap"; -import KeywordBadge from "~/components/keywords/KeywordBadge"; -import { useGetGroupsByGroupSlugMembersQuery } from "~/features/projectsV2/api/namespace.api"; -import UserAvatar from "~/features/usersV2/show/UserAvatar"; + import { useGroup } from "../show/GroupPageContainer"; import { useGroupSearch } from "./groupSearch.hook"; import { Filter, GroupSearchEntity } from "./groupSearch.types"; diff --git a/client/src/features/groupsV2/search/GroupSearchResultRecap.tsx b/client/src/features/groupsV2/search/GroupSearchResultRecap.tsx index 22e701d1e1..3973330328 100644 --- a/client/src/features/groupsV2/search/GroupSearchResultRecap.tsx +++ b/client/src/features/groupsV2/search/GroupSearchResultRecap.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { useSearchParams } from "react-router"; + import { useGroupSearch } from "./groupSearch.hook"; import { getQueryHumanReadable } from "./groupSearch.utils"; import { FILTER_QUERY } from "./groupsSearch.constants"; diff --git a/client/src/features/groupsV2/search/GroupSearchResults.tsx b/client/src/features/groupsV2/search/GroupSearchResults.tsx index 5021a37c13..c29eaba88b 100644 --- a/client/src/features/groupsV2/search/GroupSearchResults.tsx +++ b/client/src/features/groupsV2/search/GroupSearchResults.tsx @@ -16,6 +16,13 @@ * limitations under the License. */ +import KeywordBadge from "~/components/keywords/KeywordBadge"; +import KeywordContainer from "~/components/keywords/KeywordContainer"; +import Pagination from "~/components/Pagination"; +import { TimeCaption } from "~/components/TimeCaption"; +import { ShowGlobalDataConnector } from "~/features/searchV2/components/SearchV2Results"; +import UserAvatar from "~/features/usersV2/show/UserAvatar"; +import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; import cx from "classnames"; import { useMemo } from "react"; import { @@ -29,13 +36,7 @@ import { } from "react-bootstrap-icons"; import { generatePath, Link, useSearchParams } from "react-router"; import { Col, ListGroup, Row } from "reactstrap"; -import Pagination from "~/components/Pagination"; -import { TimeCaption } from "~/components/TimeCaption"; -import KeywordBadge from "~/components/keywords/KeywordBadge"; -import KeywordContainer from "~/components/keywords/KeywordContainer"; -import { ShowGlobalDataConnector } from "~/features/searchV2/components/SearchV2Results"; -import UserAvatar from "~/features/usersV2/show/UserAvatar"; -import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; + import { useGroupSearch } from "./groupSearch.hook"; import { GroupSearchEntity } from "./groupSearch.types"; import { useGroupSearchResultMembers } from "./groupSearchResultMembers.hook"; diff --git a/client/src/features/groupsV2/search/GroupV2Search.tsx b/client/src/features/groupsV2/search/GroupV2Search.tsx index 29ec8c0361..4e212e3851 100644 --- a/client/src/features/groupsV2/search/GroupV2Search.tsx +++ b/client/src/features/groupsV2/search/GroupV2Search.tsx @@ -19,6 +19,7 @@ import cx from "classnames"; import { Navigate, useSearchParams } from "react-router"; import { Col, Row } from "reactstrap"; + import { getSearchQueryMissingFilters } from "./groupSearch.utils"; import GroupSearchBar from "./GroupSearchBar"; import GroupSearchFilters from "./GroupSearchFilters"; diff --git a/client/src/features/groupsV2/search/groupSearch.hook.ts b/client/src/features/groupsV2/search/groupSearch.hook.ts index 9c6ae82b5d..21417c8dbc 100644 --- a/client/src/features/groupsV2/search/groupSearch.hook.ts +++ b/client/src/features/groupsV2/search/groupSearch.hook.ts @@ -16,9 +16,10 @@ * limitations under the License. */ +import { useGetSearchQueryQuery } from "~/features/searchV2/api/searchV2Api.api"; import { useMemo } from "react"; import { useSearchParams } from "react-router"; -import { useGetSearchQueryQuery } from "~/features/searchV2/api/searchV2Api.api"; + import { useGroup } from "../show/GroupPageContainer"; import { generateQueryParams } from "./groupSearch.utils"; import { SEARCH_DEBOUNCE_SECONDS } from "./groupsSearch.constants"; diff --git a/client/src/features/groupsV2/search/groupSearch.types.ts b/client/src/features/groupsV2/search/groupSearch.types.ts index 54491ee3bc..1a565781e4 100644 --- a/client/src/features/groupsV2/search/groupSearch.types.ts +++ b/client/src/features/groupsV2/search/groupSearch.types.ts @@ -16,9 +16,8 @@ * limitations under the License. */ -import { ReactNode } from "react"; - import type { SearchEntity } from "~/features/searchV2/api/searchV2Api.api"; +import { ReactNode } from "react"; export type GroupSearchEntity = Exclude< SearchEntity, diff --git a/client/src/features/groupsV2/search/groupSearch.utils.tsx b/client/src/features/groupsV2/search/groupSearch.utils.tsx index 579d031b2a..9d418719f2 100644 --- a/client/src/features/groupsV2/search/groupSearch.utils.tsx +++ b/client/src/features/groupsV2/search/groupSearch.utils.tsx @@ -16,8 +16,9 @@ * limitations under the License. */ -import { ReactNode } from "react"; import type { SearchQuery } from "~/features/searchV2/api/searchV2Api.api"; +import { ReactNode } from "react"; + import { KEY_VALUE_SEPARATOR, TERM_SEPARATOR, diff --git a/client/src/features/groupsV2/search/groupSearchResultMembers.hook.ts b/client/src/features/groupsV2/search/groupSearchResultMembers.hook.ts index b773afb31a..fd0c833037 100644 --- a/client/src/features/groupsV2/search/groupSearchResultMembers.hook.ts +++ b/client/src/features/groupsV2/search/groupSearchResultMembers.hook.ts @@ -18,6 +18,7 @@ import { skipToken } from "@reduxjs/toolkit/query"; import { useGetProjectsByProjectIdMembersQuery } from "~/features/projectsV2/api/projectV2.api"; + import { GroupSearchEntity } from "./groupSearch.types"; export function useGroupSearchResultMembers(item: GroupSearchEntity) { diff --git a/client/src/features/groupsV2/search/groupsSearch.constants.tsx b/client/src/features/groupsV2/search/groupsSearch.constants.tsx index dc18152887..c1fbefafbf 100644 --- a/client/src/features/groupsV2/search/groupsSearch.constants.tsx +++ b/client/src/features/groupsV2/search/groupsSearch.constants.tsx @@ -27,6 +27,7 @@ import { People, Tag, } from "react-bootstrap-icons"; + import { EnumFilter, Filter, diff --git a/client/src/features/groupsV2/settings/GroupSettingsMembers.tsx b/client/src/features/groupsV2/settings/GroupSettingsMembers.tsx index 03d876b665..0dba9ffb16 100644 --- a/client/src/features/groupsV2/settings/GroupSettingsMembers.tsx +++ b/client/src/features/groupsV2/settings/GroupSettingsMembers.tsx @@ -17,6 +17,7 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import cx from "classnames"; import { capitalize } from "lodash-es"; import { ReactNode, useCallback, useMemo, useRef, useState } from "react"; @@ -31,7 +32,6 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import { ButtonWithMenuV2 } from "../../../components/buttons/Button"; import { Loader } from "../../../components/Loader"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; diff --git a/client/src/features/groupsV2/settings/GroupSettingsMetadata.tsx b/client/src/features/groupsV2/settings/GroupSettingsMetadata.tsx index adf6fec097..3c90fdd900 100644 --- a/client/src/features/groupsV2/settings/GroupSettingsMetadata.tsx +++ b/client/src/features/groupsV2/settings/GroupSettingsMetadata.tsx @@ -31,6 +31,7 @@ import { ModalFooter, ModalHeader, } from "reactstrap"; + import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../components/Loader"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; diff --git a/client/src/features/groupsV2/show/GroupV2Information.tsx b/client/src/features/groupsV2/show/GroupV2Information.tsx index 13ad945e83..a11cf47b3b 100644 --- a/client/src/features/groupsV2/show/GroupV2Information.tsx +++ b/client/src/features/groupsV2/show/GroupV2Information.tsx @@ -19,6 +19,7 @@ import cx from "classnames"; import { Clock, InfoCircle, JournalAlbum } from "react-bootstrap-icons"; import { Card, CardBody, CardHeader } from "reactstrap"; + import { TimeCaption } from "../../../components/TimeCaption"; import GroupV2MemberListDisplay from "../members/GroupV2MemberListDisplay"; import { useGroup } from "./GroupPageContainer"; diff --git a/client/src/features/groupsV2/show/GroupV2Show.tsx b/client/src/features/groupsV2/show/GroupV2Show.tsx index 75670295cb..465e0e0cc3 100644 --- a/client/src/features/groupsV2/show/GroupV2Show.tsx +++ b/client/src/features/groupsV2/show/GroupV2Show.tsx @@ -16,9 +16,10 @@ * limitations under the License. */ +import { RELATIVE_ROUTES } from "~/routing/routes.constants"; import { Link } from "react-router"; import { Col, Row } from "reactstrap"; -import { RELATIVE_ROUTES } from "~/routing/routes.constants"; + import DataConnectorsBox from "../../dataConnectorsV2/components/DataConnectorsBox"; import ProjectV2ListDisplay from "../../projectsV2/list/ProjectV2ListDisplay"; import { useGroup } from "./GroupPageContainer"; diff --git a/client/src/features/inactiveKgProjects/InactiveKgProjects.tsx b/client/src/features/inactiveKgProjects/InactiveKgProjects.tsx index 7b3f7f6544..93dbb5c45c 100644 --- a/client/src/features/inactiveKgProjects/InactiveKgProjects.tsx +++ b/client/src/features/inactiveKgProjects/InactiveKgProjects.tsx @@ -23,9 +23,9 @@ import { Button, Table } from "reactstrap"; import { Loader } from "../../components/Loader"; import AppContext from "../../utils/context/appContext"; -import useGetInactiveProjects from "../../utils/customHooks/UseGetInactiveProjects"; import useAppDispatch from "../../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../../utils/customHooks/useAppSelector.hook"; +import useGetInactiveProjects from "../../utils/customHooks/UseGetInactiveProjects"; import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook"; import { sendPullKgActivationStatus } from "../../websocket/WsMessages"; import { useActivateIndexingMutation } from "../project/projectKg.api"; diff --git a/client/src/features/inactiveKgProjects/InactiveKgProjectsApi.ts b/client/src/features/inactiveKgProjects/InactiveKgProjectsApi.ts index 8617954547..e958853b27 100644 --- a/client/src/features/inactiveKgProjects/InactiveKgProjectsApi.ts +++ b/client/src/features/inactiveKgProjects/InactiveKgProjectsApi.ts @@ -15,7 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; + import type { InactiveKgProjects } from "./inactiveKgProjects.types"; export enum ActivationStatusProgressError { diff --git a/client/src/features/inactiveKgProjects/LazyInactiveKGProjectsPage.tsx b/client/src/features/inactiveKgProjects/LazyInactiveKGProjectsPage.tsx index d3286134e6..f02f33d596 100644 --- a/client/src/features/inactiveKgProjects/LazyInactiveKGProjectsPage.tsx +++ b/client/src/features/inactiveKgProjects/LazyInactiveKGProjectsPage.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const InactiveKGProjectsPage = lazy(() => import("./InactiveKgProjects")); diff --git a/client/src/features/inactiveKgProjects/inactiveKgProjectsSlice.ts b/client/src/features/inactiveKgProjects/inactiveKgProjectsSlice.ts index 6bcb3a4fc0..0e972f9df7 100644 --- a/client/src/features/inactiveKgProjects/inactiveKgProjectsSlice.ts +++ b/client/src/features/inactiveKgProjects/inactiveKgProjectsSlice.ts @@ -17,6 +17,7 @@ */ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; + import type { InactiveKgProjects } from "./inactiveKgProjects.types"; import { ActivationStatusProgressError } from "./InactiveKgProjectsApi"; diff --git a/client/src/features/kgSearch/KgSearch.types.ts b/client/src/features/kgSearch/KgSearch.types.ts index e277350374..dbb14c02d9 100644 --- a/client/src/features/kgSearch/KgSearch.types.ts +++ b/client/src/features/kgSearch/KgSearch.types.ts @@ -23,8 +23,8 @@ import { UserRoles } from "../../components/userRolesFilter/userRolesFilter.type import { Visibilities } from "../../components/visibility/Visibility"; import { VisibilitiesFilter } from "../../components/visibilityFilter/VisibilityFilter"; import { - AbstractKgPaginatedResponse, AbstractKgPaginatedQueryArgs, + AbstractKgPaginatedResponse, } from "../../utils/types/pagination.types"; export interface KgSearchResultLink { diff --git a/client/src/features/kgSearch/KgSearchApi.ts b/client/src/features/kgSearch/KgSearchApi.ts index 3542958518..21e5f87af9 100644 --- a/client/src/features/kgSearch/KgSearchApi.ts +++ b/client/src/features/kgSearch/KgSearchApi.ts @@ -27,7 +27,6 @@ import { TypeEntitySelection } from "../../components/typeEntityFilter/TypeEntit import type { UserRoles } from "../../components/userRolesFilter/userRolesFilter.types"; import { VisibilitiesFilter } from "../../components/visibilityFilter/VisibilityFilter"; import { processPaginationHeaders } from "../../utils/helpers/kgPagination.utils"; - import type { KgSearchResult, ListResponse } from "./KgSearch.types"; export type SearchEntitiesQueryParams = { diff --git a/client/src/features/kgSearch/KgSearchContext.tsx b/client/src/features/kgSearch/KgSearchContext.tsx index ff8b6a6323..57626db04d 100644 --- a/client/src/features/kgSearch/KgSearchContext.tsx +++ b/client/src/features/kgSearch/KgSearchContext.tsx @@ -17,13 +17,14 @@ */ import { - ReactNode, createContext, + ReactNode, useCallback, useContext, useMemo, } from "react"; import { useLocation, useNavigate } from "react-router"; + import { DateFilterTypes, DatesFilter, diff --git a/client/src/features/kgSearch/KgSearchState.ts b/client/src/features/kgSearch/KgSearchState.ts index 5670022a20..acd4cfc542 100644 --- a/client/src/features/kgSearch/KgSearchState.ts +++ b/client/src/features/kgSearch/KgSearchState.ts @@ -26,14 +26,14 @@ import { stringToSortingOption, } from "../../components/sortingEntities/SortingEntities"; import { - TypeEntitySelection, arrayToTypeEntitySelection, + TypeEntitySelection, } from "../../components/typeEntityFilter/TypeEntityFilter"; import { arrayToUserRolesFilter } from "../../components/userRolesFilter/userRoles.utils"; import { UserRoles } from "../../components/userRolesFilter/userRolesFilter.types"; import { - VisibilitiesFilter, arrayToVisibilitiesFilter, + VisibilitiesFilter, } from "../../components/visibilityFilter/VisibilityFilter"; import { KgSearchState } from "./KgSearch.types"; diff --git a/client/src/features/kgSearch/LazySearchPage.tsx b/client/src/features/kgSearch/LazySearchPage.tsx index 54fb371c97..24737b4445 100644 --- a/client/src/features/kgSearch/LazySearchPage.tsx +++ b/client/src/features/kgSearch/LazySearchPage.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const SearchPage = lazy(() => import("./KgSearchPage")); diff --git a/client/src/features/kgSearch/index.ts b/client/src/features/kgSearch/index.ts index 081c4e8d50..0ccd755a85 100644 --- a/client/src/features/kgSearch/index.ts +++ b/client/src/features/kgSearch/index.ts @@ -1,9 +1,9 @@ -import { kgSearchApi } from "./KgSearchApi"; import { EntityType, - KgSearchResultLink, KgSearchResult, + KgSearchResultLink, } from "./KgSearch.types"; +import { kgSearchApi } from "./KgSearchApi"; import { stateToSearchString } from "./KgSearchState"; export { kgSearchApi, EntityType, stateToSearchString }; diff --git a/client/src/features/landing/AnonymousHome.tsx b/client/src/features/landing/AnonymousHome.tsx index 178d04514e..b1b6c2ce7a 100644 --- a/client/src/features/landing/AnonymousHome.tsx +++ b/client/src/features/landing/AnonymousHome.tsx @@ -31,30 +31,28 @@ import { useNavigate } from "react-router"; import { Col, Row } from "reactstrap"; import LazyRenkuMarkdown from "../../components/markdown/LazyRenkuMarkdown"; -import { stateToSearchString } from "../kgSearch"; import AppContext from "../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../utils/context/appParams.constants"; import { Url } from "../../utils/helpers/url"; -import { RenkuBenefits } from "./components/Benefits/Benefits"; -import { Introduction } from "./components/Introduction/Introduction"; - -import { NavBarWarnings } from "./components/NavBar/NavBarWarnings"; - +import { stateToSearchString } from "../kgSearch"; +import type { AnonymousHomeConfig } from "./anonymousHome.types"; import VisualHead from "./assets/Visual_Head.svg"; - +import { BottomNav, TopNav } from "./components/anonymousHomeNav"; +import { RenkuBenefits } from "./components/Benefits/Benefits"; import DividerLandingPage from "./components/Dividier/Divider"; import HeroLanding from "./components/HeroLanding/HeroLanding"; +import { Introduction } from "./components/Introduction/Introduction"; +import { NavBarWarnings } from "./components/NavBar/NavBarWarnings"; import { ResourcesAndSupport } from "./components/ResourcesSupport/ResourcesAndSupport"; import WhatIsRenku from "./components/WhatIsRenku/WhatIsRenku"; import WhoWeAre from "./components/WhoWeAre/WhoWeAre"; -import type { AnonymousHomeConfig } from "./anonymousHome.types"; -import { BottomNav, TopNav } from "./components/anonymousHomeNav"; // ? react-autosuggest styles are defined there q_q // ? also, the order of import matters here q_q import "../../project/Project.style.css"; // ? the "quick-nav" class is used in this file import "../../components/quicknav/QuickNav.style.css"; + import { GetStarted } from "./components/GetStarted/GetStarted"; import { RenkuUsers } from "./components/RenkuUsers/RenkuUsers"; diff --git a/client/src/features/landing/LazyAnonymousHome.tsx b/client/src/features/landing/LazyAnonymousHome.tsx index 236b2e2d1a..80acec3ac5 100644 --- a/client/src/features/landing/LazyAnonymousHome.tsx +++ b/client/src/features/landing/LazyAnonymousHome.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../../components/PageLoader"; diff --git a/client/src/features/landing/components/AdminDropdownItem.tsx b/client/src/features/landing/components/AdminDropdownItem.tsx index e85d5a3946..19f1e3725f 100644 --- a/client/src/features/landing/components/AdminDropdownItem.tsx +++ b/client/src/features/landing/components/AdminDropdownItem.tsx @@ -16,10 +16,10 @@ * limitations under the License. */ +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import { Link } from "react-router"; import { DropdownItem } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; export default function AdminDropdownItem() { diff --git a/client/src/features/landing/components/Benefits/Benefits.tsx b/client/src/features/landing/components/Benefits/Benefits.tsx index 8ec250f0c5..dea8f8f73f 100644 --- a/client/src/features/landing/components/Benefits/Benefits.tsx +++ b/client/src/features/landing/components/Benefits/Benefits.tsx @@ -19,9 +19,11 @@ import cx from "classnames"; import { ReactNode } from "react"; import { Card, Col, Row } from "reactstrap"; + +import communityIcon from "../../assets/communityIcon.svg"; import individualsIcon from "../../assets/individualsIcon.svg"; import teamsIcon from "../../assets/teamsIcon.svg"; -import communityIcon from "../../assets/communityIcon.svg"; + import styles from "./Benefits.module.scss"; interface BenefitsProps { diff --git a/client/src/features/landing/components/Dividier/Divider.tsx b/client/src/features/landing/components/Dividier/Divider.tsx index b5ab3ce630..1464f88f75 100644 --- a/client/src/features/landing/components/Dividier/Divider.tsx +++ b/client/src/features/landing/components/Dividier/Divider.tsx @@ -17,6 +17,7 @@ */ import cx from "classnames"; + import styles from "./Divider.module.css"; export default function DividerLandingPage() { diff --git a/client/src/features/landing/components/GetStarted/GetStarted.tsx b/client/src/features/landing/components/GetStarted/GetStarted.tsx index 9b9fe9878f..cf491069d3 100644 --- a/client/src/features/landing/components/GetStarted/GetStarted.tsx +++ b/client/src/features/landing/components/GetStarted/GetStarted.tsx @@ -18,10 +18,12 @@ import cx from "classnames"; import { Col, Container, Row } from "reactstrap"; + import { useLoginUrl } from "../../../../authentication/useLoginUrl.hook"; import { ExternalLink } from "../../../../components/ExternalLinks"; import { RenkuContactEmail } from "../../../../utils/constants/Docs.js"; import getStartedGraphic from "../../assets/getStarted.svg"; + import styles from "./GetStarted.module.scss"; export function GetStarted() { diff --git a/client/src/features/landing/components/HeroLanding/HeroLanding.tsx b/client/src/features/landing/components/HeroLanding/HeroLanding.tsx index f10c51f75b..9af1b2c349 100644 --- a/client/src/features/landing/components/HeroLanding/HeroLanding.tsx +++ b/client/src/features/landing/components/HeroLanding/HeroLanding.tsx @@ -4,8 +4,8 @@ import { Col, Row } from "reactstrap"; import { useLoginUrl } from "../../../../authentication/useLoginUrl.hook"; import { HomeHeader } from "../../AnonymousHome"; -import heroGraphic from "../../assets/heroBoxes.svg"; import { AnonymousHomeConfig } from "../../anonymousHome.types"; +import heroGraphic from "../../assets/heroBoxes.svg"; import { useCustomHomePageProjectUrl } from "../../hooks/useCustomHomePageProjectUrl.hook"; export default function HeroLanding(props: AnonymousHomeConfig) { diff --git a/client/src/features/landing/components/Introduction/Introduction.tsx b/client/src/features/landing/components/Introduction/Introduction.tsx index af460d4172..9d3f6b2679 100644 --- a/client/src/features/landing/components/Introduction/Introduction.tsx +++ b/client/src/features/landing/components/Introduction/Introduction.tsx @@ -19,10 +19,12 @@ import cx from "classnames"; import { Link } from "react-router"; import { Col, Container, Row } from "reactstrap"; + import { Links } from "../../../../utils/constants/Docs.js"; import connectIcon from "../../assets/connectIcon.svg"; import puzzleIcon from "../../assets/puzzleIcon.svg"; import { useCustomHomePageProjectUrl } from "../../hooks/useCustomHomePageProjectUrl.hook"; + import styles from "./Introduction.module.scss"; export function Introduction() { diff --git a/client/src/features/landing/components/NavBar/NavBar.jsx b/client/src/features/landing/components/NavBar/NavBar.jsx index 87fa421889..b68f01b8e2 100644 --- a/client/src/features/landing/components/NavBar/NavBar.jsx +++ b/client/src/features/landing/components/NavBar/NavBar.jsx @@ -26,6 +26,7 @@ import cx from "classnames"; import { useContext } from "react"; import { Link, Route, Routes, useLocation } from "react-router"; + import { ExternalDocsLink } from "../../../../components/ExternalLinks"; import AnonymousNavBar from "../../../../components/navbar/AnonymousNavBar"; import LoggedInNavBar from "../../../../components/navbar/LoggedInNavBar"; @@ -33,12 +34,11 @@ import { RENKU_LOGO } from "../../../../components/navbar/navbar.constants"; import RenkuNavLinkV2 from "../../../../components/RenkuNavLinkV2"; import { parseChartVersion } from "../../../../help/release.utils"; import { ABSOLUTE_ROUTES } from "../../../../routing/routes.constants"; -import AppContext from "../../../../utils/context/appContext"; import { Links } from "../../../../utils/constants/Docs"; -import useLegacySelector from "../../../rootV2/NavbarV2"; +import AppContext from "../../../../utils/context/appContext"; import { isRenkuLegacy } from "../../../../utils/helpers/HelperFunctionsV2"; import { Url } from "../../../../utils/helpers/url"; - +import useLegacySelector from "../../../rootV2/NavbarV2"; import NavbarV2 from "../../../rootV2/NavbarV2"; import "./NavBar.css"; diff --git a/client/src/features/landing/components/NavBar/NavBarWarnings.jsx b/client/src/features/landing/components/NavBar/NavBarWarnings.jsx index 840dd2e1f5..0edb28887e 100644 --- a/client/src/features/landing/components/NavBar/NavBarWarnings.jsx +++ b/client/src/features/landing/components/NavBar/NavBarWarnings.jsx @@ -23,10 +23,11 @@ * Container and presentationl components for NavBar warnings */ +import { faSyncAlt } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { connect } from "react-redux"; import { Button } from "reactstrap"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faSyncAlt } from "@fortawesome/free-solid-svg-icons"; + import { WarnAlert } from "../../../../components/Alert"; /** diff --git a/client/src/features/landing/components/RenkuUsers/RenkuUsers.tsx b/client/src/features/landing/components/RenkuUsers/RenkuUsers.tsx index 08a7e85ce7..8e79b96742 100644 --- a/client/src/features/landing/components/RenkuUsers/RenkuUsers.tsx +++ b/client/src/features/landing/components/RenkuUsers/RenkuUsers.tsx @@ -19,6 +19,7 @@ import cx from "classnames"; import { ReactNode } from "react"; import { Card, Col, Row } from "reactstrap"; + import { Links } from "../../../../utils/constants/Docs.js"; import educatorIcon from "../../assets/educatorIcon.svg"; import organizerIcon from "../../assets/organizerIcon.svg"; diff --git a/client/src/features/landing/components/ResourcesSupport/ResourcesAndSupport.tsx b/client/src/features/landing/components/ResourcesSupport/ResourcesAndSupport.tsx index 63b6a8e3e9..085aa37750 100644 --- a/client/src/features/landing/components/ResourcesSupport/ResourcesAndSupport.tsx +++ b/client/src/features/landing/components/ResourcesSupport/ResourcesAndSupport.tsx @@ -19,9 +19,11 @@ import cx from "classnames"; import { CodeSquare, InfoCircle } from "react-bootstrap-icons"; import { Col, Container, Row } from "reactstrap"; + +import { Links } from "../../../../utils/constants/Docs.js"; import { FooterDashboardCard } from "../../../dashboardV2/DashboardV2.js"; import renkuBlackIcon from "../../assets/renkuBlack.svg"; -import { Links } from "../../../../utils/constants/Docs.js"; + import styles from "./Resources.module.scss"; export function ResourcesAndSupport() { diff --git a/client/src/features/landing/components/TemplateSlider/TemplateSlider.tsx b/client/src/features/landing/components/TemplateSlider/TemplateSlider.tsx index f0e726274b..a70d9e06c3 100644 --- a/client/src/features/landing/components/TemplateSlider/TemplateSlider.tsx +++ b/client/src/features/landing/components/TemplateSlider/TemplateSlider.tsx @@ -22,15 +22,15 @@ import { DateTime, Duration } from "luxon"; import { useCallback, useEffect, useRef, useState } from "react"; import { Button } from "reactstrap"; -import btnVS from "../../assets/btnVS.png"; -import btnVSSelected from "../../assets/btnVSSelected.png"; import btnPython from "../../assets/btnJupyter.png"; import btnPythonSelected from "../../assets/btnJupyterSelected.png"; import btnRStudio from "../../assets/btnR.png"; import btnRStudioSelected from "../../assets/btnRSelected.png"; -import templateVSGraphic from "../../assets/templateVS.png"; +import btnVS from "../../assets/btnVS.png"; +import btnVSSelected from "../../assets/btnVSSelected.png"; import templatePythonGraphic from "../../assets/templateJupyter.png"; import templateRStudioGraphic from "../../assets/templateR.png"; +import templateVSGraphic from "../../assets/templateVS.png"; import styles from "./TemplateSlider.module.scss"; diff --git a/client/src/features/landing/components/WhatIsRenku/WhatIsRenku.tsx b/client/src/features/landing/components/WhatIsRenku/WhatIsRenku.tsx index 09f5d13780..5848260bfd 100644 --- a/client/src/features/landing/components/WhatIsRenku/WhatIsRenku.tsx +++ b/client/src/features/landing/components/WhatIsRenku/WhatIsRenku.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { Col, Row } from "reactstrap"; + import { ExternalLink } from "../../../../components/ExternalLinks"; import { RenkuContactEmail } from "../../../../utils/constants/Docs.js"; import collaborationGraphic from "../../assets/boxes.svg"; diff --git a/client/src/features/landing/components/WhoWeAre/WhoWeAre.tsx b/client/src/features/landing/components/WhoWeAre/WhoWeAre.tsx index 30f5776c85..b94e7661db 100644 --- a/client/src/features/landing/components/WhoWeAre/WhoWeAre.tsx +++ b/client/src/features/landing/components/WhoWeAre/WhoWeAre.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { Envelope, Github, HeartFill } from "react-bootstrap-icons"; +import { Col, Row } from "reactstrap"; import { ExternalDocsLink, @@ -27,7 +28,7 @@ import { Links, RenkuContactEmail } from "../../../../utils/constants/Docs.js"; import logo_EPFL from "../../assets/EPFL.svg"; import logo_ETH from "../../assets/ETH.svg"; import logo_SDSC from "../../assets/SDSC.svg"; -import { Col, Row } from "reactstrap"; + export default function WhoWeAre() { const contactEmail = RenkuContactEmail || ""; return ( diff --git a/client/src/features/landing/components/anonymousHomeNav.tsx b/client/src/features/landing/components/anonymousHomeNav.tsx index 1db7b24e7a..ad8ed05349 100644 --- a/client/src/features/landing/components/anonymousHomeNav.tsx +++ b/client/src/features/landing/components/anonymousHomeNav.tsx @@ -16,6 +16,7 @@ * limitations under the License. */ +import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; import cx from "classnames"; import type { CSSProperties } from "react"; import React from "react"; @@ -23,7 +24,6 @@ import { List } from "react-bootstrap-icons"; import { Link } from "react-router"; import { Button, Col, Collapse, Nav, Navbar, NavItem, Row } from "reactstrap"; -import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; import { useLoginUrl } from "../../../authentication/useLoginUrl.hook"; import { ExternalLink } from "../../../components/ExternalLinks"; import { Links } from "../../../utils/constants/Docs.js"; diff --git a/client/src/features/legacy/CheckForRedirect.tsx b/client/src/features/legacy/CheckForRedirect.tsx index ab9995384b..88f16e3d6a 100644 --- a/client/src/features/legacy/CheckForRedirect.tsx +++ b/client/src/features/legacy/CheckForRedirect.tsx @@ -17,13 +17,12 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; -import cx from "classnames"; -import { useEffect, useMemo } from "react"; -import { useLocation, useNavigate } from "react-router"; - import ContainerWrap from "~/components/container/ContainerWrap"; import { useGetPlatformRedirectsBySourceUrlQuery } from "~/features/platform/api/platform.api"; import { locationPathnameToSourceUrl } from "~/features/platform/api/platform.utils"; +import cx from "classnames"; +import { useEffect, useMemo } from "react"; +import { useLocation, useNavigate } from "react-router"; import NoLegacySupportForProjects from "./NoLegacySupportForProjects"; diff --git a/client/src/features/legacy/LegacyDatasetAddToProject.tsx b/client/src/features/legacy/LegacyDatasetAddToProject.tsx index d58721d410..44c6e1f373 100644 --- a/client/src/features/legacy/LegacyDatasetAddToProject.tsx +++ b/client/src/features/legacy/LegacyDatasetAddToProject.tsx @@ -20,9 +20,7 @@ import cx from "classnames"; import { useContext } from "react"; import AppContext from "../../utils/context/appContext"; - import SunsetBanner from "../projectsV2/shared/SunsetV1Banner"; - import NoLegacySupport from "./NoLegacySupport"; export default function LegacyDatasetAddToProject() { diff --git a/client/src/features/legacy/LegacyProjectView.tsx b/client/src/features/legacy/LegacyProjectView.tsx index aa3a64be28..276aa2507c 100644 --- a/client/src/features/legacy/LegacyProjectView.tsx +++ b/client/src/features/legacy/LegacyProjectView.tsx @@ -20,7 +20,6 @@ import { useContext } from "react"; import LazyProjectView from "../../project/LazyProjectView"; import AppContext from "../../utils/context/appContext"; - import CheckForRedirect from "./CheckForRedirect"; export default function LegacyProjectView() { diff --git a/client/src/features/legacy/LegacyRoot.tsx b/client/src/features/legacy/LegacyRoot.tsx index ed5ab72859..a3ecc302eb 100644 --- a/client/src/features/legacy/LegacyRoot.tsx +++ b/client/src/features/legacy/LegacyRoot.tsx @@ -20,10 +20,8 @@ import cx from "classnames"; import { useContext } from "react"; import AppContext from "../../utils/context/appContext"; - import LazyRootV1 from "../rootV1/LazyRootV1"; import NavbarV2 from "../rootV2/NavbarV2"; - import NoLegacySupport from "./NoLegacySupport"; export default function LegacyRoot() { diff --git a/client/src/features/legacy/LegacyShowDataset.tsx b/client/src/features/legacy/LegacyShowDataset.tsx index ba619868f4..5d3bb5eb1f 100644 --- a/client/src/features/legacy/LegacyShowDataset.tsx +++ b/client/src/features/legacy/LegacyShowDataset.tsx @@ -21,9 +21,7 @@ import { useContext } from "react"; import { DatasetCoordinator } from "../../dataset/Dataset.state"; import LazyShowDataset from "../../dataset/LazyShowDataset"; import AppContext from "../../utils/context/appContext"; - import type { UserInfo } from "../usersV2/api/users.types"; - import NoLegacySupport from "./NoLegacySupport"; interface LegacyDatasetProps { diff --git a/client/src/features/legacy/NoLegacySupport.tsx b/client/src/features/legacy/NoLegacySupport.tsx index 6983ae1486..f2305de5c8 100644 --- a/client/src/features/legacy/NoLegacySupport.tsx +++ b/client/src/features/legacy/NoLegacySupport.tsx @@ -17,8 +17,8 @@ */ import cx from "classnames"; -import { Link } from "react-router"; import { ArrowLeft } from "react-bootstrap-icons"; +import { Link } from "react-router"; import ContainerWrap from "../../components/container/ContainerWrap"; diff --git a/client/src/features/legacy/NoLegacySupportForProjectsRenkulabIo.tsx b/client/src/features/legacy/NoLegacySupportForProjectsRenkulabIo.tsx index 7623023cff..d23f5ce446 100644 --- a/client/src/features/legacy/NoLegacySupportForProjectsRenkulabIo.tsx +++ b/client/src/features/legacy/NoLegacySupportForProjectsRenkulabIo.tsx @@ -16,20 +16,19 @@ * limitations under the License. */ +import { ExternalLink } from "~/components/ExternalLinks"; +import TakeActionAlert from "~/components/TakeActionAlert"; +import { PROJECT_CREATION_HASH } from "~/features/projectsV2/new/createProjectV2.constants"; +import ProjectV2New from "~/features/projectsV2/new/ProjectV2New"; +import { Links } from "~/utils/constants/Docs"; import cx from "classnames"; import { type CSSProperties } from "react"; -import { Link, useLocation } from "react-router"; import { PlusSquare } from "react-bootstrap-icons"; +import { Link, useLocation } from "react-router"; import { Col, Row } from "reactstrap"; -import { Links } from "~/utils/constants/Docs"; -import { PROJECT_CREATION_HASH } from "~/features/projectsV2/new/createProjectV2.constants"; -import { ExternalLink } from "~/components/ExternalLinks"; -import ProjectV2New from "~/features/projectsV2/new/ProjectV2New"; -import TakeActionAlert from "~/components/TakeActionAlert"; - -import MigrateRepo from "./MigrateRepo.svg"; import Background from "./Background.svg"; +import MigrateRepo from "./MigrateRepo.svg"; import styles from "./NoLegacySupportForProjects.module.css"; diff --git a/client/src/features/legacy/ProjectGitLabWarnBanner.tsx b/client/src/features/legacy/ProjectGitLabWarnBanner.tsx index 6cd791521a..9d0d6d30c4 100644 --- a/client/src/features/legacy/ProjectGitLabWarnBanner.tsx +++ b/client/src/features/legacy/ProjectGitLabWarnBanner.tsx @@ -15,17 +15,17 @@ * See the License for the specific language governing permissions and * limitations under the License */ -import cx from "classnames"; -import { EmojiDizzy } from "react-bootstrap-icons"; import { ExternalLink } from "~/components/ExternalLinks"; import TakeActionAlert from "~/components/TakeActionAlert"; import PermissionsGuard from "~/features/permissionsV2/PermissionsGuard"; -import type { Project } from "~/features/projectsV2/api/projectV2.api"; import useProjectPermissions from "~/features/ProjectPageV2/utils/useProjectPermissions.hook"; +import type { Project } from "~/features/projectsV2/api/projectV2.api"; import { useGetProjectsByProjectIdSessionLaunchersQuery } from "~/features/sessionsV2/api/sessionLaunchersV2.api"; import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import { Links } from "~/utils/constants/Docs"; +import cx from "classnames"; +import { EmojiDizzy } from "react-bootstrap-icons"; import { doesProjectReferenceRenkulabGitLab } from "./legacy.utils"; diff --git a/client/src/features/maintenance/Maintenance.tsx b/client/src/features/maintenance/Maintenance.tsx index e205e599a3..139c71451c 100644 --- a/client/src/features/maintenance/Maintenance.tsx +++ b/client/src/features/maintenance/Maintenance.tsx @@ -18,11 +18,11 @@ import { faWrench } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Button, Col, Row } from "reactstrap"; import { BrowserRouter } from "react-router"; +import { Button, Col, Row } from "reactstrap"; +import { isStatusConfigured, StatuspageDisplay } from "../../statuspage"; import { FooterNavbar } from "../landing/components/NavBar/NavBar"; -import { StatuspageDisplay, isStatusConfigured } from "../../statuspage"; interface MaintenanceProps { info: string; diff --git a/client/src/features/permissionsV2/PermissionsGuard.tsx b/client/src/features/permissionsV2/PermissionsGuard.tsx index e6118f02bb..3ea4174c37 100644 --- a/client/src/features/permissionsV2/PermissionsGuard.tsx +++ b/client/src/features/permissionsV2/PermissionsGuard.tsx @@ -17,6 +17,7 @@ */ import { ReactNode } from "react"; + import type { Permissions, RequestedPermission } from "./permissions.types"; interface PermissionsGuardProps { diff --git a/client/src/features/platform/api/platform.api-config.ts b/client/src/features/platform/api/platform.api-config.ts index c14a1b7736..729567becb 100644 --- a/client/src/features/platform/api/platform.api-config.ts +++ b/client/src/features/platform/api/platform.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:platform` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { apiFile: "./platform-empty.api.ts", diff --git a/client/src/features/platform/api/platform.generated-api.ts b/client/src/features/platform/api/platform.generated-api.ts index ac34ea413d..469b2c3db3 100644 --- a/client/src/features/platform/api/platform.generated-api.ts +++ b/client/src/features/platform/api/platform.generated-api.ts @@ -1,4 +1,5 @@ import { platformEmptyApi as api } from "./platform-empty.api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getPlatformConfig: build.query< diff --git a/client/src/features/platform/api/platform.utils.ts b/client/src/features/platform/api/platform.utils.ts index 37135f9e0b..89d595e267 100644 --- a/client/src/features/platform/api/platform.utils.ts +++ b/client/src/features/platform/api/platform.utils.ts @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { groupBy } from "lodash-es"; const projectIdRegex = /^\d+$/; diff --git a/client/src/features/platform/components/StatusSummary.tsx b/client/src/features/platform/components/StatusSummary.tsx index d722b65c27..b73a31ab10 100644 --- a/client/src/features/platform/components/StatusSummary.tsx +++ b/client/src/features/platform/components/StatusSummary.tsx @@ -32,9 +32,9 @@ import { Link } from "react-router"; import { Col, Row } from "reactstrap"; import { WarnAlert } from "../../../components/Alert"; +import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../components/Loader"; import { TimeCaption } from "../../../components/TimeCaption"; -import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import AppContext from "../../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../../utils/context/appParams.constants"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; diff --git a/client/src/features/project/components/ProjectEntityHeader.tsx b/client/src/features/project/components/ProjectEntityHeader.tsx index a091844c7a..689945d08a 100644 --- a/client/src/features/project/components/ProjectEntityHeader.tsx +++ b/client/src/features/project/components/ProjectEntityHeader.tsx @@ -17,8 +17,8 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; -import { ACCESS_LEVELS } from "../../../api-client"; +import { ACCESS_LEVELS } from "../../../api-client"; import type { EntityHeaderProps } from "../../../components/entityHeader/EntityHeader"; import EntityHeader from "../../../components/entityHeader/EntityHeader"; import { getEntityImageUrl } from "../../../utils/helpers/HelperFunctions"; diff --git a/client/src/features/project/components/ProjectSettingAvatar.tsx b/client/src/features/project/components/ProjectSettingAvatar.tsx index ded72bbba0..f5e042abdb 100644 --- a/client/src/features/project/components/ProjectSettingAvatar.tsx +++ b/client/src/features/project/components/ProjectSettingAvatar.tsx @@ -21,13 +21,13 @@ import { useCallback, useEffect, useState } from "react"; import { Card, CardBody } from "reactstrap"; import { - RtkErrorAlert, extractRkErrorRemoteBranch, + RtkErrorAlert, } from "../../../components/errors/RtkErrorAlert"; import { ImageFieldPropertyName as Prop } from "../../../components/form-field/FormGeneratorImageInput"; import InlineSubmitImageInput, { - INITIAL_IMAGE_VALUE, ImageValue, + INITIAL_IMAGE_VALUE, } from "../../../components/inlineSubmitImageInput/InlineSubmitImageInput"; import { InputCard } from "../../../components/inlineSubmitInput/InlineSubmitInput"; import { PROJECT_AVATAR_MAX_SIZE } from "../../../project/components/NewProjectAvatar"; diff --git a/client/src/features/project/components/ProjectSettingsCloudStorage.tsx b/client/src/features/project/components/ProjectSettingsCloudStorage.tsx index 4dce4d3d7c..f86c45465e 100644 --- a/client/src/features/project/components/ProjectSettingsCloudStorage.tsx +++ b/client/src/features/project/components/ProjectSettingsCloudStorage.tsx @@ -22,8 +22,8 @@ import { Col, Container, Row } from "reactstrap"; import { ACCESS_LEVELS } from "../../../api-client"; import { ErrorAlert, InfoAlert, WarnAlert } from "../../../components/Alert"; -import { Loader } from "../../../components/Loader"; import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../components/Loader"; import LoginAlert from "../../../components/loginAlert/LoginAlert"; import { User } from "../../../model/renkuModels.types"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; @@ -31,11 +31,11 @@ import { useGetNotebooksVersionQuery } from "../../versions/versions.api"; import { NotebooksVersion } from "../../versions/versions.types"; import { StateModelProject } from "../project.types"; import AddOrEditCloudStorageButton from "./cloudStorage/AddOrEditCloudStorageButton"; -import CloudStorageItem from "./cloudStorage/CloudStorageItem"; import { useGetStorageQuery, type CloudStorageGet, } from "./cloudStorage/api/projectCloudStorage.api"; +import CloudStorageItem from "./cloudStorage/CloudStorageItem"; export default function ProjectSettingsCloudStorage() { const logged = useLegacySelector( diff --git a/client/src/features/project/components/ProjectSettingsDescription.tsx b/client/src/features/project/components/ProjectSettingsDescription.tsx index f806f6988e..46183f441b 100644 --- a/client/src/features/project/components/ProjectSettingsDescription.tsx +++ b/client/src/features/project/components/ProjectSettingsDescription.tsx @@ -20,8 +20,8 @@ import { skipToken } from "@reduxjs/toolkit/query"; import React, { useCallback, useEffect, useState } from "react"; import { - RtkErrorAlert, extractRkErrorRemoteBranch, + RtkErrorAlert, } from "../../../components/errors/RtkErrorAlert"; import InlineSubmitInput, { InputCard, diff --git a/client/src/features/project/components/ProjectSettingsGeneral.tsx b/client/src/features/project/components/ProjectSettingsGeneral.tsx index adcf6c22a0..c94e912825 100644 --- a/client/src/features/project/components/ProjectSettingsGeneral.tsx +++ b/client/src/features/project/components/ProjectSettingsGeneral.tsx @@ -17,18 +17,19 @@ */ import { Card, CardBody, Col, Row } from "reactstrap"; + import { ACCESS_LEVELS } from "../../../api-client"; -import { ProjectMigrationStatus } from "./migrations/ProjectCoreMigrations"; -import { ProjectKnowledgeGraph } from "./migrations/ProjectKgStatus"; -import { ProjectSettingsGeneralDeleteProject } from "./ProjectSettingsGeneralDeleteProject"; +import { InfoAlert } from "../../../components/Alert"; +import LoginAlert from "../../../components/loginAlert/LoginAlert"; +import { Visibilities } from "../../../components/visibility/Visibility"; import { NotificationsManager } from "../../../notifications/notifications.types"; -import { ProjectSettingsDescription } from "./ProjectSettingsDescription"; import { EditVisibility } from "../../../project/components/Visibility"; -import { Visibilities } from "../../../components/visibility/Visibility"; import ProjectKeywordsInput from "../../../project/shared/ProjectKeywords"; +import { ProjectMigrationStatus } from "./migrations/ProjectCoreMigrations"; +import { ProjectKnowledgeGraph } from "./migrations/ProjectKgStatus"; import { ProjectSettingsAvatar } from "./ProjectSettingAvatar"; -import { InfoAlert } from "../../../components/Alert"; -import LoginAlert from "../../../components/loginAlert/LoginAlert"; +import { ProjectSettingsDescription } from "./ProjectSettingsDescription"; +import { ProjectSettingsGeneralDeleteProject } from "./ProjectSettingsGeneralDeleteProject"; // ****** SETTINGS COMPONENTS ****** // diff --git a/client/src/features/project/components/ProjectSettingsSessions.tsx b/client/src/features/project/components/ProjectSettingsSessions.tsx index 582cdc002d..e14fcca1dd 100644 --- a/client/src/features/project/components/ProjectSettingsSessions.tsx +++ b/client/src/features/project/components/ProjectSettingsSessions.tsx @@ -49,10 +49,10 @@ import { import { ACCESS_LEVELS } from "../../../api-client"; import { ErrorAlert, InfoAlert, WarnAlert } from "../../../components/Alert"; -import { ExternalLink } from "../../../components/ExternalLinks"; -import { Loader } from "../../../components/Loader"; import { CoreErrorAlert } from "../../../components/errors/CoreErrorAlert"; +import { ExternalLink } from "../../../components/ExternalLinks"; import ChevronFlippedIcon from "../../../components/icons/ChevronFlippedIcon"; +import { Loader } from "../../../components/Loader"; import LoginAlert from "../../../components/loginAlert/LoginAlert"; import { LockStatus, User } from "../../../model/renkuModels.types"; import { Docs } from "../../../utils/constants/Docs"; @@ -60,9 +60,9 @@ import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook import { isFetchBaseQueryError } from "../../../utils/helpers/ApiErrors"; import { Url } from "../../../utils/helpers/url"; import { + mergeDefaultUrlOptions, ServerOptionBoolean, ServerOptionEnum, - mergeDefaultUrlOptions, } from "../../session/components/options/StartNotebookServerOptions"; import { useServerOptionsQuery } from "../../session/sessions.api"; import { ServerOptions } from "../../session/sessions.types"; diff --git a/client/src/features/project/components/ProjectWarningForMerge.tsx b/client/src/features/project/components/ProjectWarningForMerge.tsx index 9ed2919445..8fb69e2a51 100644 --- a/client/src/features/project/components/ProjectWarningForMerge.tsx +++ b/client/src/features/project/components/ProjectWarningForMerge.tsx @@ -1,8 +1,9 @@ -import { ExternalLink } from "../../../components/ExternalLinks"; -import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; import { SerializedError } from "@reduxjs/toolkit"; -import { extractRkErrorRemoteBranch } from "../../../components/errors/RtkErrorAlert"; +import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; + import { WarnAlert } from "../../../components/Alert"; +import { extractRkErrorRemoteBranch } from "../../../components/errors/RtkErrorAlert"; +import { ExternalLink } from "../../../components/ExternalLinks"; interface ProjectWarningMessageForMergeProps { defaultBranch?: string; diff --git a/client/src/features/project/components/cloudStorage/CloudStorageItem.tsx b/client/src/features/project/components/cloudStorage/CloudStorageItem.tsx index 94e96b955f..0a0882c18d 100644 --- a/client/src/features/project/components/cloudStorage/CloudStorageItem.tsx +++ b/client/src/features/project/components/cloudStorage/CloudStorageItem.tsx @@ -39,14 +39,14 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { Loader } from "../../../../components/Loader"; import ChevronFlippedIcon from "../../../../components/icons/ChevronFlippedIcon"; +import { Loader } from "../../../../components/Loader"; import LazyRenkuMarkdown from "../../../../components/markdown/LazyRenkuMarkdown"; import { getCredentialFieldDefinitions } from "../../utils/projectCloudStorage.utils"; import AddOrEditCloudStorageButton from "./AddOrEditCloudStorageButton"; import { - type CloudStorageWithId, useDeleteStorageByStorageIdMutation, + type CloudStorageWithId, } from "./api/projectCloudStorage.api"; import type { CloudStorage } from "./projectCloudStorage.types"; diff --git a/client/src/features/project/components/cloudStorage/api/projectCloudStorage.api-config.ts b/client/src/features/project/components/cloudStorage/api/projectCloudStorage.api-config.ts index 6f3021444e..c255f247be 100644 --- a/client/src/features/project/components/cloudStorage/api/projectCloudStorage.api-config.ts +++ b/client/src/features/project/components/cloudStorage/api/projectCloudStorage.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:???` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { // Configure to inject endpoints into the dataConnectorsApi diff --git a/client/src/features/project/components/cloudStorage/api/projectCloudStorage.generated-api.ts b/client/src/features/project/components/cloudStorage/api/projectCloudStorage.generated-api.ts index 08d7c786a3..a44c639089 100644 --- a/client/src/features/project/components/cloudStorage/api/projectCloudStorage.generated-api.ts +++ b/client/src/features/project/components/cloudStorage/api/projectCloudStorage.generated-api.ts @@ -1,4 +1,5 @@ import { projectCloudStorageEmptyApi as api } from "./projectCloudStorage.empty-api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getStorageByStorageId: build.query< diff --git a/client/src/features/project/components/cloudStorage/cloudStorageModalComponents.tsx b/client/src/features/project/components/cloudStorage/cloudStorageModalComponents.tsx index 4c1b4d5604..d4e3c9ee96 100644 --- a/client/src/features/project/components/cloudStorage/cloudStorageModalComponents.tsx +++ b/client/src/features/project/components/cloudStorage/cloudStorageModalComponents.tsx @@ -16,6 +16,7 @@ * limitations under the License. */ +import { SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; import cx from "classnames"; import { @@ -30,8 +31,8 @@ import { import { Button, UncontrolledTooltip } from "reactstrap"; import { SuccessAlert } from "../../../../components/Alert"; -import { Loader } from "../../../../components/Loader"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; import AddOrEditCloudStorage from "./AddOrEditCloudStorage"; import { usePostStorageSchemaTestConnectionMutation } from "./api/projectCloudStorage.api"; import { CLOUD_STORAGE_TOTAL_STEPS } from "./projectCloudStorage.constants"; @@ -42,8 +43,6 @@ import { CloudStorageSchema, } from "./projectCloudStorage.types"; -import { SerializedError } from "@reduxjs/toolkit"; - interface AddCloudStorageForwardBackButtonProps { setStateSafe: (newState: Partial) => void; state: AddCloudStorageState; diff --git a/client/src/features/project/components/cloudStorage/projectCloudStorage.types.ts b/client/src/features/project/components/cloudStorage/projectCloudStorage.types.ts index 684ebd9b99..88df59988d 100644 --- a/client/src/features/project/components/cloudStorage/projectCloudStorage.types.ts +++ b/client/src/features/project/components/cloudStorage/projectCloudStorage.types.ts @@ -17,9 +17,9 @@ */ import type { - RCloneOption, - RCloneEntry, CloudStorageGet, + RCloneEntry, + RCloneOption, } from "./api/projectCloudStorage.api"; export interface CloudStorage diff --git a/client/src/features/project/components/migrations/MigrationHelpers.tsx b/client/src/features/project/components/migrations/MigrationHelpers.tsx index c201c48941..7d338ad094 100644 --- a/client/src/features/project/components/migrations/MigrationHelpers.tsx +++ b/client/src/features/project/components/migrations/MigrationHelpers.tsx @@ -21,9 +21,10 @@ import { faQuestionCircle } from "@fortawesome/free-regular-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import cx from "classnames"; import { Button, UncontrolledTooltip } from "reactstrap"; + import { ExternalLink } from "../../../../components/ExternalLinks"; -import { Loader } from "../../../../components/Loader"; import ChevronFlippedIcon from "../../../../components/icons/ChevronFlippedIcon"; +import { Loader } from "../../../../components/Loader"; import { simpleHash } from "../../../../utils/helpers/HelperFunctions"; import styles from "./migrations.module.scss"; diff --git a/client/src/features/project/components/migrations/ProjectCoreMigrations.tsx b/client/src/features/project/components/migrations/ProjectCoreMigrations.tsx index bbaacc753e..acec6f8f21 100644 --- a/client/src/features/project/components/migrations/ProjectCoreMigrations.tsx +++ b/client/src/features/project/components/migrations/ProjectCoreMigrations.tsx @@ -16,7 +16,6 @@ * limitations under the License. */ -import { useCallback, useState } from "react"; import { faArrowAltCircleUp, faCheckCircle, @@ -24,11 +23,12 @@ import { faInfoCircle, faTimesCircle, } from "@fortawesome/free-solid-svg-icons"; +import { useCallback, useState } from "react"; import { Collapse } from "reactstrap"; -import { ExternalLink } from "../../../../components/ExternalLinks"; import { CoreErrorAlert } from "../../../../components/errors/CoreErrorAlert"; import { RtkOrCoreError } from "../../../../components/errors/RtkErrorAlert"; +import { ExternalLink } from "../../../../components/ExternalLinks"; import { Docs } from "../../../../utils/constants/Docs"; import { TemplateSourceRenku } from "../../../../utils/constants/Migrations"; import { RenkuRepositories } from "../../../../utils/constants/Repositories"; diff --git a/client/src/features/project/components/projectMigration/MigrationV1Modal.tsx b/client/src/features/project/components/projectMigration/MigrationV1Modal.tsx index 586769128e..5d3a7ab2b0 100644 --- a/client/src/features/project/components/projectMigration/MigrationV1Modal.tsx +++ b/client/src/features/project/components/projectMigration/MigrationV1Modal.tsx @@ -18,15 +18,16 @@ import cx from "classnames"; import { BoxArrowInUp } from "react-bootstrap-icons"; +import { Link } from "react-router"; import { ModalBody, ModalHeader } from "reactstrap"; -import { ProjectMetadata } from "./ProjectMigration.types"; + +import { SuccessAlert } from "../../../../components/Alert"; +import { RtkErrorAlert } from "../../../../components/errors/RtkErrorAlert"; import ScrollableModal from "../../../../components/modal/ScrollableModal"; -import MigrationForm from "./ProjectMigrationForm"; -import ProjectMigrationFooter from "./ProjectMigrationFooter"; import { useMigrationForm } from "./hooks/useMigrationForm"; -import { RtkErrorAlert } from "../../../../components/errors/RtkErrorAlert"; -import { SuccessAlert } from "../../../../components/Alert"; -import { Link } from "react-router"; +import { ProjectMetadata } from "./ProjectMigration.types"; +import ProjectMigrationFooter from "./ProjectMigrationFooter"; +import MigrationForm from "./ProjectMigrationForm"; interface MigrationV1ModalProps { isOpen: boolean; diff --git a/client/src/features/project/components/projectMigration/ProjectMigration.types.ts b/client/src/features/project/components/projectMigration/ProjectMigration.types.ts index 216822ebe3..cdb40dc811 100644 --- a/client/src/features/project/components/projectMigration/ProjectMigration.types.ts +++ b/client/src/features/project/components/projectMigration/ProjectMigration.types.ts @@ -20,12 +20,12 @@ import { ContainerImage, DefaultUrl, KeywordsList, - SlugResponse, ProjectName, RepositoriesList, ResourceClassId, SessionName, Slug, + SlugResponse, Visibility, } from "../../../projectsV2/api/projectV2.api"; diff --git a/client/src/features/project/components/projectMigration/ProjectMigrationAlert.tsx b/client/src/features/project/components/projectMigration/ProjectMigrationAlert.tsx index 9a5bee4cf3..d0e9ad4e6b 100644 --- a/client/src/features/project/components/projectMigration/ProjectMigrationAlert.tsx +++ b/client/src/features/project/components/projectMigration/ProjectMigrationAlert.tsx @@ -2,6 +2,7 @@ import cx from "classnames"; import { useCallback, useEffect, useMemo, useState } from "react"; import { generatePath, Link } from "react-router"; import { Button } from "reactstrap"; + import { InfoAlert, WarnAlert } from "../../../../components/Alert"; import { ExternalLink } from "../../../../components/ExternalLinks"; import { Loader } from "../../../../components/Loader"; diff --git a/client/src/features/project/components/projectMigration/ProjectMigrationDetails.tsx b/client/src/features/project/components/projectMigration/ProjectMigrationDetails.tsx index 3ed99b7570..96e1764fe8 100644 --- a/client/src/features/project/components/projectMigration/ProjectMigrationDetails.tsx +++ b/client/src/features/project/components/projectMigration/ProjectMigrationDetails.tsx @@ -15,6 +15,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import { InfoAlert } from "~/components/Alert"; +import { ExternalLink } from "~/components/ExternalLinks"; +import ChevronFlippedIcon from "~/components/icons/ChevronFlippedIcon"; +import { SessionRowResourceRequests } from "~/features/session/components/SessionsList"; +import type { ResourceClassWithId } from "~/features/sessionsV2/api/computeResources.api"; +import { Links } from "~/utils/constants/Docs"; import cx from "classnames"; import { useCallback, useMemo, useState } from "react"; import { @@ -32,12 +39,6 @@ import { } from "react-bootstrap-icons"; import { Collapse } from "reactstrap"; -import { InfoAlert } from "~/components/Alert"; -import { ExternalLink } from "~/components/ExternalLinks"; -import ChevronFlippedIcon from "~/components/icons/ChevronFlippedIcon"; -import { SessionRowResourceRequests } from "~/features/session/components/SessionsList"; -import type { ResourceClassWithId } from "~/features/sessionsV2/api/computeResources.api"; -import { Links } from "~/utils/constants/Docs"; import type { GitLabRepositoryCommit } from "../../GitLab.types"; interface DetailsMigrationProps { diff --git a/client/src/features/project/components/projectMigration/ProjectMigrationFooter.tsx b/client/src/features/project/components/projectMigration/ProjectMigrationFooter.tsx index 6a31b8df3b..981c82822a 100644 --- a/client/src/features/project/components/projectMigration/ProjectMigrationFooter.tsx +++ b/client/src/features/project/components/projectMigration/ProjectMigrationFooter.tsx @@ -21,6 +21,7 @@ import { useCallback, useMemo } from "react"; import { ArrowLeft, BoxArrowInUp, XLg } from "react-bootstrap-icons"; import { useLocation } from "react-router"; import { Button, ModalFooter } from "reactstrap"; + import { Loader } from "../../../../components/Loader"; import { isRenkuLegacy } from "../../../../utils/helpers/HelperFunctionsV2"; import { GitlabProjectsToMigrate } from "../../../projectMigrationV2/ProjectMigration.types"; diff --git a/client/src/features/project/components/projectMigration/ProjectMigrationForm.tsx b/client/src/features/project/components/projectMigration/ProjectMigrationForm.tsx index 42fb64748d..6e7932937d 100644 --- a/client/src/features/project/components/projectMigration/ProjectMigrationForm.tsx +++ b/client/src/features/project/components/projectMigration/ProjectMigrationForm.tsx @@ -28,6 +28,7 @@ import { UseFormWatch, } from "react-hook-form"; import { Form } from "reactstrap"; + import { ErrorAlert } from "../../../../components/Alert"; import { Loader } from "../../../../components/Loader"; import { toHumanDateTime } from "../../../../utils/helpers/DateTimeUtils"; diff --git a/client/src/features/project/components/projectMigration/ProjectMigrationFormInputs.tsx b/client/src/features/project/components/projectMigration/ProjectMigrationFormInputs.tsx index c646748ba0..e80d7aa3c3 100644 --- a/client/src/features/project/components/projectMigration/ProjectMigrationFormInputs.tsx +++ b/client/src/features/project/components/projectMigration/ProjectMigrationFormInputs.tsx @@ -36,6 +36,7 @@ import ProjectNamespaceFormField from "../../../projectsV2/fields/ProjectNamespa import ProjectVisibilityFormField from "../../../projectsV2/fields/ProjectVisibilityFormField"; import SlugPreviewFormField from "../../../projectsV2/fields/SlugPreviewFormField"; import { ProjectMigrationForm } from "./ProjectMigration.types"; + import styles from "../../../projectsV2/fields/RenkuV1FormFields.module.scss"; interface ProjectMigrationFormInputsProps { diff --git a/client/src/features/project/components/projectMigration/hooks/useMigrationForm.ts b/client/src/features/project/components/projectMigration/hooks/useMigrationForm.ts index a5fee47800..2c5d273846 100644 --- a/client/src/features/project/components/projectMigration/hooks/useMigrationForm.ts +++ b/client/src/features/project/components/projectMigration/hooks/useMigrationForm.ts @@ -19,9 +19,10 @@ import { useCallback, useMemo } from "react"; import { useForm } from "react-hook-form"; import { generatePath } from "react-router"; -import { ProjectMigrationForm } from "../ProjectMigration.types"; + import { ABSOLUTE_ROUTES } from "../../../../../routing/routes.constants"; import { usePostRenkuV1ProjectsByV1IdMigrationsMutation } from "../../../../projectsV2/api/projectV2.enhanced-api"; +import { ProjectMigrationForm } from "../ProjectMigration.types"; interface UseMigrationFormProps { initialValues?: Partial; diff --git a/client/src/features/project/dataset/DatasetModify.tsx b/client/src/features/project/dataset/DatasetModify.tsx index 8a22f61d9d..665881a102 100644 --- a/client/src/features/project/dataset/DatasetModify.tsx +++ b/client/src/features/project/dataset/DatasetModify.tsx @@ -20,11 +20,10 @@ import cx from "classnames"; import React from "react"; import type { FieldErrors } from "react-hook-form"; import { SubmitHandler, useForm } from "react-hook-form"; -import { type NavigateFunction, useLocation, useNavigate } from "react-router"; +import { useLocation, useNavigate, type NavigateFunction } from "react-router"; import { Button, FormGroup, UncontrolledAlert } from "reactstrap"; import { ExternalLink } from "../../../components/ExternalLinks"; -import { Loader } from "../../../components/Loader"; import CreatorsInput, { validateCreators, } from "../../../components/form-field/CreatorsInput"; @@ -35,6 +34,7 @@ import ImageInput from "../../../components/form-field/ImageInput"; import KeywordsInput from "../../../components/form-field/KeywordsInput"; import TextAreaInput from "../../../components/form-field/TextAreaInput"; import TextInput from "../../../components/form-field/TextInput"; +import { Loader } from "../../../components/Loader"; import type { RenkuUser } from "../../../model/renkuModels.types"; import { FormErrorFields } from "../../../project/components/FormValidations"; import useAppDispatch from "../../../utils/customHooks/useAppDispatch.hook"; diff --git a/client/src/features/project/dataset/ProjectDatasetNewEdit.tsx b/client/src/features/project/dataset/ProjectDatasetNewEdit.tsx index 5a6549ec9d..7821de7e0f 100644 --- a/client/src/features/project/dataset/ProjectDatasetNewEdit.tsx +++ b/client/src/features/project/dataset/ProjectDatasetNewEdit.tsx @@ -25,8 +25,8 @@ import { useLocation, useNavigate } from "react-router"; import { Alert, Button, Col } from "reactstrap"; import { ACCESS_LEVELS } from "../../../api-client"; -import { Loader } from "../../../components/Loader"; import FormSchema from "../../../components/formschema/FormSchema"; +import { Loader } from "../../../components/Loader"; import ProgressIndicator, { ProgressStyle, ProgressType, @@ -35,14 +35,14 @@ import useAppDispatch from "../../../utils/customHooks/useAppDispatch.hook"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; import { Url } from "../../../utils/helpers/url"; import type { IDatasetFiles, StateModelProject } from "../project.types"; +import type { DatasetPostClient } from "./datasetCore.api"; +import { initializeForDataset } from "./datasetForm.slice"; import type { DatasetModifyDisplayProps, DatasetModifyProps, PostSubmitProps, } from "./DatasetModify"; import DatasetModify from "./DatasetModify"; -import type { DatasetPostClient } from "./datasetCore.api"; -import { initializeForDataset } from "./datasetForm.slice"; type ChangeDatasetProps = { apiVersion: string | undefined; diff --git a/client/src/features/project/dataset/ProjectDatasetsListView.tsx b/client/src/features/project/dataset/ProjectDatasetsListView.tsx index b0e68ef419..c8da4e67e7 100644 --- a/client/src/features/project/dataset/ProjectDatasetsListView.tsx +++ b/client/src/features/project/dataset/ProjectDatasetsListView.tsx @@ -6,7 +6,6 @@ import ListDisplay from "../../../components/List"; import { Loader } from "../../../components/Loader"; import LazyMarkdownTextExcerpt from "../../../components/markdown/LazyMarkdownTextExcerpt"; import { getUpdatedDatasetImage } from "../../../dataset/DatasetFunctions"; - import type { DatasetCore } from "../project.types"; function datasetToDict( diff --git a/client/src/features/project/dataset/ProjectDatasetsView.tsx b/client/src/features/project/dataset/ProjectDatasetsView.tsx index 9e532f6089..fd62f24f01 100644 --- a/client/src/features/project/dataset/ProjectDatasetsView.tsx +++ b/client/src/features/project/dataset/ProjectDatasetsView.tsx @@ -32,9 +32,9 @@ import { Alert, Button, Col } from "reactstrap"; import { ACCESS_LEVELS } from "../../../api-client"; import { ErrorAlert, WarnAlert } from "../../../components/Alert"; -import { Loader } from "../../../components/Loader"; import { GoBackButton } from "../../../components/buttons/Button"; import { CoreErrorAlert } from "../../../components/errors/CoreErrorAlert"; +import { Loader } from "../../../components/Loader"; import { DatasetCoordinator } from "../../../dataset/Dataset.state"; import { SpecialPropVal } from "../../../model/Model"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; diff --git a/client/src/features/project/dataset/datasetCore.api.ts b/client/src/features/project/dataset/datasetCore.api.ts index 8278e71dc4..3c45fce875 100644 --- a/client/src/features/project/dataset/datasetCore.api.ts +++ b/client/src/features/project/dataset/datasetCore.api.ts @@ -19,8 +19,8 @@ import { FILE_STATUS } from "../../../components/form-field/FileUploaderInput"; import type { ImageInputImage } from "../../../components/form-field/ImageInput"; import type { Creator } from "../project.types"; -import type { DatasetFormState } from "./datasetForm.slice"; import type { DatasetImage } from "./dataset.types"; +import type { DatasetFormState } from "./datasetForm.slice"; import { DatasetUploaderFile } from "./datasetForm.slice"; export type DatasetFormFields = DatasetFormState["form"]; diff --git a/client/src/features/project/dataset/index.ts b/client/src/features/project/dataset/index.ts index 322ae03c60..8a22edb764 100644 --- a/client/src/features/project/dataset/index.ts +++ b/client/src/features/project/dataset/index.ts @@ -1,5 +1,4 @@ -import { datasetFormSlice, setFiles, reset } from "./datasetForm.slice"; - +import { datasetFormSlice, reset, setFiles } from "./datasetForm.slice"; import type { DatasetFormState, DatasetUploaderFile, diff --git a/client/src/features/project/hook/useGetSessionLauncherData.ts b/client/src/features/project/hook/useGetSessionLauncherData.ts index 2c91b6e029..bd9d6bb179 100644 --- a/client/src/features/project/hook/useGetSessionLauncherData.ts +++ b/client/src/features/project/hook/useGetSessionLauncherData.ts @@ -17,16 +17,16 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; -import { useEffect, useMemo } from "react"; - import useDefaultBranchOption from "~/features/session/hooks/options/useDefaultBranchOption.hook"; import useDefaultCommitOption from "~/features/session/hooks/options/useDefaultCommitOption.hook"; import { useGetResourcePoolsQuery } from "~/features/sessionsV2/api/computeResources.api"; import useAppSelector from "~/utils/customHooks/useAppSelector.hook"; +import { useEffect, useMemo } from "react"; + import { projectCoreApi, - type ProjectMetadataParams, useGetConfigQuery, + type ProjectMetadataParams, } from "../projectCoreApi"; import projectGitLabApi, { useGetAllRepositoryBranchesQuery, diff --git a/client/src/features/project/index.ts b/client/src/features/project/index.ts index 1c1ac40de0..61964d091e 100644 --- a/client/src/features/project/index.ts +++ b/client/src/features/project/index.ts @@ -1,8 +1,8 @@ +import { ProjectFileLineage, ProjectFileView } from "./components/File"; +import { ProjectEntityHeader } from "./components/ProjectEntityHeader"; +import ProjectDatasetShow from "./dataset/ProjectDatasetShow"; import ProjectDatasetsListView from "./dataset/ProjectDatasetsListView"; import ProjectDatasetsView from "./dataset/ProjectDatasetsView"; -import ProjectDatasetShow from "./dataset/ProjectDatasetShow"; -import { ProjectEntityHeader } from "./components/ProjectEntityHeader"; -import { ProjectFileLineage, ProjectFileView } from "./components/File"; export { ProjectEntityHeader }; export { ProjectDatasetsListView, ProjectDatasetShow, ProjectDatasetsView }; diff --git a/client/src/features/project/projectCoreApi.ts b/client/src/features/project/projectCoreApi.ts index 8331550d06..977d2c24e2 100644 --- a/client/src/features/project/projectCoreApi.ts +++ b/client/src/features/project/projectCoreApi.ts @@ -17,10 +17,13 @@ */ import { - FetchBaseQueryError, createApi, fetchBaseQuery, + FetchBaseQueryError, } from "@reduxjs/toolkit/query/react"; + +import { versionedPathForEndpoint } from "../../utils/helpers/url/versionedUrls"; +import { CoreVersionUrl } from "../../utils/types/coreService.types"; import type { GetDatasetFilesParams, GetDatasetFilesResponse, @@ -35,8 +38,6 @@ import type { ProjectConfigSection, } from "./project.types"; import { MigrationStartScopes } from "./projectEnums"; -import { versionedPathForEndpoint } from "../../utils/helpers/url/versionedUrls"; -import { CoreVersionUrl } from "../../utils/types/coreService.types"; interface GetConfigParams extends CoreVersionUrl { projectRepositoryUrl: string; diff --git a/client/src/features/project/projectGitLab.api.ts b/client/src/features/project/projectGitLab.api.ts index f092d405d5..8c2baa6aa5 100644 --- a/client/src/features/project/projectGitLab.api.ts +++ b/client/src/features/project/projectGitLab.api.ts @@ -17,7 +17,9 @@ */ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; + import { parseINIString } from "../../utils/helpers/HelperFunctions"; +import processPaginationHeaders from "../../utils/helpers/pagination.utils"; import { MAX_GITLAB_REPOSITORY_BRANCH_PAGES, MAX_GITLAB_REPOSITORY_COMMIT_PAGES, @@ -25,33 +27,32 @@ import { } from "./GitLab.constants"; import { GetAllRepositoryBranchesParams, + GetAllRepositoryCommitsParams, GetConfigFromRepositoryParams, GetPipelineJobByNameParams, GetPipelinesParams, + GetProjectsParams, GetRegistryTagParams, GetRenkuRegistryParams, - GetRepositoryBranchParams, GetRepositoryBranchesParams, + GetRepositoryBranchParams, GetRepositoryCommitParams, GetRepositoryCommitsParams, - GetAllRepositoryCommitsParams, GitLabPipeline, GitLabPipelineJob, + GitLabProjectList, + GitlabProjectResponse, GitLabRegistry, GitLabRegistryTag, GitLabRepositoryBranch, GitLabRepositoryBranchList, GitLabRepositoryCommit, GitLabRepositoryCommitList, - GitlabProjectResponse, RetryPipelineParams, RunPipelineParams, - GetProjectsParams, - GitLabProjectList, } from "./GitLab.types"; import { ProjectConfig } from "./project.types"; import { transformGetConfigRawResponse } from "./projectCoreApi"; -import processPaginationHeaders from "../../utils/helpers/pagination.utils"; const projectGitLabApi = createApi({ reducerPath: "projectGitLab", diff --git a/client/src/features/project/projectKg.api.ts b/client/src/features/project/projectKg.api.ts index f8f42ee3f1..388ffe1652 100644 --- a/client/src/features/project/projectKg.api.ts +++ b/client/src/features/project/projectKg.api.ts @@ -17,9 +17,9 @@ */ import { - FetchBaseQueryError, createApi, fetchBaseQuery, + FetchBaseQueryError, } from "@reduxjs/toolkit/query/react"; import { diff --git a/client/src/features/project/tests/migrations.test.ts b/client/src/features/project/tests/migrations.test.ts index be3e770d0e..277f7b4f18 100644 --- a/client/src/features/project/tests/migrations.test.ts +++ b/client/src/features/project/tests/migrations.test.ts @@ -28,7 +28,6 @@ import { getRenkuLevel, getTemplateLevel, } from "../utils/migrations"; - import * as jsonObjects from "./ProjectSettings.testData.json"; type ProjectMigrationLevelKeys = keyof typeof ProjectMigrationLevel; diff --git a/client/src/features/project/useProjectCoreSupport.ts b/client/src/features/project/useProjectCoreSupport.ts index 55af2302fc..2b24f3342a 100644 --- a/client/src/features/project/useProjectCoreSupport.ts +++ b/client/src/features/project/useProjectCoreSupport.ts @@ -17,6 +17,7 @@ */ import { useContext, useMemo } from "react"; + import AppContext from "../../utils/context/appContext"; import { apiVersionForMetadataVersion } from "../../utils/helpers/url"; import type { CoreApiVersionedUrlConfig } from "../../utils/helpers/url"; diff --git a/client/src/features/project/utils/migrations.ts b/client/src/features/project/utils/migrations.ts index fafbd20031..6e6114f880 100644 --- a/client/src/features/project/utils/migrations.ts +++ b/client/src/features/project/utils/migrations.ts @@ -16,14 +16,14 @@ * limitations under the License. */ +import { TemplateSourceRenku } from "../../../utils/constants/Migrations"; +import { RenkuRepositories } from "../../../utils/constants/Repositories"; import { MigrationStatus, RenkuMigrationLevel, TemplateMigrationLevel, } from "../project.types"; import { ProjectMigrationLevel } from "../projectEnums"; -import { TemplateSourceRenku } from "../../../utils/constants/Migrations"; -import { RenkuRepositories } from "../../../utils/constants/Repositories"; /** * Replace the longer dev suffix (E.G: ".dev22+g1262f766") with a shorter diff --git a/client/src/features/project/utils/projectCloudStorage.utils.ts b/client/src/features/project/utils/projectCloudStorage.utils.ts index eec62fa515..b953085bed 100644 --- a/client/src/features/project/utils/projectCloudStorage.utils.ts +++ b/client/src/features/project/utils/projectCloudStorage.utils.ts @@ -17,6 +17,7 @@ */ import { type SessionDataConnectorOverride } from "~/features/sessionsV2/api/sessionsV2.api"; + import type { RCloneConfig, RCloneOption, diff --git a/client/src/features/projectMigrationV2/GitlabProjectList.tsx b/client/src/features/projectMigrationV2/GitlabProjectList.tsx index cd356bc22e..e9bda87441 100644 --- a/client/src/features/projectMigrationV2/GitlabProjectList.tsx +++ b/client/src/features/projectMigrationV2/GitlabProjectList.tsx @@ -21,13 +21,14 @@ import { useCallback, useMemo, useState } from "react"; import { CheckCircle, Folder } from "react-bootstrap-icons"; import { useSearchParams } from "react-router"; import { Button, Form, InputGroup } from "reactstrap"; + +import { ErrorAlert } from "../../components/Alert"; import VisibilityIcon from "../../components/entities/VisibilityIcon"; import { Loader } from "../../components/Loader"; import Pagination from "../../components/Pagination"; +import { useGetAllProjectsQuery } from "../project/projectGitLab.api"; import { useGetRenkuV1ProjectsMigrationsQuery } from "../projectsV2/api/projectV2.api.ts"; import { GitlabProjectsToMigrate } from "./ProjectMigration.types"; -import { useGetAllProjectsQuery } from "../project/projectGitLab.api"; -import { ErrorAlert } from "../../components/Alert"; export const DEFAULT_PER_PAGE_PROJECT_MIGRATION = 5; diff --git a/client/src/features/projectMigrationV2/MigrationV2Modal.tsx b/client/src/features/projectMigrationV2/MigrationV2Modal.tsx index 9b389541d1..a4b4db868f 100644 --- a/client/src/features/projectMigrationV2/MigrationV2Modal.tsx +++ b/client/src/features/projectMigrationV2/MigrationV2Modal.tsx @@ -19,16 +19,17 @@ import cx from "classnames"; import { useCallback, useState } from "react"; import { BoxArrowInUp } from "react-bootstrap-icons"; +import { Link } from "react-router"; import { ModalBody, ModalHeader } from "reactstrap"; -import { GitlabProjectsToMigrate } from "./ProjectMigration.types"; + +import { SuccessAlert } from "../../components/Alert"; +import { RtkErrorAlert } from "../../components/errors/RtkErrorAlert"; import ScrollableModal from "../../components/modal/ScrollableModal"; -import GitlabProjectList from "./GitlabProjectList"; -import MigrationForm from "../project/components/projectMigration/ProjectMigrationForm"; -import ProjectMigrationFooter from "../project/components/projectMigration/ProjectMigrationFooter"; import { useMigrationForm } from "../project/components/projectMigration/hooks/useMigrationForm"; -import { RtkErrorAlert } from "../../components/errors/RtkErrorAlert"; -import { SuccessAlert } from "../../components/Alert"; -import { Link } from "react-router"; +import ProjectMigrationFooter from "../project/components/projectMigration/ProjectMigrationFooter"; +import MigrationForm from "../project/components/projectMigration/ProjectMigrationForm"; +import GitlabProjectList from "./GitlabProjectList"; +import { GitlabProjectsToMigrate } from "./ProjectMigration.types"; interface MigrationV2ModalProps { isOpen: boolean; diff --git a/client/src/features/projectMigrationV2/ProjectMigrationBanner.tsx b/client/src/features/projectMigrationV2/ProjectMigrationBanner.tsx index a6035458d1..ff63005815 100644 --- a/client/src/features/projectMigrationV2/ProjectMigrationBanner.tsx +++ b/client/src/features/projectMigrationV2/ProjectMigrationBanner.tsx @@ -19,6 +19,7 @@ import cx from "classnames"; import { useCallback, useMemo, useState } from "react"; import { BoxArrowInUp, Link45deg, XLg } from "react-bootstrap-icons"; +import { Link } from "react-router"; import { Alert, Button, @@ -27,16 +28,16 @@ import { ModalFooter, ModalHeader, } from "reactstrap"; + import { SuccessAlert } from "../../components/Alert"; import { Loader } from "../../components/Loader"; +import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; import { useGetUserPreferencesQuery, usePostUserPreferencesDismissProjectMigrationBannerMutation, UserPreferences, } from "../usersV2/api/users.api"; import MigrationV2Modal from "./MigrationV2Modal"; -import { Link } from "react-router"; -import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; export default function ProjectMigrationBanner() { const [isOpenModal, setIsOpenModal] = useState(false); diff --git a/client/src/features/projects/projects.api.ts b/client/src/features/projects/projects.api.ts index f48d19f343..b46c501b18 100644 --- a/client/src/features/projects/projects.api.ts +++ b/client/src/features/projects/projects.api.ts @@ -15,11 +15,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { FetchArgs, FetchBaseQueryError } from "@reduxjs/toolkit/query"; import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; + import { - ProjectMetadata, formatProjectMetadata, + ProjectMetadata, } from "../../utils/helpers/ProjectFunctions"; import { GetProjectsFromSlugsParams } from "./projects.types"; diff --git a/client/src/features/projectsV2/LazyProjectV2ShowByProjectId.tsx b/client/src/features/projectsV2/LazyProjectV2ShowByProjectId.tsx index 246c655b4e..2c58da76a6 100644 --- a/client/src/features/projectsV2/LazyProjectV2ShowByProjectId.tsx +++ b/client/src/features/projectsV2/LazyProjectV2ShowByProjectId.tsx @@ -15,7 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Suspense, lazy } from "react"; + +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const ProjectV2ShowByProjectId = lazy( diff --git a/client/src/features/projectsV2/api/namespace.api-config.ts b/client/src/features/projectsV2/api/namespace.api-config.ts index 0e10e417e8..fce99c0fdd 100644 --- a/client/src/features/projectsV2/api/namespace.api-config.ts +++ b/client/src/features/projectsV2/api/namespace.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:namespaceV2` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { // Configure to inject endpoints into the projectV2Api diff --git a/client/src/features/projectsV2/api/namespace.api.ts b/client/src/features/projectsV2/api/namespace.api.ts index 229a774a3f..4a87656051 100644 --- a/client/src/features/projectsV2/api/namespace.api.ts +++ b/client/src/features/projectsV2/api/namespace.api.ts @@ -1,4 +1,5 @@ import { projectV2Api as api } from "./projectV2.api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getGroups: build.query({ diff --git a/client/src/features/projectsV2/api/projectV2.api-config.ts b/client/src/features/projectsV2/api/projectV2.api-config.ts index a058ec0cf0..fb2b7d4a0d 100644 --- a/client/src/features/projectsV2/api/projectV2.api-config.ts +++ b/client/src/features/projectsV2/api/projectV2.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npx @rtk-query/codegen-openapi projectV2.api-config.ts` in this folder to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { apiFile: "./projectV2-empty.api.ts", diff --git a/client/src/features/projectsV2/api/projectV2.api.ts b/client/src/features/projectsV2/api/projectV2.api.ts index 20aa1849d8..6119a935b3 100644 --- a/client/src/features/projectsV2/api/projectV2.api.ts +++ b/client/src/features/projectsV2/api/projectV2.api.ts @@ -1,4 +1,5 @@ import { projectV2EmptyApi as api } from "./projectV2-empty.api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getProjects: build.query({ diff --git a/client/src/features/projectsV2/api/projectV2.enhanced-api.ts b/client/src/features/projectsV2/api/projectV2.enhanced-api.ts index 3d3c473385..9b4205493e 100644 --- a/client/src/features/projectsV2/api/projectV2.enhanced-api.ts +++ b/client/src/features/projectsV2/api/projectV2.enhanced-api.ts @@ -1,18 +1,7 @@ import { processPaginationHeaders } from "../../../utils/helpers/kgPagination.utils"; import { AbstractKgPaginatedResponse } from "../../../utils/types/pagination.types"; import { usersApi } from "../../usersV2/api/users.api"; - import { projectAndNamespaceApi as api } from "./namespace.api"; - -import type { - GetProjectsApiArg, - GetProjectsApiResponse as GetProjectsApiResponseOrig, - GetProjectsByProjectIdApiArg, - GetProjectsByProjectIdApiResponse, - ProjectsList, - SessionSecretSlot, -} from "./projectV2.api"; - import type { GetGroupsApiArg, GetGroupsApiResponse as GetGroupsApiResponseOrig, @@ -21,6 +10,14 @@ import type { GroupResponseList, NamespaceResponseList, } from "./namespace.api"; +import type { + GetProjectsApiArg, + GetProjectsApiResponse as GetProjectsApiResponseOrig, + GetProjectsByProjectIdApiArg, + GetProjectsByProjectIdApiResponse, + ProjectsList, + SessionSecretSlot, +} from "./projectV2.api"; export interface GetGroupsApiResponse extends AbstractKgPaginatedResponse { groups: GetGroupsApiResponseOrig; diff --git a/client/src/features/projectsV2/fields/AddProjectMemberModal.tsx b/client/src/features/projectsV2/fields/AddProjectMemberModal.tsx index 9f0fc6d365..3d60323a8c 100644 --- a/client/src/features/projectsV2/fields/AddProjectMemberModal.tsx +++ b/client/src/features/projectsV2/fields/AddProjectMemberModal.tsx @@ -31,6 +31,7 @@ import { ModalFooter, ModalHeader, } from "reactstrap"; + import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import type { User } from "../../searchV2/api/searchV2Api.api"; import type { diff --git a/client/src/features/projectsV2/fields/DescriptionFormField.tsx b/client/src/features/projectsV2/fields/DescriptionFormField.tsx index 9f2bf7cfda..c762647cc2 100644 --- a/client/src/features/projectsV2/fields/DescriptionFormField.tsx +++ b/client/src/features/projectsV2/fields/DescriptionFormField.tsx @@ -17,11 +17,10 @@ */ import cx from "classnames"; - import { Controller } from "react-hook-form"; import type { FieldValues } from "react-hook-form"; - import { FormText, Input, Label } from "reactstrap"; + import type { GenericFormFieldProps } from "./formField.types"; export default function DescriptionFormField({ diff --git a/client/src/features/projectsV2/fields/NameFormField.tsx b/client/src/features/projectsV2/fields/NameFormField.tsx index 93376961fc..585091dd69 100644 --- a/client/src/features/projectsV2/fields/NameFormField.tsx +++ b/client/src/features/projectsV2/fields/NameFormField.tsx @@ -17,11 +17,10 @@ */ import cx from "classnames"; - import { Controller } from "react-hook-form"; import type { FieldValues } from "react-hook-form"; - import { FormText, Input, Label } from "reactstrap"; + import type { GenericFormFieldProps } from "./formField.types"; export default function NameFormField({ diff --git a/client/src/features/projectsV2/fields/ProjectNameFormField.tsx b/client/src/features/projectsV2/fields/ProjectNameFormField.tsx index 9425251e48..40ba853a89 100644 --- a/client/src/features/projectsV2/fields/ProjectNameFormField.tsx +++ b/client/src/features/projectsV2/fields/ProjectNameFormField.tsx @@ -18,8 +18,8 @@ import type { FieldValues } from "react-hook-form"; -import NameFormField from "./NameFormField"; import type { GenericProjectFormFieldProps } from "./formField.types"; +import NameFormField from "./NameFormField"; export default function ProjectNameFormField({ control, diff --git a/client/src/features/projectsV2/fields/ProjectNamespaceFormField.tsx b/client/src/features/projectsV2/fields/ProjectNamespaceFormField.tsx index 0fafb195d0..47e0b65985 100644 --- a/client/src/features/projectsV2/fields/ProjectNamespaceFormField.tsx +++ b/client/src/features/projectsV2/fields/ProjectNamespaceFormField.tsx @@ -24,13 +24,13 @@ import type { FieldValues } from "react-hook-form"; import { Controller } from "react-hook-form"; import Select, { ClassNamesConfig, + components, GroupBase, MenuListProps, OptionProps, SelectComponentsConfig, SingleValue, SingleValueProps, - components, } from "react-select"; import { Button, Label } from "reactstrap"; diff --git a/client/src/features/projectsV2/fields/ProjectOwnerSlugFormField.tsx b/client/src/features/projectsV2/fields/ProjectOwnerSlugFormField.tsx index c41a82cea8..f6643b247d 100644 --- a/client/src/features/projectsV2/fields/ProjectOwnerSlugFormField.tsx +++ b/client/src/features/projectsV2/fields/ProjectOwnerSlugFormField.tsx @@ -22,10 +22,10 @@ import type { UseFormGetValues, UseFormWatch, } from "react-hook-form"; +import { Button } from "reactstrap"; -import SlugFormField from "./SlugFormField"; import type { GenericProjectFormFieldProps } from "./formField.types"; -import { Button } from "reactstrap"; +import SlugFormField from "./SlugFormField"; interface ProjectOwnerSlugFormFieldProps extends GenericProjectFormFieldProps { diff --git a/client/src/features/projectsV2/fields/ProjectVisibilityFormField.tsx b/client/src/features/projectsV2/fields/ProjectVisibilityFormField.tsx index 804a8b80aa..938c3f4cb9 100644 --- a/client/src/features/projectsV2/fields/ProjectVisibilityFormField.tsx +++ b/client/src/features/projectsV2/fields/ProjectVisibilityFormField.tsx @@ -17,17 +17,17 @@ */ import cx from "classnames"; - +import { Globe, Lock } from "react-bootstrap-icons"; import type { FieldValues } from "react-hook-form"; import { Controller } from "react-hook-form"; - -import { Globe, Lock } from "react-bootstrap-icons"; import { useLocation } from "react-router"; import { ButtonGroup, Input, Label } from "reactstrap"; + import { isRenkuLegacy } from "../../../utils/helpers/HelperFunctionsV2"; import type { GenericProjectFormFieldProps } from "./formField.types"; import styles from "./RenkuV1FormFields.module.scss"; + export default function ProjectVisibilityFormField({ control, formId, diff --git a/client/src/features/projectsV2/fields/SlugFormField.tsx b/client/src/features/projectsV2/fields/SlugFormField.tsx index 46cf829433..daa979c112 100644 --- a/client/src/features/projectsV2/fields/SlugFormField.tsx +++ b/client/src/features/projectsV2/fields/SlugFormField.tsx @@ -22,9 +22,10 @@ import type { FieldValues } from "react-hook-form"; import { Controller } from "react-hook-form"; import { useLocation } from "react-router"; import { Button, FormText, Input, InputGroup, Label } from "reactstrap"; -import { isRenkuLegacy } from "../../../utils/helpers/HelperFunctionsV2.ts"; +import { isRenkuLegacy } from "../../../utils/helpers/HelperFunctionsV2.ts"; import type { SlugFormFieldProps } from "./formField.types"; + import styles from "./RenkuV1FormFields.module.scss"; export default function SlugFormField({ diff --git a/client/src/features/projectsV2/fields/SlugPreviewFormField.tsx b/client/src/features/projectsV2/fields/SlugPreviewFormField.tsx index df7e108d12..75511077b8 100644 --- a/client/src/features/projectsV2/fields/SlugPreviewFormField.tsx +++ b/client/src/features/projectsV2/fields/SlugPreviewFormField.tsx @@ -17,13 +17,12 @@ */ import cx from "classnames"; -import { useState, useContext } from "react"; +import { useContext, useState } from "react"; import type { FieldValues } from "react-hook-form"; import { FormText } from "reactstrap"; import ChevronFlippedIcon from "../../../components/icons/ChevronFlippedIcon.tsx"; import AppContext from "../../../utils/context/appContext.ts"; - import { SlugPreviewFormFieldProps } from "./formField.types.ts"; import SlugFormField from "./SlugFormField"; diff --git a/client/src/features/projectsV2/fields/UserSelector.tsx b/client/src/features/projectsV2/fields/UserSelector.tsx index ae651dad05..058e71eb5f 100644 --- a/client/src/features/projectsV2/fields/UserSelector.tsx +++ b/client/src/features/projectsV2/fields/UserSelector.tsx @@ -31,10 +31,12 @@ import Select, { SingleValue, SingleValueProps, } from "react-select"; + import { useGetSearchQueryQuery, type User, } from "../../searchV2/api/searchV2Api.api"; + import styles from "./ProjectNamespaceFormField.module.scss"; const USER_REQUEST_LIMIT = 100; diff --git a/client/src/features/projectsV2/list/ProjectV2ListDisplay.tsx b/client/src/features/projectsV2/list/ProjectV2ListDisplay.tsx index 5480d43c59..b59da5f180 100644 --- a/client/src/features/projectsV2/list/ProjectV2ListDisplay.tsx +++ b/client/src/features/projectsV2/list/ProjectV2ListDisplay.tsx @@ -16,6 +16,7 @@ * limitations under the License */ +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import cx from "classnames"; import { useEffect, useMemo } from "react"; import { Folder, PlusLg } from "react-bootstrap-icons"; @@ -29,10 +30,9 @@ import { ListGroupItem, } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; +import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../components/Loader"; import Pagination from "../../../components/Pagination"; -import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import useGroupPermissions from "../../groupsV2/utils/useGroupPermissions.hook"; import PermissionsGuard from "../../permissionsV2/PermissionsGuard"; import { NamespaceKind } from "../api/namespace.api"; diff --git a/client/src/features/projectsV2/new/ProjectV2New.tsx b/client/src/features/projectsV2/new/ProjectV2New.tsx index 1824acee01..a77f4b575f 100644 --- a/client/src/features/projectsV2/new/ProjectV2New.tsx +++ b/client/src/features/projectsV2/new/ProjectV2New.tsx @@ -16,6 +16,7 @@ * limitations under the License. */ +import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import cx from "classnames"; import { useCallback, useEffect } from "react"; import { CheckLg, Folder, InfoCircle, XLg } from "react-bootstrap-icons"; @@ -30,7 +31,6 @@ import { ModalFooter, } from "reactstrap"; -import { useGetUserQueryState } from "~/features/usersV2/api/users.api"; import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../components/Loader"; import LoginAlert from "../../../components/loginAlert/LoginAlert"; diff --git a/client/src/features/projectsV2/notFound/GroupNotFound.tsx b/client/src/features/projectsV2/notFound/GroupNotFound.tsx index 55c0428d25..867ceaf260 100644 --- a/client/src/features/projectsV2/notFound/GroupNotFound.tsx +++ b/client/src/features/projectsV2/notFound/GroupNotFound.tsx @@ -21,6 +21,7 @@ import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; import cx from "classnames"; import { ArrowLeft } from "react-bootstrap-icons"; import { Link, useParams } from "react-router"; + import ContainerWrap from "../../../components/container/ContainerWrap"; import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; diff --git a/client/src/features/projectsV2/shared/LearnAboutV2Button.tsx b/client/src/features/projectsV2/shared/LearnAboutV2Button.tsx index 7ed63d7b8e..e118a0e23b 100644 --- a/client/src/features/projectsV2/shared/LearnAboutV2Button.tsx +++ b/client/src/features/projectsV2/shared/LearnAboutV2Button.tsx @@ -17,6 +17,7 @@ */ import cx from "classnames"; + import { ExternalLink } from "../../../components/ExternalLinks"; interface LearnAboutV2ButtonProps { diff --git a/client/src/features/projectsV2/shared/SunsetV1Banner.tsx b/client/src/features/projectsV2/shared/SunsetV1Banner.tsx index b9c29dc8bb..ab60179c61 100644 --- a/client/src/features/projectsV2/shared/SunsetV1Banner.tsx +++ b/client/src/features/projectsV2/shared/SunsetV1Banner.tsx @@ -1,13 +1,14 @@ +import AppContext from "~/utils/context/appContext"; +import { DEFAULT_APP_PARAMS } from "~/utils/context/appParams.constants"; +import useLegacySelector from "~/utils/customHooks/useLegacySelector.hook"; import cx from "classnames"; import { useContext } from "react"; import { ArrowRight, BoxArrowUpRight } from "react-bootstrap-icons"; import { Link } from "react-router"; -import AppContext from "~/utils/context/appContext"; -import useLegacySelector from "~/utils/customHooks/useLegacySelector.hook"; + import { WarnAlert } from "../../../components/Alert"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import SunsetV1Button from "./SunsetV1Button"; -import { DEFAULT_APP_PARAMS } from "~/utils/context/appParams.constants"; export default function SunsetBanner() { const user = useLegacySelector((state) => state.stateModel.user); diff --git a/client/src/features/projectsV2/shared/SunsetV1Button.tsx b/client/src/features/projectsV2/shared/SunsetV1Button.tsx index b360f4eaad..2d83c6ee67 100644 --- a/client/src/features/projectsV2/shared/SunsetV1Button.tsx +++ b/client/src/features/projectsV2/shared/SunsetV1Button.tsx @@ -17,6 +17,7 @@ */ import cx from "classnames"; + import { ExternalLink } from "../../../components/ExternalLinks"; interface SunsetV1ButtonProps { diff --git a/client/src/features/projectsV2/shared/WipBadge.tsx b/client/src/features/projectsV2/shared/WipBadge.tsx index 3bf403cd3c..7535eca854 100644 --- a/client/src/features/projectsV2/shared/WipBadge.tsx +++ b/client/src/features/projectsV2/shared/WipBadge.tsx @@ -19,6 +19,7 @@ import cx from "classnames"; import { ReactNode, useRef } from "react"; import { Badge, UncontrolledTooltip } from "reactstrap"; + import styles from "./WipBadge.module.scss"; interface WipBadeProps { diff --git a/client/src/features/projectsV2/show/GroupShortHandDisplay.tsx b/client/src/features/projectsV2/show/GroupShortHandDisplay.tsx index 9849a0942b..c6039e8e81 100644 --- a/client/src/features/projectsV2/show/GroupShortHandDisplay.tsx +++ b/client/src/features/projectsV2/show/GroupShortHandDisplay.tsx @@ -17,7 +17,8 @@ */ import cx from "classnames"; -import { Link, generatePath } from "react-router"; +import { generatePath, Link } from "react-router"; + import { TimeCaption } from "../../../components/TimeCaption"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import UserAvatar from "../../usersV2/show/UserAvatar"; diff --git a/client/src/features/projectsV2/show/ProjectShortHandDisplay.tsx b/client/src/features/projectsV2/show/ProjectShortHandDisplay.tsx index 35827a43db..651c1f698f 100644 --- a/client/src/features/projectsV2/show/ProjectShortHandDisplay.tsx +++ b/client/src/features/projectsV2/show/ProjectShortHandDisplay.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { generatePath, Link } from "react-router"; + import VisibilityIcon from "../../../components/entities/VisibilityIcon"; import { TimeCaption } from "../../../components/TimeCaption"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; diff --git a/client/src/features/recentUserActivity/RecentUserActivityApi.ts b/client/src/features/recentUserActivity/RecentUserActivityApi.ts index b53148e66b..fc13b1e031 100644 --- a/client/src/features/recentUserActivity/RecentUserActivityApi.ts +++ b/client/src/features/recentUserActivity/RecentUserActivityApi.ts @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; interface KgLastSearchResult { diff --git a/client/src/features/repositories/repositories.api.ts b/client/src/features/repositories/repositories.api.ts index f0888d73e8..c44b57ac52 100644 --- a/client/src/features/repositories/repositories.api.ts +++ b/client/src/features/repositories/repositories.api.ts @@ -17,6 +17,7 @@ */ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; + import { GetRepositoriesProbesParams, GetRepositoriesProbesResponse, diff --git a/client/src/features/rootV1/LazyRootV1.tsx b/client/src/features/rootV1/LazyRootV1.tsx index 77ba350e0f..999ef98881 100644 --- a/client/src/features/rootV1/LazyRootV1.tsx +++ b/client/src/features/rootV1/LazyRootV1.tsx @@ -16,7 +16,7 @@ * limitations under the License */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../../components/PageLoader"; diff --git a/client/src/features/rootV1/ProjectRootV1.tsx b/client/src/features/rootV1/ProjectRootV1.tsx index 97ba522599..5f694cd2df 100644 --- a/client/src/features/rootV1/ProjectRootV1.tsx +++ b/client/src/features/rootV1/ProjectRootV1.tsx @@ -17,6 +17,7 @@ */ import { Route, Routes } from "react-router"; + import ContainerWrap from "../../components/container/ContainerWrap"; import LazyNotFound from "../../not-found/LazyNotFound"; import LazyProjectList from "../../project/list/LazyProjectList"; diff --git a/client/src/features/rootV1/RootV1.tsx b/client/src/features/rootV1/RootV1.tsx index 8d1e2b244d..0ad2f2f1d4 100644 --- a/client/src/features/rootV1/RootV1.tsx +++ b/client/src/features/rootV1/RootV1.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { Navigate, Route, Routes } from "react-router"; + import ContainerWrap from "../../components/container/ContainerWrap"; import AnonymousNavBar from "../../components/navbar/AnonymousNavBar"; import LoggedInNavBar from "../../components/navbar/LoggedInNavBar"; @@ -26,13 +27,12 @@ import LazyNotFound from "../../not-found/LazyNotFound"; import LazyNotificationsPage from "../../notifications/LazyNotificationsPage"; import { RELATIVE_ROUTES } from "../../routing/routes.constants"; import LazyStyleGuide from "../../styleguide/LazyStyleGuide"; +import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook"; import LazyDashboard from "../dashboard/LazyDashboard"; import LazyInactiveKGProjectsPage from "../inactiveKgProjects/LazyInactiveKGProjectsPage"; import LazySearchPage from "../kgSearch/LazySearchPage"; import LazySecrets from "../secrets/LazySecrets"; import LazyAnonymousSessionsList from "../session/components/LazyAnonymousSessionsList"; -import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook"; - import ProjectRootV1 from "./ProjectRootV1"; export default function RootV1() { diff --git a/client/src/features/rootV2/LazyRootV2.tsx b/client/src/features/rootV2/LazyRootV2.tsx index 4b55e6a24e..f34d6ef2ed 100644 --- a/client/src/features/rootV2/LazyRootV2.tsx +++ b/client/src/features/rootV2/LazyRootV2.tsx @@ -16,7 +16,7 @@ * limitations under the License */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../../components/PageLoader"; diff --git a/client/src/features/rootV2/NavbarV2.tsx b/client/src/features/rootV2/NavbarV2.tsx index dc13ac00b1..e5216755c5 100644 --- a/client/src/features/rootV2/NavbarV2.tsx +++ b/client/src/features/rootV2/NavbarV2.tsx @@ -32,13 +32,13 @@ import { DropdownMenu, DropdownToggle, Nav, - NavItem, NavbarToggler, + NavItem, } from "reactstrap"; import { ExternalDocsLink } from "../../components/ExternalLinks"; -import RenkuNavLinkV2 from "../../components/RenkuNavLinkV2"; import { RenkuToolbarItemUser } from "../../components/navbar/NavBarItems"; +import RenkuNavLinkV2 from "../../components/RenkuNavLinkV2"; import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; import { Links } from "../../utils/constants/Docs"; import AppContext from "../../utils/context/appContext"; diff --git a/client/src/features/rootV2/RootV2.tsx b/client/src/features/rootV2/RootV2.tsx index 655659d9b2..6984a25e65 100644 --- a/client/src/features/rootV2/RootV2.tsx +++ b/client/src/features/rootV2/RootV2.tsx @@ -19,10 +19,10 @@ import cx from "classnames"; import { useEffect, useState } from "react"; import { + generatePath, Navigate, Route, Routes, - generatePath, useMatch, useNavigate, } from "react-router"; @@ -41,6 +41,7 @@ import LazyDashboardV2 from "../dashboardV2/LazyDashboardV2"; import LazyHelpV2 from "../dashboardV2/LazyHelpV2"; import LazyGroupContainer from "../groupsV2/LazyGroupContainer"; import LazyGroupV2Overview from "../groupsV2/LazyGroupV2Overview"; +import LazyGroupV2Search from "../groupsV2/LazyGroupV2Search"; import LazyGroupV2Settings from "../groupsV2/LazyGroupV2Settings"; import GroupNew from "../groupsV2/new/GroupNew"; import LazyProjectPageV2Show from "../ProjectPageV2/LazyProjectPageV2Show"; @@ -54,7 +55,6 @@ import LazySessionStartPage from "../sessionsV2/LazySessionStartPage"; import LazyShowSessionPage from "../sessionsV2/LazyShowSessionPage"; import LazyUserRedirect from "../usersV2/LazyUserRedirect"; import LazyUserShow from "../usersV2/LazyUserShow"; -import LazyGroupV2Search from "../groupsV2/LazyGroupV2Search"; function BetaV2Redirect() { const navigate = useNavigate(); diff --git a/client/src/features/searchV2/LazySearchV2.tsx b/client/src/features/searchV2/LazySearchV2.tsx index 9062db74f1..6c7fbcd4db 100644 --- a/client/src/features/searchV2/LazySearchV2.tsx +++ b/client/src/features/searchV2/LazySearchV2.tsx @@ -15,7 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License */ -import { Suspense, lazy } from "react"; + +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const SearchV2 = lazy(() => import("./SearchV2")); diff --git a/client/src/features/searchV2/SearchV2.tsx b/client/src/features/searchV2/SearchV2.tsx index 18b441302b..4bdc921a68 100644 --- a/client/src/features/searchV2/SearchV2.tsx +++ b/client/src/features/searchV2/SearchV2.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License */ + import { Col, Row } from "reactstrap"; import SearchV2Bar from "./components/SearchV2Bar"; diff --git a/client/src/features/searchV2/api/searchV2.api-config.ts b/client/src/features/searchV2/api/searchV2.api-config.ts index 729fd8e3c2..f36cf9c632 100644 --- a/client/src/features/searchV2/api/searchV2.api-config.ts +++ b/client/src/features/searchV2/api/searchV2.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:searchV2` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { apiFile: "./searchV2-empty.api.ts", diff --git a/client/src/features/searchV2/api/searchV2Api.generated-api.ts b/client/src/features/searchV2/api/searchV2Api.generated-api.ts index e7ec34dd38..c02e4a3807 100644 --- a/client/src/features/searchV2/api/searchV2Api.generated-api.ts +++ b/client/src/features/searchV2/api/searchV2Api.generated-api.ts @@ -1,4 +1,5 @@ import { searchV2EmptyApi as api } from "./searchV2-empty.api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getSearchQuery: build.query< diff --git a/client/src/features/searchV2/components/SearchV2Bar.tsx b/client/src/features/searchV2/components/SearchV2Bar.tsx index 6e0284b4ad..0f5e8426df 100644 --- a/client/src/features/searchV2/components/SearchV2Bar.tsx +++ b/client/src/features/searchV2/components/SearchV2Bar.tsx @@ -15,10 +15,12 @@ * See the License for the specific language governing permissions and * limitations under the License */ + import { useCallback, useEffect, useMemo } from "react"; import { useForm } from "react-hook-form"; import { useLocation, useNavigate } from "react-router"; import { Button, Form, InputGroup } from "reactstrap"; + import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants.ts"; import useAppDispatch from "../../../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../../../utils/customHooks/useAppSelector.hook"; diff --git a/client/src/features/searchV2/components/SearchV2DateFilters.tsx b/client/src/features/searchV2/components/SearchV2DateFilters.tsx index a7fecba9dd..919e9b8080 100644 --- a/client/src/features/searchV2/components/SearchV2DateFilters.tsx +++ b/client/src/features/searchV2/components/SearchV2DateFilters.tsx @@ -30,8 +30,8 @@ import { } from "../searchV2.constants"; import { selectCreationDateFilter } from "../searchV2.slice"; import type { SearchDateFilter } from "../searchV2.types"; -import { SearchV2Visualization } from "./SearchV2Filters.types"; import { SearchV2FilterContainer } from "./SearchV2Filters"; +import { SearchV2Visualization } from "./SearchV2Filters.types"; interface SearchV2DateFilterProps { dateFilter: SearchDateFilter; diff --git a/client/src/features/searchV2/components/SearchV2Header.tsx b/client/src/features/searchV2/components/SearchV2Header.tsx index 2188aefece..87c474b5a5 100644 --- a/client/src/features/searchV2/components/SearchV2Header.tsx +++ b/client/src/features/searchV2/components/SearchV2Header.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License */ + import cx from "classnames"; import React, { useCallback } from "react"; diff --git a/client/src/features/searchV2/components/SearchV2Results.tsx b/client/src/features/searchV2/components/SearchV2Results.tsx index e93b1a5406..39b0caf306 100644 --- a/client/src/features/searchV2/components/SearchV2Results.tsx +++ b/client/src/features/searchV2/components/SearchV2Results.tsx @@ -16,6 +16,7 @@ * limitations under the License. */ +import { skipToken } from "@reduxjs/toolkit/query"; import cx from "classnames"; import { ReactNode, useCallback, useEffect, useMemo, useRef } from "react"; import { @@ -28,7 +29,7 @@ import { Person, Question, } from "react-bootstrap-icons"; -import { Link, generatePath, useLocation } from "react-router"; +import { generatePath, Link, useLocation } from "react-router"; import { Badge, Card, @@ -39,7 +40,6 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { skipToken } from "@reduxjs/toolkit/query"; import ClampedParagraph from "../../../components/clamped/ClampedParagraph"; import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../components/Loader"; @@ -51,12 +51,12 @@ import useLocationHash from "../../../utils/customHooks/useLocationHash.hook"; import { useGetDataConnectorsByDataConnectorIdQuery } from "../../dataConnectorsV2/api/data-connectors.api"; import DataConnectorView from "../../dataConnectorsV2/components/DataConnectorView"; import { + searchV2Api, type DataConnector, type Group, type Project, type SearchEntity, type User, - searchV2Api, } from "../api/searchV2Api.api"; import useClampSearchPage from "../hooks/useClampSearchPage.hook"; import { toDisplayName } from "../searchV2.utils"; diff --git a/client/src/features/searchV2/hooks/useSearch.hook.ts b/client/src/features/searchV2/hooks/useSearch.hook.ts index 2139f6ff0a..7a8ef1bdf8 100644 --- a/client/src/features/searchV2/hooks/useSearch.hook.ts +++ b/client/src/features/searchV2/hooks/useSearch.hook.ts @@ -21,13 +21,13 @@ import { useSearchParams } from "react-router"; import useAppDispatch from "../../../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../../../utils/customHooks/useAppSelector.hook"; -import { setInitialQuery, setPage, setPerPage } from "../searchV2.slice"; -import { parseSearchQuery } from "../searchV2.utils"; import { DEFAULT_PAGE_SIZE, FIRST_PAGE, MAX_PAGE_SIZE, } from "../searchV2.constants"; +import { setInitialQuery, setPage, setPerPage } from "../searchV2.slice"; +import { parseSearchQuery } from "../searchV2.utils"; export default function useSearch() { const [searchParams, setSearchParams] = useSearchParams(); diff --git a/client/src/features/searchV2/searchV2.constants.ts b/client/src/features/searchV2/searchV2.constants.ts index 3501fdad76..f4b617bd96 100644 --- a/client/src/features/searchV2/searchV2.constants.ts +++ b/client/src/features/searchV2/searchV2.constants.ts @@ -25,6 +25,7 @@ import { People, Person, } from "react-bootstrap-icons"; + import type { Role } from "../projectsV2/api/projectV2.api"; import type { AfterDateValue, diff --git a/client/src/features/searchV2/searchV2.utils.ts b/client/src/features/searchV2/searchV2.utils.ts index fe56082e72..1389b9342d 100644 --- a/client/src/features/searchV2/searchV2.utils.ts +++ b/client/src/features/searchV2/searchV2.utils.ts @@ -17,6 +17,7 @@ */ import { DateTime } from "luxon"; + import { toNumericRole } from "../ProjectPageV2/utils/roleUtils"; import type { SearchEntity } from "./api/searchV2Api.api"; import { diff --git a/client/src/features/secrets/LazySecrets.tsx b/client/src/features/secrets/LazySecrets.tsx index 3c796bbb73..352b275b94 100644 --- a/client/src/features/secrets/LazySecrets.tsx +++ b/client/src/features/secrets/LazySecrets.tsx @@ -16,7 +16,7 @@ * limitations under the License */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../../components/PageLoader"; diff --git a/client/src/features/secrets/Secrets.tsx b/client/src/features/secrets/Secrets.tsx index f60a477c06..1b611880c8 100644 --- a/client/src/features/secrets/Secrets.tsx +++ b/client/src/features/secrets/Secrets.tsx @@ -24,10 +24,9 @@ import { Loader } from "../../components/Loader"; import LoginAlert from "../../components/loginAlert/LoginAlert"; import { User } from "../../model/renkuModels.types"; import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook"; - import GeneralSecretNew from "./GeneralSecretNew"; -import SecretsList from "./SecretsList"; import { SECRETS_DOCS_URL } from "./secrets.constants"; +import SecretsList from "./SecretsList"; function GeneralSecretSection() { return ( diff --git a/client/src/features/secretsV2/DataConnectorSecretItem.tsx b/client/src/features/secretsV2/DataConnectorSecretItem.tsx index 86291ddcd7..ea4665ba16 100644 --- a/client/src/features/secretsV2/DataConnectorSecretItem.tsx +++ b/client/src/features/secretsV2/DataConnectorSecretItem.tsx @@ -16,16 +16,16 @@ * limitations under the License. */ +import { skipToken } from "@reduxjs/toolkit/query"; import cx from "classnames"; import { ReactNode, useMemo } from "react"; -import { Badge, Col, ListGroupItem, Row } from "reactstrap"; - -import { skipToken } from "@reduxjs/toolkit/query"; import { Database, NodePlus } from "react-bootstrap-icons"; import { generatePath, Link } from "react-router"; +import { Badge, Col, ListGroupItem, Row } from "reactstrap"; + +import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import { Loader } from "../../components/Loader"; import { TimeCaption } from "../../components/TimeCaption"; -import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; import { useGetDataConnectorsByDataConnectorIdQuery, diff --git a/client/src/features/secretsV2/GeneralSecretItem.tsx b/client/src/features/secretsV2/GeneralSecretItem.tsx index 411595eca5..eea7a7d6ed 100644 --- a/client/src/features/secretsV2/GeneralSecretItem.tsx +++ b/client/src/features/secretsV2/GeneralSecretItem.tsx @@ -18,10 +18,10 @@ import cx from "classnames"; import { useCallback, useMemo, useState } from "react"; +import { Folder, ShieldLock } from "react-bootstrap-icons"; import { generatePath, Link } from "react-router"; import { Badge, Col, Collapse, ListGroupItem, Row } from "reactstrap"; -import { Folder, ShieldLock } from "react-bootstrap-icons"; import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import ChevronFlippedIcon from "../../components/icons/ChevronFlippedIcon"; import { Loader } from "../../components/Loader"; diff --git a/client/src/features/secretsV2/LazySecretsV2.tsx b/client/src/features/secretsV2/LazySecretsV2.tsx index b860dcb05a..5d018fdc4a 100644 --- a/client/src/features/secretsV2/LazySecretsV2.tsx +++ b/client/src/features/secretsV2/LazySecretsV2.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../../components/PageLoader"; diff --git a/client/src/features/secretsV2/SecretsV2.tsx b/client/src/features/secretsV2/SecretsV2.tsx index 4055568a1c..f1b4af4941 100644 --- a/client/src/features/secretsV2/SecretsV2.tsx +++ b/client/src/features/secretsV2/SecretsV2.tsx @@ -35,9 +35,9 @@ import LoginAlert from "../../components/loginAlert/LoginAlert"; import type { User } from "../../model/renkuModels.types"; import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook"; import { - type SecretWithId, useGetUserSecretsQuery, usersApi, + type SecretWithId, } from "../usersV2/api/users.api"; import DataConnectorSecretItem from "./DataConnectorSecretItem"; import GeneralSecretItem from "./GeneralSecretItem"; diff --git a/client/src/features/secretsV2/fields/FilenameField.tsx b/client/src/features/secretsV2/fields/FilenameField.tsx index 346aa0a8cc..3e6ccf49bb 100644 --- a/client/src/features/secretsV2/fields/FilenameField.tsx +++ b/client/src/features/secretsV2/fields/FilenameField.tsx @@ -19,6 +19,7 @@ import cx from "classnames"; import { Controller, type FieldValues } from "react-hook-form"; import { Input, Label } from "reactstrap"; + import { UserSecretFormFieldProps } from "./fields.types"; type FilenameFieldProps = UserSecretFormFieldProps; diff --git a/client/src/features/secretsV2/fields/NameField.tsx b/client/src/features/secretsV2/fields/NameField.tsx index a0ebd736aa..2927a1ad71 100644 --- a/client/src/features/secretsV2/fields/NameField.tsx +++ b/client/src/features/secretsV2/fields/NameField.tsx @@ -19,6 +19,7 @@ import cx from "classnames"; import { Controller, type FieldValues } from "react-hook-form"; import { Input, Label } from "reactstrap"; + import { UserSecretFormFieldProps } from "./fields.types"; type NameFieldProps = UserSecretFormFieldProps; diff --git a/client/src/features/session/components/AboutSessionModal.tsx b/client/src/features/session/components/AboutSessionModal.tsx index f25dae1613..2e06926c0a 100644 --- a/client/src/features/session/components/AboutSessionModal.tsx +++ b/client/src/features/session/components/AboutSessionModal.tsx @@ -21,9 +21,9 @@ import { InfoCircle } from "react-bootstrap-icons"; import { Container, ModalBody, ModalHeader } from "reactstrap"; import { ACCESS_LEVELS } from "../../../api-client"; -import { ExternalLink } from "../../../components/ExternalLinks"; import { EntityType } from "../../../components/entities/entities.types"; import EntityHeader from "../../../components/entityHeader/EntityHeader"; +import { ExternalLink } from "../../../components/ExternalLinks"; import ScrollableModal from "../../../components/modal/ScrollableModal"; import { ProjectMetadata } from "../../../notebooks/components/session.types"; import { Docs } from "../../../utils/constants/Docs"; diff --git a/client/src/features/session/components/AnonymousSessionsList.tsx b/client/src/features/session/components/AnonymousSessionsList.tsx index c73f456745..8f9a499474 100644 --- a/client/src/features/session/components/AnonymousSessionsList.tsx +++ b/client/src/features/session/components/AnonymousSessionsList.tsx @@ -21,8 +21,8 @@ import { useContext } from "react"; import { Col, Row } from "reactstrap"; import { ErrorAlert, InfoAlert } from "../../../components/Alert"; -import { Loader } from "../../../components/Loader"; import ContainerWrap from "../../../components/container/ContainerWrap"; +import { Loader } from "../../../components/Loader"; import { User } from "../../../model/renkuModels.types"; import AppContext from "../../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../../utils/context/appParams.constants"; diff --git a/client/src/features/session/components/LazyAnonymousSessionsList.tsx b/client/src/features/session/components/LazyAnonymousSessionsList.tsx index 75a2d2d110..17feb23952 100644 --- a/client/src/features/session/components/LazyAnonymousSessionsList.tsx +++ b/client/src/features/session/components/LazyAnonymousSessionsList.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../../components/PageLoader"; const AnonymousSessionsList = lazy(() => import("./AnonymousSessionsList")); diff --git a/client/src/features/session/components/PauseOrDeleteSessionModal.tsx b/client/src/features/session/components/PauseOrDeleteSessionModal.tsx index 04c3bf6200..e1186507a5 100644 --- a/client/src/features/session/components/PauseOrDeleteSessionModal.tsx +++ b/client/src/features/session/components/PauseOrDeleteSessionModal.tsx @@ -21,8 +21,8 @@ import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; import cx from "classnames"; import { Duration } from "luxon"; import { useCallback, useContext, useEffect, useState } from "react"; -import { Button, Col, Modal, ModalBody, ModalHeader, Row } from "reactstrap"; import { useNavigate } from "react-router"; +import { Button, Col, Modal, ModalBody, ModalHeader, Row } from "reactstrap"; import { InfoAlert } from "../../../components/Alert"; import { Loader } from "../../../components/Loader"; diff --git a/client/src/features/session/components/PullSessionModal.tsx b/client/src/features/session/components/PullSessionModal.tsx index a678259074..a6f8a7ac8c 100644 --- a/client/src/features/session/components/PullSessionModal.tsx +++ b/client/src/features/session/components/PullSessionModal.tsx @@ -23,8 +23,8 @@ import { Button, Col, Modal, ModalBody, ModalHeader, Row } from "reactstrap"; import { Loader } from "../../../components/Loader"; import { CenteredLoader, - InformationalBody, commitsPhrasing, + InformationalBody, } from "../../../notebooks/components/Sidecar"; import { useGitStatusQuery, diff --git a/client/src/features/session/components/ResourcesSessionModal.tsx b/client/src/features/session/components/ResourcesSessionModal.tsx index dbb6f7c2b9..760dc1ac47 100644 --- a/client/src/features/session/components/ResourcesSessionModal.tsx +++ b/client/src/features/session/components/ResourcesSessionModal.tsx @@ -29,8 +29,8 @@ import { import { SessionLogs } from "../../../components/Logs"; import ScrollableModal from "../../../components/modal/ScrollableModal"; -import { SESSION_TABS } from "../../../notebooks/Notebooks.present"; import SessionCheatSheetGenerated from "../../../notebooks/components/SessionCheatSheet"; +import { SESSION_TABS } from "../../../notebooks/Notebooks.present"; import { Docs } from "../../../utils/constants/Docs"; import useGetSessionLogs from "../../../utils/customHooks/UseGetSessionLogs"; diff --git a/client/src/features/session/components/SaveSessionModal.tsx b/client/src/features/session/components/SaveSessionModal.tsx index a1a9a5416d..2623cd1e44 100644 --- a/client/src/features/session/components/SaveSessionModal.tsx +++ b/client/src/features/session/components/SaveSessionModal.tsx @@ -43,8 +43,8 @@ import { Loader } from "../../../components/Loader"; import { User } from "../../../model/renkuModels.types"; import { CenteredLoader, - InformationalBody, commitsPhrasing, + InformationalBody, } from "../../../notebooks/components/Sidecar"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; import { diff --git a/client/src/features/session/components/SessionButton.tsx b/client/src/features/session/components/SessionButton.tsx index d8418f25f5..c48b8066bc 100644 --- a/client/src/features/session/components/SessionButton.tsx +++ b/client/src/features/session/components/SessionButton.tsx @@ -26,31 +26,14 @@ import { import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError, skipToken } from "@reduxjs/toolkit/query"; -import cx from "classnames"; -import { useCallback, useContext, useEffect, useMemo, useState } from "react"; -import { CheckLg, Tools, XLg } from "react-bootstrap-icons"; -import { Link, useNavigate } from "react-router"; -import { SingleValue } from "react-select"; -import { - Button, - Col, - DropdownItem, - Modal, - ModalBody, - ModalFooter, - ModalHeader, - Row, - UncontrolledTooltip, -} from "reactstrap"; - import { WarnAlert } from "~/components/Alert"; -import { Loader } from "~/components/Loader"; import { ButtonWithMenu } from "~/components/buttons/Button"; import SessionPausedIcon from "~/components/icons/SessionPausedIcon"; +import { Loader } from "~/components/Loader"; import { SshDropdown } from "~/components/ssh/ssh"; import { - type ResourceClassWithId, useGetResourcePoolsQuery, + type ResourceClassWithId, } from "~/features/sessionsV2/api/computeResources.api"; import { User } from "~/model/renkuModels.types"; import { NotebooksHelper } from "~/notebooks"; @@ -64,6 +47,23 @@ import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; import useLegacySelector from "~/utils/customHooks/useLegacySelector.hook"; import RtkQueryErrorsContext from "~/utils/helpers/RtkQueryErrorsContext"; import { Url } from "~/utils/helpers/url"; +import cx from "classnames"; +import { useCallback, useContext, useEffect, useMemo, useState } from "react"; +import { CheckLg, Tools, XLg } from "react-bootstrap-icons"; +import { Link, useNavigate } from "react-router"; +import { SingleValue } from "react-select"; +import { + Button, + Col, + DropdownItem, + Modal, + ModalBody, + ModalFooter, + ModalHeader, + Row, + UncontrolledTooltip, +} from "reactstrap"; + import { toggleSessionLogsModal } from "../../display/displaySlice"; import { ErrorOrNotAvailableResourcePools, @@ -77,10 +77,10 @@ import { import { Session, SessionStatusState } from "../sessions.types"; import { getRunningSession } from "../sessions.utils"; import useWaitForSessionStatus from "../useWaitForSessionStatus.hook"; +import { SessionClassSelector } from "./options/SessionClassOption"; import { SessionRowResourceRequests } from "./SessionsList"; import SimpleSessionButton from "./SimpleSessionButton"; import UnsavedWorkWarning from "./UnsavedWorkWarning"; -import { SessionClassSelector } from "./options/SessionClassOption"; interface SessionButtonProps { className?: string; diff --git a/client/src/features/session/components/SessionFileButton.tsx b/client/src/features/session/components/SessionFileButton.tsx index 5c439bb7fd..a375eea797 100644 --- a/client/src/features/session/components/SessionFileButton.tsx +++ b/client/src/features/session/components/SessionFileButton.tsx @@ -21,8 +21,8 @@ import { ReactNode, useRef } from "react"; import { Link, useLocation, type To } from "react-router"; import { UncontrolledTooltip } from "reactstrap"; -import { Loader } from "../../../components/Loader"; import JupyterIcon from "../../../components/icons/JupyterIcon"; +import { Loader } from "../../../components/Loader"; import { NotebooksHelper } from "../../../notebooks"; import { NotebookAnnotations } from "../../../notebooks/components/session.types"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; diff --git a/client/src/features/session/components/SessionsList.tsx b/client/src/features/session/components/SessionsList.tsx index dc29e23df3..e18a61f890 100644 --- a/client/src/features/session/components/SessionsList.tsx +++ b/client/src/features/session/components/SessionsList.tsx @@ -23,18 +23,19 @@ import { ReactNode } from "react"; import Media from "react-media"; import { Link } from "react-router"; import { Col, Row } from "reactstrap"; + import { ExternalLink } from "../../../components/ExternalLinks"; import { EnvironmentLogs } from "../../../components/Logs"; import { NotebooksHelper } from "../../../notebooks"; +import { NotebookAnnotations } from "../../../notebooks/components/session.types"; import { SessionListRowStatus, SessionListRowStatusIcon, } from "../../../notebooks/components/SessionListStatus"; -import { NotebookAnnotations } from "../../../notebooks/components/session.types"; import Sizes from "../../../utils/constants/Media"; import { simpleHash } from "../../../utils/helpers/HelperFunctions"; import { Url } from "../../../utils/helpers/url"; -import { Session, SessionStatusState, Sessions } from "../sessions.types"; +import { Session, Sessions, SessionStatusState } from "../sessions.types"; import SessionButton from "./SessionButton"; import SessionRowCommitInfo from "./SessionRowCommitInfo"; diff --git a/client/src/features/session/components/ShowSession.tsx b/client/src/features/session/components/ShowSession.tsx index 77b328e3f6..73578dc023 100644 --- a/client/src/features/session/components/ShowSession.tsx +++ b/client/src/features/session/components/ShowSession.tsx @@ -43,13 +43,13 @@ import { Button, Row, UncontrolledTooltip } from "reactstrap"; import SessionPausedIcon from "../../../components/icons/SessionPausedIcon"; import { User } from "../../../model/renkuModels.types"; -import { SESSION_TABS } from "../../../notebooks/Notebooks.present"; import { GoBackBtn } from "../../../notebooks/components/SessionButtons"; +import { SESSION_TABS } from "../../../notebooks/Notebooks.present"; import AppContext from "../../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../../utils/context/appParams.constants"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; -import useWindowSize from "../../../utils/helpers/UseWindowsSize"; import { Url } from "../../../utils/helpers/url"; +import useWindowSize from "../../../utils/helpers/UseWindowsSize"; import { useGetSessionsQuery } from "../sessions.api"; import AboutSessionModal from "./AboutSessionModal"; import AnonymousSessionsDisabledNotice from "./AnonymousSessionsDisabledNotice"; @@ -60,9 +60,10 @@ import SaveSessionModal from "./SaveSessionModal"; import SessionHibernated from "./SessionHibernated"; import SessionJupyter from "./SessionJupyter"; import SessionUnavailable from "./SessionUnavailable"; -import styles from "./ShowSession.module.scss"; import StartSessionProgressBar from "./StartSessionProgressBar"; +import styles from "./ShowSession.module.scss"; + const logo = "/static/public/img/logo.svg"; export default function ShowSession() { diff --git a/client/src/features/session/components/SimpleSessionButton.tsx b/client/src/features/session/components/SimpleSessionButton.tsx index a26fdfa0d0..3db041a893 100644 --- a/client/src/features/session/components/SimpleSessionButton.tsx +++ b/client/src/features/session/components/SimpleSessionButton.tsx @@ -18,6 +18,8 @@ import { faPlay } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import AppContext from "~/utils/context/appContext"; +import { DEFAULT_APP_PARAMS } from "~/utils/context/appParams.constants"; import cx from "classnames"; import { MouseEvent, @@ -28,8 +30,7 @@ import { } from "react"; import { Link, useNavigate } from "react-router"; import { Button, UncontrolledTooltip } from "reactstrap"; -import AppContext from "~/utils/context/appContext"; -import { DEFAULT_APP_PARAMS } from "~/utils/context/appParams.constants"; + import { Loader } from "../../../components/Loader"; import { NotebooksHelper } from "../../../notebooks"; import { Url } from "../../../utils/helpers/url"; diff --git a/client/src/features/session/components/StartNewSession.tsx b/client/src/features/session/components/StartNewSession.tsx index 5f4e1c0f1a..2dd2262d12 100644 --- a/client/src/features/session/components/StartNewSession.tsx +++ b/client/src/features/session/components/StartNewSession.tsx @@ -33,6 +33,7 @@ import { type Location, } from "react-router"; import { Button, Col, DropdownItem, Form, Row } from "reactstrap"; + import { ACCESS_LEVELS } from "../../../api-client"; import { useLoginUrl } from "../../../authentication/useLoginUrl.hook"; import { @@ -41,12 +42,12 @@ import { RenkuAlert, WarnAlert, } from "../../../components/Alert"; -import { ExternalLink } from "../../../components/ExternalLinks"; -import { Loader } from "../../../components/Loader"; import { ButtonWithMenu, GoBackButton, } from "../../../components/buttons/Button"; +import { ExternalLink } from "../../../components/ExternalLinks"; +import { Loader } from "../../../components/Loader"; import ProgressStepsIndicator, { ProgressStyle, ProgressType, @@ -78,7 +79,6 @@ import startSessionSlice, { } from "../startSession.slice"; import { startSessionOptionsSlice } from "../startSessionOptionsSlice"; import AnonymousSessionsDisabledNotice from "./AnonymousSessionsDisabledNotice"; -import ProjectSessionsList, { useProjectSessions } from "./ProjectSessionsList"; import AutostartSessionOptions from "./options/AutostartSessionOptions"; import SessionBranchOption from "./options/SessionBranchOption"; import SessionCloudStorageOption from "./options/SessionCloudStorageOption"; @@ -87,6 +87,7 @@ import SessionDockerImage from "./options/SessionDockerImage"; import SessionEnvironmentVariables from "./options/SessionEnvironmentVariables"; import SessionUserSecrets from "./options/SessionUserSecrets"; import { StartNotebookServerOptions } from "./options/StartNotebookServerOptions"; +import ProjectSessionsList, { useProjectSessions } from "./ProjectSessionsList"; export default function StartNewSession() { const { params } = useContext(AppContext); diff --git a/client/src/features/session/components/StartSessionProgressBar.tsx b/client/src/features/session/components/StartSessionProgressBar.tsx index 6022292121..0d2e3fade8 100644 --- a/client/src/features/session/components/StartSessionProgressBar.tsx +++ b/client/src/features/session/components/StartSessionProgressBar.tsx @@ -16,17 +16,18 @@ * limitations under the License. */ -import { Session, SessionStatus } from "../sessions.types"; +import cx from "classnames"; +import { Button } from "reactstrap"; + +import { Loader } from "../../../components/Loader"; import ProgressStepsIndicator, { ProgressStyle, ProgressType, StatusStepProgressBar, StepsProgressBar, } from "../../../components/progress/ProgressSteps"; -import cx from "classnames"; -import { Button } from "reactstrap"; import { SessionV2 } from "../../sessionsV2/sessionsV2.types"; -import { Loader } from "../../../components/Loader"; +import { Session, SessionStatus } from "../sessions.types"; interface StartSessionProgressBarProps { includeStepInTitle?: boolean; diff --git a/client/src/features/session/components/options/AutostartSessionOptions.tsx b/client/src/features/session/components/options/AutostartSessionOptions.tsx index 4b4bba400f..cde2f2fabc 100644 --- a/client/src/features/session/components/options/AutostartSessionOptions.tsx +++ b/client/src/features/session/components/options/AutostartSessionOptions.tsx @@ -17,8 +17,6 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; -import { useEffect, useMemo } from "react"; - import { StatusStepProgressBar } from "~/components/progress/ProgressSteps"; import { useGetStorageQuery } from "~/features/project/components/cloudStorage/api/projectCloudStorage.api"; import { useGetConfigQuery } from "~/features/project/projectCoreApi"; @@ -33,6 +31,8 @@ import { ProjectStatistics } from "~/notebooks/components/session.types"; import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; import useAppSelector from "~/utils/customHooks/useAppSelector.hook"; import useLegacySelector from "~/utils/customHooks/useLegacySelector.hook"; +import { useEffect, useMemo } from "react"; + import useDefaultAutoFetchLfsOption from "../../hooks/options/useDefaultAutoFetchLfsOption.hook"; import useDefaultBranchOption from "../../hooks/options/useDefaultBranchOption.hook"; import useDefaultCloudStorageOption from "../../hooks/options/useDefaultCloudStorageOption.hook"; diff --git a/client/src/features/session/components/options/SessionBranchOption.tsx b/client/src/features/session/components/options/SessionBranchOption.tsx index a93efd7c3b..80e38108f3 100644 --- a/client/src/features/session/components/options/SessionBranchOption.tsx +++ b/client/src/features/session/components/options/SessionBranchOption.tsx @@ -25,11 +25,11 @@ import { ChevronDown, ThreeDots } from "react-bootstrap-icons"; import { Link } from "react-router"; import Select, { ClassNamesConfig, + components, GroupBase, MenuListProps, SelectComponentsConfig, SingleValue, - components, } from "react-select"; import { Button, @@ -51,8 +51,8 @@ import useLegacySelector from "../../../../utils/customHooks/useLegacySelector.h import { Url } from "../../../../utils/helpers/url"; import type { GitLabRepositoryBranch } from "../../../project/GitLab.types"; import projectGitLabApi, { - useGetRepositoryBranchQuery, useGetRepositoryBranchesQuery, + useGetRepositoryBranchQuery, useRefetchBranchesMutation, } from "../../../project/projectGitLab.api"; import useDefaultBranchOption from "../../hooks/options/useDefaultBranchOption.hook"; diff --git a/client/src/features/session/components/options/SessionClassOption.tsx b/client/src/features/session/components/options/SessionClassOption.tsx index 2c78d73d39..79b7c6631a 100644 --- a/client/src/features/session/components/options/SessionClassOption.tsx +++ b/client/src/features/session/components/options/SessionClassOption.tsx @@ -22,21 +22,6 @@ import { } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { skipToken } from "@reduxjs/toolkit/query"; -import cx from "classnames"; -import { useCallback, useContext, useEffect, useMemo } from "react"; -import { ChevronDown } from "react-bootstrap-icons"; -import Select, { - ClassNamesConfig, - GroupBase, - GroupHeadingProps, - MenuListProps, - OptionProps, - SelectComponentsConfig, - SingleValue, - SingleValueProps, - components, -} from "react-select"; - import { ErrorAlert, WarnAlert } from "~/components/Alert"; import { ExternalLink } from "~/components/ExternalLinks"; import { @@ -52,6 +37,21 @@ import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; import useAppSelector from "~/utils/customHooks/useAppSelector.hook"; import useLegacySelector from "~/utils/customHooks/useLegacySelector.hook"; import { toHumanDuration } from "~/utils/helpers/DurationUtils"; +import cx from "classnames"; +import { useCallback, useContext, useEffect, useMemo } from "react"; +import { ChevronDown } from "react-bootstrap-icons"; +import Select, { + ClassNamesConfig, + components, + GroupBase, + GroupHeadingProps, + MenuListProps, + OptionProps, + SelectComponentsConfig, + SingleValue, + SingleValueProps, +} from "react-select"; + import { ProjectConfig } from "../../../project/project.types"; import { useGetConfigQuery } from "../../../project/projectCoreApi"; import { useCoreSupport } from "../../../project/useProjectCoreSupport"; diff --git a/client/src/features/session/components/options/SessionCloudStorageOption.tsx b/client/src/features/session/components/options/SessionCloudStorageOption.tsx index d7c40afdb5..f2f718acd3 100644 --- a/client/src/features/session/components/options/SessionCloudStorageOption.tsx +++ b/client/src/features/session/components/options/SessionCloudStorageOption.tsx @@ -34,15 +34,15 @@ import { } from "reactstrap"; import { ACCESS_LEVELS } from "../../../../api-client"; -import { Loader } from "../../../../components/Loader"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; import LazyRenkuMarkdown from "../../../../components/markdown/LazyRenkuMarkdown"; import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../../../../utils/customHooks/useAppSelector.hook"; import useLegacySelector from "../../../../utils/customHooks/useLegacySelector.hook"; import { Url } from "../../../../utils/helpers/url"; -import CloudStorageItem from "../../../project/components/cloudStorage/CloudStorageItem"; import { useGetStorageQuery } from "../../../project/components/cloudStorage/api/projectCloudStorage.api"; +import CloudStorageItem from "../../../project/components/cloudStorage/CloudStorageItem"; import { CLOUD_STORAGE_SENSITIVE_FIELD_TOKEN } from "../../../project/components/cloudStorage/projectCloudStorage.constants"; import { StateModelProject } from "../../../project/project.types"; import { useGetNotebooksVersionQuery } from "../../../versions/versions.api"; diff --git a/client/src/features/session/components/options/SessionCommitOption.tsx b/client/src/features/session/components/options/SessionCommitOption.tsx index 77a1e0766b..cd4c9f59ad 100644 --- a/client/src/features/session/components/options/SessionCommitOption.tsx +++ b/client/src/features/session/components/options/SessionCommitOption.tsx @@ -24,13 +24,13 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { ChevronDown, ThreeDots } from "react-bootstrap-icons"; import Select, { ClassNamesConfig, + components, GroupBase, MenuListProps, OptionProps, SelectComponentsConfig, SingleValue, SingleValueProps, - components, } from "react-select"; import { Button, UncontrolledTooltip } from "reactstrap"; diff --git a/client/src/features/session/components/options/SessionStorageOption.tsx b/client/src/features/session/components/options/SessionStorageOption.tsx index d42be8e89b..89ff18a5cd 100644 --- a/client/src/features/session/components/options/SessionStorageOption.tsx +++ b/client/src/features/session/components/options/SessionStorageOption.tsx @@ -17,25 +17,25 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; -import cx from "classnames"; -import { useCallback, useEffect, useMemo } from "react"; -import { - Input, - InputGroup, - InputGroupText, - UncontrolledTooltip, -} from "reactstrap"; - import { useGetConfigQuery } from "~/features/project/projectCoreApi"; import { useCoreSupport } from "~/features/project/useProjectCoreSupport"; import { - type ResourceClassWithId, useGetResourcePoolsQuery, + type ResourceClassWithId, } from "~/features/sessionsV2/api/computeResources.api"; import { ProjectStatistics } from "~/notebooks/components/session.types"; import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; import useAppSelector from "~/utils/customHooks/useAppSelector.hook"; import useLegacySelector from "~/utils/customHooks/useLegacySelector.hook"; +import cx from "classnames"; +import { useCallback, useEffect, useMemo } from "react"; +import { + Input, + InputGroup, + InputGroupText, + UncontrolledTooltip, +} from "reactstrap"; + import { MIN_SESSION_STORAGE_GB, STEP_SESSION_STORAGE_GB, diff --git a/client/src/features/session/components/options/SessionUserSecrets.tsx b/client/src/features/session/components/options/SessionUserSecrets.tsx index fef781d1ae..ec574b7766 100644 --- a/client/src/features/session/components/options/SessionUserSecrets.tsx +++ b/client/src/features/session/components/options/SessionUserSecrets.tsx @@ -21,17 +21,17 @@ import { useCallback, useEffect, useState } from "react"; import { Link } from "react-router"; import { Button, Card, CardBody, Collapse, Input, Label } from "reactstrap"; +import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; +import ChevronFlippedIcon from "../../../../components/icons/ChevronFlippedIcon"; import { Loader } from "../../../../components/Loader"; import { User } from "../../../../model/renkuModels.types"; +import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; +import useAppSelector from "../../../../utils/customHooks/useAppSelector.hook"; import useLegacySelector from "../../../../utils/customHooks/useLegacySelector.hook"; import { Url } from "../../../../utils/helpers/url"; -import ChevronFlippedIcon from "../../../../components/icons/ChevronFlippedIcon"; import { useGetUserSecretsQuery } from "../../../usersV2/api/users.api"; -import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; -import { setSecretsList, setSecretsPath } from "../../startSessionOptionsSlice"; -import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; -import useAppSelector from "../../../../utils/customHooks/useAppSelector.hook"; import { SessionSecrets } from "../../startSessionOptions.types"; +import { setSecretsList, setSecretsPath } from "../../startSessionOptionsSlice"; export default function SessionUserSecrets() { const secretsUrl = Url.get(Url.pages.secrets); diff --git a/client/src/features/session/components/status/SessionHibernationStatusDetails.tsx b/client/src/features/session/components/status/SessionHibernationStatusDetails.tsx index 4d41e3ab0d..1c44889923 100644 --- a/client/src/features/session/components/status/SessionHibernationStatusDetails.tsx +++ b/client/src/features/session/components/status/SessionHibernationStatusDetails.tsx @@ -20,6 +20,7 @@ import { faExclamationTriangle } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import cx from "classnames"; import { Duration } from "luxon"; + import { TimeCaption } from "../../../../components/TimeCaption"; import { NotebookAnnotations } from "../../../../notebooks/components/session.types"; import { ensureDateTime } from "../../../../utils/helpers/DateTimeUtils"; diff --git a/client/src/features/session/components/status/SessionStatusIcon.tsx b/client/src/features/session/components/status/SessionStatusIcon.tsx index 69121e54d3..f0d9cbc0a3 100644 --- a/client/src/features/session/components/status/SessionStatusIcon.tsx +++ b/client/src/features/session/components/status/SessionStatusIcon.tsx @@ -22,8 +22,9 @@ import { faTimesCircle, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Loader } from "../../../../components/Loader"; + import SessionPausedIcon from "../../../../components/icons/SessionPausedIcon"; +import { Loader } from "../../../../components/Loader"; import { SessionStatusState } from "../../sessions.types"; interface SessionStatusIconProps { diff --git a/client/src/features/session/components/status/SessionStatusText.tsx b/client/src/features/session/components/status/SessionStatusText.tsx index 472e015994..3a997d6af9 100644 --- a/client/src/features/session/components/status/SessionStatusText.tsx +++ b/client/src/features/session/components/status/SessionStatusText.tsx @@ -21,6 +21,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Duration } from "luxon"; import { useRef } from "react"; import { PopoverBody, PopoverHeader, UncontrolledPopover } from "reactstrap"; + import { TimeCaption } from "../../../../components/TimeCaption"; import { NotebookAnnotations } from "../../../../notebooks/components/session.types"; import { ensureDateTime } from "../../../../utils/helpers/DateTimeUtils"; diff --git a/client/src/features/session/hooks/options/useDefaultAutoFetchLfsOption.hook.ts b/client/src/features/session/hooks/options/useDefaultAutoFetchLfsOption.hook.ts index 13506443f6..8d44cb6833 100644 --- a/client/src/features/session/hooks/options/useDefaultAutoFetchLfsOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultAutoFetchLfsOption.hook.ts @@ -17,6 +17,7 @@ */ import { useEffect } from "react"; + import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; import { ProjectConfig } from "../../../project/project.types"; import { setLfsAutoFetch } from "../../startSessionOptionsSlice"; diff --git a/client/src/features/session/hooks/options/useDefaultBranchOption.hook.ts b/client/src/features/session/hooks/options/useDefaultBranchOption.hook.ts index 7a79bc601c..9a031754c9 100644 --- a/client/src/features/session/hooks/options/useDefaultBranchOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultBranchOption.hook.ts @@ -18,6 +18,7 @@ import { useEffect, useMemo } from "react"; import { useLocation } from "react-router"; + import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; import { GitLabRepositoryBranch } from "../../../project/GitLab.types"; import { setError } from "../../startSession.slice"; diff --git a/client/src/features/session/hooks/options/useDefaultCloudStorageOption.hook.ts b/client/src/features/session/hooks/options/useDefaultCloudStorageOption.hook.ts index 6d7fd228d1..58766a2a61 100644 --- a/client/src/features/session/hooks/options/useDefaultCloudStorageOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultCloudStorageOption.hook.ts @@ -17,13 +17,14 @@ */ import { useEffect } from "react"; + import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; +import type { CloudStorageGet } from "../../../project/components/cloudStorage/api/projectCloudStorage.api"; import { getProvidedSensitiveFields } from "../../../project/utils/projectCloudStorage.utils"; import { NotebooksVersion } from "../../../versions/versions.types"; import { setError } from "../../startSession.slice"; import { SessionCloudStorage } from "../../startSessionOptions.types"; import { setCloudStorage } from "../../startSessionOptionsSlice"; -import type { CloudStorageGet } from "../../../project/components/cloudStorage/api/projectCloudStorage.api"; interface UseDefaultCloudStorageOptionArgs { notebooksVersion: NotebooksVersion | undefined; diff --git a/client/src/features/session/hooks/options/useDefaultCommitOption.hook.ts b/client/src/features/session/hooks/options/useDefaultCommitOption.hook.ts index c2cfd24de8..a4d7445f44 100644 --- a/client/src/features/session/hooks/options/useDefaultCommitOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultCommitOption.hook.ts @@ -18,6 +18,7 @@ import { useEffect, useMemo } from "react"; import { useLocation } from "react-router"; + import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; import { GitLabRepositoryCommit } from "../../../project/GitLab.types"; import { setError } from "../../startSession.slice"; diff --git a/client/src/features/session/hooks/options/useDefaultSessionClassOption.hook.ts b/client/src/features/session/hooks/options/useDefaultSessionClassOption.hook.ts index 3b8c00a7bc..6f89dddd90 100644 --- a/client/src/features/session/hooks/options/useDefaultSessionClassOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultSessionClassOption.hook.ts @@ -16,10 +16,10 @@ * limitations under the License. */ -import { useEffect, useMemo } from "react"; - import type { ResourcePoolWithIdFiltered } from "~/features/sessionsV2/api/computeResources.api"; import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; +import { useEffect, useMemo } from "react"; + import { setError } from "../../startSession.slice"; import { setSessionClass } from "../../startSessionOptionsSlice"; diff --git a/client/src/features/session/hooks/options/useDefaultStorageOption.hook.ts b/client/src/features/session/hooks/options/useDefaultStorageOption.hook.ts index 7762ae79cd..de802fc846 100644 --- a/client/src/features/session/hooks/options/useDefaultStorageOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultStorageOption.hook.ts @@ -16,12 +16,12 @@ * limitations under the License. */ -import { useEffect } from "react"; - import type { ProjectConfig } from "~/features/project/project.types"; import type { ResourceClassWithId } from "~/features/sessionsV2/api/computeResources.api"; import type { ProjectStatistics } from "~/notebooks/components/session.types"; import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; +import { useEffect } from "react"; + import { setError } from "../../startSession.slice"; import { setStorage } from "../../startSessionOptionsSlice"; import { diff --git a/client/src/features/session/hooks/options/useDefaultUrlOption.hook.ts b/client/src/features/session/hooks/options/useDefaultUrlOption.hook.ts index c58d6d64da..8478041eb4 100644 --- a/client/src/features/session/hooks/options/useDefaultUrlOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultUrlOption.hook.ts @@ -17,6 +17,7 @@ */ import { useEffect } from "react"; + import useAppDispatch from "../../../../utils/customHooks/useAppDispatch.hook"; import { ProjectConfig } from "../../../project/project.types"; import { setDefaultUrl } from "../../startSessionOptionsSlice"; diff --git a/client/src/features/session/sessions.api.ts b/client/src/features/session/sessions.api.ts index 0530bd4a81..016931d1ce 100644 --- a/client/src/features/session/sessions.api.ts +++ b/client/src/features/session/sessions.api.ts @@ -17,6 +17,7 @@ */ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; + import { convertCloudStorageForSessionApi, convertCloudStorageForSessionV2Api, diff --git a/client/src/features/session/sessions.utils.ts b/client/src/features/session/sessions.utils.ts index 1b65cffc7f..7dffaea1b1 100644 --- a/client/src/features/session/sessions.utils.ts +++ b/client/src/features/session/sessions.utils.ts @@ -17,6 +17,7 @@ */ import { DateTime } from "luxon"; + import { NotebooksHelper } from "../../notebooks"; import { Url } from "../../utils/helpers/url"; import { Session, Sessions } from "./sessions.types"; diff --git a/client/src/features/session/sidecar.api.ts b/client/src/features/session/sidecar.api.ts index c5cd88907a..74b078db82 100644 --- a/client/src/features/session/sidecar.api.ts +++ b/client/src/features/session/sidecar.api.ts @@ -18,10 +18,10 @@ import { BaseQueryFn, - FetchArgs, - FetchBaseQueryError, createApi, + FetchArgs, fetchBaseQuery, + FetchBaseQueryError, } from "@reduxjs/toolkit/query/react"; import type { diff --git a/client/src/features/session/startSession.slice.ts b/client/src/features/session/startSession.slice.ts index 7fe48279e1..2cb6ac28c2 100644 --- a/client/src/features/session/startSession.slice.ts +++ b/client/src/features/session/startSession.slice.ts @@ -17,8 +17,9 @@ */ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; -import { StartSession } from "./startSession.types"; + import { StepsProgressBar } from "../../components/progress/ProgressSteps"; +import { StartSession } from "./startSession.types"; const initialState: StartSession = { error: null, diff --git a/client/src/features/session/startSessionOptionsSlice.ts b/client/src/features/session/startSessionOptionsSlice.ts index e6e3b7cd9f..6d5859e15e 100644 --- a/client/src/features/session/startSessionOptionsSlice.ts +++ b/client/src/features/session/startSessionOptionsSlice.ts @@ -17,6 +17,7 @@ */ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; + import { MIN_SESSION_STORAGE_GB } from "./startSessionOptions.constants"; import { DockerImageBuildStatus, diff --git a/client/src/features/session/useWaitForSessionStatus.hook.ts b/client/src/features/session/useWaitForSessionStatus.hook.ts index 4679a13044..8e0628fa6e 100644 --- a/client/src/features/session/useWaitForSessionStatus.hook.ts +++ b/client/src/features/session/useWaitForSessionStatus.hook.ts @@ -17,6 +17,7 @@ */ import { useEffect, useMemo, useState } from "react"; + import { useGetSessionsQuery as useGetSessionsQueryV2 } from "../sessionsV2/api/sessionsV2.api"; import { useGetSessionsQuery } from "./sessions.api"; import { SessionStatusState } from "./sessions.types"; diff --git a/client/src/features/sessionsV2/AddSessionLauncherButton.tsx b/client/src/features/sessionsV2/AddSessionLauncherButton.tsx index 994d841b73..e38e827670 100644 --- a/client/src/features/sessionsV2/AddSessionLauncherButton.tsx +++ b/client/src/features/sessionsV2/AddSessionLauncherButton.tsx @@ -20,6 +20,7 @@ import cx from "classnames"; import { useCallback, useState } from "react"; import { PlusLg } from "react-bootstrap-icons"; import { Button } from "reactstrap"; + import NewSessionLauncherModal from "./components/SessionModals/NewSessionLauncherModal.tsx"; export default function AddSessionLauncherButton({ diff --git a/client/src/features/sessionsV2/DataConnectorSecretsModal.tsx b/client/src/features/sessionsV2/DataConnectorSecretsModal.tsx index 954f047314..933f2514e9 100644 --- a/client/src/features/sessionsV2/DataConnectorSecretsModal.tsx +++ b/client/src/features/sessionsV2/DataConnectorSecretsModal.tsx @@ -17,7 +17,6 @@ */ import cx from "classnames"; - import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { ArrowRepeat, @@ -46,7 +45,6 @@ import { import { Loader } from "../../components/Loader"; import { User } from "../../model/renkuModels.types"; import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook"; - import { validationParametersFromDataConnectorConfiguration } from "../dataConnectorsV2/components/dataConnector.utils"; import { DataConnectorConfiguration } from "../dataConnectorsV2/components/useDataConnectorConfiguration.hook"; import { usePostStorageSchemaTestConnectionMutation } from "../project/components/cloudStorage/api/projectCloudStorage.api"; diff --git a/client/src/features/sessionsV2/LazySessionStartPage.tsx b/client/src/features/sessionsV2/LazySessionStartPage.tsx index 0568a31183..f21a7d4d2d 100644 --- a/client/src/features/sessionsV2/LazySessionStartPage.tsx +++ b/client/src/features/sessionsV2/LazySessionStartPage.tsx @@ -16,7 +16,7 @@ * limitations under the License */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../../components/PageLoader"; diff --git a/client/src/features/sessionsV2/LazyShowSessionPage.tsx b/client/src/features/sessionsV2/LazyShowSessionPage.tsx index 7cc4b476cd..694e744769 100644 --- a/client/src/features/sessionsV2/LazyShowSessionPage.tsx +++ b/client/src/features/sessionsV2/LazyShowSessionPage.tsx @@ -16,7 +16,7 @@ * limitations under the License */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../../components/PageLoader"; diff --git a/client/src/features/sessionsV2/PauseOrDeleteSessionModal.tsx b/client/src/features/sessionsV2/PauseOrDeleteSessionModal.tsx index 7ebfb51760..587c8168a6 100644 --- a/client/src/features/sessionsV2/PauseOrDeleteSessionModal.tsx +++ b/client/src/features/sessionsV2/PauseOrDeleteSessionModal.tsx @@ -18,13 +18,14 @@ import { SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; +import { InfoAlert } from "~/components/Alert"; +import { TimeCaption } from "~/components/TimeCaption"; import cx from "classnames"; import { useCallback, useContext, useEffect, useState } from "react"; import { PauseCircle, Trash, XLg } from "react-bootstrap-icons"; import { generatePath, useNavigate, useParams } from "react-router"; import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; -import { InfoAlert } from "~/components/Alert"; -import { TimeCaption } from "~/components/TimeCaption"; + import { Loader } from "../../components/Loader"; import { User } from "../../model/renkuModels.types"; import { NOTIFICATION_TOPICS } from "../../notifications/Notifications.constants"; diff --git a/client/src/features/sessionsV2/SessionImageModal.tsx b/client/src/features/sessionsV2/SessionImageModal.tsx index 7b05b6f3f6..b6d6a8bc8f 100644 --- a/client/src/features/sessionsV2/SessionImageModal.tsx +++ b/client/src/features/sessionsV2/SessionImageModal.tsx @@ -17,15 +17,16 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import { Loader } from "~/components/Loader"; +import ScrollableModal from "~/components/modal/ScrollableModal"; +import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; +import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; import cx from "classnames"; import { useCallback, useMemo } from "react"; import { Plugin, Send, SkipForward, XLg } from "react-bootstrap-icons"; import { generatePath, Link, useLocation, useNavigate } from "react-router"; import { Button, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; -import { Loader } from "~/components/Loader"; -import ScrollableModal from "~/components/modal/ScrollableModal"; -import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; -import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; + import type { Project } from "../projectsV2/api/projectV2.api"; import { SessionLauncher } from "./api/sessionLaunchersV2.generated-api"; import { useGetSessionsImagesQuery } from "./api/sessionsV2.api"; diff --git a/client/src/features/sessionsV2/SessionList/SessionCard.tsx b/client/src/features/sessionsV2/SessionList/SessionCard.tsx index 6ccf45244f..a187938d32 100644 --- a/client/src/features/sessionsV2/SessionList/SessionCard.tsx +++ b/client/src/features/sessionsV2/SessionList/SessionCard.tsx @@ -18,6 +18,7 @@ import cx from "classnames"; import { Col, Row } from "reactstrap"; + import { Project } from "../../projectsV2/api/projectV2.api"; import ActiveSessionButton from "../components/SessionButton/ActiveSessionButton"; import { @@ -27,6 +28,7 @@ import { } from "../components/SessionStatus/SessionStatus"; import { getShowSessionUrlByProject } from "../SessionsV2"; import { SessionV2 } from "../sessionsV2.types"; + import styles from "./Session.module.scss"; interface SessionCardProps { diff --git a/client/src/features/sessionsV2/SessionList/SessionItem.tsx b/client/src/features/sessionsV2/SessionList/SessionItem.tsx index 8934852493..c363963e4f 100644 --- a/client/src/features/sessionsV2/SessionList/SessionItem.tsx +++ b/client/src/features/sessionsV2/SessionList/SessionItem.tsx @@ -15,13 +15,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; import { CircleFill } from "react-bootstrap-icons"; import { Col, ListGroupItem, Row } from "reactstrap"; import { Project } from "../../projectsV2/api/projectV2.api"; -import { getShowSessionUrlByProject } from "../SessionsV2"; -import StartSessionButton from "../StartSessionButton"; import type { SessionLauncher } from "../api/sessionLaunchersV2.api"; import ActiveSessionButton from "../components/SessionButton/ActiveSessionButton"; import { @@ -29,7 +28,9 @@ import { SessionStatusV2Description, SessionStatusV2Label, } from "../components/SessionStatus/SessionStatus"; +import { getShowSessionUrlByProject } from "../SessionsV2"; import { SessionV2 } from "../sessionsV2.types"; +import StartSessionButton from "../StartSessionButton"; interface SessionItemProps { launcher?: SessionLauncher; diff --git a/client/src/features/sessionsV2/SessionList/SessionLauncherCard.tsx b/client/src/features/sessionsV2/SessionList/SessionLauncherCard.tsx index 180c88e7f9..97b140ede6 100644 --- a/client/src/features/sessionsV2/SessionList/SessionLauncherCard.tsx +++ b/client/src/features/sessionsV2/SessionList/SessionLauncherCard.tsx @@ -15,12 +15,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { skipToken } from "@reduxjs/toolkit/query"; +import SessionEnvironmentGitLabWarningBadge from "~/features/legacy/SessionEnvironmentGitLabWarnBadge"; import cx from "classnames"; import { useContext } from "react"; import { CircleFill, Link45deg, Pencil, Trash } from "react-bootstrap-icons"; import { Card, CardBody, Col, DropdownItem, Row } from "reactstrap"; -import SessionEnvironmentGitLabWarningBadge from "~/features/legacy/SessionEnvironmentGitLabWarnBadge"; + import { Loader } from "../../../components/Loader"; import AppContext from "../../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../../utils/context/appParams.constants"; diff --git a/client/src/features/sessionsV2/SessionList/SessionLauncherDisplay.tsx b/client/src/features/sessionsV2/SessionList/SessionLauncherDisplay.tsx index 35d830aae7..57d5d008c6 100644 --- a/client/src/features/sessionsV2/SessionList/SessionLauncherDisplay.tsx +++ b/client/src/features/sessionsV2/SessionList/SessionLauncherDisplay.tsx @@ -18,17 +18,17 @@ import { useCallback, useMemo, useState } from "react"; +import EnvironmentLogsV2 from "../../../components/LogsV2"; import useLocationHash from "../../../utils/customHooks/useLocationHash.hook"; import { Project } from "../../projectsV2/api/projectV2.api"; import type { SessionLauncher } from "../api/sessionLaunchersV2.api"; import { useGetSessionsQuery as useGetSessionsQueryV2 } from "../api/sessionsV2.api"; +import UpdateSessionLauncherMetadataModal from "../components/SessionModals/UpdateSessionLauncherMetadataModal"; import UpdateSessionLauncherEnvironmentModal from "../components/SessionModals/UpdateSessionLauncherModal"; import DeleteSessionV2Modal from "../DeleteSessionLauncherModal"; import SessionLaunchLinkModal from "../SessionView/SessionLaunchLinkModal"; import { SessionView } from "../SessionView/SessionView"; import SessionLauncherCard from "./SessionLauncherCard"; -import EnvironmentLogsV2 from "../../../components/LogsV2"; -import UpdateSessionLauncherMetadataModal from "../components/SessionModals/UpdateSessionLauncherMetadataModal"; interface SessionLauncherDisplayProps { launcher: SessionLauncher; diff --git a/client/src/features/sessionsV2/SessionShowPage/SessionUnavailable.tsx b/client/src/features/sessionsV2/SessionShowPage/SessionUnavailable.tsx index cdfbca5027..12ba16bd85 100644 --- a/client/src/features/sessionsV2/SessionShowPage/SessionUnavailable.tsx +++ b/client/src/features/sessionsV2/SessionShowPage/SessionUnavailable.tsx @@ -17,10 +17,10 @@ */ import cx from "classnames"; -import { Link } from "react-router"; -import { Alert } from "reactstrap"; import { QuestionCircle } from "react-bootstrap-icons"; -import { generatePath, useParams } from "react-router"; +import { generatePath, Link, useParams } from "react-router"; +import { Alert } from "reactstrap"; + import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; export default function SessionUnavailable() { diff --git a/client/src/features/sessionsV2/SessionShowPage/ShowSessionPage.tsx b/client/src/features/sessionsV2/SessionShowPage/ShowSessionPage.tsx index 5e6800b74a..dc6b3ac689 100644 --- a/client/src/features/sessionsV2/SessionShowPage/ShowSessionPage.tsx +++ b/client/src/features/sessionsV2/SessionShowPage/ShowSessionPage.tsx @@ -31,7 +31,7 @@ import { PauseCircle, Trash, } from "react-bootstrap-icons"; -import { Link, generatePath, useNavigate, useParams } from "react-router"; +import { generatePath, Link, useNavigate, useParams } from "react-router"; import { Button, Modal, @@ -40,27 +40,27 @@ import { UncontrolledTooltip, } from "reactstrap"; +import { CommandCopy } from "../../../components/commandCopy/CommandCopy"; +import RenkuFrogIcon from "../../../components/icons/RenkuIcon"; import { Loader } from "../../../components/Loader"; import EnvironmentLogsV2 from "../../../components/LogsV2"; import { TimeCaption } from "../../../components/TimeCaption"; -import { CommandCopy } from "../../../components/commandCopy/CommandCopy"; -import RenkuFrogIcon from "../../../components/icons/RenkuIcon"; import { User } from "../../../model/renkuModels.types"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import useAppDispatch from "../../../utils/customHooks/useAppDispatch.hook"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; import useWindowSize from "../../../utils/helpers/UseWindowsSize"; import { displaySlice, resetFavicon, setFavicon } from "../../display"; +import type { Project } from "../../projectsV2/api/projectV2.api"; import { useGetNamespacesByNamespaceProjectsAndSlugQuery } from "../../projectsV2/api/projectV2.enhanced-api"; import { SessionRowResourceRequests } from "../../session/components/SessionsList"; import { StartSessionProgressBarV2 } from "../../session/components/StartSessionProgressBar"; -import type { Project } from "../../projectsV2/api/projectV2.api"; -import PauseOrDeleteSessionModal from "../PauseOrDeleteSessionModal"; import { useGetProjectsByProjectIdSessionLaunchersQuery as useGetProjectSessionLaunchersQuery, type SessionLauncher, } from "../api/sessionLaunchersV2.api"; import { useGetSessionsQuery } from "../api/sessionsV2.api"; +import PauseOrDeleteSessionModal from "../PauseOrDeleteSessionModal"; import { getSessionFavicon } from "../session.utils"; import { SessionV2 } from "../sessionsV2.types"; import SessionLaunchLinkModal from "../SessionView/SessionLaunchLinkModal"; diff --git a/client/src/features/sessionsV2/SessionStartPage.tsx b/client/src/features/sessionsV2/SessionStartPage.tsx index 1c88b1ee02..a7c809ec18 100644 --- a/client/src/features/sessionsV2/SessionStartPage.tsx +++ b/client/src/features/sessionsV2/SessionStartPage.tsx @@ -26,11 +26,11 @@ import { useSearchParams, } from "react-router"; -import PageLoader from "../../components/PageLoader"; import { RtkErrorAlert, RtkOrNotebooksError, } from "../../components/errors/RtkErrorAlert"; +import PageLoader from "../../components/PageLoader"; import ProgressStepsIndicator, { ProgressStyle, ProgressType, @@ -40,7 +40,6 @@ import ProgressStepsIndicator, { import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; import useAppDispatch from "../../utils/customHooks/useAppDispatch.hook"; import useAppSelector from "../../utils/customHooks/useAppSelector.hook"; -import type { SessionSecretSlotWithSecret } from "../ProjectPageV2/ProjectPageContent/SessionSecrets/sessionSecrets.types"; import { usePatchDataConnectorsByDataConnectorIdSecretsMutation } from "../dataConnectorsV2/api/data-connectors.enhanced-api"; import type { DataConnectorConfiguration } from "../dataConnectorsV2/components/useDataConnectorConfiguration.hook"; import { resetFavicon, setFavicon } from "../display"; @@ -48,12 +47,10 @@ import { dataConnectorsOverrideFromConfig, storageDefinitionAfterSavingCredentialsFromConfig, } from "../project/utils/projectCloudStorage.utils"; +import type { SessionSecretSlotWithSecret } from "../ProjectPageV2/ProjectPageContent/SessionSecrets/sessionSecrets.types"; import type { Project } from "../projectsV2/api/projectV2.api"; import { useGetNamespacesByNamespaceProjectsAndSlugQuery } from "../projectsV2/api/projectV2.enhanced-api"; import { storageSecretNameToFieldName } from "../secretsV2/secrets.utils"; -import DataConnectorSecretsModal from "./DataConnectorSecretsModal"; -import SessionImageModal from "./SessionImageModal"; -import SessionSecretsModal from "./SessionSecretsModal"; import type { SessionLauncher } from "./api/sessionLaunchersV2.api"; import { useGetProjectsByProjectIdSessionLaunchersQuery as useGetProjectSessionLaunchersQuery } from "./api/sessionLaunchersV2.api"; import { @@ -61,8 +58,11 @@ import { type SessionPostRequest, } from "./api/sessionsV2.api"; import { SelectResourceClassModal } from "./components/SessionModals/SelectResourceClass"; +import DataConnectorSecretsModal from "./DataConnectorSecretsModal"; import { CUSTOM_LAUNCH_SEARCH_PARAM } from "./session.constants"; import { validateEnvVariableName } from "./session.utils"; +import SessionImageModal from "./SessionImageModal"; +import SessionSecretsModal from "./SessionSecretsModal"; import startSessionOptionsV2Slice from "./startSessionOptionsV2.slice"; import type { SessionStartDataConnectorConfiguration, diff --git a/client/src/features/sessionsV2/SessionStyles.constants.ts b/client/src/features/sessionsV2/SessionStyles.constants.ts index 70c0ecea76..7c4d096d57 100644 --- a/client/src/features/sessionsV2/SessionStyles.constants.ts +++ b/client/src/features/sessionsV2/SessionStyles.constants.ts @@ -16,17 +16,16 @@ * limitations under the License. */ -import linePlaying from "../../styles/assets/linePlaying.svg"; +import blockIcon from "../../styles/assets/block.svg"; +import failedIcon from "../../styles/assets/failed.svg"; +import lineBlock from "../../styles/assets/lineBlock.svg"; import lineFailed from "../../styles/assets/lineFailed.svg"; import linePaused from "../../styles/assets/linePaused.svg"; +import linePlaying from "../../styles/assets/linePlaying.svg"; import lineStopped from "../../styles/assets/lineStopped.svg"; -import lineBlock from "../../styles/assets/lineBlock.svg"; - -import playingIcon from "../../styles/assets/playing.svg"; -import failedIcon from "../../styles/assets/failed.svg"; import pausedIcon from "../../styles/assets/paused.svg"; +import playingIcon from "../../styles/assets/playing.svg"; import stoppedIcon from "../../styles/assets/stopped.svg"; -import blockIcon from "../../styles/assets/block.svg"; export const SESSION_STATES = { RUNNING: "running", diff --git a/client/src/features/sessionsV2/SessionView/EnvironmentCard.tsx b/client/src/features/sessionsV2/SessionView/EnvironmentCard.tsx index 59306a167a..9318949b82 100644 --- a/client/src/features/sessionsV2/SessionView/EnvironmentCard.tsx +++ b/client/src/features/sessionsV2/SessionView/EnvironmentCard.tsx @@ -17,13 +17,14 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import { ErrorAlert, WarnAlert } from "~/components/Alert"; +import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; import cx from "classnames"; import { ReactNode, useContext, useEffect, useMemo } from "react"; import { CircleFill, Clock, Plugin, Send } from "react-bootstrap-icons"; import { Link, useLocation } from "react-router"; import { Badge, Card, CardBody, Col, Row } from "reactstrap"; -import { ErrorAlert, WarnAlert } from "~/components/Alert"; -import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; + import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { ErrorLabel } from "../../../components/formlabels/FormLabels"; import { Loader } from "../../../components/Loader"; diff --git a/client/src/features/sessionsV2/SessionView/SessionLaunchLinkModal.tsx b/client/src/features/sessionsV2/SessionView/SessionLaunchLinkModal.tsx index e62b6b9de6..4b56c56aeb 100644 --- a/client/src/features/sessionsV2/SessionView/SessionLaunchLinkModal.tsx +++ b/client/src/features/sessionsV2/SessionView/SessionLaunchLinkModal.tsx @@ -27,6 +27,7 @@ import { type FieldErrors, type UseFormRegister, } from "react-hook-form"; +import { generatePath } from "react-router"; import { Button, Col, @@ -40,14 +41,12 @@ import { ModalFooter, Row, } from "reactstrap"; -import { generatePath } from "react-router"; import { Clipboard } from "../../../components/clipboard/Clipboard"; import ChevronFlippedIcon from "../../../components/icons/ChevronFlippedIcon"; import ModalHeader from "../../../components/modal/ModalHeader"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import AppContext from "../../../utils/context/appContext"; - import { Project } from "../../projectsV2/api/projectV2.api"; import type { SessionLauncher } from "../api/sessionLaunchersV2.api"; diff --git a/client/src/features/sessionsV2/SessionView/SessionView.tsx b/client/src/features/sessionsV2/SessionView/SessionView.tsx index 988f874d10..085c485ea3 100644 --- a/client/src/features/sessionsV2/SessionView/SessionView.tsx +++ b/client/src/features/sessionsV2/SessionView/SessionView.tsx @@ -15,7 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { skipToken } from "@reduxjs/toolkit/query"; +import { useGetProjectsByProjectIdDataConnectorLinksQuery } from "~/features/dataConnectorsV2/api/data-connectors.enhanced-api"; import cx from "classnames"; import { ReactNode, useCallback, useMemo, useState } from "react"; import { @@ -41,18 +43,15 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { useGetProjectsByProjectIdDataConnectorLinksQuery } from "~/features/dataConnectorsV2/api/data-connectors.enhanced-api"; -import { TimeCaption } from "../../../components/TimeCaption"; import { CommandCopy } from "../../../components/commandCopy/CommandCopy"; +import { TimeCaption } from "../../../components/TimeCaption"; +import { useGetDataConnectorsListByDataConnectorIdsQuery } from "../../dataConnectorsV2/api/data-connectors.enhanced-api"; +import PermissionsGuard from "../../permissionsV2/PermissionsGuard"; import { RepositoryItem } from "../../ProjectPageV2/ProjectPageContent/CodeRepositories/CodeRepositoryDisplay"; import SessionViewSessionSecrets from "../../ProjectPageV2/ProjectPageContent/SessionSecrets/SessionViewSessionSecrets"; import useProjectPermissions from "../../ProjectPageV2/utils/useProjectPermissions.hook"; -import { useGetDataConnectorsListByDataConnectorIdsQuery } from "../../dataConnectorsV2/api/data-connectors.enhanced-api"; -import PermissionsGuard from "../../permissionsV2/PermissionsGuard"; import { Project } from "../../projectsV2/api/projectV2.api"; import { SessionRowResourceRequests } from "../../session/components/SessionsList"; -import { SessionV2Actions, getShowSessionUrlByProject } from "../SessionsV2"; -import StartSessionButton from "../StartSessionButton"; import { useGetClassesByClassIdQuery, useGetResourcePoolsQuery, @@ -68,10 +67,12 @@ import { SessionStatusV2Title, } from "../components/SessionStatus/SessionStatus"; import { DEFAULT_URL } from "../session.constants"; +import { getShowSessionUrlByProject, SessionV2Actions } from "../SessionsV2"; import { SessionV2 } from "../sessionsV2.types"; +import StartSessionButton from "../StartSessionButton"; +import EnvironmentCard from "./EnvironmentCard"; import EnvVariablesCard from "./EnvVariablesCard"; import EnvVariablesModal from "./EnvVariablesModal"; -import EnvironmentCard from "./EnvironmentCard"; interface SessionCardContentProps { color: string; diff --git a/client/src/features/sessionsV2/SessionsV2.tsx b/client/src/features/sessionsV2/SessionsV2.tsx index fd2bb41fde..c619818e29 100644 --- a/client/src/features/sessionsV2/SessionsV2.tsx +++ b/client/src/features/sessionsV2/SessionsV2.tsx @@ -29,26 +29,27 @@ import { DropdownItem, } from "reactstrap"; -import { Loader } from "../../components/Loader"; -import EnvironmentLogsV2 from "../../components/LogsV2"; import { ButtonWithMenuV2 } from "../../components/buttons/Button"; import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; +import { Loader } from "../../components/Loader"; +import EnvironmentLogsV2 from "../../components/LogsV2"; import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; import useLocationHash from "../../utils/customHooks/useLocationHash.hook"; -import useProjectPermissions from "../ProjectPageV2/utils/useProjectPermissions.hook"; import PermissionsGuard from "../permissionsV2/PermissionsGuard"; +import useProjectPermissions from "../ProjectPageV2/utils/useProjectPermissions.hook"; import type { Project } from "../projectsV2/api/projectV2.api"; import AddSessionLauncherButton from "./AddSessionLauncherButton"; -import SessionLauncherCard from "./SessionList/SessionLauncherCard"; -import { SessionLauncherDisplay } from "./SessionList/SessionLauncherDisplay"; -import { SessionView } from "./SessionView/SessionView"; import type { SessionLauncher } from "./api/sessionLaunchersV2.api"; import { useGetProjectsByProjectIdSessionLaunchersQuery as useGetProjectSessionLaunchersQuery } from "./api/sessionLaunchersV2.api"; import { useGetSessionsQuery as useGetSessionsQueryV2 } from "./api/sessionsV2.api"; +import SessionLauncherCard from "./SessionList/SessionLauncherCard"; +import { SessionLauncherDisplay } from "./SessionList/SessionLauncherDisplay"; import { SessionV2 } from "./sessionsV2.types"; +import { SessionView } from "./SessionView/SessionView"; // Required for logs formatting import "../../notebooks/Notebooks.css"; + import { LauncherEnvironmentIcon } from "./components/SessionForm/LauncherEnvironmentIcon"; export function getShowSessionUrlByProject( diff --git a/client/src/features/sessionsV2/StartSessionButton.tsx b/client/src/features/sessionsV2/StartSessionButton.tsx index 059d7fc732..f29b7cd162 100644 --- a/client/src/features/sessionsV2/StartSessionButton.tsx +++ b/client/src/features/sessionsV2/StartSessionButton.tsx @@ -20,7 +20,8 @@ import { skipToken } from "@reduxjs/toolkit/query/react"; import cx from "classnames"; import { ReactNode } from "react"; import { PlayCircle } from "react-bootstrap-icons"; -import { Link, generatePath } from "react-router"; +import { generatePath, Link } from "react-router"; + import { ButtonWithMenuV2 } from "../../components/buttons/Button"; import { ABSOLUTE_ROUTES } from "../../routing/routes.constants"; import { SessionLauncher } from "./api/sessionLaunchersV2.generated-api"; diff --git a/client/src/features/sessionsV2/api/computeResources.api-config.ts b/client/src/features/sessionsV2/api/computeResources.api-config.ts index 26971dd70f..99329189ff 100644 --- a/client/src/features/sessionsV2/api/computeResources.api-config.ts +++ b/client/src/features/sessionsV2/api/computeResources.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:computeResources` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { apiFile: "./computeResources.empty-api.ts", diff --git a/client/src/features/sessionsV2/api/computeResources.api.ts b/client/src/features/sessionsV2/api/computeResources.api.ts index d19f81cfe9..6da27dd356 100644 --- a/client/src/features/sessionsV2/api/computeResources.api.ts +++ b/client/src/features/sessionsV2/api/computeResources.api.ts @@ -18,8 +18,8 @@ import { computeResourcesGeneratedApi, - type GetResourcePoolsApiResponse, type GetResourcePoolsApiArg, + type GetResourcePoolsApiResponse, } from "./computeResources.generated-api"; // Fixes some API endpoints diff --git a/client/src/features/sessionsV2/api/computeResources.generated-api.ts b/client/src/features/sessionsV2/api/computeResources.generated-api.ts index ac22163888..39aa9c5e9c 100644 --- a/client/src/features/sessionsV2/api/computeResources.generated-api.ts +++ b/client/src/features/sessionsV2/api/computeResources.generated-api.ts @@ -1,4 +1,5 @@ import { computeResourcesEmptyApi as api } from "./computeResources.empty-api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getClassesByClassId: build.query< diff --git a/client/src/features/sessionsV2/api/sessionLaunchersV2.api-config.ts b/client/src/features/sessionsV2/api/sessionLaunchersV2.api-config.ts index d765cec7fb..8d44fb5698 100644 --- a/client/src/features/sessionsV2/api/sessionLaunchersV2.api-config.ts +++ b/client/src/features/sessionsV2/api/sessionLaunchersV2.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:sessionLaunchersV2` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { apiFile: "./sessionLaunchersV2.empty-api.ts", diff --git a/client/src/features/sessionsV2/api/sessionLaunchersV2.api.ts b/client/src/features/sessionsV2/api/sessionLaunchersV2.api.ts index d5cb34e2fa..68853fdc85 100644 --- a/client/src/features/sessionsV2/api/sessionLaunchersV2.api.ts +++ b/client/src/features/sessionsV2/api/sessionLaunchersV2.api.ts @@ -17,13 +17,13 @@ */ import { + sessionLaunchersV2GeneratedApi, type EnvironmentIdOnlyPatch, type EnvironmentIdOnlyPost, type EnvironmentPatchInLauncher, type EnvironmentPostInLauncher, type GetEnvironmentsApiArg, type GetEnvironmentsApiResponse, - sessionLaunchersV2GeneratedApi, } from "./sessionLaunchersV2.generated-api"; // Fixes some API endpoints diff --git a/client/src/features/sessionsV2/api/sessionLaunchersV2.generated-api.ts b/client/src/features/sessionsV2/api/sessionLaunchersV2.generated-api.ts index 6b0d267fdf..ad44044b04 100644 --- a/client/src/features/sessionsV2/api/sessionLaunchersV2.generated-api.ts +++ b/client/src/features/sessionsV2/api/sessionLaunchersV2.generated-api.ts @@ -1,4 +1,5 @@ import { sessionLaunchersV2EmptyApi as api } from "./sessionLaunchersV2.empty-api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getEnvironments: build.query< diff --git a/client/src/features/sessionsV2/api/sessionsV2.api-config.ts b/client/src/features/sessionsV2/api/sessionsV2.api-config.ts index eda5fee45b..030d521323 100644 --- a/client/src/features/sessionsV2/api/sessionsV2.api-config.ts +++ b/client/src/features/sessionsV2/api/sessionsV2.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:sessionsV2` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { apiFile: "./sessionsV2.empty-api.ts", diff --git a/client/src/features/sessionsV2/api/sessionsV2.generated-api.ts b/client/src/features/sessionsV2/api/sessionsV2.generated-api.ts index a418255df0..628650863d 100644 --- a/client/src/features/sessionsV2/api/sessionsV2.generated-api.ts +++ b/client/src/features/sessionsV2/api/sessionsV2.generated-api.ts @@ -1,4 +1,5 @@ import { sessionsV2EmptyApi as api } from "./sessionsV2.empty-api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getNotebooksImages: build.query< diff --git a/client/src/features/sessionsV2/components/BuildLauncherButtons.tsx b/client/src/features/sessionsV2/components/BuildLauncherButtons.tsx index f2e2837d27..3236b91c57 100644 --- a/client/src/features/sessionsV2/components/BuildLauncherButtons.tsx +++ b/client/src/features/sessionsV2/components/BuildLauncherButtons.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { skipToken } from "@reduxjs/toolkit/query"; import cx from "classnames"; import { useCallback, useMemo, useState } from "react"; @@ -24,6 +25,7 @@ import { XOctagon, } from "react-bootstrap-icons"; import { Button, ButtonGroup } from "reactstrap"; + import PermissionsGuard from "../../permissionsV2/PermissionsGuard"; import useProjectPermissions from "../../ProjectPageV2/utils/useProjectPermissions.hook"; import { diff --git a/client/src/features/sessionsV2/components/BuildStatusComponents.tsx b/client/src/features/sessionsV2/components/BuildStatusComponents.tsx index 4d85c50575..f02fa873e0 100644 --- a/client/src/features/sessionsV2/components/BuildStatusComponents.tsx +++ b/client/src/features/sessionsV2/components/BuildStatusComponents.tsx @@ -40,6 +40,7 @@ import { ModalFooter, ModalHeader, } from "reactstrap"; + import { ButtonWithMenuV2 } from "../../../components/buttons/Button"; import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; import { ExternalLink } from "../../../components/ExternalLinks"; diff --git a/client/src/features/sessionsV2/components/SessionButton/ActiveSessionButton.tsx b/client/src/features/sessionsV2/components/SessionButton/ActiveSessionButton.tsx index 53bc07ddcf..c3cc8adb51 100644 --- a/client/src/features/sessionsV2/components/SessionButton/ActiveSessionButton.tsx +++ b/client/src/features/sessionsV2/components/SessionButton/ActiveSessionButton.tsx @@ -18,6 +18,15 @@ import { SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; +import { WarnAlert } from "~/components/Alert"; +import { ButtonWithMenuV2 } from "~/components/buttons/Button"; +import { Loader } from "~/components/Loader"; +import { User } from "~/model/renkuModels.types"; +import { NOTIFICATION_TOPICS } from "~/notifications/Notifications.constants"; +import { NotificationsManager } from "~/notifications/notifications.types"; +import AppContext from "~/utils/context/appContext"; +import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; +import useLegacySelector from "~/utils/customHooks/useLegacySelector.hook"; import cx from "classnames"; import { useCallback, useContext, useEffect, useState } from "react"; import { @@ -44,23 +53,14 @@ import { Row, } from "reactstrap"; -import { WarnAlert } from "~/components/Alert"; -import { Loader } from "~/components/Loader"; -import { ButtonWithMenuV2 } from "~/components/buttons/Button"; -import { User } from "~/model/renkuModels.types"; -import { NOTIFICATION_TOPICS } from "~/notifications/Notifications.constants"; -import { NotificationsManager } from "~/notifications/notifications.types"; -import AppContext from "~/utils/context/appContext"; -import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; -import useLegacySelector from "~/utils/customHooks/useLegacySelector.hook"; import { toggleSessionLogsModal } from "../../../display/displaySlice"; -import { SessionRowResourceRequests } from "../../../session/components/SessionsList"; import { SessionClassSelectorV2 } from "../../../session/components/options/SessionClassOption"; +import { SessionRowResourceRequests } from "../../../session/components/SessionsList"; import { SessionStatusState } from "../../../session/sessions.types"; import { useWaitForSessionStatusV2 } from "../../../session/useWaitForSessionStatus.hook"; import { - type ResourceClassWithId, useGetResourcePoolsQuery, + type ResourceClassWithId, } from "../../api/computeResources.api"; import { usePatchSessionsBySessionIdMutation as usePatchSessionMutation, diff --git a/client/src/features/sessionsV2/components/SessionForm/AdvancedSettingsFields.tsx b/client/src/features/sessionsV2/components/SessionForm/AdvancedSettingsFields.tsx index e8ff1cbd65..308a9eba7e 100644 --- a/client/src/features/sessionsV2/components/SessionForm/AdvancedSettingsFields.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/AdvancedSettingsFields.tsx @@ -28,6 +28,7 @@ import { } from "react-hook-form"; import { FormText, Input, Label } from "reactstrap"; import { InputType } from "reactstrap/types/lib/Input"; + import LazyRenkuMarkdown from "../../../../components/markdown/LazyRenkuMarkdown"; import { MoreInfo } from "../../../../components/MoreInfo"; import { SessionEnvironmentForm } from "../../../admin/SessionEnvironmentFormContent"; diff --git a/client/src/features/sessionsV2/components/SessionForm/BuilderEnvironmentFields.tsx b/client/src/features/sessionsV2/components/SessionForm/BuilderEnvironmentFields.tsx index a308ca98d6..b7dc4d95fa 100644 --- a/client/src/features/sessionsV2/components/SessionForm/BuilderEnvironmentFields.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/BuilderEnvironmentFields.tsx @@ -22,8 +22,8 @@ import { useContext, useMemo } from "react"; import { type Control } from "react-hook-form"; import { ErrorAlert, WarnAlert } from "../../../../components/Alert"; -import { Loader } from "../../../../components/Loader"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; import AppContext from "../../../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../../../utils/context/appParams.constants"; import { useProject } from "../../../ProjectPageV2/ProjectPageContainer/ProjectPageContainer"; @@ -31,8 +31,8 @@ import { useGetRepositoriesProbesQuery } from "../../../repositories/repositorie import type { SessionLauncherForm } from "../../sessionsV2.types"; import BuilderFrontendSelector from "./BuilderFrontendSelector"; import BuilderTypeSelector from "./BuilderTypeSelector"; -import CodeRepositorySelector from "./CodeRepositorySelector"; import CodeRepositoryAdvancedSettings from "./CodeRepositoryAdvancedSettings"; +import CodeRepositorySelector from "./CodeRepositorySelector"; interface BuilderEnvironmentFieldsProps { control: Control; diff --git a/client/src/features/sessionsV2/components/SessionForm/BuilderTypeSelector.tsx b/client/src/features/sessionsV2/components/SessionForm/BuilderTypeSelector.tsx index bf436100c8..dff45508f9 100644 --- a/client/src/features/sessionsV2/components/SessionForm/BuilderTypeSelector.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/BuilderTypeSelector.tsx @@ -25,6 +25,7 @@ import { type UseControllerProps, } from "react-hook-form"; import { Label } from "reactstrap"; + import { ExternalLink } from "../../../../components/ExternalLinks"; import { BUILDER_TYPES, IMAGE_BUILD_DOCS } from "../../session.constants"; import BuilderSelectorCommon from "./BuilderSelectorCommon"; diff --git a/client/src/features/sessionsV2/components/SessionForm/CodeRepositoryAdvancedSettings.tsx b/client/src/features/sessionsV2/components/SessionForm/CodeRepositoryAdvancedSettings.tsx index 6e1d97dbe2..a9e896adf1 100644 --- a/client/src/features/sessionsV2/components/SessionForm/CodeRepositoryAdvancedSettings.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/CodeRepositoryAdvancedSettings.tsx @@ -16,12 +16,13 @@ * limitations under the License. */ +import CollapseBody from "~/components/container/CollapseBody"; +import ChevronFlippedIcon from "~/components/icons/ChevronFlippedIcon"; import cx from "classnames"; import { useCallback, useState } from "react"; import { Controller, type Control } from "react-hook-form"; import { Collapse, Input, Label } from "reactstrap"; -import CollapseBody from "~/components/container/CollapseBody"; -import ChevronFlippedIcon from "~/components/icons/ChevronFlippedIcon"; + import type { SessionLauncherForm } from "../../sessionsV2.types"; interface CodeRepositoryAdvancedSettingsProps { diff --git a/client/src/features/sessionsV2/components/SessionForm/CodeRepositorySelector.tsx b/client/src/features/sessionsV2/components/SessionForm/CodeRepositorySelector.tsx index e29138bf4c..767bbfd2c5 100644 --- a/client/src/features/sessionsV2/components/SessionForm/CodeRepositorySelector.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/CodeRepositorySelector.tsx @@ -27,13 +27,13 @@ import { type UseControllerProps, } from "react-hook-form"; import Select, { + components, type ClassNamesConfig, type GroupBase, type OptionProps, type SelectComponentsConfig, type SingleValue, type SingleValueProps, - components, } from "react-select"; import { Label } from "reactstrap"; diff --git a/client/src/features/sessionsV2/components/SessionForm/CustomEnvironmentFields.tsx b/client/src/features/sessionsV2/components/SessionForm/CustomEnvironmentFields.tsx index 9cdab1dda1..8654f11082 100644 --- a/client/src/features/sessionsV2/components/SessionForm/CustomEnvironmentFields.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/CustomEnvironmentFields.tsx @@ -17,12 +17,13 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import useDebouncedState from "~/utils/customHooks/useDebouncedState.hook"; import cx from "classnames"; import { useEffect } from "react"; import { ExclamationTriangle } from "react-bootstrap-icons"; import { Controller } from "react-hook-form"; import { Input, Label } from "reactstrap"; -import useDebouncedState from "~/utils/customHooks/useDebouncedState.hook"; + import { InfoAlert } from "../../../../components/Alert"; import { ExternalLink } from "../../../../components/ExternalLinks"; import { Links } from "../../../../utils/constants/Docs"; diff --git a/client/src/features/sessionsV2/components/SessionForm/EditLauncherFormContent.tsx b/client/src/features/sessionsV2/components/SessionForm/EditLauncherFormContent.tsx index c010aea574..6bf5b7af87 100644 --- a/client/src/features/sessionsV2/components/SessionForm/EditLauncherFormContent.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/EditLauncherFormContent.tsx @@ -17,6 +17,7 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import useDebouncedState from "~/utils/customHooks/useDebouncedState.hook"; import cx from "classnames"; import { useEffect, useMemo } from "react"; import { ExclamationTriangle } from "react-bootstrap-icons"; @@ -28,7 +29,7 @@ import { UseFormWatch, } from "react-hook-form"; import { Input, Label, ListGroup } from "reactstrap"; -import useDebouncedState from "~/utils/customHooks/useDebouncedState.hook"; + import { InfoAlert } from "../../../../components/Alert"; import { RtkErrorAlert } from "../../../../components/errors/RtkErrorAlert"; import { ExternalLink } from "../../../../components/ExternalLinks"; diff --git a/client/src/features/sessionsV2/components/SessionForm/EnvironmentKindField.tsx b/client/src/features/sessionsV2/components/SessionForm/EnvironmentKindField.tsx index 2a22bac444..82a1111b3c 100644 --- a/client/src/features/sessionsV2/components/SessionForm/EnvironmentKindField.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/EnvironmentKindField.tsx @@ -15,10 +15,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; import { useContext } from "react"; import { Control, Controller } from "react-hook-form"; import { ButtonGroup } from "reactstrap"; + import AppContext from "../../../../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../../../../utils/context/appParams.constants"; import { SessionLauncherForm } from "../../sessionsV2.types"; diff --git a/client/src/features/sessionsV2/components/SessionForm/InputOverlayLoader.tsx b/client/src/features/sessionsV2/components/SessionForm/InputOverlayLoader.tsx index 4b89fc6a47..a665219a54 100644 --- a/client/src/features/sessionsV2/components/SessionForm/InputOverlayLoader.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/InputOverlayLoader.tsx @@ -16,8 +16,8 @@ * limitations under the License. */ -import cx from "classnames"; import { Loader } from "~/components/Loader"; +import cx from "classnames"; export default function InputOverlayLoader() { return ( diff --git a/client/src/features/sessionsV2/components/SessionForm/LauncherDetailsFields.tsx b/client/src/features/sessionsV2/components/SessionForm/LauncherDetailsFields.tsx index 599b625e69..4757088f5f 100644 --- a/client/src/features/sessionsV2/components/SessionForm/LauncherDetailsFields.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/LauncherDetailsFields.tsx @@ -16,6 +16,14 @@ * limitations under the License. */ +import { WarnAlert } from "~/components/Alert"; +import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; +import { Loader } from "~/components/Loader"; +import { SessionClassSelectorV2 } from "~/features/session/components/options/SessionClassOption"; +import { + MIN_SESSION_STORAGE_GB, + STEP_SESSION_STORAGE_GB, +} from "~/features/session/startSessionOptions.constants"; import cx from "classnames"; import { useMemo } from "react"; import { Control, Controller, useWatch } from "react-hook-form"; @@ -28,14 +36,6 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { WarnAlert } from "~/components/Alert"; -import { RtkErrorAlert } from "~/components/errors/RtkErrorAlert"; -import { Loader } from "~/components/Loader"; -import { SessionClassSelectorV2 } from "~/features/session/components/options/SessionClassOption"; -import { - MIN_SESSION_STORAGE_GB, - STEP_SESSION_STORAGE_GB, -} from "~/features/session/startSessionOptions.constants"; import { useGetResourcePoolsQuery } from "../../api/computeResources.api"; import { SessionLauncherForm } from "../../sessionsV2.types"; diff --git a/client/src/features/sessionsV2/components/SessionForm/LauncherEnvironmentIcon.tsx b/client/src/features/sessionsV2/components/SessionForm/LauncherEnvironmentIcon.tsx index 05858e23dc..f100ece105 100644 --- a/client/src/features/sessionsV2/components/SessionForm/LauncherEnvironmentIcon.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/LauncherEnvironmentIcon.tsx @@ -15,8 +15,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import cx from "classnames"; import { CSSProperties } from "react"; + import { SessionLauncher } from "../../api/sessionLaunchersV2.generated-api"; export function LauncherEnvironmentIcon({ diff --git a/client/src/features/sessionsV2/components/SessionForm/SessionEnvironmentItem.tsx b/client/src/features/sessionsV2/components/SessionForm/SessionEnvironmentItem.tsx index 4474b4b557..9ffd457b2e 100644 --- a/client/src/features/sessionsV2/components/SessionForm/SessionEnvironmentItem.tsx +++ b/client/src/features/sessionsV2/components/SessionForm/SessionEnvironmentItem.tsx @@ -16,6 +16,8 @@ * limitations under the License. */ +import { TimeCaption } from "~/components/TimeCaption"; +import { SessionClassSelectorV2 } from "~/features/session/components/options/SessionClassOption"; import cx from "classnames"; import { Control, @@ -26,8 +28,7 @@ import { } from "react-hook-form"; import { SingleValue } from "react-select"; import { Card, CardBody, Input, Label, ListGroupItem } from "reactstrap"; -import { TimeCaption } from "~/components/TimeCaption"; -import { SessionClassSelectorV2 } from "~/features/session/components/options/SessionClassOption"; + import { type ResourceClassWithId, type ResourcePoolWithId, diff --git a/client/src/features/sessionsV2/components/SessionLauncherButtons.tsx b/client/src/features/sessionsV2/components/SessionLauncherButtons.tsx index becc4cb44e..40ca9e927d 100644 --- a/client/src/features/sessionsV2/components/SessionLauncherButtons.tsx +++ b/client/src/features/sessionsV2/components/SessionLauncherButtons.tsx @@ -15,14 +15,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { skipToken } from "@reduxjs/toolkit/query/react"; +import { Loader } from "~/components/Loader"; +import useLocationHash from "~/utils/customHooks/useLocationHash.hook"; import cx from "classnames"; import { ReactNode, useCallback, useMemo } from "react"; import { Gear, PlayCircle } from "react-bootstrap-icons"; import { generatePath, Link } from "react-router"; import { Button, ButtonGroup, UncontrolledTooltip } from "reactstrap"; -import { Loader } from "~/components/Loader"; -import useLocationHash from "~/utils/customHooks/useLocationHash.hook"; + import { ButtonWithMenuV2 } from "../../../components/buttons/Button"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import useProjectPermissions from "../../ProjectPageV2/utils/useProjectPermissions.hook"; diff --git a/client/src/features/sessionsV2/components/SessionModals/ModifyResourcesLauncher.tsx b/client/src/features/sessionsV2/components/SessionModals/ModifyResourcesLauncher.tsx index f109194cae..e8095df187 100644 --- a/client/src/features/sessionsV2/components/SessionModals/ModifyResourcesLauncher.tsx +++ b/client/src/features/sessionsV2/components/SessionModals/ModifyResourcesLauncher.tsx @@ -16,6 +16,13 @@ * limitations under the License. */ +import { SuccessAlert } from "~/components/Alert"; +import { Loader } from "~/components/Loader"; +import { SessionClassSelectorV2 } from "~/features/session/components/options/SessionClassOption"; +import { + MIN_SESSION_STORAGE_GB, + STEP_SESSION_STORAGE_GB, +} from "~/features/session/startSessionOptions.constants"; import cx from "classnames"; import { useCallback, useEffect, useMemo } from "react"; import { CheckLg, XLg } from "react-bootstrap-icons"; @@ -33,16 +40,9 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { SuccessAlert } from "~/components/Alert"; -import { Loader } from "~/components/Loader"; -import { SessionClassSelectorV2 } from "~/features/session/components/options/SessionClassOption"; -import { - MIN_SESSION_STORAGE_GB, - STEP_SESSION_STORAGE_GB, -} from "~/features/session/startSessionOptions.constants"; import { - type ResourceClassWithId, useGetResourcePoolsQuery, + type ResourceClassWithId, } from "../../api/computeResources.api"; import { usePatchSessionLaunchersByLauncherIdMutation as useUpdateSessionLauncherMutation } from "../../api/sessionLaunchersV2.api"; import { diff --git a/client/src/features/sessionsV2/components/SessionModals/NewSessionLauncherModal.tsx b/client/src/features/sessionsV2/components/SessionModals/NewSessionLauncherModal.tsx index 7deb988745..3e4479942c 100644 --- a/client/src/features/sessionsV2/components/SessionModals/NewSessionLauncherModal.tsx +++ b/client/src/features/sessionsV2/components/SessionModals/NewSessionLauncherModal.tsx @@ -29,6 +29,7 @@ import { import { useForm } from "react-hook-form"; import { useParams } from "react-router"; import { Button, Form, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; + import { SuccessAlert } from "../../../../components/Alert"; import { RtkOrNotebooksError } from "../../../../components/errors/RtkErrorAlert"; import { Loader } from "../../../../components/Loader"; diff --git a/client/src/features/sessionsV2/components/SessionModals/ResourceClassWarning.tsx b/client/src/features/sessionsV2/components/SessionModals/ResourceClassWarning.tsx index 10a1ca150d..87ecc82a92 100644 --- a/client/src/features/sessionsV2/components/SessionModals/ResourceClassWarning.tsx +++ b/client/src/features/sessionsV2/components/SessionModals/ResourceClassWarning.tsx @@ -17,6 +17,7 @@ */ import cx from "classnames"; + import { ErrorAlert } from "../../../../components/Alert.jsx"; import { Loader } from "../../../../components/Loader.tsx"; diff --git a/client/src/features/sessionsV2/components/SessionModals/SelectResourceClass.tsx b/client/src/features/sessionsV2/components/SessionModals/SelectResourceClass.tsx index 4c56cdafe5..640267db27 100644 --- a/client/src/features/sessionsV2/components/SessionModals/SelectResourceClass.tsx +++ b/client/src/features/sessionsV2/components/SessionModals/SelectResourceClass.tsx @@ -17,6 +17,12 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; +import { SessionClassSelectorV2 } from "~/features/session/components/options/SessionClassOption"; +import { SessionRowResourceRequests } from "~/features/session/components/SessionsList"; +import { + MIN_SESSION_STORAGE_GB, + STEP_SESSION_STORAGE_GB, +} from "~/features/session/startSessionOptions.constants"; import cx from "classnames"; import { useCallback, useMemo } from "react"; import { XLg } from "react-bootstrap-icons"; @@ -35,12 +41,6 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { SessionRowResourceRequests } from "~/features/session/components/SessionsList"; -import { SessionClassSelectorV2 } from "~/features/session/components/options/SessionClassOption"; -import { - MIN_SESSION_STORAGE_GB, - STEP_SESSION_STORAGE_GB, -} from "~/features/session/startSessionOptions.constants"; import { useGetClassesByClassIdQuery, useGetResourcePoolsQuery, diff --git a/client/src/features/sessionsV2/components/SessionModals/ShoutdownSessionContent.tsx b/client/src/features/sessionsV2/components/SessionModals/ShoutdownSessionContent.tsx index fe55da9e58..788f160be6 100644 --- a/client/src/features/sessionsV2/components/SessionModals/ShoutdownSessionContent.tsx +++ b/client/src/features/sessionsV2/components/SessionModals/ShoutdownSessionContent.tsx @@ -17,15 +17,16 @@ */ import { skipToken } from "@reduxjs/toolkit/query/react"; -import cx from "classnames"; -import { useCallback, useMemo, useState } from "react"; -import { Collapse } from "reactstrap"; import CollapseBody from "~/components/container/CollapseBody"; import ChevronFlippedIcon from "~/components/icons/ChevronFlippedIcon"; import { useGetProjectsByProjectIdDataConnectorLinksQuery } from "~/features/dataConnectorsV2/api/data-connectors.api"; import { useGetDataConnectorsListByDataConnectorIdsQuery } from "~/features/dataConnectorsV2/api/data-connectors.enhanced-api"; import { getRepositoryName } from "~/features/ProjectPageV2/ProjectPageContent/CodeRepositories/repositories.utils"; import { useGetProjectsByProjectIdQuery } from "~/features/projectsV2/api/projectV2.enhanced-api"; +import cx from "classnames"; +import { useCallback, useMemo, useState } from "react"; +import { Collapse } from "reactstrap"; + import { useGetSessionLaunchersByLauncherIdQuery } from "../../api/sessionLaunchersV2.api"; import shutdownSessionWarningImage from "./assets/renkuShutdownSessionWarning.svg"; diff --git a/client/src/features/sessionsV2/components/SessionModals/UpdateSessionLauncherModal.tsx b/client/src/features/sessionsV2/components/SessionModals/UpdateSessionLauncherModal.tsx index 6b9c910db9..28e21e19ec 100644 --- a/client/src/features/sessionsV2/components/SessionModals/UpdateSessionLauncherModal.tsx +++ b/client/src/features/sessionsV2/components/SessionModals/UpdateSessionLauncherModal.tsx @@ -23,8 +23,8 @@ import { useForm } from "react-hook-form"; import { Button, Form, ModalBody, ModalFooter, ModalHeader } from "reactstrap"; import { SuccessAlert } from "../../../../components/Alert"; -import { Loader } from "../../../../components/Loader"; import { RtkErrorAlert } from "../../../../components/errors/RtkErrorAlert"; +import { Loader } from "../../../../components/Loader"; import ScrollableModal from "../../../../components/modal/ScrollableModal"; import type { SessionLauncher } from "../../api/sessionLaunchersV2.api"; import { diff --git a/client/src/features/sessionsV2/components/SessionStatus/SessionImageBadge.tsx b/client/src/features/sessionsV2/components/SessionStatus/SessionImageBadge.tsx index 6cd9ecf1d4..0d7dba686e 100644 --- a/client/src/features/sessionsV2/components/SessionStatus/SessionImageBadge.tsx +++ b/client/src/features/sessionsV2/components/SessionStatus/SessionImageBadge.tsx @@ -16,10 +16,11 @@ * limitations under the License. */ -import cx from "classnames"; -import { CircleFill } from "react-bootstrap-icons"; import { Loader } from "~/components/Loader"; import RenkuBadge from "~/components/renkuBadge/RenkuBadge"; +import cx from "classnames"; +import { CircleFill } from "react-bootstrap-icons"; + import { ImageCheckResponse } from "../../api/sessionsV2.generated-api"; interface SessionImageBadgeProps { diff --git a/client/src/features/sessionsV2/components/SessionStatus/SessionStatus.tsx b/client/src/features/sessionsV2/components/SessionStatus/SessionStatus.tsx index 5cd2a7958d..ced556af9c 100644 --- a/client/src/features/sessionsV2/components/SessionStatus/SessionStatus.tsx +++ b/client/src/features/sessionsV2/components/SessionStatus/SessionStatus.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { faInfoCircle } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import cx from "classnames"; @@ -32,13 +33,14 @@ import { TimeCaption } from "../../../../components/TimeCaption"; import { PrettySessionErrorMessage } from "../../../session/components/status/SessionStatusBadge"; import { MissingHibernationInfo } from "../../../session/components/status/SessionStatusText"; import type { SessionLauncher } from "../../api/sessionLaunchersV2.api"; -import { SessionStatus, SessionV2 } from "../../sessionsV2.types"; import { SESSION_STATES, SESSION_STYLES, SESSION_TITLE, SESSION_TITLE_DASHBOARD, } from "../../SessionStyles.constants"; +import { SessionStatus, SessionV2 } from "../../sessionsV2.types"; + export function SessionBadge({ children, className, diff --git a/client/src/features/sessionsV2/session.constants.tsx b/client/src/features/sessionsV2/session.constants.tsx index dc50fa4903..1621292ddc 100644 --- a/client/src/features/sessionsV2/session.constants.tsx +++ b/client/src/features/sessionsV2/session.constants.tsx @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License */ + import faviconICO from "../../styles/assets/favicon/Favicon.ico"; import faviconSVG from "../../styles/assets/favicon/Favicon.svg"; import favicon16px from "../../styles/assets/favicon/Favicon16px.png"; diff --git a/client/src/features/sessionsV2/startSessionOptionsV2.types.ts b/client/src/features/sessionsV2/startSessionOptionsV2.types.ts index 197bbd8a96..56364495c3 100644 --- a/client/src/features/sessionsV2/startSessionOptionsV2.types.ts +++ b/client/src/features/sessionsV2/startSessionOptionsV2.types.ts @@ -16,8 +16,8 @@ * limitations under the License. */ -import type { SessionEnvironmentVariable } from "../session/startSessionOptions.types"; import type { DataConnectorRead } from "../dataConnectorsV2/api/data-connectors.api"; +import type { SessionEnvironmentVariable } from "../session/startSessionOptions.types"; export interface SessionStartDataConnectorConfiguration { active: boolean; diff --git a/client/src/features/sessionsV2/useSessionLaunchState.hook.ts b/client/src/features/sessionsV2/useSessionLaunchState.hook.ts index 0545aaddd7..038ea6ebf1 100644 --- a/client/src/features/sessionsV2/useSessionLaunchState.hook.ts +++ b/client/src/features/sessionsV2/useSessionLaunchState.hook.ts @@ -17,9 +17,10 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; -import { useEffect, useMemo } from "react"; import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; import useAppSelector from "~/utils/customHooks/useAppSelector.hook"; +import { useEffect, useMemo } from "react"; + import { useGetDataConnectorsListByDataConnectorIdsQuery, useGetProjectsByProjectIdDataConnectorLinksQuery, diff --git a/client/src/features/sessionsV2/useSessionResourceClass.hook.ts b/client/src/features/sessionsV2/useSessionResourceClass.hook.ts index 318af68d85..89db437d24 100644 --- a/client/src/features/sessionsV2/useSessionResourceClass.hook.ts +++ b/client/src/features/sessionsV2/useSessionResourceClass.hook.ts @@ -17,14 +17,14 @@ */ import { skipToken } from "@reduxjs/toolkit/query"; -import { useCallback, useEffect, useState } from "react"; - import useAppDispatch from "~/utils/customHooks/useAppDispatch.hook"; import useAppSelector from "~/utils/customHooks/useAppSelector.hook"; +import { useCallback, useEffect, useState } from "react"; + import { + useGetClassesByClassIdQuery, type ResourceClassWithId, type ResourcePoolWithIdFiltered, - useGetClassesByClassIdQuery, } from "./api/computeResources.api"; import type { SessionLauncher } from "./api/sessionLaunchersV2.api"; import startSessionOptionsV2Slice from "./startSessionOptionsV2.slice"; diff --git a/client/src/features/sessionsV2/useSessionSecrets.hook.ts b/client/src/features/sessionsV2/useSessionSecrets.hook.ts index aef84604ba..f9ce794403 100644 --- a/client/src/features/sessionsV2/useSessionSecrets.hook.ts +++ b/client/src/features/sessionsV2/useSessionSecrets.hook.ts @@ -19,13 +19,13 @@ import { skipToken } from "@reduxjs/toolkit/query"; import { useEffect, useMemo } from "react"; +import useAppDispatch from "../../utils/customHooks/useAppDispatch.hook"; import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook"; import { getSessionSecretSlotsWithSecrets } from "../ProjectPageV2/ProjectPageContent/SessionSecrets/sessionSecrets.utils"; import { useGetProjectsByProjectIdSessionSecretSlotsQuery, useGetProjectsByProjectIdSessionSecretsQuery, } from "../projectsV2/api/projectV2.enhanced-api"; -import useAppDispatch from "../../utils/customHooks/useAppDispatch.hook"; import startSessionOptionsV2Slice from "./startSessionOptionsV2.slice"; interface UseSessionSecretsArgs { diff --git a/client/src/features/usersV2/LazyUserRedirect.tsx b/client/src/features/usersV2/LazyUserRedirect.tsx index 571c77b31c..92b1016cf6 100644 --- a/client/src/features/usersV2/LazyUserRedirect.tsx +++ b/client/src/features/usersV2/LazyUserRedirect.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const UserRedirect = lazy(() => import("./show/UserRedirect")); diff --git a/client/src/features/usersV2/LazyUserShow.tsx b/client/src/features/usersV2/LazyUserShow.tsx index 36660489e2..1c0a3bfb24 100644 --- a/client/src/features/usersV2/LazyUserShow.tsx +++ b/client/src/features/usersV2/LazyUserShow.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../../components/PageLoader"; const UserShow = lazy(() => import("./show/UserShow")); diff --git a/client/src/features/usersV2/api/users.api-config.ts b/client/src/features/usersV2/api/users.api-config.ts index 74ed73e93c..caae329c78 100644 --- a/client/src/features/usersV2/api/users.api-config.ts +++ b/client/src/features/usersV2/api/users.api-config.ts @@ -17,8 +17,9 @@ */ // Run `npm run generate-api:users` to generate the API -import type { ConfigFile } from "@rtk-query/codegen-openapi"; + import path from "path"; +import type { ConfigFile } from "@rtk-query/codegen-openapi"; const config: ConfigFile = { apiFile: "./users.empty-api.ts", diff --git a/client/src/features/usersV2/api/users.api.ts b/client/src/features/usersV2/api/users.api.ts index e384909073..63e652c194 100644 --- a/client/src/features/usersV2/api/users.api.ts +++ b/client/src/features/usersV2/api/users.api.ts @@ -19,6 +19,7 @@ import type { DataServicesError } from "../../dataServices/dataServices.types"; import { projectV2Api } from "../../projectsV2/api/projectV2.enhanced-api"; import { + usersGeneratedApi, type DeleteUserPreferencesPinnedProjectsApiArg, type DeleteUserPreferencesPinnedProjectsApiResponse, type GetUserApiArg, @@ -29,7 +30,6 @@ import { type GetUsersApiResponse, type GetUserSecretsApiArg, type GetUserSecretsApiResponse, - usersGeneratedApi, } from "./users.generated-api"; import type { UserInfo } from "./users.types"; diff --git a/client/src/features/usersV2/api/users.generated-api.ts b/client/src/features/usersV2/api/users.generated-api.ts index 4a56072dfc..097156d210 100644 --- a/client/src/features/usersV2/api/users.generated-api.ts +++ b/client/src/features/usersV2/api/users.generated-api.ts @@ -1,4 +1,5 @@ import { usersEmptyApi as api } from "./users.empty-api"; + const injectedRtkApi = api.injectEndpoints({ endpoints: (build) => ({ getUser: build.query({ diff --git a/client/src/features/usersV2/show/UserRedirect.tsx b/client/src/features/usersV2/show/UserRedirect.tsx index 82d1840302..c23a153795 100644 --- a/client/src/features/usersV2/show/UserRedirect.tsx +++ b/client/src/features/usersV2/show/UserRedirect.tsx @@ -20,12 +20,12 @@ import { skipToken } from "@reduxjs/toolkit/query"; import cx from "classnames"; import { useEffect } from "react"; import { ArrowLeft, BoxArrowInRight } from "react-bootstrap-icons"; -import { Link, generatePath, useNavigate } from "react-router"; +import { generatePath, Link, useNavigate } from "react-router"; import { Col, Row } from "reactstrap"; import { useLoginUrl } from "../../../authentication/useLoginUrl.hook"; -import { Loader } from "../../../components/Loader"; import ContainerWrap from "../../../components/container/ContainerWrap"; +import { Loader } from "../../../components/Loader"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import useLegacySelector from "../../../utils/customHooks/useLegacySelector.hook"; import UserNotFound from "../../projectsV2/notFound/UserNotFound"; diff --git a/client/src/features/usersV2/show/UserShow.tsx b/client/src/features/usersV2/show/UserShow.tsx index a229fa9f66..8b30f5a316 100644 --- a/client/src/features/usersV2/show/UserShow.tsx +++ b/client/src/features/usersV2/show/UserShow.tsx @@ -23,9 +23,9 @@ import { InfoCircle, JournalAlbum } from "react-bootstrap-icons"; import { generatePath, useNavigate, useParams } from "react-router"; import { Badge, Card, CardBody, CardHeader, Col, Row } from "reactstrap"; -import { Loader } from "../../../components/Loader"; import ContainerWrap from "../../../components/container/ContainerWrap"; import { EntityWatermark } from "../../../components/entityWatermark/EntityWatermark"; +import { Loader } from "../../../components/Loader"; import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import DataConnectorsBox from "../../dataConnectorsV2/components/DataConnectorsBox"; import { useGetNamespacesByNamespaceSlugQuery } from "../../projectsV2/api/projectV2.enhanced-api"; diff --git a/client/src/features/workflows/WorkflowsApi.ts b/client/src/features/workflows/WorkflowsApi.ts index 667dd652eb..7cc8cb93aa 100644 --- a/client/src/features/workflows/WorkflowsApi.ts +++ b/client/src/features/workflows/WorkflowsApi.ts @@ -18,10 +18,9 @@ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; -import { CoreResponse } from "../../utils/types/coreService.types"; import { Url } from "../../utils/helpers/url"; import { versionedPathForEndpoint } from "../../utils/helpers/url/versionedUrls"; - +import { CoreResponse } from "../../utils/types/coreService.types"; import { WorkflowDetails, WorkflowDetailsRequestParams, diff --git a/client/src/features/workflows/WorkflowsSlice.ts b/client/src/features/workflows/WorkflowsSlice.ts index aaaaa8c4e3..3f572f05ad 100644 --- a/client/src/features/workflows/WorkflowsSlice.ts +++ b/client/src/features/workflows/WorkflowsSlice.ts @@ -17,6 +17,7 @@ */ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; + import { WorkflowsDisplay } from "./workflows.types"; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/client/src/features/workflows/workflows.types.ts b/client/src/features/workflows/workflows.types.ts index 49250c14e0..4b29c219e7 100644 --- a/client/src/features/workflows/workflows.types.ts +++ b/client/src/features/workflows/workflows.types.ts @@ -16,13 +16,12 @@ * limitations under the License. */ +import { WorkflowType } from "../../components/entities/entities.types"; import { CoreRepositoryParams, CoreVersionUrl, } from "../../utils/types/coreService.types"; -import { WorkflowType } from "../../components/entities/entities.types"; - /* eslint-disable @typescript-eslint/no-explicit-any */ export interface Creator { diff --git a/client/src/file/CodePreview.tsx b/client/src/file/CodePreview.tsx index a54d506538..1f45f8e965 100644 --- a/client/src/file/CodePreview.tsx +++ b/client/src/file/CodePreview.tsx @@ -19,6 +19,7 @@ import DOMPurify from "dompurify"; import hljs from "highlight.js"; import { useEffect, useRef } from "react"; + import { atobUTF8 } from "../utils/helpers/Encoding"; interface CodePreviewProps { diff --git a/client/src/file/File.present.jsx b/client/src/file/File.present.jsx index d41dd2f957..688a21227d 100644 --- a/client/src/file/File.present.jsx +++ b/client/src/file/File.present.jsx @@ -19,9 +19,8 @@ import cx from "classnames"; import DOMPurify from "dompurify"; import { isEqual } from "lodash-es"; -import styles from "./File.module.scss"; - import React, { memo, useState } from "react"; +import { Download } from "react-bootstrap-icons"; import { Badge, Button, @@ -34,18 +33,19 @@ import { ListGroup, ListGroupItem, } from "reactstrap"; -import { Download } from "react-bootstrap-icons"; + import { Clipboard } from "../components/clipboard/Clipboard"; import { ExternalIconLink, ExternalLink } from "../components/ExternalLinks"; - import BootstrapGitLabIcon from "../components/icons/BootstrapGitLabIcon"; import { Loader } from "../components/Loader"; -import { TimeCaption } from "../components/TimeCaption"; import LazyNotebookPreview from "../components/notebook/LazyNotebookRender"; +import { TimeCaption } from "../components/TimeCaption"; import { formatBytes } from "../utils/helpers/HelperFunctions"; import FileAndLineageSwitch from "./FileAndLineageComponents"; import FilePreview from "./FilePreview"; +import styles from "./File.module.scss"; + import "../../node_modules/highlight.js/styles/atom-one-light.css"; const commitMessageLengthLimit = 120; diff --git a/client/src/file/LazyCodePreview.tsx b/client/src/file/LazyCodePreview.tsx index 0de4f301c9..38e51fe838 100644 --- a/client/src/file/LazyCodePreview.tsx +++ b/client/src/file/LazyCodePreview.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { ComponentProps, Suspense, lazy } from "react"; +import { ComponentProps, lazy, Suspense } from "react"; + import { Loader } from "../components/Loader"; const CodePreview = lazy(() => import("./CodePreview")); diff --git a/client/src/file/LazyFileLineage.tsx b/client/src/file/LazyFileLineage.tsx index 701fee5ca9..9fad29522c 100644 --- a/client/src/file/LazyFileLineage.tsx +++ b/client/src/file/LazyFileLineage.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { ComponentProps, Suspense, lazy } from "react"; +import { ComponentProps, lazy, Suspense } from "react"; + import { Loader } from "../components/Loader"; const FileLineage = lazy(() => diff --git a/client/src/file/LazyPDFViewer.tsx b/client/src/file/LazyPDFViewer.tsx index a99f47b9a0..89a790057c 100644 --- a/client/src/file/LazyPDFViewer.tsx +++ b/client/src/file/LazyPDFViewer.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { ComponentProps, Suspense, lazy } from "react"; +import { ComponentProps, lazy, Suspense } from "react"; + import { Loader } from "../components/Loader"; const PDFViewer = lazy(() => import("./PDFViewer")); diff --git a/client/src/file/Lineage.present.jsx b/client/src/file/Lineage.present.jsx index 102c10e30f..31ecde0a47 100644 --- a/client/src/file/Lineage.present.jsx +++ b/client/src/file/Lineage.present.jsx @@ -23,8 +23,8 @@ import { Download } from "react-bootstrap-icons"; import { useNavigate } from "react-router"; import { Badge, Card, CardBody, CardHeader } from "reactstrap"; -import { ExternalIconLink } from "../components/ExternalLinks"; import { Clipboard } from "../components/clipboard/Clipboard"; +import { ExternalIconLink } from "../components/ExternalLinks"; import BootstrapGitLabIcon from "../components/icons/BootstrapGitLabIcon"; import { KgStatusWrapper } from "../components/kgStatus/KgStatus"; import SessionFileButton from "../features/session/components/SessionFileButton"; diff --git a/client/src/help/Help.tsx b/client/src/help/Help.tsx index bc336a5f2e..344d3796e0 100644 --- a/client/src/help/Help.tsx +++ b/client/src/help/Help.tsx @@ -25,6 +25,7 @@ import { faDiscourse, faGitter } from "@fortawesome/free-brands-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; import { useContext } from "react"; import { Github } from "react-bootstrap-icons"; import { Route, Routes } from "react-router"; @@ -35,16 +36,14 @@ import { ExternalIconLink, } from "../components/ExternalLinks"; import RenkuNavLinkV2 from "../components/RenkuNavLinkV2"; +import StatusSummary from "../features/platform/components/StatusSummary"; import { isStatusConfigured } from "../statuspage"; import { Docs, Links, RenkuPythonDocs } from "../utils/constants/Docs"; import AppContext from "../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../utils/context/appParams.constants"; - -import StatusSummary from "../features/platform/components/StatusSummary"; import HelpRelease from "./HelpRelease"; import PrivacyPolicy from "./PrivacyPolicy"; import TermsOfService from "./TermsOfService"; -import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; type HelpNavProps = { statuspageId: string; diff --git a/client/src/help/HelpRelease.tsx b/client/src/help/HelpRelease.tsx index 388a4b3638..8d9bea887a 100644 --- a/client/src/help/HelpRelease.tsx +++ b/client/src/help/HelpRelease.tsx @@ -16,11 +16,11 @@ * limitations under the License. */ +import { isRenkuLegacy } from "~/utils/helpers/HelperFunctionsV2"; import { useContext } from "react"; +import { useLocation } from "react-router"; import { Col, Row } from "reactstrap"; -import { useLocation } from "react-router"; -import { isRenkuLegacy } from "~/utils/helpers/HelperFunctionsV2"; import { ExternalLink } from "../components/ExternalLinks"; import { Loader } from "../components/Loader"; import { diff --git a/client/src/help/LazyHelp.tsx b/client/src/help/LazyHelp.tsx index 6309a63a76..dad008c64f 100644 --- a/client/src/help/LazyHelp.tsx +++ b/client/src/help/LazyHelp.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../components/PageLoader"; diff --git a/client/src/help/PrivacyPolicy.tsx b/client/src/help/PrivacyPolicy.tsx index 401478314e..1105c50481 100644 --- a/client/src/help/PrivacyPolicy.tsx +++ b/client/src/help/PrivacyPolicy.tsx @@ -19,6 +19,7 @@ /** * Container components for privacy */ + import { useContext } from "react"; import { WarnAlert } from "../components/Alert"; diff --git a/client/src/help/TermsOfService.tsx b/client/src/help/TermsOfService.tsx index 28618c6aaf..459285c94d 100644 --- a/client/src/help/TermsOfService.tsx +++ b/client/src/help/TermsOfService.tsx @@ -17,13 +17,13 @@ */ import { useContext } from "react"; -import AppContext from "../utils/context/appContext"; import { WarnAlert } from "../components/Alert"; import { Loader } from "../components/Loader"; import LazyRenkuMarkdown from "../components/markdown/LazyRenkuMarkdown"; import { isValidMarkdownResponse } from "../components/markdown/utils"; import { useGetTermsOfUseQuery } from "../features/terms/terms.api"; +import AppContext from "../utils/context/appContext"; export default function TermsOfService() { const { params } = useContext(AppContext); diff --git a/client/src/model/Model.example.js b/client/src/model/Model.example.js index 9b24cb3c62..55af30fb08 100644 --- a/client/src/model/Model.example.js +++ b/client/src/model/Model.example.js @@ -19,7 +19,7 @@ import { Component } from "react"; import { connect } from "react-redux"; -import { StateKind, Schema, StateModel } from "./Model"; +import { Schema, StateKind, StateModel } from "./Model"; const simpleSchema = new Schema({ name: { initial: "Jane Doe", mandatory: true }, diff --git a/client/src/model/Model.js b/client/src/model/Model.js index d06160937e..78172df377 100644 --- a/client/src/model/Model.js +++ b/client/src/model/Model.js @@ -36,7 +36,9 @@ // TODO: Maybe use [jsdoc](http://usejsdoc.org/) here? import immutableUpdate from "immutability-helper"; + import { createStore } from "../utils/helpers/EnhancedState"; + // import { Component } from 'react'; const PropertyName = { diff --git a/client/src/model/RenkuModels.js b/client/src/model/RenkuModels.js index 08a518b468..32d26551e7 100644 --- a/client/src/model/RenkuModels.js +++ b/client/src/model/RenkuModels.js @@ -23,7 +23,7 @@ * */ -import { Schema, PropertyName as Prop } from "./Model"; +import { PropertyName as Prop, Schema } from "./Model"; const userSchema = new Schema({ fetched: { initial: null, mandatory: true }, diff --git a/client/src/model/RenkuModels.test.js b/client/src/model/RenkuModels.test.js index ca6684ecf4..fa24726100 100644 --- a/client/src/model/RenkuModels.test.js +++ b/client/src/model/RenkuModels.test.js @@ -3,7 +3,7 @@ import { describe, expect, it } from "vitest"; import { testClient as client } from "../api-client"; -import { StateModel, globalSchema } from "../model"; +import { globalSchema, StateModel } from "../model"; import { ProjectCoordinator } from "../project/Project.state"; const model = new StateModel(globalSchema); diff --git a/client/src/model/index.js b/client/src/model/index.js index 1c0f06d7c0..3382871530 100644 --- a/client/src/model/index.js +++ b/client/src/model/index.js @@ -23,16 +23,16 @@ * Model and schema for storing Renku data. */ +import { globalSchema } from "./GlobalSchema"; import { PropertyName, Schema, - StateModel, - StateKind, - SubModel, SpecialPropVal, + StateKind, + StateModel, StatusHelper, + SubModel, } from "./Model"; -import { globalSchema } from "./GlobalSchema"; import { formGeneratorSchema, projectSchema } from "./RenkuModels"; export { diff --git a/client/src/namespace/Namespace.container.jsx b/client/src/namespace/Namespace.container.jsx index caf96fdc48..d4619ef577 100644 --- a/client/src/namespace/Namespace.container.jsx +++ b/client/src/namespace/Namespace.container.jsx @@ -23,7 +23,7 @@ * Namespace container components. */ -import { useState, useEffect } from "react"; +import { useEffect, useState } from "react"; import { NamespaceProjectsPresent } from "."; import { API_ERRORS } from "../api-client/errors"; diff --git a/client/src/not-found/LazyNotFound.tsx b/client/src/not-found/LazyNotFound.tsx index 1787c2df3c..2bf3690623 100644 --- a/client/src/not-found/LazyNotFound.tsx +++ b/client/src/not-found/LazyNotFound.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../components/PageLoader"; diff --git a/client/src/not-found/NotFound.tsx b/client/src/not-found/NotFound.tsx index 6ac8a2e99e..75753e6dcf 100644 --- a/client/src/not-found/NotFound.tsx +++ b/client/src/not-found/NotFound.tsx @@ -22,15 +22,17 @@ * not-found * Components for the not-found page */ + import cx from "classnames"; import { ReactNode } from "react"; +import { ArrowLeft } from "react-bootstrap-icons"; import { Link, useLocation } from "react-router"; -import { ArrowLeft } from "react-bootstrap-icons"; import ContainerWrap from "../components/container/ContainerWrap"; import rkNotFoundImg from "../styles/assets/not-found.svg"; import rkNotFoundImgV2 from "../styles/assets/not-foundV2.svg"; import { isRenkuLegacy } from "../utils/helpers/HelperFunctionsV2"; + import "./NotFound.css"; interface NotFoundProps { diff --git a/client/src/notebooks/Notebooks.test.js b/client/src/notebooks/Notebooks.test.js index 2f4c96234f..be9bd7e981 100644 --- a/client/src/notebooks/Notebooks.test.js +++ b/client/src/notebooks/Notebooks.test.js @@ -24,8 +24,8 @@ import { describe, expect, it } from "vitest"; -import { ExpectedAnnotations } from "./Notebooks.state"; import { NotebooksHelper } from "./index"; +import { ExpectedAnnotations } from "./Notebooks.state"; const simplifiedGlobalOptions = { default_url: { diff --git a/client/src/notebooks/components/SessionCheatSheet.tsx b/client/src/notebooks/components/SessionCheatSheet.tsx index 8745bbe6ba..95b7d7beef 100644 --- a/client/src/notebooks/components/SessionCheatSheet.tsx +++ b/client/src/notebooks/components/SessionCheatSheet.tsx @@ -20,10 +20,11 @@ import { useEffect, useState } from "react"; import { Col } from "reactstrap"; import "./SessionCheatSheet.css"; -import * as cheatsheetJson from "./cheatsheet.json"; + +import { CommandCopy } from "../../components/commandCopy/CommandCopy"; import { ExternalDocsLink } from "../../components/ExternalLinks"; import { Docs, RenkuPythonDocs } from "../../utils/constants/Docs"; -import { CommandCopy } from "../../components/commandCopy/CommandCopy"; +import * as cheatsheetJson from "./cheatsheet.json"; interface CommandDescProps { command: string; diff --git a/client/src/notifications/LazyNotificationsPage.tsx b/client/src/notifications/LazyNotificationsPage.tsx index 13452bd5fb..2d27dc5d97 100644 --- a/client/src/notifications/LazyNotificationsPage.tsx +++ b/client/src/notifications/LazyNotificationsPage.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../components/PageLoader"; diff --git a/client/src/notifications/Notifications.test.js b/client/src/notifications/Notifications.test.js index 99bd3a6b9f..86692fce25 100644 --- a/client/src/notifications/Notifications.test.js +++ b/client/src/notifications/Notifications.test.js @@ -26,7 +26,7 @@ import { describe, expect, it } from "vitest"; import { testClient as client } from "../api-client"; -import { StateModel, globalSchema } from "../model"; +import { globalSchema, StateModel } from "../model"; import { NotificationsInfo } from "./Notifications.state"; import NotificationsManager from "./NotificationsManager"; diff --git a/client/src/notifications/NotificationsMenu.jsx b/client/src/notifications/NotificationsMenu.jsx index 8613b3b18e..9d449691a6 100644 --- a/client/src/notifications/NotificationsMenu.jsx +++ b/client/src/notifications/NotificationsMenu.jsx @@ -19,8 +19,8 @@ import { Component } from "react"; import { connect } from "react-redux"; -import { NotificationsCoordinator } from "./Notifications.state"; import { NotificationsMenu as NotificationsMenuPresent } from "./Notifications.present"; +import { NotificationsCoordinator } from "./Notifications.state"; /** * NotificationsMenu component. diff --git a/client/src/privacy/Cookie.tsx b/client/src/privacy/Cookie.tsx index 817dd8c733..ba6a7a3008 100644 --- a/client/src/privacy/Cookie.tsx +++ b/client/src/privacy/Cookie.tsx @@ -19,6 +19,7 @@ /** * Container components for privacy */ + import { useContext } from "react"; import CookieConsent from "react-cookie-consent"; diff --git a/client/src/project/LazyProjectView.tsx b/client/src/project/LazyProjectView.tsx index 48a92373d8..18eef6ce92 100644 --- a/client/src/project/LazyProjectView.tsx +++ b/client/src/project/LazyProjectView.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../components/PageLoader"; const ProjectView = lazy(() => import("./ProjectV2")); diff --git a/client/src/project/Project.present.jsx b/client/src/project/Project.present.jsx index 31125de03e..b141bc1884 100644 --- a/client/src/project/Project.present.jsx +++ b/client/src/project/Project.present.jsx @@ -41,16 +41,16 @@ import { UncontrolledTooltip, } from "reactstrap"; -import { ContainerWrap } from "../App"; import { ACCESS_LEVELS } from "../api-client"; +import { ContainerWrap } from "../App"; import { InfoAlert } from "../components/Alert"; +import { RoundButtonGroup } from "../components/buttons/Button"; import { ExternalLink } from "../components/ExternalLinks"; import { Loader } from "../components/Loader"; +import LazyRenkuMarkdown from "../components/markdown/LazyRenkuMarkdown"; import RenkuNavLinkV2, { RenkuNavLinkV2WithAlternates, } from "../components/RenkuNavLinkV2"; -import { RoundButtonGroup } from "../components/buttons/Button"; -import LazyRenkuMarkdown from "../components/markdown/LazyRenkuMarkdown"; import { SshModal } from "../components/ssh/ssh"; import { ProjectDatasetsView, @@ -66,7 +66,9 @@ import { SpecialPropVal } from "../model/Model"; import { NamespaceProjects } from "../namespace"; import { Url } from "../utils/helpers/url"; import { WorkflowsList } from "../workflows"; + import "./Project.css"; + import { CloneButton } from "./clone/CloneButton"; import GitLabConnectButton, { externalUrlToGitLabIdeUrl, diff --git a/client/src/project/Project.state.js b/client/src/project/Project.state.js index 678a30453c..c6d0ca6725 100644 --- a/client/src/project/Project.state.js +++ b/client/src/project/Project.state.js @@ -24,7 +24,7 @@ */ import { API_ERRORS } from "../api-client"; -import { SpecialPropVal, projectSchema } from "../model"; +import { projectSchema, SpecialPropVal } from "../model"; import { refreshIfNecessary, splitAutosavedBranches, diff --git a/client/src/project/Project.test.js b/client/src/project/Project.test.js index 167e9b102d..52b1f32455 100644 --- a/client/src/project/Project.test.js +++ b/client/src/project/Project.test.js @@ -26,7 +26,7 @@ import { describe, expect, it } from "vitest"; import { testClient as client } from "../api-client"; -import { StateModel, globalSchema } from "../model"; +import { globalSchema, StateModel } from "../model"; import { mapProjectFeatures } from "./Project"; import { filterPaths } from "./Project.present"; import { ProjectCoordinator } from "./Project.state"; diff --git a/client/src/project/ProjectV2.tsx b/client/src/project/ProjectV2.tsx index 1f956059b4..a52c51b831 100644 --- a/client/src/project/ProjectV2.tsx +++ b/client/src/project/ProjectV2.tsx @@ -5,6 +5,7 @@ import { useContext, useMemo } from "react"; import { useLocation, useMatch, useNavigate } from "react-router"; + import AppContext from "../utils/context/appContext"; import { DEFAULT_APP_PARAMS } from "../utils/context/appParams.constants"; import useLegacySelector from "../utils/customHooks/useLegacySelector.hook"; diff --git a/client/src/project/clone/CloneSettings.tsx b/client/src/project/clone/CloneSettings.tsx index 01aa8e8a96..e8677cf450 100644 --- a/client/src/project/clone/CloneSettings.tsx +++ b/client/src/project/clone/CloneSettings.tsx @@ -18,6 +18,7 @@ import { useCallback, useState } from "react"; import { Button } from "reactstrap"; + import { CommandCopy } from "../../components/commandCopy/CommandCopy"; interface CloneSettingsProps { diff --git a/client/src/project/components/FormValidations.tsx b/client/src/project/components/FormValidations.tsx index 20fc1d869e..77b2cfac38 100644 --- a/client/src/project/components/FormValidations.tsx +++ b/client/src/project/components/FormValidations.tsx @@ -22,6 +22,7 @@ * FormValidation.tsx * FormValidation components. */ + import { ErrorLabel } from "../../components/formlabels/FormLabels"; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/client/src/project/components/GitLabConnect.tsx b/client/src/project/components/GitLabConnect.tsx index 119a61e9e7..11d5ad1d84 100644 --- a/client/src/project/components/GitLabConnect.tsx +++ b/client/src/project/components/GitLabConnect.tsx @@ -1,7 +1,7 @@ import { UncontrolledTooltip } from "reactstrap"; -import { ExternalLink } from "../../components/ExternalLinks"; import { ButtonWithMenu } from "../../components/buttons/Button"; +import { ExternalLink } from "../../components/ExternalLinks"; function externalUrlToGitLabIdeUrl(externalUrl: string) { if (externalUrl.includes("/gitlab/")) diff --git a/client/src/project/components/NewProjectAvatar.tsx b/client/src/project/components/NewProjectAvatar.tsx index 52ccfcbd2c..278589ee6d 100644 --- a/client/src/project/components/NewProjectAvatar.tsx +++ b/client/src/project/components/NewProjectAvatar.tsx @@ -25,8 +25,9 @@ import { useEffect, useState } from "react"; -import ImageInput from "../../components/form-field/FormGeneratorImageInput"; -import { ImageInputMode } from "../../components/form-field/FormGeneratorImageInput"; +import ImageInput, { + ImageInputMode, +} from "../../components/form-field/FormGeneratorImageInput"; // 3 MB -- GitLab has a 200kB limit, but a 3 MB file should be small enough after cropping const PROJECT_AVATAR_MAX_SIZE = 3 * 1024 * 1024; diff --git a/client/src/project/components/ShareLinkModal.jsx b/client/src/project/components/ShareLinkModal.jsx index e965468e62..9a7e3a1b3e 100644 --- a/client/src/project/components/ShareLinkModal.jsx +++ b/client/src/project/components/ShareLinkModal.jsx @@ -21,19 +21,21 @@ * ShareLinkModal.js * Share Link Modal component to create a project */ + import { useEffect, useState } from "react"; import { + Col, + Form, FormGroup, FormText, - Label, Input, + Label, Modal, - ModalHeader, ModalBody, + ModalHeader, Row, - Col, - Form, } from "reactstrap"; + import { CommandCopy } from "../../components/commandCopy/CommandCopy"; function ShareLinkModal(props) { diff --git a/client/src/project/components/Visibility.tsx b/client/src/project/components/Visibility.tsx index dc18d5f03d..cc8bf00d06 100644 --- a/client/src/project/components/Visibility.tsx +++ b/client/src/project/components/Visibility.tsx @@ -21,6 +21,7 @@ * Visibility.js * Visibility field group component */ + import { skipToken } from "@reduxjs/toolkit/query"; import { ReactNode, useCallback, useEffect, useState } from "react"; import { @@ -34,13 +35,13 @@ import { } from "reactstrap"; import { SuccessAlert } from "../../components/Alert"; -import { ExternalLink } from "../../components/ExternalLinks"; -import { Loader } from "../../components/Loader"; import { RtkErrorAlert } from "../../components/errors/RtkErrorAlert"; +import { ExternalLink } from "../../components/ExternalLinks"; import { LoadingLabel } from "../../components/formlabels/FormLabels"; +import { Loader } from "../../components/Loader"; import VisibilitiesInput, { - VISIBILITY_ITEMS, Visibilities, + VISIBILITY_ITEMS, } from "../../components/visibility/Visibility"; import { SettingRequiresKg } from "../../features/project/components/ProjectSettingsUtils"; import { useGetProjectByIdQuery } from "../../features/project/projectGitLab.api"; diff --git a/client/src/project/list/LazyProjectList.tsx b/client/src/project/list/LazyProjectList.tsx index b256e4865c..6d2fb999f9 100644 --- a/client/src/project/list/LazyProjectList.tsx +++ b/client/src/project/list/LazyProjectList.tsx @@ -16,7 +16,7 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; import PageLoader from "../../components/PageLoader"; diff --git a/client/src/project/list/ProjectList.container.jsx b/client/src/project/list/ProjectList.container.jsx index fceb706115..714f5bd50a 100644 --- a/client/src/project/list/ProjectList.container.jsx +++ b/client/src/project/list/ProjectList.container.jsx @@ -22,7 +22,7 @@ import { useNavigate, useLocation as useRouterLocation } from "react-router"; import AppContext from "../../utils/context/appContext"; import useLegacySelector from "../../utils/customHooks/useLegacySelector.hook"; -import { Url, getSearchParams } from "../../utils/helpers/url"; +import { getSearchParams, Url } from "../../utils/helpers/url"; import { ProjectList as ProjectListPresent } from "./ProjectList.present"; // *** Constants *** diff --git a/client/src/project/list/ProjectList.present.jsx b/client/src/project/list/ProjectList.present.jsx index abd423e675..b69574f39d 100644 --- a/client/src/project/list/ProjectList.present.jsx +++ b/client/src/project/list/ProjectList.present.jsx @@ -16,6 +16,16 @@ * limitations under the License. */ +import { + faBars, + faCheck, + faPlus, + faSearch, + faSortAmountDown, + faSortAmountUp, + faTh, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Fragment, useEffect, useState } from "react"; import { Link } from "react-router"; import { @@ -32,23 +42,16 @@ import { NavItem, Row, } from "reactstrap"; -import { - faCheck, - faSearch, - faSortAmountDown, - faSortAmountUp, - faBars, - faTh, - faPlus, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Url } from "../../utils/helpers/url"; + import "../Project.css"; + import { Label } from "reactstrap"; + +import ListDisplay from "../../components/List"; import { Loader } from "../../components/Loader"; import LazyMarkdownTextExcerpt from "../../components/markdown/LazyMarkdownTextExcerpt"; -import ListDisplay from "../../components/List"; import RenkuNavLinkV2 from "../../components/RenkuNavLinkV2"; function ProjectListRows(props) { diff --git a/client/src/project/shared/ProjectKeywords.tsx b/client/src/project/shared/ProjectKeywords.tsx index 3cc987c142..71fcca0e49 100644 --- a/client/src/project/shared/ProjectKeywords.tsx +++ b/client/src/project/shared/ProjectKeywords.tsx @@ -28,8 +28,8 @@ import { trim } from "lodash-es"; import { useCallback, useEffect, useState } from "react"; import { - RtkErrorAlert, extractRkErrorRemoteBranch, + RtkErrorAlert, } from "../../components/errors/RtkErrorAlert"; import InlineSubmitInput, { InputCard, diff --git a/client/src/root.tsx b/client/src/root.tsx index f605592557..5f5f82425d 100644 --- a/client/src/root.tsx +++ b/client/src/root.tsx @@ -16,22 +16,21 @@ * limitations under the License. */ +import v2Styles from "~/styles/renku_bootstrap.scss?url"; import cx from "classnames"; import { + isRouteErrorResponse, Links, Meta, Outlet, Scripts, ScrollRestoration, - isRouteErrorResponse, type MetaDescriptor, type MetaFunction, } from "react-router"; -import v2Styles from "~/styles/renku_bootstrap.scss?url"; -import NotFound from "./not-found/NotFound"; - import type { Route } from "./+types/root"; +import NotFound from "./not-found/NotFound"; export const DEFAULT_META_TITLE: string = "Reproducible Data Science | Open Research | Renku"; diff --git a/client/src/routes.ts b/client/src/routes.ts index 57da273102..b4a816c957 100644 --- a/client/src/routes.ts +++ b/client/src/routes.ts @@ -1,4 +1,4 @@ -import { type RouteConfig, route } from "@react-router/dev/routes"; +import { route, type RouteConfig } from "@react-router/dev/routes"; export default [ // * matches all URLs, the ? makes it optional so it will match / as well diff --git a/client/src/routes/catchall.tsx b/client/src/routes/catchall.tsx index 455c5941fb..b07e634df6 100644 --- a/client/src/routes/catchall.tsx +++ b/client/src/routes/catchall.tsx @@ -1,8 +1,6 @@ import AppRoot from "~/index"; - -import { data, type LoaderFunctionArgs } from "react-router"; - import { ABSOLUTE_ROUTES } from "~/routing/routes.constants"; +import { data, type LoaderFunctionArgs } from "react-router"; type RouteGroup = Record | Record; type Route = string | RouteGroup; diff --git a/client/src/setupTests.js b/client/src/setupTests.js index d6494a6782..5407eed841 100644 --- a/client/src/setupTests.js +++ b/client/src/setupTests.js @@ -1,4 +1,5 @@ // ? reference: https://www.npmjs.com/package/jest-localstorage-mock#in-create-react-app + import "jest-localstorage-mock"; if (global.document) { diff --git a/client/src/statuspage/Statuspage.container.jsx b/client/src/statuspage/Statuspage.container.jsx index 5c5296fa79..95d61e478f 100644 --- a/client/src/statuspage/Statuspage.container.jsx +++ b/client/src/statuspage/Statuspage.container.jsx @@ -26,8 +26,8 @@ import { connect } from "react-redux"; import { - StatuspageDisplay as DisplayPresent, StatuspageBanner as BannerPresent, + StatuspageDisplay as DisplayPresent, } from "./Statuspage.present"; function mapStateToProps(state, ownProps) { diff --git a/client/src/statuspage/Statuspage.present.jsx b/client/src/statuspage/Statuspage.present.jsx index e249b4cb90..7f126cbb36 100644 --- a/client/src/statuspage/Statuspage.present.jsx +++ b/client/src/statuspage/Statuspage.present.jsx @@ -23,8 +23,6 @@ * Components for the displaying information from statuspage.io */ -import cx from "classnames"; -import { Fragment, useState } from "react"; import { faCheckCircle, faExclamationCircle, @@ -33,7 +31,9 @@ import { faWrench, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import cx from "classnames"; import { DateTime } from "luxon"; +import { Fragment, useState } from "react"; import { Link } from "react-router"; import { Alert, Badge, Col, Row, Table } from "reactstrap"; diff --git a/client/src/statuspage/index.js b/client/src/statuspage/index.js index fb26089ce9..85913c4304 100644 --- a/client/src/statuspage/index.js +++ b/client/src/statuspage/index.js @@ -23,7 +23,7 @@ * Components for the displaying information from statuspage.io */ -import { StatuspageDisplay, StatuspageBanner } from "./Statuspage.container"; +import { StatuspageBanner, StatuspageDisplay } from "./Statuspage.container"; import StatuspageAPI, { isStatusConfigured, pollStatuspage, diff --git a/client/src/storybook/bootstrap/Badge.stories.tsx b/client/src/storybook/bootstrap/Badge.stories.tsx index a9ec1c4e54..4754d80a94 100644 --- a/client/src/storybook/bootstrap/Badge.stories.tsx +++ b/client/src/storybook/bootstrap/Badge.stories.tsx @@ -1,5 +1,4 @@ import { Meta, StoryObj } from "@storybook/react"; - import { Badge } from "reactstrap"; const componentDescription = ` diff --git a/client/src/storybook/bootstrap/BadgeInfo.stories.tsx b/client/src/storybook/bootstrap/BadgeInfo.stories.tsx index 7e1fd7a950..58ed4c7060 100644 --- a/client/src/storybook/bootstrap/BadgeInfo.stories.tsx +++ b/client/src/storybook/bootstrap/BadgeInfo.stories.tsx @@ -1,9 +1,9 @@ -import cx from "classnames"; import { Meta, StoryObj } from "@storybook/react"; +import RenkuBadge from "~/components/renkuBadge/RenkuBadge"; +import cx from "classnames"; import { CircleFill } from "react-bootstrap-icons"; import { Loader } from "../../components/Loader"; -import RenkuBadge from "~/components/renkuBadge/RenkuBadge"; export default { args: { diff --git a/client/src/storybook/bootstrap/Button.stories.tsx b/client/src/storybook/bootstrap/Button.stories.tsx index f753453add..837e2173d1 100644 --- a/client/src/storybook/bootstrap/Button.stories.tsx +++ b/client/src/storybook/bootstrap/Button.stories.tsx @@ -1,8 +1,8 @@ -import cx from "classnames"; import { Meta, StoryObj } from "@storybook/react"; +import cx from "classnames"; +import React from "react"; import { Pencil, PencilSquare, PlusLg, Trash } from "react-bootstrap-icons"; import { Button, ButtonGroup, DropdownItem } from "reactstrap"; -import React from "react"; import { ButtonWithMenuV2 } from "../../components/buttons/Button"; diff --git a/client/src/storybook/bootstrap/Card.stories.tsx b/client/src/storybook/bootstrap/Card.stories.tsx index 846596ca3f..ff33b6c894 100644 --- a/client/src/storybook/bootstrap/Card.stories.tsx +++ b/client/src/storybook/bootstrap/Card.stories.tsx @@ -1,5 +1,5 @@ -import { Card, CardBody, CardFooter, CardHeader } from "reactstrap"; import { Meta, StoryObj } from "@storybook/react"; +import { Card, CardBody, CardFooter, CardHeader } from "reactstrap"; const componentDescription = ` This is a very generic example of card, rarely used in its vanilla version in Renku. diff --git a/client/src/storybook/bootstrap/CardWithList.stories.tsx b/client/src/storybook/bootstrap/CardWithList.stories.tsx index 6586c483e0..78fb6c9907 100644 --- a/client/src/storybook/bootstrap/CardWithList.stories.tsx +++ b/client/src/storybook/bootstrap/CardWithList.stories.tsx @@ -1,4 +1,6 @@ +import { Meta, StoryObj } from "@storybook/react"; import cx from "classnames"; +import { PlayCircle } from "react-bootstrap-icons"; import { Card, CardBody, @@ -6,8 +8,6 @@ import { ListGroup, ListGroupItem, } from "reactstrap"; -import { PlayCircle } from "react-bootstrap-icons"; -import { Meta, StoryObj } from "@storybook/react"; const componentDescription = ` Renku has in many places cards containing a list of elements that users can interact with. This is a simple example where the only interaction is a click. diff --git a/client/src/storybook/bootstrap/ListGroup.stories.tsx b/client/src/storybook/bootstrap/ListGroup.stories.tsx index 659c2c0d58..ed43d7c255 100644 --- a/client/src/storybook/bootstrap/ListGroup.stories.tsx +++ b/client/src/storybook/bootstrap/ListGroup.stories.tsx @@ -1,7 +1,7 @@ +import { Meta, StoryObj } from "@storybook/react"; import cx from "classnames"; -import { ListGroup, ListGroupItem } from "reactstrap"; import { PlayCircle } from "react-bootstrap-icons"; -import { Meta, StoryObj } from "@storybook/react"; +import { ListGroup, ListGroupItem } from "reactstrap"; const componentDescription = ` Renku extensively uses List groups. diff --git a/client/src/storybook/bootstrap/Loader.stories.tsx b/client/src/storybook/bootstrap/Loader.stories.tsx index 7305881dcc..cb8ddf8da8 100644 --- a/client/src/storybook/bootstrap/Loader.stories.tsx +++ b/client/src/storybook/bootstrap/Loader.stories.tsx @@ -1,5 +1,6 @@ -import cx from "classnames"; import { Meta, StoryObj } from "@storybook/react"; +import cx from "classnames"; + import { Loader } from "../../components/Loader"; const componentDescription = ` diff --git a/client/src/storybook/bootstrap/Navbar.stories.tsx b/client/src/storybook/bootstrap/Navbar.stories.tsx index 07a97cec0b..524700a7d2 100644 --- a/client/src/storybook/bootstrap/Navbar.stories.tsx +++ b/client/src/storybook/bootstrap/Navbar.stories.tsx @@ -1,7 +1,7 @@ +import { Meta, StoryObj } from "@storybook/react"; import cx from "classnames"; -import { Nav, NavItem, NavLink } from "reactstrap"; import { Eye, Sliders } from "react-bootstrap-icons"; -import { Meta, StoryObj } from "@storybook/react"; +import { Nav, NavItem, NavLink } from "reactstrap"; const componentDescription = ` Navbar helps users navigate the application. We have a main navbar at the top and bottom of the application, and local navbar in pages (or rarely modals) requiring navigation. diff --git a/client/src/storybook/bootstrap/Offcanvas.stories.tsx b/client/src/storybook/bootstrap/Offcanvas.stories.tsx index 06185dae16..4f2be51a7f 100644 --- a/client/src/storybook/bootstrap/Offcanvas.stories.tsx +++ b/client/src/storybook/bootstrap/Offcanvas.stories.tsx @@ -1,5 +1,5 @@ -import cx from "classnames"; import { Meta, StoryObj } from "@storybook/react"; +import cx from "classnames"; import { useState } from "react"; import { Button, Offcanvas, OffcanvasBody } from "reactstrap"; diff --git a/client/src/storybook/bootstrap/Pagination.stories.tsx b/client/src/storybook/bootstrap/Pagination.stories.tsx index fa837f5a52..88046ecfe4 100644 --- a/client/src/storybook/bootstrap/Pagination.stories.tsx +++ b/client/src/storybook/bootstrap/Pagination.stories.tsx @@ -1,7 +1,7 @@ import { Meta, StoryObj } from "@storybook/react"; import { useMemo } from "react"; - import { useSearchParams } from "react-router"; + import Pagination from "../../components/Pagination"; const componentDescription = ` diff --git a/client/src/storybook/bootstrap/Spacing.stories.tsx b/client/src/storybook/bootstrap/Spacing.stories.tsx index a09f1997a2..087250de22 100644 --- a/client/src/storybook/bootstrap/Spacing.stories.tsx +++ b/client/src/storybook/bootstrap/Spacing.stories.tsx @@ -1,5 +1,5 @@ -import cx from "classnames"; import { Meta, StoryObj } from "@storybook/react"; +import cx from "classnames"; export default { args: {}, diff --git a/client/src/styleguide/ButtonsGuide.jsx b/client/src/styleguide/ButtonsGuide.jsx index 603d7d2c8a..efff936792 100644 --- a/client/src/styleguide/ButtonsGuide.jsx +++ b/client/src/styleguide/ButtonsGuide.jsx @@ -17,18 +17,18 @@ */ import { Fragment, useState } from "react"; - import { Button, ButtonGroup, DropdownItem, Table } from "reactstrap"; -import { Loader } from "../components/Loader"; + import { ErrorAlert, InfoAlert, SuccessAlert, WarnAlert, } from "../components/Alert"; -import { Clipboard } from "../components/clipboard/Clipboard"; import { ButtonWithMenu, GoBackButton } from "../components/buttons/Button"; +import { Clipboard } from "../components/clipboard/Clipboard"; import { ExternalLink } from "../components/ExternalLinks"; +import { Loader } from "../components/Loader"; function Switch() { const [mode, setMode] = useState(0); diff --git a/client/src/styleguide/FormsGuide.jsx b/client/src/styleguide/FormsGuide.jsx index bba3d1af9f..d8188689b2 100644 --- a/client/src/styleguide/FormsGuide.jsx +++ b/client/src/styleguide/FormsGuide.jsx @@ -17,8 +17,7 @@ */ import { Fragment } from "react"; - -import { Row, Col, Card, CardBody, CardHeader } from "reactstrap"; +import { Card, CardBody, CardHeader, Col, Row } from "reactstrap"; /* eslint-disable */ function CardsSection(props) { diff --git a/client/src/styleguide/LazyStyleGuide.tsx b/client/src/styleguide/LazyStyleGuide.tsx index 19189be499..cddd3fa10b 100644 --- a/client/src/styleguide/LazyStyleGuide.tsx +++ b/client/src/styleguide/LazyStyleGuide.tsx @@ -16,7 +16,8 @@ * limitations under the License. */ -import { Suspense, lazy } from "react"; +import { lazy, Suspense } from "react"; + import PageLoader from "../components/PageLoader"; const StyleGuide = lazy(() => import("./StyleGuide")); diff --git a/client/src/styleguide/ListsGuide.jsx b/client/src/styleguide/ListsGuide.jsx index 283e723772..409d42bca9 100644 --- a/client/src/styleguide/ListsGuide.jsx +++ b/client/src/styleguide/ListsGuide.jsx @@ -17,9 +17,9 @@ */ import { Fragment } from "react"; - import { Link } from "react-router"; import { Card, CardBody, CardHeader } from "reactstrap"; + import Pagination from "../components/Pagination"; import { TimeCaption } from "../components/TimeCaption"; diff --git a/client/src/utils/context/appContext.ts b/client/src/utils/context/appContext.ts index aab37ca4dc..cf983eb5b0 100644 --- a/client/src/utils/context/appContext.ts +++ b/client/src/utils/context/appContext.ts @@ -17,6 +17,7 @@ */ import React from "react"; + import type { NotificationsManager } from "../../notifications/notifications.types"; import type { CoreApiVersionedUrlConfig } from "../helpers/url"; import { createCoreApiVersionedUrlConfig } from "../helpers/url"; diff --git a/client/src/utils/context/appParams.utils.ts b/client/src/utils/context/appParams.utils.ts index 7e0cf1afd7..69c372bdfb 100644 --- a/client/src/utils/context/appParams.utils.ts +++ b/client/src/utils/context/appParams.utils.ts @@ -17,6 +17,7 @@ */ import { clamp } from "lodash-es"; + import type { DashboardMessageParams } from "../../features/dashboard/message/DashboardMessage.types"; import type { HomepageParams } from "../../features/landing/anonymousHome.types"; import type { CoreApiVersionedUrlConfig } from "../helpers/url"; diff --git a/client/src/utils/customHooks/UseGetInactiveProjects.ts b/client/src/utils/customHooks/UseGetInactiveProjects.ts index 6d3ec64297..95ecf8f773 100644 --- a/client/src/utils/customHooks/UseGetInactiveProjects.ts +++ b/client/src/utils/customHooks/UseGetInactiveProjects.ts @@ -17,8 +17,9 @@ */ import { useEffect, useState } from "react"; -import { useGetInactiveKgProjectsQuery } from "../../features/inactiveKgProjects/InactiveKgProjectsApi"; + import type { InactiveKgProjects } from "../../features/inactiveKgProjects"; +import { useGetInactiveKgProjectsQuery } from "../../features/inactiveKgProjects/InactiveKgProjectsApi"; const PROJECTS_PER_PAGE = 100; /** diff --git a/client/src/utils/customHooks/UseGetProjects.ts b/client/src/utils/customHooks/UseGetProjects.ts index d88e388486..51569a4660 100644 --- a/client/src/utils/customHooks/UseGetProjects.ts +++ b/client/src/utils/customHooks/UseGetProjects.ts @@ -17,6 +17,7 @@ */ import { useEffect, useState } from "react"; + import { useGetMemberProjectsQuery } from "../../features/projects/projects.api"; /** diff --git a/client/src/utils/customHooks/UseGetVisibilities.ts b/client/src/utils/customHooks/UseGetVisibilities.ts index 9e7a6c8a50..fb5b223a70 100644 --- a/client/src/utils/customHooks/UseGetVisibilities.ts +++ b/client/src/utils/customHooks/UseGetVisibilities.ts @@ -17,6 +17,7 @@ */ import { useEffect, useState } from "react"; + import { useGetGroupByPathQuery } from "../../features/projects/projects.api"; import { computeVisibilities } from "../helpers/HelperFunctions"; diff --git a/client/src/utils/customHooks/useAppDispatch.hook.ts b/client/src/utils/customHooks/useAppDispatch.hook.ts index ced018bddc..a140301b9b 100644 --- a/client/src/utils/customHooks/useAppDispatch.hook.ts +++ b/client/src/utils/customHooks/useAppDispatch.hook.ts @@ -17,6 +17,7 @@ */ import { useDispatch } from "react-redux"; + import type { AppDispatch } from "../helpers/EnhancedState"; const useAppDispatch: () => AppDispatch = useDispatch; diff --git a/client/src/utils/customHooks/useAppSelector.hook.ts b/client/src/utils/customHooks/useAppSelector.hook.ts index bacd1a7b5a..32ee442344 100644 --- a/client/src/utils/customHooks/useAppSelector.hook.ts +++ b/client/src/utils/customHooks/useAppSelector.hook.ts @@ -18,6 +18,7 @@ import type { TypedUseSelectorHook } from "react-redux"; import { useSelector } from "react-redux"; + import type { StrictRootState } from "../helpers/EnhancedState"; const useAppSelector: TypedUseSelectorHook = useSelector; diff --git a/client/src/utils/customHooks/useLegacySelector.hook.ts b/client/src/utils/customHooks/useLegacySelector.hook.ts index 62af336b74..3ace433b8e 100644 --- a/client/src/utils/customHooks/useLegacySelector.hook.ts +++ b/client/src/utils/customHooks/useLegacySelector.hook.ts @@ -18,6 +18,7 @@ import type { TypedUseSelectorHook } from "react-redux"; import { useSelector } from "react-redux"; + import type { LegacyRootState } from "../helpers/EnhancedState"; const useLegacySelector: TypedUseSelectorHook = useSelector; diff --git a/client/src/utils/customHooks/useLocationHash.hook.ts b/client/src/utils/customHooks/useLocationHash.hook.ts index 359b81b623..41a1c2eb5c 100644 --- a/client/src/utils/customHooks/useLocationHash.hook.ts +++ b/client/src/utils/customHooks/useLocationHash.hook.ts @@ -17,7 +17,7 @@ */ import { useCallback, useMemo } from "react"; -import { type NavigateOptions, useLocation, useNavigate } from "react-router"; +import { useLocation, useNavigate, type NavigateOptions } from "react-router"; /** * useLocationHash() is a hook similar to react-router's useSearchParams but for the URL hash. diff --git a/client/src/utils/helpers/Dataset.utils.ts b/client/src/utils/helpers/Dataset.utils.ts index 8f32a8deae..6f4229ab8a 100644 --- a/client/src/utils/helpers/Dataset.utils.ts +++ b/client/src/utils/helpers/Dataset.utils.ts @@ -17,6 +17,7 @@ */ import { cleanGitUrl } from "./ProjectFunctions"; + interface DatasetImages { content_url: string; } diff --git a/client/src/utils/helpers/DurationUtils.ts b/client/src/utils/helpers/DurationUtils.ts index 2f53bee988..1d984981a5 100644 --- a/client/src/utils/helpers/DurationUtils.ts +++ b/client/src/utils/helpers/DurationUtils.ts @@ -22,6 +22,7 @@ import { DurationLikeObject, DurationObjectUnits, } from "luxon"; + import { ensureDateTime } from "./DateTimeUtils"; /** diff --git a/client/src/utils/helpers/EnhancedState.ts b/client/src/utils/helpers/EnhancedState.ts index a3e5ef1696..f53e960546 100644 --- a/client/src/utils/helpers/EnhancedState.ts +++ b/client/src/utils/helpers/EnhancedState.ts @@ -23,12 +23,12 @@ import { Action, AnyAction, + configureStore, ReducersMapObject, StoreEnhancer, - configureStore, } from "@reduxjs/toolkit"; - import { computeResourcesEmptyApi as computeResourcesApi } from "~/features/sessionsV2/api/computeResources.empty-api"; + import adminKeycloakApi from "../../features/admin/adminKeycloak.api"; import { connectedServicesEmptyApi as connectedServicesApi } from "../../features/connectedServices/api/connectedServices.empty-api"; import { dashboardMessageSlice } from "../../features/dashboard/message/dashboardMessageSlice"; diff --git a/client/src/utils/helpers/KgSearchFunctions.ts b/client/src/utils/helpers/KgSearchFunctions.ts index 4798e8cfdf..1fbe2d9fc3 100644 --- a/client/src/utils/helpers/KgSearchFunctions.ts +++ b/client/src/utils/helpers/KgSearchFunctions.ts @@ -16,22 +16,23 @@ * limitations under the License. */ +import { isEqual } from "lodash-es"; + +import { DateFilterTypes } from "../../components/dateFilter/DateFilter"; +import { ListElementProps } from "../../components/list/list.types"; +import type { UserRoles } from "../../components/userRolesFilter/userRolesFilter.types"; +import { Visibilities } from "../../components/visibility/Visibility"; import { EntityType, KgSearchResult, KgSearchResultLink, } from "../../features/kgSearch"; -import { ListElementProps } from "../../components/list/list.types"; -import { Url } from "./url"; -import { DateFilterTypes } from "../../components/dateFilter/DateFilter"; -import { isEqual } from "lodash-es"; -import { getEntityImageUrl } from "./HelperFunctions"; import { DatasetKg, KgMetadataResponse, } from "../../features/project/project.types"; -import { Visibilities } from "../../components/visibility/Visibility"; -import type { UserRoles } from "../../components/userRolesFilter/userRolesFilter.types"; +import { getEntityImageUrl } from "./HelperFunctions"; +import { Url } from "./url"; const getDatasetIdentifier = (links: KgSearchResultLink[]): string => { try { diff --git a/client/src/utils/helpers/ProjectFunctions.ts b/client/src/utils/helpers/ProjectFunctions.ts index 90b527fb09..8a801f07ce 100644 --- a/client/src/utils/helpers/ProjectFunctions.ts +++ b/client/src/utils/helpers/ProjectFunctions.ts @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { ACCESS_LEVELS } from "../../api-client"; interface ProjectMetadata { diff --git a/client/src/utils/helpers/RtkQueryErrorsContext.tsx b/client/src/utils/helpers/RtkQueryErrorsContext.tsx index fa9c71c7d1..9554c33a61 100644 --- a/client/src/utils/helpers/RtkQueryErrorsContext.tsx +++ b/client/src/utils/helpers/RtkQueryErrorsContext.tsx @@ -18,7 +18,7 @@ import { SerializedError } from "@reduxjs/toolkit"; import { FetchBaseQueryError } from "@reduxjs/toolkit/query"; -import { ReactNode, createContext, useContext, useMemo } from "react"; +import { createContext, ReactNode, useContext, useMemo } from "react"; export enum RtkQuery { getSessions = "getSessions", diff --git a/client/src/utils/helpers/UseWindowsSize.tsx b/client/src/utils/helpers/UseWindowsSize.tsx index 185872e2ec..6c43dfa3eb 100644 --- a/client/src/utils/helpers/UseWindowsSize.tsx +++ b/client/src/utils/helpers/UseWindowsSize.tsx @@ -22,6 +22,7 @@ * UseWindowSize.tsx * UseWindowSize hook */ + import { useLayoutEffect, useState } from "react"; function useWindowSize() { diff --git a/client/src/utils/helpers/kgPagination.utils.ts b/client/src/utils/helpers/kgPagination.utils.ts index 52bdcac75c..6dcd6fba51 100644 --- a/client/src/utils/helpers/kgPagination.utils.ts +++ b/client/src/utils/helpers/kgPagination.utils.ts @@ -17,8 +17,8 @@ */ import { - AbstractKgPaginatedResponse, AbstractKgPaginatedQueryArgs, + AbstractKgPaginatedResponse, } from "../types/pagination.types"; export function processPaginationHeaders( diff --git a/client/src/utils/helpers/markdown.utils.js b/client/src/utils/helpers/markdown.utils.js index 2dab73d300..7a56f2d38f 100644 --- a/client/src/utils/helpers/markdown.utils.js +++ b/client/src/utils/helpers/markdown.utils.js @@ -16,12 +16,12 @@ * limitations under the License. */ +import DOMPurify from "dompurify"; import showdown from "showdown"; import showdownHighlight from "showdown-highlight"; // Version 0.8.0 of showdown-katex breaks the tests so do not update the library import showdownKatex from "showdown-katex"; import showdownMermaid from "showdown-mermaid"; -import DOMPurify from "dompurify"; // ! This functions should only be imported from src/components/markdown/RenkuMarkdown.js // ! If imported multiple times, the main bundle will contain showdown and diff --git a/client/src/utils/helpers/markdownUtils.test.js b/client/src/utils/helpers/markdownUtils.test.js index 58302c1b49..653625cc51 100644 --- a/client/src/utils/helpers/markdownUtils.test.js +++ b/client/src/utils/helpers/markdownUtils.test.js @@ -17,6 +17,7 @@ */ import { describe, expect, it } from "vitest"; + import { sanitizedHTMLFromMarkdown } from "./markdown.utils"; describe("html sanitization", () => { diff --git a/client/src/utils/helpers/sentry/Sentry.js b/client/src/utils/helpers/sentry/Sentry.js index 74a9641e3b..654db66119 100644 --- a/client/src/utils/helpers/sentry/Sentry.js +++ b/client/src/utils/helpers/sentry/Sentry.js @@ -25,6 +25,7 @@ import * as SentryLib from "@sentry/react"; import { clamp } from "lodash-es"; + import { API_ERRORS } from "../../../api-client/errors"; const NAMESPACE_DEFAULT = "unknown"; diff --git a/client/src/utils/helpers/url/Url.test.js b/client/src/utils/helpers/url/Url.test.js index 6a944a3ccf..fcf69fd262 100644 --- a/client/src/utils/helpers/url/Url.test.js +++ b/client/src/utils/helpers/url/Url.test.js @@ -25,7 +25,7 @@ import { beforeAll, describe, expect, it } from "vitest"; -import { Url, UrlRule, getSearchParams, isSessionUrl } from "./Url"; +import { getSearchParams, isSessionUrl, Url, UrlRule } from "./Url"; describe("UrlRule private class", () => { it("Initialization values and errors", () => { diff --git a/client/src/websocket/handlers/userHandlers.test.ts b/client/src/websocket/handlers/userHandlers.test.ts index 89d502ff92..b12a6276ca 100644 --- a/client/src/websocket/handlers/userHandlers.test.ts +++ b/client/src/websocket/handlers/userHandlers.test.ts @@ -19,7 +19,7 @@ import WS from "jest-websocket-mock"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; -import { StateModel, globalSchema } from "../../model"; +import { globalSchema, StateModel } from "../../model"; import { sleep } from "../../utils/helpers/HelperFunctions"; import { handleUserError, diff --git a/client/src/websocket/index.test.ts b/client/src/websocket/index.test.ts index d082264f8d..7135d7c351 100644 --- a/client/src/websocket/index.test.ts +++ b/client/src/websocket/index.test.ts @@ -20,16 +20,16 @@ import WS from "jest-websocket-mock"; import { describe, expect, it } from "vitest"; import APIClient, { testClient as client } from "../api-client"; -import { StateModel, globalSchema } from "../model"; +import { globalSchema, StateModel } from "../model"; import NotificationsManager from "../notifications/NotificationsManager"; import { sleep } from "../utils/helpers/HelperFunctions"; -import { WsServerMessage } from "./WsMessages"; import { - MessageData, getWsServerMessageHandler, + MessageData, retryConnection, setupWebSocket, } from "./index"; +import { WsServerMessage } from "./WsMessages"; const fakeLocation = () => { return { pathname: "" }; diff --git a/client/src/websocket/index.ts b/client/src/websocket/index.ts index 4431231172..1a371f037b 100644 --- a/client/src/websocket/index.ts +++ b/client/src/websocket/index.ts @@ -16,29 +16,29 @@ * limitations under the License. */ -import { - checkWsServerMessage, - sendPullKgActivationStatus, - WsMessage, - WsServerMessage, -} from "./WsMessages"; -import { - handleUserInit, - handleUserUiVersion, - handleUserError, -} from "./handlers/userHandlers"; -import { handleSessionsStatus } from "./handlers/sessionStatusHandler"; +import APIClient from "../api-client"; +import type { KgInactiveProjectsState } from "../features/inactiveKgProjects/"; +import { ActivationStatusProgressError } from "../features/inactiveKgProjects/"; +import { StateModel } from "../model"; import { handleKgActivationStatus, handleWebSocketErrorForKgActivationStatus, handleWebSocketPing, updateStatus, } from "./handlers/kgActivationStatusHandler"; -import type { KgInactiveProjectsState } from "../features/inactiveKgProjects/"; -import { ActivationStatusProgressError } from "../features/inactiveKgProjects/"; -import { StateModel } from "../model"; -import APIClient from "../api-client"; +import { handleSessionsStatus } from "./handlers/sessionStatusHandler"; import { handleSessionsStatusV2 } from "./handlers/sessionStatusHandlerV2"; +import { + handleUserError, + handleUserInit, + handleUserUiVersion, +} from "./handlers/userHandlers"; +import { + checkWsServerMessage, + sendPullKgActivationStatus, + WsMessage, + WsServerMessage, +} from "./WsMessages"; const timeoutIntervalMs = 45 * 1000; // ? set to 0 to disable const reconnectIntervalMs = 10 * 1000; diff --git a/client/src/workflows/Workflows.present.tsx b/client/src/workflows/Workflows.present.tsx index 80d736937f..022d6c3ed9 100644 --- a/client/src/workflows/Workflows.present.tsx +++ b/client/src/workflows/Workflows.present.tsx @@ -16,8 +16,27 @@ * limitations under the License. */ +import { + faArrowRight, + faCheck, + faExclamationTriangle, + faSortAmountDown, + faSortAmountUp, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import cx from "classnames"; import { useState } from "react"; +import { + Bookmarks, + Calendar4, + Diagram2, + FileCode, + Journals, + Link45deg, + People, + XLg, +} from "react-bootstrap-icons"; +import { Link } from "react-router"; import { Button, ButtonDropdown, @@ -34,37 +53,17 @@ import { Table, UncontrolledTooltip, } from "reactstrap"; -import { - Bookmarks, - Calendar4, - Diagram2, - FileCode, - Journals, - Link45deg, - People, - XLg, -} from "react-bootstrap-icons"; -import { Link } from "react-router"; -import { - faArrowRight, - faCheck, - faExclamationTriangle, - faSortAmountDown, - faSortAmountUp, -} from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { InfoAlert, WarnAlert } from "../components/Alert"; - -import { ExternalDocsLink, ExternalLink } from "../components/ExternalLinks"; -import LinkWithTooltip from "../components/LinkWithTooltip"; -import InformativeIcon from "../components/InformativeIcon"; -import { Loader } from "../components/Loader"; -import { TreeBrowser, TreeDetails, TreeElement } from "../components/Tree"; import { CommandCopy } from "../components/commandCopy/CommandCopy"; import EntityCreators from "../components/entities/Creators"; import { EntityType } from "../components/entities/entities.types"; import { CoreErrorAlert } from "../components/errors/CoreErrorAlert"; +import { ExternalDocsLink, ExternalLink } from "../components/ExternalLinks"; +import InformativeIcon from "../components/InformativeIcon"; +import LinkWithTooltip from "../components/LinkWithTooltip"; +import { Loader } from "../components/Loader"; +import { TreeBrowser, TreeDetails, TreeElement } from "../components/Tree"; import { Docs } from "../utils/constants/Docs"; import { toHumanDateTime } from "../utils/helpers/DateTimeUtils"; import { toShortHumanDuration } from "../utils/helpers/DurationUtils"; diff --git a/client/src/wrappedIndex.jsx b/client/src/wrappedIndex.jsx index 965cec0bae..e37bd1fdac 100644 --- a/client/src/wrappedIndex.jsx +++ b/client/src/wrappedIndex.jsx @@ -6,27 +6,26 @@ import { BrowserRouter, useLocation, useNavigate } from "react-router"; import "bootstrap"; -// Use our version of bootstrap, not the one in import 'bootstrap/dist/css/bootstrap.css'; -import v1Styles from "./styles/index.scss?inline"; +import StyleHandler from "~/features/rootV2/StyleHandler"; -import App from "./App"; // Disable service workers for the moment -- see below where registerServiceWorker is called // import registerServiceWorker from './utils/ServiceWorker'; import APIClient from "./api-client"; +import App from "./App"; import { LoginHelper } from "./authentication"; import { AppErrorBoundary } from "./error-boundary/ErrorBoundary"; import ApiClientV2Compat from "./features/api-client-v2-compat/ApiClientV2Compat"; import { Maintenance } from "./features/maintenance/Maintenance"; import { globalSchema, StateModel } from "./model"; import { pollStatuspage } from "./statuspage"; +// Use our version of bootstrap, not the one in import 'bootstrap/dist/css/bootstrap.css'; +import v1Styles from "./styles/index.scss?inline"; import { UserCoordinator } from "./user"; import { validatedAppParams } from "./utils/context/appParams.utils"; import useFeatureFlagSync from "./utils/feature-flags/useFeatureFlagSync.hook"; import { Sentry } from "./utils/helpers/sentry"; import { createCoreApiVersionedUrlConfig, Url } from "./utils/helpers/url"; -import StyleHandler from "~/features/rootV2/StyleHandler"; - let hasRendered = false; export default function appIndex() { diff --git a/client/storybook-vite.config.ts b/client/storybook-vite.config.ts index f9d5564f8c..acc4e9cb82 100644 --- a/client/storybook-vite.config.ts +++ b/client/storybook-vite.config.ts @@ -1,6 +1,6 @@ +import { resolve } from "path"; import eslintPlugin from "@nabla/vite-plugin-eslint"; import react from "@vitejs/plugin-react"; -import { resolve } from "path"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; diff --git a/client/vite.config.ts b/client/vite.config.ts index f99d563532..7feef9d9a0 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -1,8 +1,8 @@ +import { resolve } from "path"; import eslintPlugin from "@nabla/vite-plugin-eslint"; import { reactRouter } from "@react-router/dev/vite"; -import { resolve } from "path"; -import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vite"; +import tsconfigPaths from "vite-tsconfig-paths"; // https://vitejs.dev/config/ export default defineConfig(({ isSsrBuild }) => ({