diff --git a/client/public/index.html b/client/public/index.html index baad12737c..9278a16fb8 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -1,4 +1,4 @@ - + diff --git a/client/public/static/public/theme.css b/client/public/static/public/theme.css index 4b4f722ee3..aa1eca5d1b 100644 --- a/client/public/static/public/theme.css +++ b/client/public/static/public/theme.css @@ -2,7 +2,9 @@ font-family: "Inter"; font-style: normal; font-weight: 400; - src: local("Inter Regular"), local("Inter-Regular"), + src: + local("Inter Regular"), + local("Inter-Regular"), url("./fonts/Inter/static/Inter-Regular.ttf") format("truetype"); font-display: swap; } @@ -11,7 +13,9 @@ font-family: "Inter"; font-style: normal; font-weight: 600; - src: local("Inter Bold"), local("Inter-Bold"), + src: + local("Inter Bold"), + local("Inter-Bold"), url("./fonts/Inter/static/Inter-Bold.ttf") format("truetype"); font-display: swap; } diff --git a/client/src/App.js b/client/src/App.js index eebccc6943..1dc036c2ac 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -242,7 +242,7 @@ function CentralContentContainer(props) { datasetCoordinator={ new DatasetCoordinator( props.client, - props.model.subModel("dataset") + props.model.subModel("dataset"), ) } logged={props.user.logged} @@ -306,7 +306,7 @@ function App(props) { const notificationManager = new NotificationsManager( props.model, props.client, - getLocation + getLocation, ); setNotifications(notificationManager); @@ -325,8 +325,8 @@ function App(props) { props.model, getLocation, props.client, - notificationManager - ) + notificationManager, + ), ); }, []); // eslint-disable-line diff --git a/client/src/App.test.js b/client/src/App.test.js index 353faad24b..2be3f25579 100644 --- a/client/src/App.test.js +++ b/client/src/App.test.js @@ -39,7 +39,7 @@ describe("rendering", () => { params={params} /> - + , ); }); }); @@ -64,7 +64,7 @@ describe("rendering", () => { params={params} /> - + , ); }); }); diff --git a/client/src/api-client/dataset.js b/client/src/api-client/dataset.js index 54cc509dce..a5de4a8d2a 100644 --- a/client/src/api-client/dataset.js +++ b/client/src/api-client/dataset.js @@ -41,7 +41,7 @@ export default function addDatasetMethods(client) { thenCallback, onErrorCallback, setController, - onFileUploadEnd + onFileUploadEnd, ) => { const data = createFileUploadFormData(file); data.append("processData", false); @@ -95,7 +95,7 @@ export default function addDatasetMethods(client) { client.uploadSingleFile = async ( file, unpack_archive = false, - versionUrl = null + versionUrl = null, ) => { const headers = new Headers(uploadFileHeaders); const data = createFileUploadFormData(file); @@ -134,7 +134,7 @@ export default function addDatasetMethods(client) { client.listProjectDatasetsFromCoreService = ( git_url, versionUrl = null, - defaultBranch + defaultBranch, ) => { let headers = client.getBasicHeaders(); headers.append("Content-Type", "application/json"); @@ -152,7 +152,7 @@ export default function addDatasetMethods(client) { .then((response) => { if (response.data.result && response.data.result.datasets.length > 0) { response.data.result.datasets.map((d) => - addMarqueeImageToDataset(git_url, cleanDatasetId(d), defaultBranch) + addMarqueeImageToDataset(git_url, cleanDatasetId(d), defaultBranch), ); } @@ -166,7 +166,7 @@ export default function addDatasetMethods(client) { client.fetchDatasetFilesFromCoreService = ( name, git_url, - versionUrl = null + versionUrl = null, ) => { let headers = client.getBasicHeaders(); headers.append("Content-Type", "application/json"); diff --git a/client/src/api-client/errors.js b/client/src/api-client/errors.js index 629d4764e6..e6e9eba8d0 100644 --- a/client/src/api-client/errors.js +++ b/client/src/api-client/errors.js @@ -79,17 +79,17 @@ function alertAPIErrors(error) { switch (error.case) { case API_ERRORS.forbiddenError: throw Error( - "You don't have the necessary permission to view this information or perform this action." + "You don't have the necessary permission to view this information or perform this action.", ); case API_ERRORS.notFoundError: throw Error("We could not find the requested resource on the server."); case API_ERRORS.internalServerError: throw Error( - "There is a problem with the server - please try again later." + "There is a problem with the server - please try again later.", ); case API_ERRORS.networkError: throw Error( - "There seems to be problem with your network connection. Please check and try again." + "There seems to be problem with your network connection. Please check and try again.", ); default: // No alert on default exception diff --git a/client/src/api-client/index.js b/client/src/api-client/index.js index a5c477f1e8..f91da3fcdb 100644 --- a/client/src/api-client/index.js +++ b/client/src/api-client/index.js @@ -62,7 +62,7 @@ class APIClient { this.baseUrl = apiUrl; this.uiserverUrl = uiserverUrl; this.coreApiVersionedUrlHelper = new CoreApiVersionedUrlHelper( - coreApiVersionedUrlConfig + coreApiVersionedUrlConfig, ); this.returnTypes = RETURN_TYPES; @@ -96,7 +96,7 @@ class APIClient { returnType = FETCH_DEFAULT.returnType, alertOnErr = FETCH_DEFAULT.alertOnErr, reLogin = FETCH_DEFAULT.reLogin, - anonymousLogin = FETCH_DEFAULT.anonymousLogin + anonymousLogin = FETCH_DEFAULT.anonymousLogin, ) { return renkuFetch(url, options) .catch((error) => { @@ -158,7 +158,7 @@ class APIClient { reLogin = FETCH_DEFAULT.reLogin, anonymousLogin = FETCH_DEFAULT.anonymousLogin, maxIterations = FETCH_DEFAULT.maxIterations, - } = {} + } = {}, ) { let iterations = 1, page = 1; @@ -176,11 +176,11 @@ class APIClient { returnType, alertOnErr, reLogin, - anonymousLogin + anonymousLogin, ); if (!response.pagination) throw new Error( - "Invoked API doesn't return structured data, making pagination unusable." + "Invoked API doesn't return structured data, making pagination unusable.", ); page = response.pagination.nextPage; response.pagination.progress = @@ -235,7 +235,7 @@ class APIClient { versionedCoreUrl(endpoint, metadataVersion) { const path = this.coreApiVersionedUrlHelper.urlForEndpoint( endpoint, - metadataVersion + metadataVersion, ); return `${this.baseUrl}/renku${path}`; } @@ -247,7 +247,7 @@ class APIClient { uploadFileURL(versionUrl) { return this.versionedCoreUrl( "cache.files_upload?override_existing=true", - versionUrl + versionUrl, ); } } diff --git a/client/src/api-client/instance.js b/client/src/api-client/instance.js index 167f3d0c09..cfc54b10ee 100644 --- a/client/src/api-client/instance.js +++ b/client/src/api-client/instance.js @@ -36,7 +36,7 @@ function addInstanceMethods(client) { { method: "GET", headers: new Headers({ Accept: "application/json" }), - } + }, ); const data = await response.json(); return data?.isIframeValid ?? false; diff --git a/client/src/api-client/notebook-servers.js b/client/src/api-client/notebook-servers.js index 717a524897..c34744c6e6 100644 --- a/client/src/api-client/notebook-servers.js +++ b/client/src/api-client/notebook-servers.js @@ -25,7 +25,7 @@ function addNotebookServersMethods(client) { project, branch, commit, - anonymous = false + anonymous = false, ) => { const headers = client.getBasicHeaders(); const url = `${client.baseUrl}/notebooks/servers`; @@ -42,7 +42,7 @@ function addNotebookServersMethods(client) { FETCH_DEFAULT.returnType, FETCH_DEFAULT.alertOnErr, FETCH_DEFAULT.reLogin, - anonymous + anonymous, ) .then((resp) => { return { data: resp.data.servers }; @@ -63,7 +63,7 @@ function addNotebookServersMethods(client) { headers, queryParams: parameters, }, - "text" + "text", ) .then(() => { return true; @@ -81,7 +81,7 @@ function addNotebookServersMethods(client) { FETCH_DEFAULT.returnType, FETCH_DEFAULT.alertOnErr, FETCH_DEFAULT.reLogin, - anonymous + anonymous, ) .then((resp) => { let { data } = resp; @@ -106,7 +106,7 @@ function addNotebookServersMethods(client) { commitId, image, options, - env_variables = {} + env_variables = {}, ) => { const headers = client.getBasicHeaders(); headers.append("Content-Type", "application/json"); @@ -209,7 +209,7 @@ function addNotebookServersMethods(client) { const response = await client.clientFetch( url, { method: "DELETE", headers }, - RETURN_TYPES.full + RETURN_TYPES.full, ); if (response.status >= 200 && response.status < 400) return true; return false; diff --git a/client/src/api-client/pipeline.js b/client/src/api-client/pipeline.js index 6c6ed5a8ca..12465210d3 100644 --- a/client/src/api-client/pipeline.js +++ b/client/src/api-client/pipeline.js @@ -30,7 +30,7 @@ function addPipelineMethods(client) { body: JSON.stringify({ ref: defaultBranch, }), - } + }, ); }; diff --git a/client/src/api-client/project.js b/client/src/api-client/project.js index 05164ff9d1..36cedd95dd 100644 --- a/client/src/api-client/project.js +++ b/client/src/api-client/project.js @@ -25,7 +25,7 @@ function buildTreeLazy( jsonObj, hash, currentPath, - gitAttributes + gitAttributes, ) { if (name.length === 0) return; @@ -34,7 +34,7 @@ function buildTreeLazy( let nodeType = jsonObj.type; // "tree" "blob" "commit" const isLfs = gitAttributes ? gitAttributes.includes( - currentPath + " filter=lfs diff=lfs merge=lfs -text" + currentPath + " filter=lfs diff=lfs merge=lfs -text", ) : false; let newNode = { @@ -64,7 +64,7 @@ function getFilesTreeLazy( files, projectId, openFilePath, - lfsFiles + lfsFiles, ) { let tree = []; let hash = {}; @@ -82,7 +82,7 @@ function getFilesTreeLazy( hash, "", json, - openFilePath + openFilePath, ); const treeObj = { tree: tree, hash: hash, lfsFiles: json }; @@ -97,7 +97,7 @@ function getFilesTreeLazy( hash, "", lfsFiles, - openFilePath + openFilePath, ); const treeObj = { tree: tree, hash: hash, lfsFiles: lfsFiles }; @@ -220,13 +220,13 @@ function addProjectMethods(client) { return client .clientFetch( `${client.baseUrl}/projects/${encodeURIComponent( - projectPathWithNamespace + projectPathWithNamespace, )}`, { method: "GET", headers, queryParams, - } + }, ) .then((resp) => { return { ...resp, data: carveProject(resp.data) }; @@ -258,7 +258,7 @@ function addProjectMethods(client) { method: "GET", headers, queryParams, - } + }, ); }; @@ -280,7 +280,7 @@ function addProjectMethods(client) { branchName = "master", openFilePath, currentPath = "", - lfsFiles + lfsFiles, ) => { return client .getRepositoryTree(projectId, { path: currentPath, recursive: false }) @@ -291,7 +291,7 @@ function addProjectMethods(client) { tree, projectId, openFilePath, - lfsFiles + lfsFiles, ); return fileStructure; }); @@ -320,7 +320,7 @@ function addProjectMethods(client) { targetTitle, targetPath, targetNamespace, - store + store, ) => { const headers = client.getBasicHeaders(); headers.append("Content-Type", "application/json"); @@ -348,7 +348,7 @@ function addProjectMethods(client) { try { pipeline = await client.runPipeline( forkedProject.data.id, - forkedProject.data.forked_from_project.default_branch + forkedProject.data.forked_from_project.default_branch, ); } catch (error) { // Sometimes triggering the pipelines after a few seconds succeed. @@ -356,7 +356,7 @@ function addProjectMethods(client) { try { pipeline = await client.runPipeline( forkedProject.data.id, - forkedProject.data.forked_from_project.default_branch + forkedProject.data.forked_from_project.default_branch, ); } catch (error) { pipeline = error; @@ -367,7 +367,7 @@ function addProjectMethods(client) { let webhook; try { const resp = await store.dispatch( - projectKgApi.endpoints.activateIndexing.initiate(forkedProject.data.id) + projectKgApi.endpoints.activateIndexing.initiate(forkedProject.data.id), ); webhook = (resp?.data?.message ?? "").includes("created"); } catch (error) { @@ -403,7 +403,7 @@ function addProjectMethods(client) { { method: "POST", headers: headers, - } + }, ); }; @@ -431,7 +431,7 @@ function addProjectMethods(client) { client.putProjectFieldFormData = async ( projectId, fieldNameOrObject, - fieldValue + fieldValue, ) => { const headers = client.getBasicHeaders(); @@ -466,7 +466,7 @@ function addProjectMethods(client) { client.getProjectConfig = async ( projectRepositoryUrl, versionUrl = null, - branch = null + branch = null, ) => { const url = client.versionedCoreUrl("config.show", versionUrl); let queryParams = { git_url: projectRepositoryUrl }; @@ -494,7 +494,7 @@ function addProjectMethods(client) { projectRepositoryUrl, config, versionUrl = null, - branch = null + branch = null, ) => { const url = client.versionedCoreUrl("config.set", versionUrl); let body = { git_url: projectRepositoryUrl, config }; @@ -520,7 +520,7 @@ function addProjectMethods(client) { */ client.getProjectLockStatus = async ( projectRepositoryUrl, - versionUrl = null + versionUrl = null, ) => { const url = client.versionedCoreUrl("project.lock_status", versionUrl); // wait up to 2s if a project is locked to give it time to free @@ -549,13 +549,13 @@ function carveProject(projectJson) { if (projectJson.permissions && projectJson.permissions.project_access) accessLevel = Math.max( accessLevel, - projectJson.permissions.project_access.access_level + projectJson.permissions.project_access.access_level, ); if (projectJson.permissions && projectJson.permissions.group_access) accessLevel = Math.max( accessLevel, - projectJson.permissions.group_access.access_level + projectJson.permissions.group_access.access_level, ); result["metadata"]["visibility"]["accessLevel"] = accessLevel; diff --git a/client/src/api-client/repository.js b/client/src/api-client/repository.js index 07a7657d24..7051b827b1 100644 --- a/client/src/api-client/repository.js +++ b/client/src/api-client/repository.js @@ -29,7 +29,7 @@ function addRepositoryMethods(client) { method: "POST", headers: headers, body: JSON.stringify(commitPayload), - } + }, ); }; @@ -38,7 +38,7 @@ function addRepositoryMethods(client) { ref = "master", per_page = 100, path, - maxIterations + maxIterations, ) => { const url = `${client.baseUrl}/projects/${projectId}/repository/commits`; let headers = client.getBasicHeaders(); @@ -83,7 +83,7 @@ function addRepositoryMethods(client) { projectId, path, ref = "master", - alertOnErr = true + alertOnErr = true, ) => { let headers = client.getBasicHeaders(); const encodedPath = encodeURIComponent(path); @@ -94,7 +94,7 @@ function addRepositoryMethods(client) { headers: headers, }, client.returnTypes.text, - alertOnErr + alertOnErr, ); }; @@ -108,7 +108,7 @@ function addRepositoryMethods(client) { headers: headers, }, client.returnTypes.full, - false + false, ) .then((response) => { return response.json(); @@ -120,7 +120,7 @@ function addRepositoryMethods(client) { projectId, path, ref = "master", - encoding = "base64" + encoding = "base64", ) => { let headers = client.getBasicHeaders(); const pathEncoded = encodeURIComponent(path); @@ -133,7 +133,7 @@ function addRepositoryMethods(client) { headers: headers, }, client.returnTypes.full, - false + false, ) .then((response) => { if (encoding === "raw") return response.text(); @@ -155,7 +155,7 @@ function addRepositoryMethods(client) { per_page = 100, page = 1, previousResults = [], - } = {} + } = {}, ) => { let headers = client.getBasicHeaders(); const queryParams = { @@ -175,7 +175,7 @@ function addRepositoryMethods(client) { queryParams, }, client.returnTypes.full, - false + false, ) .then((response) => { if (response.headers.get("X-Next-Page")) { diff --git a/client/src/api-client/user.js b/client/src/api-client/user.js index 5c07a437cf..ecf9d5afd6 100644 --- a/client/src/api-client/user.js +++ b/client/src/api-client/user.js @@ -30,7 +30,7 @@ function addUserMethods(client) { }, RETURN_TYPES.json, false, - false + false, ) .then((response) => response.data); }; diff --git a/client/src/authentication/Authentication.container.js b/client/src/authentication/Authentication.container.js index 4897a54e35..d0debbb333 100644 --- a/client/src/authentication/Authentication.container.js +++ b/client/src/authentication/Authentication.container.js @@ -83,7 +83,7 @@ const LoginHelper = { sessionStorage.removeItem(RenkuQueryParams.login); notifications?.addSuccess( notifications.Topics.AUTHENTICATION, - "The page was refreshed because you recently logged in on a different tab." + "The page was refreshed because you recently logged in on a different tab.", ); } @@ -93,7 +93,7 @@ const LoginHelper = { sessionStorage.removeItem(RenkuQueryParams.logout); notifications?.addWarning( notifications.Topics.AUTHENTICATION, - "The page was refreshed because you recently logged out on a different tab." + "The page was refreshed because you recently logged out on a different tab.", ); } }, diff --git a/client/src/authentication/Authentication.test.js b/client/src/authentication/Authentication.test.js index fff92a6076..3d66567ba5 100644 --- a/client/src/authentication/Authentication.test.js +++ b/client/src/authentication/Authentication.test.js @@ -93,7 +93,7 @@ describe("LoginHelper functions", () => { dispatchFakeStorageEvent(queryParams.login, new Date()); expect(Object.keys(sessionStorage.__STORE__).length).toBe(1); const sessionStorageDate = parseInt( - sessionStorage.getItem(queryParams.login) + sessionStorage.getItem(queryParams.login), ); expect(sessionStorageDate).toBeGreaterThanOrEqual(datePre); const datePost = new Date().getTime(); diff --git a/client/src/authentication/LoginRedirect.test.js b/client/src/authentication/LoginRedirect.test.js index 61741509e9..ba8ba3d10d 100644 --- a/client/src/authentication/LoginRedirect.test.js +++ b/client/src/authentication/LoginRedirect.test.js @@ -51,7 +51,7 @@ describe("rendering", () => { root.render( - + , ); }); }); diff --git a/client/src/authentication/LoginRedirect.tsx b/client/src/authentication/LoginRedirect.tsx index 6737cb994d..89bbc099e3 100644 --- a/client/src/authentication/LoginRedirect.tsx +++ b/client/src/authentication/LoginRedirect.tsx @@ -25,7 +25,7 @@ function createLoginUrl(url: string) { if (!redirectUrl.search.includes(RenkuQueryParams.login)) redirectUrl.searchParams.append( RenkuQueryParams.login, - RenkuQueryParams.loginValue + RenkuQueryParams.loginValue, ); return redirectUrl.toString(); diff --git a/client/src/components/FileExplorer.tsx b/client/src/components/FileExplorer.tsx index 864e7d2433..6e5c08d72f 100644 --- a/client/src/components/FileExplorer.tsx +++ b/client/src/components/FileExplorer.tsx @@ -38,7 +38,7 @@ function buildTree( jsonObj: FileTreeNode, hash: Record, currentPathCandidate: string, - foldersOpenOnLoad = 0 + foldersOpenOnLoad = 0, ) { if (parts.length === 0) return; const currentPath = @@ -53,7 +53,7 @@ function buildTree( treeNode[i].children, jsonObj, hash, - currentPath + "/" + parts[0] + currentPath + "/" + parts[0], ); return; } @@ -93,7 +93,7 @@ function buildTree( jsonObj, hash, currentPath, - foldersOpenOnLoad > 0 ? foldersOpenOnLoad - 1 : 0 + foldersOpenOnLoad > 0 ? foldersOpenOnLoad - 1 : 0, ); } else { for (let j = 0; j < newNode.children.length; j++) @@ -105,7 +105,7 @@ function buildTree( jsonObj, hash, currentPath, - foldersOpenOnLoad > 0 ? foldersOpenOnLoad - 1 : 0 + foldersOpenOnLoad > 0 ? foldersOpenOnLoad - 1 : 0, ); } } @@ -117,7 +117,7 @@ type FilesTree = { }; function getFilesTree( files: FileTreeNode[], - foldersOpenOnLoad: number | undefined + foldersOpenOnLoad: number | undefined, ): FilesTree { const list = files; const tree: TreeNodeElt[] = []; @@ -294,7 +294,7 @@ function FilesTreeView(props: FilesTreeViewProps) { insideProject={props.insideProject} /> ); - }) + }), ); } }, [ @@ -350,7 +350,7 @@ function FileExplorer(props: FileExplorerProps) { setFilesTree(updatedFilesTree); }, - [filesTree] + [filesTree], ); const loading = filesTree === undefined; diff --git a/client/src/components/Loader.tsx b/client/src/components/Loader.tsx index 492ab125c1..bad509190c 100644 --- a/client/src/components/Loader.tsx +++ b/client/src/components/Loader.tsx @@ -73,7 +73,7 @@ function LoaderSpinner({ className, inline, size }: LoaderSpinnerProps) { const baseSpinner = existingSpinners.find( (spinner) => spinner !== ref.current && - spinner.getAnimations?.().at(0)?.startTime != null + spinner.getAnimations?.().at(0)?.startTime != null, ); if (!baseSpinner) { return; @@ -105,7 +105,7 @@ function LoaderSpinner({ className, inline, size }: LoaderSpinnerProps) { "top-0", "start-0", "opacity-25", - inline && "d-inline-block" + inline && "d-inline-block", )} style={trackStyle} > @@ -116,7 +116,7 @@ function LoaderSpinner({ className, inline, size }: LoaderSpinnerProps) { "top-0", "start-0", "opacity-100", - inline && "d-inline-block" + inline && "d-inline-block", )} ref={ref} style={spinnerStyle} diff --git a/client/src/components/Logs.tsx b/client/src/components/Logs.tsx index a25cce025a..0308bcf89e 100644 --- a/client/src/components/Logs.tsx +++ b/client/src/components/Logs.tsx @@ -74,7 +74,7 @@ interface LogBodyProps extends IFetchableLogs { const LogTabs = ({ logs }: { logs: Record }) => { const [activeTab, setActiveTab] = React.useState( - undefined + undefined, ); const [data, setData] = React.useState | null>(null); @@ -179,10 +179,10 @@ const LogDownloadButton = ({ const useDownloadLogs = ( logs: IFetchableLogs["logs"], fetchLogs: IFetchableLogs["fetchLogs"], - sessionName: string + sessionName: string, ): [boolean | undefined, () => Promise] => { const [downloading, setDownloading] = React.useState( - undefined + undefined, ); const save = async () => { @@ -322,12 +322,12 @@ const EnvironmentLogs = ({ name, annotations }: EnvironmentLogsProps) => { const displayModal = useDisplaySelector((state) => state.modals.sessionLogs); const { logs, fetchLogs } = useGetSessionLogs( displayModal.targetServer, - displayModal.show + displayModal.show, ); const dispatch = useDispatch(); const toggleLogs = function (target: string) { dispatch( - displaySlice.actions.toggleSessionLogsModal({ targetServer: target }) + displaySlice.actions.toggleSessionLogsModal({ targetServer: target }), ); }; @@ -368,7 +368,7 @@ const EnvironmentLogsPresent = ({ if (!logs?.show || logs?.show !== name || !logs) return null; const cleanAnnotations = NotebooksHelper.cleanAnnotations( - annotations + annotations, ) as NotebookAnnotations; return ( diff --git a/client/src/components/SelectAutosuggestInput.js b/client/src/components/SelectAutosuggestInput.js index 12655a126f..7aa6795e05 100644 --- a/client/src/components/SelectAutosuggestInput.js +++ b/client/src/components/SelectAutosuggestInput.js @@ -53,7 +53,7 @@ function SelectAutosuggestInput({ return inputLength === 0 ? options : options.filter((language) => - language.name.toLowerCase().includes(inputValue) + language.name.toLowerCase().includes(inputValue), ); }; diff --git a/client/src/components/TimeCaption.tsx b/client/src/components/TimeCaption.tsx index ce19207cd3..f50ebff5f9 100644 --- a/client/src/components/TimeCaption.tsx +++ b/client/src/components/TimeCaption.tsx @@ -70,9 +70,9 @@ export function TimeCaption({ const refresh = Math.min( Math.max( duration.toMillis() / 10, - Duration.fromObject({ seconds: 5 }).toMillis() + Duration.fromObject({ seconds: 5 }).toMillis(), ), - Duration.fromObject({ minutes: 10 }).toMillis() + Duration.fromObject({ minutes: 10 }).toMillis(), ); /* eslint-enable spellcheck/spell-checker */ diff --git a/client/src/components/Tooltip.js b/client/src/components/Tooltip.js index 3abb238e1c..110948cfb0 100644 --- a/client/src/components/Tooltip.js +++ b/client/src/components/Tooltip.js @@ -67,7 +67,7 @@ function ThrottledTooltip(props) { tooltipOpen, setTooltipOpen, lastToggleTime, - setLastToggleTime + setLastToggleTime, ); const placement = props.placement ?? "top"; diff --git a/client/src/components/buttons/Button.tsx b/client/src/components/buttons/Button.tsx index 79a2909a46..7b4291aebd 100644 --- a/client/src/components/buttons/Button.tsx +++ b/client/src/components/buttons/Button.tsx @@ -239,7 +239,7 @@ function InlineSubmitButton({ onClick={onSubmit} className={cx( className, - isMainButton ? "btn-rk-green" : "btn-outline-rk-green" + isMainButton ? "btn-rk-green" : "btn-outline-rk-green", )} color="inlineSubmit" size="sm" diff --git a/client/src/components/buttons/ButtonWithMenu.stories.tsx b/client/src/components/buttons/ButtonWithMenu.stories.tsx index c9fc878da4..bf18bfac7f 100644 --- a/client/src/components/buttons/ButtonWithMenu.stories.tsx +++ b/client/src/components/buttons/ButtonWithMenu.stories.tsx @@ -103,10 +103,10 @@ export const Primary: Story = { }, play: async ({ canvasElement }) => { await userEvent.click( - canvasElement.querySelector('[data-cy="more-menu"]') as Element + canvasElement.querySelector('[data-cy="more-menu"]') as Element, ); await expect( - canvasElement.querySelector('[data-cy="option-a"]') as Element + canvasElement.querySelector('[data-cy="option-a"]') as Element, ).toBeVisible(); }, }; @@ -132,10 +132,10 @@ export const Secondary: Story = { }, play: async ({ canvasElement }) => { await userEvent.click( - canvasElement.querySelector('[data-cy="more-menu"]') as Element + canvasElement.querySelector('[data-cy="more-menu"]') as Element, ); await expect( - canvasElement.querySelector('[data-cy="option-b"]') as Element + canvasElement.querySelector('[data-cy="option-b"]') as Element, ).toBeVisible(); }, }; diff --git a/client/src/components/clipboard/Clipboard.tsx b/client/src/components/clipboard/Clipboard.tsx index 3184b1073e..7de36ac3f5 100644 --- a/client/src/components/clipboard/Clipboard.tsx +++ b/client/src/components/clipboard/Clipboard.tsx @@ -67,7 +67,7 @@ export const Clipboard = ({ onSuccess(); }); }, - [clipboardText, onSuccess] + [clipboardText, onSuccess], ); useEffect(() => { diff --git a/client/src/components/commandCopy/CommandCopy.module.scss b/client/src/components/commandCopy/CommandCopy.module.scss index 3ed5bba1ba..337e8997d7 100644 --- a/client/src/components/commandCopy/CommandCopy.module.scss +++ b/client/src/components/commandCopy/CommandCopy.module.scss @@ -6,8 +6,11 @@ } .clipboardBtn { - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, - border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + transition: + color 0.15s ease-in-out, + background-color 0.15s ease-in-out, + border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; &:hover, &:focus { diff --git a/client/src/components/commandCopy/CommandCopy.tsx b/client/src/components/commandCopy/CommandCopy.tsx index b7ffe24509..4536f05247 100644 --- a/client/src/components/commandCopy/CommandCopy.tsx +++ b/client/src/components/commandCopy/CommandCopy.tsx @@ -42,13 +42,13 @@ export const CommandCopy = ({ command, noMargin }: CommandCopyProps) => { className={cx( styles.main, "rounded overflow-hidden d-flex align-items-stretch", - !noMargin && "my-2" + !noMargin && "my-2", )} > { className={cx( styles.clipboardBtn, "rounded-end border d-inline-block align-middle cursor-pointer", - "px-2 py-1" + "px-2 py-1", )} clipboardText={command} /> diff --git a/client/src/components/commitSelector/CommitSelector.tsx b/client/src/components/commitSelector/CommitSelector.tsx index b0d19f02d6..13868df648 100644 --- a/client/src/components/commitSelector/CommitSelector.tsx +++ b/client/src/components/commitSelector/CommitSelector.tsx @@ -64,7 +64,7 @@ interface CommitSelectorProps { function CommitSelector({ commits, disabled, onChange }: CommitSelectorProps) { const [suggestionList, setSuggestionList] = useState(commits); const [selectedCommit, setSelectedCommit] = useState( - suggestionList.length > 0 ? suggestionList[0] : undefined + suggestionList.length > 0 ? suggestionList[0] : undefined, ); const [selectedCommitId, setSelectedCommitId] = useState(""); const [isSelectorOpened, setIsSelectorOpened] = useState(false); @@ -76,7 +76,7 @@ function CommitSelector({ commits, disabled, onChange }: CommitSelectorProps) { const onSuggestionSelected = ( event: React.FormEvent, - data: SuggestionSelectedEventData + data: SuggestionSelectedEventData, ) => { setSelectedCommit(data.suggestion); setIsSelectorOpened(false); @@ -84,7 +84,7 @@ function CommitSelector({ commits, disabled, onChange }: CommitSelectorProps) { const handleChange = ( event: React.FormEvent, - { newValue }: ChangeEvent + { newValue }: ChangeEvent, ) => { setSelectedCommitId(newValue); onChange(newValue); @@ -126,7 +126,7 @@ function CommitSelector({ commits, disabled, onChange }: CommitSelectorProps) { const shouldRenderSuggestions = ( value: string, - reason: ShouldRenderReasons + reason: ShouldRenderReasons, ) => { return reason === "input-focused" || isSelectorOpened; }; diff --git a/client/src/components/commits/Commits.js b/client/src/components/commits/Commits.js index 72c4d3597f..bc21843dd5 100644 --- a/client/src/components/commits/Commits.js +++ b/client/src/components/commits/Commits.js @@ -77,7 +77,7 @@ function createCommitsObjects(commits) { return data; }, - { lastDate: null, list: [] } + { lastDate: null, list: [] }, ); return enhancedCommits.list; } diff --git a/client/src/components/container/ContainerWrap.tsx b/client/src/components/container/ContainerWrap.tsx index 1dfcc0820a..d2d8d493c6 100644 --- a/client/src/components/container/ContainerWrap.tsx +++ b/client/src/components/container/ContainerWrap.tsx @@ -36,7 +36,7 @@ export default function ContainerWrap({ const className = cx( fullSize ? "w-100" : ["container-xxl", "py-4", "mt-2", "renku-container"], - className_ + className_, ); return
{children}
; } diff --git a/client/src/components/dateFilter/DateFilter.tsx b/client/src/components/dateFilter/DateFilter.tsx index 7fd3c29923..8e19acbdc1 100644 --- a/client/src/components/dateFilter/DateFilter.tsx +++ b/client/src/components/dateFilter/DateFilter.tsx @@ -57,7 +57,7 @@ export function dateFilterTypeToSinceAndUntil(typeDate: DateFilterTypes) { function getFromToDateFilter( typeDate: DateFilterTypes, - now: DateTime + now: DateTime, ): [DateTime | null, DateTime | null] { switch (typeDate) { case DateFilterTypes.last90days: @@ -87,7 +87,7 @@ const DateFilter = ({ onDatesChange, dates }: DateFilterProps) => { const { since, until } = dateFilterTypeToSinceAndUntil(typeDate); onDatesChange({ since, until, type: typeDate }); }, - [onDatesChange] + [onDatesChange], ); const items = [ diff --git a/client/src/components/entities/Creators.tsx b/client/src/components/entities/Creators.tsx index eca8dc0308..69ad6da0bf 100644 --- a/client/src/components/entities/Creators.tsx +++ b/client/src/components/entities/Creators.tsx @@ -56,7 +56,7 @@ function EntityCreators({ .map( (creator) => creator.name + - (creator.affiliation ? ` (${creator.affiliation})` : "") + (creator.affiliation ? ` (${creator.affiliation})` : ""), ) .join(", "); if (creators.length > 3) creatorsText += ", et al."; diff --git a/client/src/components/entities/Executions.tsx b/client/src/components/entities/Executions.tsx index 2dd2208329..9001fe99c3 100644 --- a/client/src/components/entities/Executions.tsx +++ b/client/src/components/entities/Executions.tsx @@ -141,7 +141,7 @@ const ExecutionContentTree = forwardRef< classNameSmall, lastExecution, }, - ref + ref, ) => { if (executions === 0) { return

No executions

; @@ -177,6 +177,6 @@ const ExecutionContentTree = forwardRef< {lastExec} ); - } + }, ); ExecutionContentTree.displayName = "ExecutionContentTree"; diff --git a/client/src/components/entities/Tags.tsx b/client/src/components/entities/Tags.tsx index 51eff50019..d50e695d09 100644 --- a/client/src/components/entities/Tags.tsx +++ b/client/src/components/entities/Tags.tsx @@ -40,7 +40,7 @@ function EntityTags({ hideEmptyTags, multiline, tagList }: EntityTagsProps) { : "text-truncate text-dark"; const isUpdatingValue = useSelector( (state: RootStateOrAny) => - state.stateModel?.project?.metadata?.tagList?.updating + state.stateModel?.project?.metadata?.tagList?.updating, ); if (isUpdatingValue) { diff --git a/client/src/components/entityHeader/EntityHeader.tsx b/client/src/components/entityHeader/EntityHeader.tsx index 5eb73b1f29..931d1f42ef 100644 --- a/client/src/components/entityHeader/EntityHeader.tsx +++ b/client/src/components/entityHeader/EntityHeader.tsx @@ -94,7 +94,7 @@ function EntityHeader({ const projectData = { namespace: "", path: fullPath }; const sessionAutostartUrl = Url.get( Url.pages.project.session.autostart, - projectData + projectData, ); const runningSession = sessions diff --git a/client/src/components/errors/RtkErrorAlert.tsx b/client/src/components/errors/RtkErrorAlert.tsx index 6503c44196..4ea98f38ee 100644 --- a/client/src/components/errors/RtkErrorAlert.tsx +++ b/client/src/components/errors/RtkErrorAlert.tsx @@ -27,7 +27,7 @@ import { UpdateProjectResponse } from "../../features/project/Project"; export function extractRkErrorMessage( error: FetchBaseQueryError | SerializedError, - property = "message" + property = "message", ): string { if ("error" in error && error.error.length) return error.error.toString(); if ("message" in error && error.message?.length) @@ -48,7 +48,7 @@ export function extractRkErrorMessage( } export function extractRkErrorRemoteBranch( - error: FetchBaseQueryError | SerializedError + error: FetchBaseQueryError | SerializedError, ): string | undefined { if ( "data" in error && @@ -79,8 +79,8 @@ export function RtkErrorAlert({ "status" in error ? error.status.toString() : "code" in error && error.code !== undefined - ? error.code.toString() - : "Unknown"; + ? error.code.toString() + : "Unknown"; // message const errorMessage = extractRkErrorMessage(error, property); diff --git a/client/src/components/form-field/CreatorsInput.stories.tsx b/client/src/components/form-field/CreatorsInput.stories.tsx index 176f944ae3..d8f3e3af43 100644 --- a/client/src/components/form-field/CreatorsInput.stories.tsx +++ b/client/src/components/form-field/CreatorsInput.stories.tsx @@ -72,16 +72,16 @@ export const Default: Story = { }, play: async ({ canvasElement }) => { await userEvent.click( - canvasElement.querySelector('[data-cy="addCreatorButton"]') as Element + canvasElement.querySelector('[data-cy="addCreatorButton"]') as Element, ); await expect( - canvasElement.querySelectorAll('[data-cy="creator-name"]').length + canvasElement.querySelectorAll('[data-cy="creator-name"]').length, ).toEqual(1); await userEvent.click( - canvasElement.querySelector('[data-cy="creator-delete"]') as Element + canvasElement.querySelector('[data-cy="creator-delete"]') as Element, ); await expect( - canvasElement.querySelectorAll('[data-cy="creator-name"]') + canvasElement.querySelectorAll('[data-cy="creator-name"]'), ).toHaveLength(0); }, }; diff --git a/client/src/components/form-field/CreatorsInput.tsx b/client/src/components/form-field/CreatorsInput.tsx index b4f4d4382f..c959115f57 100644 --- a/client/src/components/form-field/CreatorsInput.tsx +++ b/client/src/components/form-field/CreatorsInput.tsx @@ -53,7 +53,7 @@ export interface CreatorInputProps { function validateCreators(creators: CreatorInputCreator[]) { const invalidCreators = creators.find( (creator) => - creator.email && (creator.name.length <= 0 || creator.email.length <= 0) + creator.email && (creator.name.length <= 0 || creator.email.length <= 0), ); return invalidCreators === undefined; } @@ -149,7 +149,7 @@ export function FormGeneratorCreatorsInput({ disabled = false, }: CreatorInputProps) { const counter = React.useRef( - value !== undefined && value.length > 0 ? value.length : 1 + value !== undefined && value.length > 0 ? value.length : 1, ); const [creators, setCreators] = React.useState( value !== undefined && value.length > 0 @@ -170,7 +170,7 @@ export function FormGeneratorCreatorsInput({ identifier: "", default: false, }, - ] + ], ); const addEmptyCreator = () => { @@ -192,7 +192,7 @@ export function FormGeneratorCreatorsInput({ (id: number) => { setCreators(creators.filter((creator) => creator.id !== id)); }, - [creators] + [creators], ); const setCreator = (newCreator: CreatorInputCreator) => { @@ -206,8 +206,8 @@ export function FormGeneratorCreatorsInput({ affiliation: newCreator.affiliation, default: false, } - : oldCreator - ) + : oldCreator, + ), ); }; @@ -218,7 +218,7 @@ export function FormGeneratorCreatorsInput({ creator.name === "" && creator.email === "" && creator.affiliation === "" - ) + ), ); const artificialEvent = { target: { name: name, value: filteredCreators }, @@ -228,10 +228,10 @@ export function FormGeneratorCreatorsInput({ }, [creators, name, setInputs]); const defaultCreators = creators.filter( - (creator) => creator.default === true + (creator) => creator.default === true, ); const nonDefaultCreators = creators.filter( - (creator) => creator.default !== true + (creator) => creator.default !== true, ); return ( diff --git a/client/src/components/form-field/DropzoneFileUploader.js b/client/src/components/form-field/DropzoneFileUploader.js index 2c53d00b4f..4ac44be669 100644 --- a/client/src/components/form-field/DropzoneFileUploader.js +++ b/client/src/components/form-field/DropzoneFileUploader.js @@ -99,7 +99,7 @@ class FileUploadHandler { updateAndSetDisplayFilesAfterChanges(changed) { const displayFiles = this.displayFiles.map((dFile) => - dFile.file_name === changed.file_name ? changed : dFile + dFile.file_name === changed.file_name ? changed : dFile, ); this.setDisplayFiles(displayFiles); } @@ -169,7 +169,7 @@ class DisplayFilesHandler extends FileUploadHandler { const currentFile = this.getFileByName(file_name); if (!currentFile) return; this.setDisplayFiles( - this.displayFiles.filter((file) => file.file_name !== file_name) + this.displayFiles.filter((file) => file.file_name !== file_name), ); } @@ -241,13 +241,13 @@ class DisplayFilesHandler extends FileUploadHandler { resultFiles.map((fileInZip) => ({ atLocation: fileInZip.relative_path.replace( currentFile.file_path, - "" + "", ), id: fileInZip.file_id, - })) + })), ); currentFile.file_id = currentFile.folder_structure?.tree?.map( - (file) => file.id + (file) => file.id, ); } this.updateAndSetDisplayFilesAfterChanges(currentFile); @@ -280,7 +280,7 @@ class DropzoneHandler extends FileUploadHandler { this.setErrorOnDrop(""); const dropzoneFiles = this.dropzone.getActiveFiles(); const fileToDelete = dropzoneFiles.filter( - (file) => file.upload?.uuid === uploadId + (file) => file.upload?.uuid === uploadId, ); if (fileToDelete.length) this.dropzone.removeFile(fileToDelete[0]); } @@ -298,7 +298,7 @@ class DropzoneHandler extends FileUploadHandler { if ( existingFile && ([FILE_STATUS.UPLOADED, FILE_STATUS.FAILED].includes( - existingFile?.file_status + existingFile?.file_status, ) || isFileUploading(existingFile?.file_status)) ) { @@ -347,7 +347,7 @@ class DropzoneHandler extends FileUploadHandler { this.setDisplayFiles( allCurrentFiles.length ? [...allCurrentFiles, fileToUpload] - : [fileToUpload] + : [fileToUpload], ); } } @@ -375,7 +375,7 @@ class DropzoneHandler extends FileUploadHandler { currentFile.file_status = getFileStatus( currentFile.file_id, currentFile.file_error, - progress + progress, ); this.updateAndSetDisplayFilesAfterChanges(currentFile); } @@ -399,7 +399,7 @@ class DropzoneHandler extends FileUploadHandler { updatedFile.file_uncompress = uncompressed; if ( [FILE_COMPRESSED.UNCOMPRESS_YES, FILE_COMPRESSED.UNCOMPRESS_NO].includes( - uncompressed + uncompressed, ) ) this.dropzone.addFile(updatedFile.file); @@ -459,7 +459,7 @@ function FilesTableRowActions({ }) { if ( [FILE_STATUS.UPLOADED, FILE_STATUS.FAILED, FILE_STATUS.PENDING].includes( - file.file_status + file.file_status, ) ) { return ( @@ -668,7 +668,7 @@ function InputUrl({ }) { const onKeyDown = useCallback( (e) => displayFilesHandler.onUrlInputEnter(e, urlInputValue), - [displayFilesHandler, urlInputValue] + [displayFilesHandler, urlInputValue], ); if (displayFilesHandler == null) return null; return ( @@ -783,7 +783,7 @@ function FileStatusComp({ file, uploadCompressedFile, uploadThresholdSoft }) { onClick={() => uploadCompressedFile( file.file_name, - FILE_COMPRESSED.UNCOMPRESS_YES + FILE_COMPRESSED.UNCOMPRESS_YES, ) } > @@ -797,7 +797,7 @@ function FileStatusComp({ file, uploadCompressedFile, uploadThresholdSoft }) { onClick={() => uploadCompressedFile( file.file_name, - FILE_COMPRESSED.UNCOMPRESS_NO + FILE_COMPRESSED.UNCOMPRESS_NO, ) } > @@ -926,18 +926,18 @@ function FileUploaderInput({ }); myDropzone.on("sending", (file, xhr, data) => - onSendingFile(file, xhr, data) + onSendingFile(file, xhr, data), ); myDropzone.on("addedfile", (file) => dropzoneHandler.onAddFileUpload(file)); myDropzone.on("error", (file, message) => - dropzoneHandler.onErrorUpload(file, message) + dropzoneHandler.onErrorUpload(file, message), ); myDropzone.on("complete", (file) => { const processedFile = displayFilesHandler.onCompletedUpload(file); return dropzoneHandler.onCompletedUpload(processedFile); }); myDropzone.on("uploadprogress", (file, progress) => - dropzoneHandler.onProgressUpload(file, progress) + dropzoneHandler.onProgressUpload(file, progress), ); setDisplayFilesHandler(displayFilesHandler); setDropzone(myDropzone); diff --git a/client/src/components/form-field/FileUploaderInput.tsx b/client/src/components/form-field/FileUploaderInput.tsx index c8ccfb4b8d..3dedb74a58 100644 --- a/client/src/components/form-field/FileUploaderInput.tsx +++ b/client/src/components/form-field/FileUploaderInput.tsx @@ -56,7 +56,7 @@ function notificationFunction(props: NotificationFunctionArgs) { `Files for the ${datasetName} in ${props.projectPathWithNamespace} finished uploading.`, redirectUrl, "Go to dataset", - props.location.pathname + props.location.pathname, ); } else { const fullError = `An error occurred while uploading a file to the @@ -68,7 +68,7 @@ function notificationFunction(props: NotificationFunctionArgs) { redirectUrl, "Try again", props.location.pathname, - fullError + fullError, ); } }; @@ -92,7 +92,7 @@ type FileUploaderInputProps = { function FileUploaderInput(props: FileUploaderInputProps) { const datasetUploaderFiles = useDatasetFormSelector( - (state) => state.form.files + (state) => state.form.files, ); const dispatch = useDispatch(); const { setValue } = props; @@ -101,7 +101,7 @@ function FileUploaderInput(props: FileUploaderInputProps) { dispatch(setFiles(files)); setValue(files); }, - [dispatch, setValue] + [dispatch, setValue], ); return ( maxSize) { setSizeAlert( - `Please select an image that is at most ${formatBytes(maxSize)}` + `Please select an image that is at most ${formatBytes(maxSize)}`, ); return; } @@ -319,7 +319,7 @@ function ImageContentInput({ setInputs, setSizeAlert, setOriginalImageInput, - e + e, ); } if (disabled) return null; @@ -366,7 +366,7 @@ function ImageContentInput({ setInputs, setSizeAlert, setOriginalImageInput, - e + e, ) } onDrop={(e) => @@ -377,7 +377,7 @@ function ImageContentInput({ setInputs, setSizeAlert, setOriginalImageInput, - e + e, ) } ref={fileInput} diff --git a/client/src/components/form-field/KeywordsInput.tsx b/client/src/components/form-field/KeywordsInput.tsx index 1475f4c3ec..09c3ebf86f 100644 --- a/client/src/components/form-field/KeywordsInput.tsx +++ b/client/src/components/form-field/KeywordsInput.tsx @@ -62,7 +62,7 @@ function FormGeneratorKeywordsInput({ newTags.splice(i, 1); setTags(newTags); }, - [tags] + [tags], ); const inputKeyDown = React.useCallback( @@ -91,7 +91,7 @@ function FormGeneratorKeywordsInput({ } setDirty(val !== ""); }, - [removeTag, setDirty, tags] + [removeTag, setDirty, tags], ); React.useEffect(() => { diff --git a/client/src/components/icons/ChevronFlippedIcon.tsx b/client/src/components/icons/ChevronFlippedIcon.tsx index 7258cb727f..960ac0bcef 100644 --- a/client/src/components/icons/ChevronFlippedIcon.tsx +++ b/client/src/components/icons/ChevronFlippedIcon.tsx @@ -33,7 +33,7 @@ export default function ChevronFlippedIcon({ "accordion", styles.chevron, flipped && styles.chevronIsOpen, - className_ + className_, ); return ; } diff --git a/client/src/components/imageEditor/ImageEditor.tsx b/client/src/components/imageEditor/ImageEditor.tsx index b2286aed15..6e88dca32b 100644 --- a/client/src/components/imageEditor/ImageEditor.tsx +++ b/client/src/components/imageEditor/ImageEditor.tsx @@ -55,7 +55,7 @@ function ImageEditor({ height: number, scale = 1, positions: Position, - imageType: string + imageType: string, ) => { const offScreenCanvas = document.createElement("canvas"); const newWidth = width * scale; @@ -87,12 +87,12 @@ function ImageEditor({ CARD_IMAGE_DIMENSIONS.height, imageEditionState.scale, imageEditionState.positions, - file.type + file.type, ); const imageFile = generateImageFile( blobScaledImage, file.name, - file.type + file.type, ); if (onSave) onSave(imageFile); } catch (e) { @@ -104,7 +104,7 @@ function ImageEditor({ const modifyImage = ( e: any, action: "zoomIn" | "zoomOut" | "changePosition" | "restore", - values?: unknown + values?: unknown, ) => { if (e) e.preventDefault(); switch (action) { diff --git a/client/src/components/list/ListBar.tsx b/client/src/components/list/ListBar.tsx index 000481353d..84b705e05e 100644 --- a/client/src/components/list/ListBar.tsx +++ b/client/src/components/list/ListBar.tsx @@ -31,7 +31,7 @@ import "./ListBar.scss"; export function getMainActionByEntity( entityType: EntityType, slug: string, - gitUrl?: string + gitUrl?: string, ) { switch (entityType) { case EntityType.Project: diff --git a/client/src/components/list/ListBarSessions.tsx b/client/src/components/list/ListBarSessions.tsx index 2be53c44e6..72aed909f9 100644 --- a/client/src/components/list/ListBarSessions.tsx +++ b/client/src/components/list/ListBarSessions.tsx @@ -81,8 +81,7 @@ function SessionDetailsPopOver({ commit, image }: SessionDetailsPopOverProps) { {image}

Commit Details:

- Author:{" "} - {commit.author_name} + Author: {commit.author_name}
Date:{" "} @@ -155,7 +154,7 @@ function ListBarSession({ const sessionCommit = commitsFetched.data.filter( // eslint-disable-next-line @typescript-eslint/no-explicit-any (commit: Record) => - commit.id === notebook.annotations["commit-sha"] + commit.id === notebook.annotations["commit-sha"], ); if (sessionCommit.length > 0) setCommit(sessionCommit[0]); } @@ -241,7 +240,7 @@ function ListBarSession({ "entity-date", "listBar-entity-date", "align-self-start", - "mt-2" + "mt-2", )} >
diff --git a/client/src/components/list/ListCard.tsx b/client/src/components/list/ListCard.tsx index e76fb3af06..5a64311bd8 100644 --- a/client/src/components/list/ListCard.tsx +++ b/client/src/components/list/ListCard.tsx @@ -63,7 +63,7 @@ function ListCard({ "card-header-entity", !imageUrl && `card-header-entity--${itemType}`, "d-block", - "text-decoration-none" + "text-decoration-none", )} style={imageStyles} to={url} diff --git a/client/src/components/markdown/LazyMarkdownTextExcerpt.tsx b/client/src/components/markdown/LazyMarkdownTextExcerpt.tsx index ba7bd3626c..2dea91e06e 100644 --- a/client/src/components/markdown/LazyMarkdownTextExcerpt.tsx +++ b/client/src/components/markdown/LazyMarkdownTextExcerpt.tsx @@ -22,13 +22,13 @@ import { Loader } from "../Loader"; const MarkdownTextExcerpt = lazy(() => import("./RenkuMarkdown").then((module) => ({ default: module.MarkdownTextExcerpt, - })) + })), ); // ? Lazy loading of CodePreview allows us to split off ~300kB from // ? the main bundle. export default function LazyMarkdownTextExcerpt( - props: ComponentProps + props: ComponentProps, ) { return ( }> diff --git a/client/src/components/markdown/LazyRenkuMarkdown.tsx b/client/src/components/markdown/LazyRenkuMarkdown.tsx index 9555327c30..6acb6dbaad 100644 --- a/client/src/components/markdown/LazyRenkuMarkdown.tsx +++ b/client/src/components/markdown/LazyRenkuMarkdown.tsx @@ -22,13 +22,13 @@ import { Loader } from "../Loader"; const RenkuMarkdown = lazy(() => import("./RenkuMarkdown").then((module) => ({ default: module.RenkuMarkdown, - })) + })), ); // ? Lazy loading of Markdown components allows us to split off ~700kB from // ? the main bundle. export default function LazyRenkuMarkdown( - props: ComponentProps + props: ComponentProps, ) { return ( }> diff --git a/client/src/components/markdown/RenkuMarkdownWithPathTranslation.tsx b/client/src/components/markdown/RenkuMarkdownWithPathTranslation.tsx index 5b7f60b96a..5b880cf8ac 100644 --- a/client/src/components/markdown/RenkuMarkdownWithPathTranslation.tsx +++ b/client/src/components/markdown/RenkuMarkdownWithPathTranslation.tsx @@ -81,7 +81,7 @@ const fileIsImage = (file_path: string | undefined) => { const getFilesRefs = ( markdownHTML: HTMLDivElement, - filePathArray: string[] + filePathArray: string[], ) => { const previewFiles = markdownHTML.getElementsByTagName("img"); const filesRefs: FileReference[] = [...previewFiles] @@ -179,7 +179,7 @@ function fixRelativePath(pathToFix: string | null, filePathArray: string[]) { } function RenkuMarkdownWithPathTranslation( - props: RenkuMarkdownWithPathTranslationProps + props: RenkuMarkdownWithPathTranslationProps, ) { const { singleLine, style, branch } = props; let className = "text-break renku-markdown"; @@ -192,7 +192,7 @@ function RenkuMarkdownWithPathTranslation( divWithMarkdown.innerHTML = markdownToHtml; const [filesRefs, setFilesRefs] = useState( - getFilesRefs(divWithMarkdown, filesPathArray) + getFilesRefs(divWithMarkdown, filesPathArray), ); const loaded = useRef(false); const loading = useRef(false); @@ -225,7 +225,7 @@ function RenkuMarkdownWithPathTranslation( block.isOpened = false; block.filePreview = false; return block; - }) + }), ); } } @@ -237,10 +237,10 @@ function RenkuMarkdownWithPathTranslation( prevFilesRefs.map((pb) => { const newBlock = filesRefsWithFiles.find( //eslint-disable-next-line max-nested-callbacks - (bf) => bf.iBlock === pb.iBlock + (bf) => bf.iBlock === pb.iBlock, ); return newBlock !== undefined ? newBlock : pb; - }) + }), ); loaded.current = true; loading.current = false; @@ -262,14 +262,14 @@ function RenkuMarkdownWithPathTranslation( for (const file of previewFiles) { const currentBlock = filesRefs.find((block) => - block.refPath == null ? false : file.src.endsWith(block.refPath) + block.refPath == null ? false : file.src.endsWith(block.refPath), ); if (!currentBlock || !currentBlock.data) continue; if (currentBlock.type === REF_TYPES.IMAGE_PREV) { file.src = encodeImageBase64( currentBlock.data.file_name, - currentBlock.data.content + currentBlock.data.content, ); file.setAttribute("class", "image-preview"); } else { @@ -306,7 +306,7 @@ function RenkuMarkdownWithPathTranslation( if (href && !href.match(patterns.urlRef)) { const newHref = fixRelativePath( link.getAttribute("href"), - filesPathArray + filesPathArray, ); link.href = fullBaseUrl + newHref; } @@ -322,7 +322,7 @@ function RenkuMarkdownWithPathTranslation( } function GuardedRenkuMarkdownWithPathTranslation( - props: RenkuMarkdownWithPathTranslationProps + props: RenkuMarkdownWithPathTranslationProps, ) { // Return null if markdownHtml is null, otherwise there are problems with the hooks if (props.markdownHtml == null) return null; diff --git a/client/src/components/navbar/AnonymousNavBar.tsx b/client/src/components/navbar/AnonymousNavBar.tsx index 5a9be8e7d2..dfb7e76b1f 100644 --- a/client/src/components/navbar/AnonymousNavBar.tsx +++ b/client/src/components/navbar/AnonymousNavBar.tsx @@ -75,7 +75,7 @@ export default function AnonymousNavBar({ "flex-wrap", "flex-sm-nowrap", "align-items-center", - "ms-lg-auto" + "ms-lg-auto", )} > diff --git a/client/src/components/navbar/LoggedInNavBar.tsx b/client/src/components/navbar/LoggedInNavBar.tsx index 5ab287007f..11369aa5db 100644 --- a/client/src/components/navbar/LoggedInNavBar.tsx +++ b/client/src/components/navbar/LoggedInNavBar.tsx @@ -81,7 +81,7 @@ export default function LoggedInNavBar({ "flex-wrap", "flex-sm-nowrap", "align-items-center", - "ms-lg-auto" + "ms-lg-auto", )} > diff --git a/client/src/components/navbar/NavBarItems.tsx b/client/src/components/navbar/NavBarItems.tsx index 86a40490a4..83c1527160 100644 --- a/client/src/components/navbar/NavBarItems.tsx +++ b/client/src/components/navbar/NavBarItems.tsx @@ -47,7 +47,7 @@ export function RenkuToolbarItemPlus() { // Display the "new dataset" options only if a project is active. const activeProjectPathWithNamespace = getActiveProjectPathWithNamespace( - location.pathname + location.pathname, ); const datasetDropdown = activeProjectPathWithNamespace ? ( @@ -96,7 +96,7 @@ export function RenkuToolbarItemPlus() { export function RenkuToolbarGitLabMenu() { const user = useSelector( - (state) => state.stateModel.user + (state) => state.stateModel.user, ); if (!user.fetched) { @@ -180,7 +180,7 @@ export function RenkuToolbarHelpMenu({ firstItem }: RenkuToolbarHelpMenuProps) { "nav-link", "fs-5", firstItem ? "pe-2" : "px-2", - "ps-sm-2" + "ps-sm-2", )} nav caret @@ -272,7 +272,7 @@ export function RenkuToolbarItemUser({ params }: RenkuToolbarItemUserProps) { const location = useLocation(); const user = useSelector( - (state) => state.stateModel.user + (state) => state.stateModel.user, ); const gatewayURL = params.GATEWAY_URL; diff --git a/client/src/components/notebook/LazyNotebookRender.tsx b/client/src/components/notebook/LazyNotebookRender.tsx index 59a6240a81..dd80b69d05 100644 --- a/client/src/components/notebook/LazyNotebookRender.tsx +++ b/client/src/components/notebook/LazyNotebookRender.tsx @@ -24,7 +24,7 @@ const NotebookRender = lazy(() => import("./NotebookRender")); // ? Lazy loading of NotebookRender allows us to split off ~950kB from // ? the main bundle. export default function LazyNotebookRender( - props: ComponentProps + props: ComponentProps, ) { return ( }> diff --git a/client/src/components/shareLinkSession/ShareLinkSession.tsx b/client/src/components/shareLinkSession/ShareLinkSession.tsx index 27fb7414c7..ab10becfdc 100644 --- a/client/src/components/shareLinkSession/ShareLinkSession.tsx +++ b/client/src/components/shareLinkSession/ShareLinkSession.tsx @@ -134,7 +134,7 @@ const ShareLinkSessionModal = ({ environmentVariables.map((env) => { if (env.key && env.value) urlVariables = `${urlVariables}&env[${encodeURIComponent( - env.key + env.key, )}]=${encodeURIComponent(env.value)}`; }); urlSession = `${urlSession}${urlVariables}`; @@ -163,14 +163,14 @@ const ShareLinkSessionModal = ({ }; const validVariables = environmentVariables.filter( - (variable) => variable.key.length && variable.value.length + (variable) => variable.key.length && variable.value.length, ); const isVariablesEmpty = !validVariables.length; const markdown = `[![launch - renku](${Url.get( Url.pages.landing, undefined, - true + true, )}renku-badge.svg)](${url})`; const notebookFilePathLabel = notebookFilePath ? ( @@ -299,7 +299,7 @@ const ShareLinkSessionOpenFileModal = ({ const markdown = `[![launch - renku](${Url.get( Url.pages.landing, undefined, - true + true, )}renku-badge.svg)](${url})`; const notebookFilePathLabel = filePath ? ( diff --git a/client/src/components/sortingEntities/SortingEntities.tsx b/client/src/components/sortingEntities/SortingEntities.tsx index 8d0d3ed818..bd4b38d66a 100644 --- a/client/src/components/sortingEntities/SortingEntities.tsx +++ b/client/src/components/sortingEntities/SortingEntities.tsx @@ -79,7 +79,7 @@ const SortingEntities = ({ setSort, styleType, sort }: SortingInputProps) => { options.push( + , ); } const SortOptionByValue = diff --git a/client/src/components/ssh/ssh.tsx b/client/src/components/ssh/ssh.tsx index db70832e64..2ab37309fa 100644 --- a/client/src/components/ssh/ssh.tsx +++ b/client/src/components/ssh/ssh.tsx @@ -82,14 +82,14 @@ function SshModal() { const migrationStatusApiVersion = apiVersionForMetadataVersion( coreApiVersionedUrlConfig, undefined, - undefined // do not use the override for getting migration status + undefined, // do not use the override for getting migration status ); const coreSupport = projectCoreApi.useGetMigrationStatusQuery( { apiVersion: migrationStatusApiVersion, gitUrl, }, - { skip: !gitUrl } + { skip: !gitUrl }, ); // return early if we don't need to display the modal @@ -198,7 +198,7 @@ function SshModal() { diff --git a/client/src/components/templateSelector/TemplateSelector.css b/client/src/components/templateSelector/TemplateSelector.css index 08c14d30aa..b459128462 100644 --- a/client/src/components/templateSelector/TemplateSelector.css +++ b/client/src/components/templateSelector/TemplateSelector.css @@ -1,5 +1,7 @@ .template-card:hover { - box-shadow: 0 0 0 1px var(--bs-rk-green), var(--rk-box-shadow); + box-shadow: + 0 0 0 1px var(--bs-rk-green), + var(--rk-box-shadow); border-color: var(--bs-rk-green); } @@ -22,7 +24,9 @@ } .template--active.selected { - box-shadow: 0 0 0 2px var(--bs-rk-green), var(--rk-box-shadow); + box-shadow: + 0 0 0 2px var(--bs-rk-green), + var(--rk-box-shadow); border-color: var(--bs-rk-green); color: var(--bs-rk-green); } diff --git a/client/src/dataset/Dataset.container.js b/client/src/dataset/Dataset.container.js index 9ad655a74d..537e043fe3 100644 --- a/client/src/dataset/Dataset.container.js +++ b/client/src/dataset/Dataset.container.js @@ -27,7 +27,7 @@ export default function ShowDataset(props) { const [datasetFiles, setDatasetFiles] = useState(null); const { defaultBranch, externalUrl } = useSelector( - (state) => state.stateModel.project.metadata + (state) => state.stateModel.project.metadata, ); const { coreSupport } = useCoreSupport({ gitUrl: externalUrl ?? undefined, @@ -83,7 +83,7 @@ export default function ShowDataset(props) { props.datasetCoordinator.fetchDatasetFilesFromCoreService( name, externalUrl, - versionUrl + versionUrl, ); }; @@ -115,7 +115,7 @@ export default function ShowDataset(props) { ]); const currentDataset = useSelector( - (state) => state.stateModel.dataset?.metadata + (state) => state.stateModel.dataset?.metadata, ); useEffect(() => { const datasetId = props.insideProject diff --git a/client/src/dataset/Dataset.present.js b/client/src/dataset/Dataset.present.js index fdf8abf2dd..3a001f27b7 100644 --- a/client/src/dataset/Dataset.present.js +++ b/client/src/dataset/Dataset.present.js @@ -80,10 +80,10 @@ function DisplayFiles(props) { files.length < 1 ? 0 : filesFolderLength > 1 - ? 1 - : files.length < fileLengthCutoff - ? 2 - : 1; + ? 1 + : files.length < fileLengthCutoff + ? 2 + : 1; // ? This re-adds the name property on the datasets. // TODO: consider refactoring FileExplorer @@ -473,8 +473,8 @@ export default function DatasetView(props) { const imageUrl = dataset.mediaContent ? getUpdatedDatasetImage(dataset.mediaContent, datasetDate) : dataset.images?.length > 0 - ? getUpdatedDatasetImage(getEntityImageUrl(dataset.images), datasetDate) - : undefined; + ? getUpdatedDatasetImage(getEntityImageUrl(dataset.images), datasetDate) + : undefined; const settingsUrl = Url.get(Url.pages.project.settings, { namespace: "", diff --git a/client/src/dataset/Dataset.state.js b/client/src/dataset/Dataset.state.js index a96d58096a..d125624229 100644 --- a/client/src/dataset/Dataset.state.js +++ b/client/src/dataset/Dataset.state.js @@ -71,7 +71,7 @@ class DatasetCoordinator { ? datasets.find((dataset) => dataset.identifier === datasetId) : undefined, datasetKg, - datasetFiles + datasetFiles, ); const values = { ...data, diff --git a/client/src/dataset/DatasetFunctions.js b/client/src/dataset/DatasetFunctions.js index 487d68b36f..368bdf5479 100644 --- a/client/src/dataset/DatasetFunctions.js +++ b/client/src/dataset/DatasetFunctions.js @@ -45,7 +45,7 @@ function getDatasetAuthors(dataset) { .map( (creator) => creator.name + - (creator.affiliation ? ` (${creator.affiliation})` : "") + (creator.affiliation ? ` (${creator.affiliation})` : ""), ) .join("; ") : null; diff --git a/client/src/dataset/Datasets.test.js b/client/src/dataset/Datasets.test.js index 775b2cd0e2..4530955db8 100644 --- a/client/src/dataset/Datasets.test.js +++ b/client/src/dataset/Datasets.test.js @@ -82,7 +82,7 @@ describe("Dataset functions", () => { selectedDataset="79215657-4319-4fcf-82b9-58267f2a1db8" /> - + , ); }); }); @@ -200,25 +200,25 @@ describe("Dataset functions", () => { it("maps core dataset into kg dataset structure", () => { expect(mapDataset(core_dataset, kg_dataset, core_files)).toEqual( - result_dataset_in_kg_and_core + result_dataset_in_kg_and_core, ); }); it("maps core dataset into kg dataset structure for dataset outside of kg", () => { expect(mapDataset(core_dataset, undefined, core_files)).toEqual( - result_dataset_no_kg + result_dataset_no_kg, ); }); it("maps core dataset into kg dataset outside of a project - kg only", () => { expect(mapDataset(undefined, kg_dataset, undefined)).toEqual( - result_dataset_only_kg + result_dataset_only_kg, ); }); it("maps core dataset into kg dataset in a project for imported dataset", () => { expect( - mapDataset(core_dataset_import, kg_dataset_import, core_files) + mapDataset(core_dataset_import, kg_dataset_import, core_files), ).toEqual(result_dataset_import); }); }); diff --git a/client/src/dataset/addtoproject/DatasetAdd.present.tsx b/client/src/dataset/addtoproject/DatasetAdd.present.tsx index 2e9a855158..62fd132b77 100644 --- a/client/src/dataset/addtoproject/DatasetAdd.present.tsx +++ b/client/src/dataset/addtoproject/DatasetAdd.present.tsx @@ -84,7 +84,7 @@ function DatasetAddMainContent({ }: Omit) { const [isNewProject, setIsNewProject] = useState(false); const logged = useSelector( - (state: RootStateOrAny) => state.stateModel.user.logged + (state: RootStateOrAny) => state.stateModel.user.logged, ); if (!logged) { const textIntro = "Only authenticated users can create new projects."; @@ -94,7 +94,7 @@ function DatasetAddMainContent({ ); } const disabled = ["inProcess", "importing"].includes( - currentStatus?.status || "" + currentStatus?.status || "", ) ? true : false; @@ -155,7 +155,7 @@ type DatasetAddProps = { function DatasetAdd(props: DatasetAddProps) { const { dataset, insideProject } = props; const logged = useSelector( - (state: RootStateOrAny) => state.stateModel.user.logged + (state: RootStateOrAny) => state.stateModel.user.logged, ); // Return early if there is no dataset diff --git a/client/src/dataset/addtoproject/DatasetAddToExistingProject.tsx b/client/src/dataset/addtoproject/DatasetAddToExistingProject.tsx index 68f5f3732a..c82035be43 100644 --- a/client/src/dataset/addtoproject/DatasetAddToExistingProject.tsx +++ b/client/src/dataset/addtoproject/DatasetAddToExistingProject.tsx @@ -83,7 +83,7 @@ function AddDatasetExistingProject({ }; const onSuggestionsFetchRequested = ( value: string, - setSuggestions: (suggestions: unknown) => void + setSuggestions: (suggestions: unknown) => void, ) => { if (!memberProjects || isLoadingMemberProjects) return; const featured = { member: memberProjects }; @@ -109,7 +109,7 @@ function AddDatasetExistingProject({ }); const hitValues = Object.values(hits).sort((a, b) => - a.name > b.name ? 1 : b.name > a.name ? -1 : 0 + a.name > b.name ? 1 : b.name > a.name ? -1 : 0, ); const groupedHits = groupBy(hitValues, (item: THit) => item.subgroup); for (const [key, val] of groupedHits) diff --git a/client/src/dataset/addtoproject/DatasetAddToNewProject.tsx b/client/src/dataset/addtoproject/DatasetAddToNewProject.tsx index d54807d110..e3551d029f 100644 --- a/client/src/dataset/addtoproject/DatasetAddToNewProject.tsx +++ b/client/src/dataset/addtoproject/DatasetAddToNewProject.tsx @@ -110,7 +110,7 @@ function AddDatasetNewProject({ importingDataset || !isDatasetValid || ["inProcess", "importing", "error"].includes( - currentStatus?.status ?? "" + currentStatus?.status ?? "", ) ? null : ( ( - null + null, ); const [importingDataset, setImportingDataset] = useState(false); const [isDatasetValid, setIsDatasetValid] = useState(null); @@ -77,7 +77,7 @@ function DatasetAddToProject({ useEffect(() => { setDatasetCoordinator( - new DatasetCoordinator(client, model.subModel("dataset")) + new DatasetCoordinator(client, model.subModel("dataset")), ); }, [client, model]); @@ -122,7 +122,7 @@ function DatasetAddToProject({ // TODO remove this request when dataset include httpUrlToRepo try { const fetchDatasetProject = await client.getProject( - dataset.project?.path + dataset.project?.path, ); const urlProjectOrigin = fetchDatasetProject?.data?.all?.web_url; if (!urlProjectOrigin) { @@ -139,7 +139,7 @@ function DatasetAddToProject({ } setIsDatasetValid(true); }, - [dataset, client] + [dataset, client], ); useEffect(() => { @@ -176,7 +176,7 @@ function DatasetAddToProject({ const validateProject = async ( project: SubmitProject, _validateOrigin: boolean, - isSubmit = false + isSubmit = false, ) => { if (!project) return false; const processStatus = isSubmit ? "importing" : "inProcess"; @@ -255,7 +255,7 @@ function DatasetAddToProject({ .datasetImport( cleanGitUrl(selectedProject.value), dataset.url, - versionUrl // this will be undefined for a new project, so the latest version will be used + versionUrl, // this will be undefined for a new project, so the latest version will be used ) .then((response: DatasetImportResponse) => { if (response?.data?.error !== undefined) { @@ -271,7 +271,7 @@ function DatasetAddToProject({ monitorJobStatusAndHandleResponse( jobId, selectedProject.name, - dataset.name + dataset.name, ); } }); @@ -280,7 +280,7 @@ function DatasetAddToProject({ const monitorJobStatusAndHandleResponse = ( job_id: string, projectPath: string, - datasetName: string + datasetName: string, ) => { let cont = 0; const INTERVAL = 6000; @@ -294,7 +294,7 @@ function DatasetAddToProject({ monitorJob, (cont * INTERVAL) / 1000, projectPath, - datasetName + datasetName, ); } catch (e) { const error = e as { message?: string }; @@ -310,7 +310,7 @@ function DatasetAddToProject({ monitorJob: ReturnType, waitedSeconds: number, projectPath: string, - datasetName: string + datasetName: string, ) { if (!job) return; switch (job.state) { diff --git a/client/src/error-boundary/ErrorBoundary.tsx b/client/src/error-boundary/ErrorBoundary.tsx index cd8799fe86..fd5a906a65 100644 --- a/client/src/error-boundary/ErrorBoundary.tsx +++ b/client/src/error-boundary/ErrorBoundary.tsx @@ -59,7 +59,7 @@ function ErrorPage() {
You can try to{" "} diff --git a/client/src/features/admin/AddResourceClassButton.tsx b/client/src/features/admin/AddResourceClassButton.tsx index c4ddd198f7..bc1400886c 100644 --- a/client/src/features/admin/AddResourceClassButton.tsx +++ b/client/src/features/admin/AddResourceClassButton.tsx @@ -117,7 +117,7 @@ function AddResourceClassModal({ ...data, }); }, - [addResourceClass, resourcePool.id] + [addResourceClass, resourcePool.id], ); useEffect(() => { diff --git a/client/src/features/admin/AddResourcePoolButton.tsx b/client/src/features/admin/AddResourcePoolButton.tsx index 2346e24b13..fa2e669d8e 100644 --- a/client/src/features/admin/AddResourcePoolButton.tsx +++ b/client/src/features/admin/AddResourcePoolButton.tsx @@ -67,7 +67,7 @@ function AddResourcePoolModal({ isOpen, toggle }: AddResourcePoolModalProps) { ?.filter((pool) => pool.default) .flatMap(({ classes }) => classes) .find((c) => c.default), - [resourcePools] + [resourcePools], ); const [addResourcePool, result] = useAddResourcePoolMutation(); @@ -110,7 +110,7 @@ function AddResourcePoolModal({ isOpen, toggle }: AddResourcePoolModalProps) { }, }); }, - [addResourcePool, defaultSessionClass] + [addResourcePool, defaultSessionClass], ); useEffect(() => { diff --git a/client/src/features/admin/AddUserToResourcePoolButton.tsx b/client/src/features/admin/AddUserToResourcePoolButton.tsx index 49a8b5dc6f..62620273f7 100644 --- a/client/src/features/admin/AddUserToResourcePoolButton.tsx +++ b/client/src/features/admin/AddUserToResourcePoolButton.tsx @@ -105,7 +105,7 @@ function AddUserToResourcePoolModal({ userIds: [data.userId], }); }, - [addUsersToResourcePool, resourcePool.id] + [addUsersToResourcePool, resourcePool.id], ); const onPickUser = useCallback((user: KeycloakUser | null | undefined) => { @@ -172,7 +172,7 @@ function AddUserToResourcePoolModal({ className={cx( "rounded-0", "rounded-start", - errors.userId && "is-invalid" + errors.userId && "is-invalid", )} disabled id="addUserToResourcePoolUserDisplay" @@ -244,7 +244,7 @@ function UserAutoSuggest({ onPickUser }: UserAutoSuggestProps) { (_event: FormEvent, { newValue }: ChangeEvent) => { setValue(newValue); }, - [] + [], ); const inputProps: InputProps = { @@ -255,7 +255,7 @@ function UserAutoSuggest({ onPickUser }: UserAutoSuggestProps) { const getSuggestionValue = useCallback( ({ firstName, lastName }: KeycloakUser) => `${firstName} ${lastName}`, - [] + [], ); const onSuggestionsClearRequested = useCallback(() => { @@ -266,17 +266,17 @@ function UserAutoSuggest({ onPickUser }: UserAutoSuggestProps) { ({ value }: SuggestionsFetchRequestedParams) => { getKeycloakUsers({ realm, search: value }, /*preferCacheValue=*/ true); }, - [getKeycloakUsers, realm] + [getKeycloakUsers, realm], ); const onSuggestionSelected = useCallback( ( _event: FormEvent, - { suggestion }: SuggestionSelectedEventData + { suggestion }: SuggestionSelectedEventData, ) => { onPickUser(suggestion); }, - [onPickUser] + [onPickUser], ); const renderSuggestion = ({ firstName, lastName, email }: KeycloakUser) => ( diff --git a/client/src/features/admin/AdminPage.tsx b/client/src/features/admin/AdminPage.tsx index f3bd4e0166..961dc76a83 100644 --- a/client/src/features/admin/AdminPage.tsx +++ b/client/src/features/admin/AdminPage.tsx @@ -171,7 +171,7 @@ function ResourcePoolItem({ resourcePool }: ResourcePoolItemProps) { "p-3", "bg-transparent", "border-0", - "fw-bold" + "fw-bold", )} onClick={toggle} type="button" @@ -198,7 +198,7 @@ function ResourcePoolItem({ resourcePool }: ResourcePoolItemProps) { "row-cols-1", "row-cols-sm-4", "row-cols-md-5", - "text-end" + "text-end", )} >
diff --git a/client/src/features/admin/UpdateResourceClassButton.tsx b/client/src/features/admin/UpdateResourceClassButton.tsx index 62b0847128..f40f4f8125 100644 --- a/client/src/features/admin/UpdateResourceClassButton.tsx +++ b/client/src/features/admin/UpdateResourceClassButton.tsx @@ -108,7 +108,7 @@ function UpdateResourceClassModal({ ...data, }); }, - [resourceClass.id, resourcePool.id, updateResourceClass] + [resourceClass.id, resourcePool.id, updateResourceClass], ); useEffect(() => { diff --git a/client/src/features/admin/UpdateResourcePoolQuotaButton.tsx b/client/src/features/admin/UpdateResourcePoolQuotaButton.tsx index c7c6d8876c..537164ff6b 100644 --- a/client/src/features/admin/UpdateResourcePoolQuotaButton.tsx +++ b/client/src/features/admin/UpdateResourcePoolQuotaButton.tsx @@ -99,7 +99,7 @@ function UpdateResourcePoolQuotaModal({ quota: { ...data }, }); }, - [id, updateResourcePool] + [id, updateResourcePool], ); useEffect(() => { diff --git a/client/src/features/admin/adminComputeResources.api.ts b/client/src/features/admin/adminComputeResources.api.ts index 350d118db9..3942c8fa22 100644 --- a/client/src/features/admin/adminComputeResources.api.ts +++ b/client/src/features/admin/adminComputeResources.api.ts @@ -49,7 +49,7 @@ const adminComputeResourcesApi = createApi({ result ? [ ...result.map( - ({ id }) => ({ id, type: "ResourcePool" } as const) + ({ id }) => ({ id, type: "ResourcePool" }) as const, ), "ResourcePool", ] @@ -72,7 +72,7 @@ const adminComputeResourcesApi = createApi({ ({ id, type: "ResourcePoolUser", - } as const) + }) as const, ), { id: `LIST-${resourcePoolId}`, type: "ResourcePoolUser" }, ] diff --git a/client/src/features/admin/adminKeycloak.api.ts b/client/src/features/admin/adminKeycloak.api.ts index 95cccedd8d..93ab5d3d68 100644 --- a/client/src/features/admin/adminKeycloak.api.ts +++ b/client/src/features/admin/adminKeycloak.api.ts @@ -55,7 +55,7 @@ const adminKeycloakApi = createApi({ ({ id, type: "KeycloakUser", - } as const) + }) as const, ), { id: `LIST-${search}`, type: "KeycloakUser" }, ] diff --git a/client/src/features/admin/useKeycloakRealm.hook.ts b/client/src/features/admin/useKeycloakRealm.hook.ts index 60d42b0727..f44029fa37 100644 --- a/client/src/features/admin/useKeycloakRealm.hook.ts +++ b/client/src/features/admin/useKeycloakRealm.hook.ts @@ -25,7 +25,7 @@ export default function useKeycloakRealm() { const keycloakRealm = useMemo( () => validateKeycloakRealmParams(params), - [params] + [params], ); return keycloakRealm; diff --git a/client/src/features/dashboard/components/DashboardMessage.tsx b/client/src/features/dashboard/components/DashboardMessage.tsx index e3cf724c0b..c459920eb2 100644 --- a/client/src/features/dashboard/components/DashboardMessage.tsx +++ b/client/src/features/dashboard/components/DashboardMessage.tsx @@ -36,16 +36,16 @@ export default function DashboardMessage() { const dashboardParams = useMemo( () => validateDashboardMessageParams(params), - [params] + [params], ); const alreadyDismissed = useDashboardMessageSelector( - (state) => state.dismissed + (state) => state.dismissed, ); const dispatch = useDispatch(); const dismiss = useCallback( () => dispatch(dashboardMessageSlice.actions.dismiss()), - [dispatch] + [dispatch], ); if (!dashboardParams.enabled || alreadyDismissed) { diff --git a/client/src/features/dashboard/components/DatasetsDashboard.tsx b/client/src/features/dashboard/components/DatasetsDashboard.tsx index a5da65a38d..b65febde74 100644 --- a/client/src/features/dashboard/components/DatasetsDashboard.tsx +++ b/client/src/features/dashboard/components/DatasetsDashboard.tsx @@ -55,7 +55,7 @@ function OtherDatasetsButton({ totalDatasets }: OtherDatasetsButtonProps) { "btn", "btn-outline-rk-pink", "d-flex", - "align-items-center" + "align-items-center", )} > @@ -66,14 +66,14 @@ function OtherDatasetsButton({ totalDatasets }: OtherDatasetsButtonProps) {
diff --git a/client/src/features/dashboard/components/InactiveKgProjects.tsx b/client/src/features/dashboard/components/InactiveKgProjects.tsx index a7411fabbd..97fd94cfe5 100644 --- a/client/src/features/dashboard/components/InactiveKgProjects.tsx +++ b/client/src/features/dashboard/components/InactiveKgProjects.tsx @@ -78,7 +78,7 @@ export function ProjectsInactiveKGWarning() { return ; const totalProjects = projectList.filter( - (p) => p.progressActivation !== 100 + (p) => p.progressActivation !== 100, ).length; if (totalProjects === 0) return null; diff --git a/client/src/features/dashboard/components/ProjectsDashboard.tsx b/client/src/features/dashboard/components/ProjectsDashboard.tsx index d91de08b41..8ba473a437 100644 --- a/client/src/features/dashboard/components/ProjectsDashboard.tsx +++ b/client/src/features/dashboard/components/ProjectsDashboard.tsx @@ -135,7 +135,7 @@ function OtherProjectsButton({ totalOwnProjects }: OtherProjectsButtonProps) { "btn", "btn-outline-rk-green", "d-flex", - "align-items-center" + "align-items-center", )} > @@ -146,14 +146,14 @@ function OtherProjectsButton({ totalOwnProjects }: OtherProjectsButtonProps) {
@@ -244,12 +244,12 @@ function ProjectsDashboard({ userName }: ProjectsDashboardProps) { const sessionsFormatted = useMemo( () => getFormattedSessionsAnnotations(sessions ?? {}), - [sessions] + [sessions], ); const { projects, isFetchingProjects } = useGetRecentlyVisitedProjects( TOTAL_RECENTLY_VISITED_PROJECT, - sessionsFormatted + sessionsFormatted, ); const totalUserProjects = @@ -323,7 +323,7 @@ function SessionsToShow({ currentSessions }: SessionsToShowProps) { const dispatch = useDispatch(); const showLogs = (target: string) => { dispatch( - displaySlice.actions.showSessionLogsModal({ targetServer: target }) + displaySlice.actions.showSessionLogsModal({ targetServer: target }), ); }; @@ -336,10 +336,10 @@ function SessionsToShow({ currentSessions }: SessionsToShowProps) { const sessionProject: SessionProject[] = []; for (const session of currentSessions) { const fetchProject = await client.getProject( - `${session.annotations["namespace"]}/${session.annotations["projectName"]}` + `${session.annotations["namespace"]}/${session.annotations["projectName"]}`, ); const project = getProjectFormatted( - formatProjectMetadata(fetchProject?.data?.all) + formatProjectMetadata(fetchProject?.data?.all), ); sessionProject.push({ ...project, notebook: session }); } diff --git a/client/src/features/dashboard/message/dashboardMessage.utils.ts b/client/src/features/dashboard/message/dashboardMessage.utils.ts index 94eadf89fb..acecd26da6 100644 --- a/client/src/features/dashboard/message/dashboardMessage.utils.ts +++ b/client/src/features/dashboard/message/dashboardMessage.utils.ts @@ -19,7 +19,7 @@ import { DashboardMessageParams } from "./DashboardMessage.types"; export function validateDashboardMessageParams( - params: unknown + params: unknown, ): DashboardMessageParams { if ( params == null || @@ -61,14 +61,14 @@ export function validateDashboardMessageParams( rawStyle === "plain" ? "plain" : rawStyle === "success" - ? "success" - : rawStyle === "info" - ? "info" - : rawStyle === "warning" - ? "warning" - : rawStyle === "danger" - ? "danger" - : "plain"; + ? "success" + : rawStyle === "info" + ? "info" + : rawStyle === "warning" + ? "warning" + : rawStyle === "danger" + ? "danger" + : "plain"; if (enabled && text && style) { return { diff --git a/client/src/features/dashboard/message/dashboardMessageSlice.ts b/client/src/features/dashboard/message/dashboardMessageSlice.ts index 5c31e650e4..e256d10af6 100644 --- a/client/src/features/dashboard/message/dashboardMessageSlice.ts +++ b/client/src/features/dashboard/message/dashboardMessageSlice.ts @@ -38,5 +38,5 @@ export const dashboardMessageSlice = createSlice({ }); export const useDashboardMessageSelector = createSliceSelector( - dashboardMessageSlice + dashboardMessageSlice, ); diff --git a/client/src/features/inactiveKgProjects/InactiveKgProjects.tsx b/client/src/features/inactiveKgProjects/InactiveKgProjects.tsx index 9662f6bbb4..9ef57371bf 100644 --- a/client/src/features/inactiveKgProjects/InactiveKgProjects.tsx +++ b/client/src/features/inactiveKgProjects/InactiveKgProjects.tsx @@ -53,10 +53,10 @@ function InactiveKGProjectsPage({ socket }: InactiveKGProjectsPageProps) { const [activating, setActivating] = useState(false); const user = useSelector((state: RootStateOrAny) => state.stateModel.user); const websocket = useSelector( - (state: RootStateOrAny) => state.stateModel.webSocket + (state: RootStateOrAny) => state.stateModel.webSocket, ); const { data, isFetching, isLoading, error } = useGetInactiveProjects( - user?.data?.id + user?.data?.id, ); const projectList = useInactiveProjectSelector(); const { client } = useContext(AppContext); @@ -71,10 +71,10 @@ function InactiveKGProjectsPage({ socket }: InactiveKGProjectsPageProps) { // hook to calculate if still activating a project of the list useEffect(() => { const inProgress = projectList.find( - (p) => p.progressActivation !== 100 && p.progressActivation !== null + (p) => p.progressActivation !== 100 && p.progressActivation !== null, ); const totalCompleted = projectList.filter( - (p) => p.progressActivation === 100 || p.progressActivation === -2 + (p) => p.progressActivation === 100 || p.progressActivation === -2, ).length; const totalSelected = projectList.filter((p) => p.selected).length; if (inProgress) setActivating(true); @@ -101,14 +101,14 @@ function InactiveKGProjectsPage({ socket }: InactiveKGProjectsPageProps) { setActivating(true); if (client && websocket.open && socket) { const projectSelected = projectList.filter( - (p) => p.selected && p.progressActivation !== 100 + (p) => p.selected && p.progressActivation !== 100, ); for (let i = 0; i < projectSelected.length; i++) { const projectId = projectSelected[i].id; dispatch(projectKgApi.endpoints.activateIndexing.initiate(projectId)); dispatch(updateProgress({ id: projectId, progress: 0 })); const message = JSON.stringify( - new WsMessage({ projects: [projectId] }, "pullKgActivationStatus") + new WsMessage({ projects: [projectId] }, "pullKgActivationStatus"), ); socket.send(message); } diff --git a/client/src/features/inactiveKgProjects/inactiveKgProjectsSlice.ts b/client/src/features/inactiveKgProjects/inactiveKgProjectsSlice.ts index af5ec01a52..98346227d0 100644 --- a/client/src/features/inactiveKgProjects/inactiveKgProjectsSlice.ts +++ b/client/src/features/inactiveKgProjects/inactiveKgProjectsSlice.ts @@ -59,5 +59,5 @@ export const { updateList, addFullList, updateProgress } = kgInactiveProjectsSlice.actions; export const useInactiveProjectSelector = createSliceSelector( - kgInactiveProjectsSlice + kgInactiveProjectsSlice, ); diff --git a/client/src/features/kgSearch/KgSearchApi.ts b/client/src/features/kgSearch/KgSearchApi.ts index 9b48efe687..53f6f1e2d0 100644 --- a/client/src/features/kgSearch/KgSearchApi.ts +++ b/client/src/features/kgSearch/KgSearchApi.ts @@ -58,7 +58,7 @@ function setTypeInQuery(query: string, types: TypeEntitySelection) { function setVisibilityInQuery( query: string, - visibilities?: VisibilitiesFilter + visibilities?: VisibilitiesFilter, ) { if (!visibilities) return query; @@ -112,24 +112,24 @@ export const kgSearchApi = createApi({ until, }) => { const url = `entities?${getPhrase( - phrase + phrase, )}&page=${page}&per_page=${perPage}`; return setSort( setDates( setAuthorInQuery( setVisibilityInQuery(setTypeInQuery(url, type), visibility), author, - userName + userName, ), since, - until + until, ), - sort + sort, ); }, transformResponse: ( response: KgSearchResult[], - meta: FetchBaseQueryMeta + meta: FetchBaseQueryMeta, ) => { // Left here temporarily in case we want to use headers const headers = meta.response?.headers; diff --git a/client/src/features/kgSearch/KgSearchContext.tsx b/client/src/features/kgSearch/KgSearchContext.tsx index 26803b9ca1..0eea9c3833 100644 --- a/client/src/features/kgSearch/KgSearchContext.tsx +++ b/client/src/features/kgSearch/KgSearchContext.tsx @@ -80,7 +80,7 @@ export const KgSearchContextProvider = ({ }); history.push({ search }); }, - [history, kgSearchState] + [history, kgSearchState], ); const setDates = useCallback( (dates: DatesFilter) => { @@ -93,7 +93,7 @@ export const KgSearchContextProvider = ({ }); history.push({ search }); }, - [history, kgSearchState] + [history, kgSearchState], ); const setMyProjects = useCallback(() => { const search = stateToSearchString({ @@ -124,28 +124,28 @@ export const KgSearchContextProvider = ({ }); history.push({ search }); }, - [history, kgSearchState] + [history, kgSearchState], ); const setPage = useCallback( (page: number) => { const search = stateToSearchString({ ...kgSearchState, page }); history.push({ search }); }, - [history, kgSearchState] + [history, kgSearchState], ); const setSort = useCallback( (sort: SortingOptions) => { const search = stateToSearchString({ ...kgSearchState, sort, page: 1 }); history.push({ search }); }, - [history, kgSearchState] + [history, kgSearchState], ); const setType = useCallback( (type: TypeEntitySelection) => { const search = stateToSearchString({ ...kgSearchState, type, page: 1 }); history.push({ search }); }, - [history, kgSearchState] + [history, kgSearchState], ); const setVisibility = useCallback( (visibility: VisibilitiesFilter) => { @@ -156,7 +156,7 @@ export const KgSearchContextProvider = ({ }); history.push({ search }); }, - [history, kgSearchState] + [history, kgSearchState], ); const reset = useCallback(() => { const search = stateToSearchString(defaultSearchState); @@ -187,7 +187,7 @@ export const useKgSearchContext = () => { const context = useContext(KgSearchContext); if (context == null) { throw new Error( - "useKgSearchContext() must be called within a " + "useKgSearchContext() must be called within a ", ); } diff --git a/client/src/features/kgSearch/KgSearchState.ts b/client/src/features/kgSearch/KgSearchState.ts index a3f81bad36..10c21c5780 100644 --- a/client/src/features/kgSearch/KgSearchState.ts +++ b/client/src/features/kgSearch/KgSearchState.ts @@ -65,14 +65,14 @@ type KgStateSimpleKey = Exclude< type KgStateVal = T extends KgStateAuthorKey ? KgAuthor : T extends KgStateSortKey - ? SortingOptions - : T extends KgStateTypeKey - ? TypeEntitySelection - : T extends KgStateVisibilityKey - ? VisibilitiesFilter - : T extends KgStateNumKey - ? number - : string; + ? SortingOptions + : T extends KgStateTypeKey + ? TypeEntitySelection + : T extends KgStateVisibilityKey + ? VisibilitiesFilter + : T extends KgStateNumKey + ? number + : string; export const defaultSearchState: KgSearchState = { author: "all", @@ -113,7 +113,7 @@ export const searchStringToState = (searchString: string): KgSearchState => { const queryParameterStateValue = ( qp: URLSearchParams, - key: T + key: T, ): KgStateVal => { const result = qp.get(key) ?? defaultSearchState[key]; if (isAuthorKey(key)) return result as KgStateVal; @@ -147,7 +147,7 @@ const queryParameterStateValue = ( * @returns since, typeDate, until */ const queryParameterDateStateValue = ( - qp: URLSearchParams + qp: URLSearchParams, ): Pick => { const typeDateString = qp.get("typeDate"); const typeDate = @@ -244,7 +244,7 @@ export const stateToSearchString = (state: Partial): string => { function isInitialEqualToObject( key: KgStateTypeKey | KgStateVisibilityKey, - value?: TypeEntitySelection | VisibilitiesFilter | null + value?: TypeEntitySelection | VisibilitiesFilter | null, ) { // treat an missing value as same as initial if (value == null) return true; diff --git a/client/src/features/project/Project.d.ts b/client/src/features/project/Project.d.ts index 3600d893a5..9eb19f8fdd 100644 --- a/client/src/features/project/Project.d.ts +++ b/client/src/features/project/Project.d.ts @@ -149,7 +149,7 @@ export type UsedIn = { { rel: string; href: string; - } + }, ]; path: string; name: string; diff --git a/client/src/features/project/components/AddCloudStorageButton.tsx b/client/src/features/project/components/AddCloudStorageButton.tsx index d301938e85..150d94b9b9 100644 --- a/client/src/features/project/components/AddCloudStorageButton.tsx +++ b/client/src/features/project/components/AddCloudStorageButton.tsx @@ -222,7 +222,7 @@ function AdvancedAddCloudStorage({ target_path: data.name, }); }, - [addCloudStorageForProject, projectId] + [addCloudStorageForProject, projectId], ); // Handle picking required credentials if necessary @@ -382,7 +382,7 @@ function AdvancedAddCloudStorage({ + {} as Record, ); updateCloudStorage({ @@ -800,7 +800,7 @@ function AddCloudStorageCredentialsStep({ }, }); }, - [configuration, project_id, storage_id, updateCloudStorage] + [configuration, project_id, storage_id, updateCloudStorage], ); useEffect(() => { @@ -816,7 +816,7 @@ function AddCloudStorageCredentialsStep({ "d-flex", "flex-column", "mh-100", - "overflow-y-hidden" + "overflow-y-hidden", )} noValidate onSubmit={handleSubmit(onSubmit)} diff --git a/client/src/features/project/components/File.tsx b/client/src/features/project/components/File.tsx index c81ef5b849..883451d08a 100644 --- a/client/src/features/project/components/File.tsx +++ b/client/src/features/project/components/File.tsx @@ -37,7 +37,7 @@ type ProjectFileLineageProps = { function ProjectFileLineage(props: ProjectFileLineageProps) { const project = useSelector( - (state: RootStateOrAny) => state.stateModel.project as StateModelProject + (state: RootStateOrAny) => state.stateModel.project as StateModelProject, ); const user = useSelector((state: RootStateOrAny) => state.stateModel.user); const projectMetadata = project.metadata; @@ -71,12 +71,12 @@ function ProjectFileLineage(props: ProjectFileLineageProps) { const lineagesUrl = lineageUrl.substring(0, lineageUrl.length - 1); const overviewCommitsUrl = Url.get( Url.pages.project.overview.commits, - projectUrlProps + projectUrlProps, ); const sessionNewUrl = Url.get(Url.pages.project.session.new, projectUrlProps); const gitFilePath = props.location.pathname.replace( lineageUrl + "/files/lineage/", - "" + "", ); return ( @@ -117,7 +117,7 @@ interface ProjectFileViewProps extends ProjectFileLineageProps { function ProjectFileView(props: ProjectFileViewProps) { const project = useSelector( - (state: RootStateOrAny) => state.stateModel.project as StateModelProject + (state: RootStateOrAny) => state.stateModel.project as StateModelProject, ); const user = useSelector((state: RootStateOrAny) => state.stateModel.user); const projectMetadata = project.metadata; @@ -151,7 +151,7 @@ function ProjectFileView(props: ProjectFileViewProps) { const lineagesUrl = lineageUrl.substring(0, lineageUrl.length - 1); const overviewCommitsUrl = Url.get( Url.pages.project.overview.commits, - projectUrlProps + projectUrlProps, ); const sessionNewUrl = Url.get(Url.pages.project.session.new, projectUrlProps); const filePath = props.location.pathname.replace(fileContentUrl, ""); diff --git a/client/src/features/project/components/ProjectEntityHeader.tsx b/client/src/features/project/components/ProjectEntityHeader.tsx index ff87355f1b..f84cbb3535 100644 --- a/client/src/features/project/components/ProjectEntityHeader.tsx +++ b/client/src/features/project/components/ProjectEntityHeader.tsx @@ -40,7 +40,7 @@ export function ProjectEntityHeader(props: ProjectEntityHeaderProps) { const projectMetadataQuery = useProjectMetadataQuery( { projectPath: fullPath, projectId }, - { skip: !fullPath || !projectId || !projectIndexingStatus.data?.activated } + { skip: !fullPath || !projectId || !projectIndexingStatus.data?.activated }, ); // overwrite description when available from KG @@ -65,7 +65,7 @@ export function ProjectEntityHeader(props: ProjectEntityHeaderProps) { ); const entityImage = getEntityImageUrl( - projectMetadataQuery?.data?.images as unknown as ImagesLinks[] + projectMetadataQuery?.data?.images as unknown as ImagesLinks[], ); return ( diff --git a/client/src/features/project/components/ProjectPageTitle.tsx b/client/src/features/project/components/ProjectPageTitle.tsx index 7c241a324f..8c63a30f09 100644 --- a/client/src/features/project/components/ProjectPageTitle.tsx +++ b/client/src/features/project/components/ProjectPageTitle.tsx @@ -45,11 +45,11 @@ function ProjectPageTitle({ const options = { skip: !projectIndexingStatus.data?.activated }; const { data, isFetching, isLoading } = useProjectJsonLdQuery( kgProjectQueryParams, - options + options, ); const { data: kgData } = useProjectMetadataQuery( { ...kgProjectQueryParams, projectId }, - options + options, ); const projectDesc = kgData?.description; diff --git a/client/src/features/project/components/ProjectSettingAvatar.tsx b/client/src/features/project/components/ProjectSettingAvatar.tsx index 1923735aa5..1001580b23 100644 --- a/client/src/features/project/components/ProjectSettingAvatar.tsx +++ b/client/src/features/project/components/ProjectSettingAvatar.tsx @@ -81,7 +81,7 @@ export function ProjectSettingsAvatar({ !projectFullPath || !projectId || !projectIndexingStatus.data?.activated, - } + }, ); const [ @@ -113,22 +113,22 @@ export function ProjectSettingsAvatar({ setAvatar(newAvatar); reset(); }, - [setAvatar, reset] + [setAvatar, reset], ); useEffect(() => { setAvatar( getCurrentImageAvatar( - projectMetadata.data?.images as unknown as ImagesLinks[] - ) + projectMetadata.data?.images as unknown as ImagesLinks[], + ), ); }, [projectMetadata.data?.images]); const onCancel = useCallback(() => { setAvatar( getCurrentImageAvatar( - projectMetadata.data?.images as unknown as ImagesLinks[] - ) + projectMetadata.data?.images as unknown as ImagesLinks[], + ), ); reset(); }, [reset, setAvatar, projectMetadata.data?.images]); @@ -162,7 +162,7 @@ export function ProjectSettingsAvatar({ ) : null; const initialValue = getCurrentImageAvatar( - projectMetadata.data?.images as unknown as ImagesLinks[] + projectMetadata.data?.images as unknown as ImagesLinks[], ); return ( <> diff --git a/client/src/features/project/components/ProjectSettingsCloudStorage.tsx b/client/src/features/project/components/ProjectSettingsCloudStorage.tsx index d7f48aaf55..e0a7efc3e3 100644 --- a/client/src/features/project/components/ProjectSettingsCloudStorage.tsx +++ b/client/src/features/project/components/ProjectSettingsCloudStorage.tsx @@ -86,7 +86,7 @@ import AddCloudStorageButton from "./AddCloudStorageButton"; export default function ProjectSettingsCloudStorage() { const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); // Project options @@ -201,9 +201,9 @@ function CloudStorageSupportNotice({ notebooksVersion.cloudStorageEnabled.s3 ? "s3" : notebooksVersion.cloudStorageEnabled.azureBlob - ? "azure" - : "none", - [notebooksVersion.cloudStorageEnabled] + ? "azure" + : "none", + [notebooksVersion.cloudStorageEnabled], ); if (support === "none") { @@ -292,7 +292,7 @@ function CloudStorageItem({ storageDefinition }: CloudStorageItemProps) { "w-100", "p-3", "bg-transparent", - "border-0" + "border-0", )} onClick={toggle} type="button" @@ -379,7 +379,7 @@ function EditCloudStorage({ const credentialFieldDefinitions = useMemo( () => getCredentialFieldDefinitions(storageDefinition), - [storageDefinition] + [storageDefinition], ); const projectId = useSelector< @@ -432,7 +432,7 @@ function EditCloudStorage({ ...obj, [name]: CLOUD_STORAGE_SENSITIVE_FIELD_TOKEN, }), - {} as Record + {} as Record, ) : {}; const parsedConfiguration = @@ -445,14 +445,14 @@ function EditCloudStorage({ .filter(([key]) => !sensitiveFields.includes(key)) .reduce( (obj, [key, value]) => ({ ...obj, [key]: value }), - {} as Record + {} as Record, ); const removedKeysConfiguration = Object.keys(configuration) .filter((key) => !sensitiveFields.includes(key)) .filter((key) => !Object.keys(filteredConfiguration).includes(key)) .reduce( (obj, key) => ({ ...obj, [key]: null }), - {} as Record + {} as Record, ); const configurationUpdate = { configuration: { @@ -486,7 +486,7 @@ function EditCloudStorage({ storage_id, target_path, updateCloudStorage, - ] + ], ); const watchPrivateToggle = watch("private"); @@ -539,7 +539,7 @@ function EditCloudStorage({ getCredentialFieldDefinitions(storageDefinition), - [storageDefinition] + [storageDefinition], ); const requiredCredentials = useMemo( () => credentialFieldDefinitions?.filter( - ({ requiredCredential }) => requiredCredential + ({ requiredCredential }) => requiredCredential, ), - [credentialFieldDefinitions] + [credentialFieldDefinitions], ); return ( diff --git a/client/src/features/project/components/ProjectSettingsDescription.tsx b/client/src/features/project/components/ProjectSettingsDescription.tsx index bc6964b4dd..2c0c590604 100644 --- a/client/src/features/project/components/ProjectSettingsDescription.tsx +++ b/client/src/features/project/components/ProjectSettingsDescription.tsx @@ -48,7 +48,7 @@ export function ProjectSettingsDescription({ }: ProjectSettingsDescriptionProps) { const [description, setDescription] = useState(""); const [succeeded, setSucceeded] = React.useState( - undefined + undefined, ); const projectIndexingStatus = useGetProjectIndexingStatusQuery(projectId, { skip: !projectFullPath || !projectId, @@ -60,7 +60,7 @@ export function ProjectSettingsDescription({ !projectFullPath || !projectId || !projectIndexingStatus.data?.activated, - } + }, ); const [ diff --git a/client/src/features/project/components/ProjectSettingsGeneralDeleteProject.tsx b/client/src/features/project/components/ProjectSettingsGeneralDeleteProject.tsx index 75ebcc5209..1082dfdc8c 100644 --- a/client/src/features/project/components/ProjectSettingsGeneralDeleteProject.tsx +++ b/client/src/features/project/components/ProjectSettingsGeneralDeleteProject.tsx @@ -60,7 +60,7 @@ export const ProjectSettingsGeneralDeleteProject = ({ (event: ChangeEvent) => { setConfirmText(event.target.value); }, - [] + [], ); const confirmMatches = confirmText === projectPathWithNamespace; @@ -203,6 +203,6 @@ const addNotification = ({ NOTIFICATION_TOPICS.PROJECT_DELETED, <> Project {projectPathWithNamespace} deleted - + , ); }; diff --git a/client/src/features/project/components/migrations/MigrationHelpers.tsx b/client/src/features/project/components/migrations/MigrationHelpers.tsx index 6754c29faa..88c716cdd3 100644 --- a/client/src/features/project/components/migrations/MigrationHelpers.tsx +++ b/client/src/features/project/components/migrations/MigrationHelpers.tsx @@ -134,7 +134,7 @@ export function CompositeTitle({ className={cx( styles.sectionTitle, !loading && [styles.sectionTitleExpandable, "cursor-pointer"], - "d-flex align-items-center m-0 me-3" + "d-flex align-items-center m-0 me-3", )} onClick={toggleShowDetails} > diff --git a/client/src/features/project/components/migrations/ProjectCoreMigrations.tsx b/client/src/features/project/components/migrations/ProjectCoreMigrations.tsx index 8b0642e605..3193ef70f0 100644 --- a/client/src/features/project/components/migrations/ProjectCoreMigrations.tsx +++ b/client/src/features/project/components/migrations/ProjectCoreMigrations.tsx @@ -89,14 +89,14 @@ export function ProjectMigrationStatus({ const { data, isLoading, isFetching, error } = projectCoreApi.useGetMigrationStatusQuery( { apiVersion, gitUrl, branch }, - { refetchOnMountOrArgChange: 60 * 5, skip } + { refetchOnMountOrArgChange: 60 * 5, skip }, ); const [startMigration, migrationStatus] = projectCoreApi.useStartMigrationMutation(); const updateProject = useCallback( (scope: MigrationStartScopes) => startMigration({ apiVersion, branch, gitUrl, scope }), - [apiVersion, branch, gitUrl, startMigration] + [apiVersion, branch, gitUrl, startMigration], ); const sectionCyId = "project-version"; @@ -123,8 +123,8 @@ export function ProjectMigrationStatus({ const currentError = migrationStatus.error ? migrationStatus.error : error - ? error - : null; + ? error + : null; return ( <> + props: Pick, ) { return (
@@ -317,7 +317,7 @@ function formatServerWarning( props: Pick< DatasetModifyProps, "defaultBranch" | "externalUrl" | "overviewCommitsUrl" - > + >, ) { if (warning.source === "remoteBranch") { return serverWarningMessageForMerge(warning.error.reason, props); @@ -397,14 +397,14 @@ export default function DatasetModify(props: DatasetModifyProps) { (error: ServerError) => { dispatch(setServerError(error)); }, - [dispatch] + [dispatch], ); const setWarning = React.useCallback( (warning: ServerError) => { dispatch(setServerWarning(warning)); }, - [dispatch] + [dispatch], ); const [postDatasetMutation] = usePostDatasetMutation(); @@ -424,7 +424,7 @@ export default function DatasetModify(props: DatasetModifyProps) { const groomedDataset = await createSubmitDataset( submitData, client, - versionUrl + versionUrl, ); // ? "data" means that an error occurred if ( @@ -441,7 +441,7 @@ export default function DatasetModify(props: DatasetModifyProps) { error: { reason, }, - }) + }), ); setSubmitting(false); @@ -607,7 +607,7 @@ export default function DatasetModify(props: DatasetModifyProps) { setSubmitting, setWarning, versionUrl, - ] + ], ); React.useEffect(() => { diff --git a/client/src/features/project/dataset/ProjectDatasetImport.tsx b/client/src/features/project/dataset/ProjectDatasetImport.tsx index 2b89c7c6bd..7a47c69cea 100644 --- a/client/src/features/project/dataset/ProjectDatasetImport.tsx +++ b/client/src/features/project/dataset/ProjectDatasetImport.tsx @@ -18,7 +18,7 @@ type ProjectDatasetImportProps = { function ProjectDatasetImport(props: ProjectDatasetImportProps) { const project = useSelector( - (state: RootStateOrAny) => state.stateModel.project as StateModelProject + (state: RootStateOrAny) => state.stateModel.project as StateModelProject, ); const projectMetadata = project.metadata; const accessLevel = projectMetadata.accessLevel; diff --git a/client/src/features/project/dataset/ProjectDatasetNewEdit.tsx b/client/src/features/project/dataset/ProjectDatasetNewEdit.tsx index bc2710826b..5614558123 100644 --- a/client/src/features/project/dataset/ProjectDatasetNewEdit.tsx +++ b/client/src/features/project/dataset/ProjectDatasetNewEdit.tsx @@ -97,7 +97,7 @@ type ProjectDatasetNewEditProps = ChangeDatasetProps & Partial; function ProjectDatasetNewEdit(props: ProjectDatasetNewEditProps) { const project = useSelector( - (state: RootStateOrAny) => state.stateModel.project as StateModelProject + (state: RootStateOrAny) => state.stateModel.project as StateModelProject, ); const user = useSelector((state: RootStateOrAny) => state.stateModel.user); const projectMetadata = project.metadata; @@ -114,7 +114,7 @@ function ProjectDatasetNewEdit(props: ProjectDatasetNewEditProps) { // Remove the trailing slash, since that is how downstream components expect it. const overviewCommitsUrl = Url.get( Url.pages.project.overview.commits, - projectUrlProps + projectUrlProps, ); const { dataset, history, submitting, setSubmitting } = props; @@ -200,11 +200,11 @@ function ProjectDatasetNewEdit(props: ProjectDatasetNewEditProps) { function ProjectDatasetNew( props: Omit & - ProjectDatasetNewOnlyProps + ProjectDatasetNewOnlyProps, ) { const location = props.location; const project = useSelector( - (state: RootStateOrAny) => state.stateModel.project as StateModelProject + (state: RootStateOrAny) => state.stateModel.project as StateModelProject, ); const projectPathWithNamespace = project.metadata.pathWithNamespace; const user = useSelector((state: RootStateOrAny) => state.stateModel.user); @@ -255,11 +255,11 @@ function ProjectDatasetNew( function ProjectDatasetEditForm( props: ChangeDatasetProps & DatasetModifyDisplayProps & - ProjectDatasetEditOnlyProps + ProjectDatasetEditOnlyProps, ) { const location = props.location; const project = useSelector( - (state: RootStateOrAny) => state.stateModel.project as StateModelProject + (state: RootStateOrAny) => state.stateModel.project as StateModelProject, ); const projectPathWithNamespace = project.metadata.pathWithNamespace; const dispatch = useDispatch(); @@ -270,7 +270,7 @@ function ProjectDatasetEditForm( dataset: dataset, location, projectPathWithNamespace, - }) + }), ); }, [dataset, dispatch, files, location, projectPathWithNamespace]); const [submitting, setSubmitting] = React.useState(false); diff --git a/client/src/features/project/dataset/ProjectDatasetShow.tsx b/client/src/features/project/dataset/ProjectDatasetShow.tsx index d00dfc15a8..6e9b3f62d5 100644 --- a/client/src/features/project/dataset/ProjectDatasetShow.tsx +++ b/client/src/features/project/dataset/ProjectDatasetShow.tsx @@ -38,7 +38,7 @@ type IDatasetCoordinator = { fetchDatasetFilesFromCoreService: ( id: string, httpProjectUrl: string, - versionUrl: string + versionUrl: string, ) => void; // eslint-disable-next-line @typescript-eslint/no-explicit-any get(key: string): any; @@ -77,7 +77,7 @@ type ProjectDatasetViewProps = { function findDataset( name: string | undefined, - datasets: DatasetCore[] | undefined + datasets: DatasetCore[] | undefined, ) { if (name == null || datasets == null) return undefined; return datasets.find((d) => d.name === name); @@ -85,7 +85,7 @@ function findDataset( function findDatasetId( name: string | undefined, - datasets: DatasetCore[] | undefined + datasets: DatasetCore[] | undefined, ) { if (name == null || datasets == null) return undefined; const dataset = findDataset(name, datasets); @@ -94,7 +94,7 @@ function findDatasetId( function mergeCoreAndKgDatasets( coreDataset?: DatasetCore, - kgDataset?: DatasetKg + kgDataset?: DatasetKg, ) { if (coreDataset == null) { if (kgDataset == null) return undefined; @@ -156,7 +156,7 @@ function ProjectDatasetView(props: ProjectDatasetViewProps) { name: datasetName ?? "", metadataVersion, }, - { skip: !datasetName } + { skip: !datasetName }, ); const loadingDatasets = @@ -199,7 +199,7 @@ function ProjectDatasetView(props: ProjectDatasetViewProps) { function ProjectDatasetShow(props: ProjectDatasetShowProps) { const project = useSelector( - (state: RootStateOrAny) => state.stateModel.project as StateModelProject + (state: RootStateOrAny) => state.stateModel.project as StateModelProject, ); const user = useSelector((state: RootStateOrAny) => state.stateModel.user); const projectMetadata = project.metadata; diff --git a/client/src/features/project/dataset/ProjectDatasetsListView.tsx b/client/src/features/project/dataset/ProjectDatasetsListView.tsx index 7871411f2e..7a8d656820 100644 --- a/client/src/features/project/dataset/ProjectDatasetsListView.tsx +++ b/client/src/features/project/dataset/ProjectDatasetsListView.tsx @@ -14,7 +14,7 @@ import type { DatasetCore } from "../Project"; function datasetToDict( datasetsUrl: string, gridDisplay: boolean, - dataset: DatasetCore + dataset: DatasetCore, ) { const timeCaption = dataset.created_at != null ? new Date(dataset.created_at) : ""; @@ -124,9 +124,9 @@ export default function DatasetsListView(props: DatasetsListViewProps) { const datasets = useMemo( () => props.datasets.sort((d1, d2) => - d1.title > d2.title ? 1 : d2.title > d1.title ? -1 : 0 + d1.title > d2.title ? 1 : d2.title > d1.title ? -1 : 0, ), - [props.datasets] + [props.datasets], ); return ( diff --git a/client/src/features/project/dataset/ProjectDatasetsView.tsx b/client/src/features/project/dataset/ProjectDatasetsView.tsx index 78f728e99a..ff1c8b93dd 100644 --- a/client/src/features/project/dataset/ProjectDatasetsView.tsx +++ b/client/src/features/project/dataset/ProjectDatasetsView.tsx @@ -216,7 +216,7 @@ function ProjectDatasetsView(props: any) { useEffect(() => { setDatasetCoordinator( - new DatasetCoordinator(props.client, props.model.subModel("dataset")) + new DatasetCoordinator(props.client, props.model.subModel("dataset")), ); }, [props.client, props.model]); diff --git a/client/src/features/project/dataset/datasetCore.api.ts b/client/src/features/project/dataset/datasetCore.api.ts index b1257ca119..cd1006ccfd 100644 --- a/client/src/features/project/dataset/datasetCore.api.ts +++ b/client/src/features/project/dataset/datasetCore.api.ts @@ -29,7 +29,7 @@ export type DatasetPostClient = { uploadSingleFile( file: unknown, unpackArchive: boolean, - versionUrl: string + versionUrl: string, ): Promise; }; @@ -72,7 +72,7 @@ type PostImageUploadResponse = { export async function createSubmitDataset( datasetInput: DatasetFormFields, client: DatasetPostClient, - versionUrl: string + versionUrl: string, ): Promise { const { readyFiles, pendingFiles } = gatherDatasetFilesForSubmit(datasetInput); @@ -80,7 +80,7 @@ export async function createSubmitDataset( const images = await getDatasetImagesForSubmit( datasetInput, client, - versionUrl + versionUrl, ); if ("data" in images) return images; const dataset = { @@ -104,7 +104,7 @@ function getCreator(creator: Creator) { } function getFileIds( - files: Omit[] + files: Omit[], ): { file_id: string }[] { return files.flatMap((file) => { if (Array.isArray(file.file_id)) @@ -121,7 +121,7 @@ function gatherDatasetFilesForSubmit(datasetInput: DatasetFormFields) { (f) => f.file_status !== FILE_STATUS.PENDING && f.file_status !== FILE_STATUS.ADDED && - f.file_id !== undefined + f.file_id !== undefined, ); return { readyFiles: getFileIds(readyFiles), pendingFiles }; } @@ -129,7 +129,7 @@ function gatherDatasetFilesForSubmit(datasetInput: DatasetFormFields) { async function getDatasetImagesForSubmit( datasetInput: DatasetFormFields, client: DatasetPostClient, - versionUrl: string + versionUrl: string, ): ReturnType { if (datasetInput.image.options.length < 1) return []; @@ -151,7 +151,7 @@ async function getDatasetImagesForSubmit( const uploadedImages = await uploadDatasetImages( client, versionUrl, - datasetInput.image + datasetInput.image, ); return uploadedImages ?? []; } @@ -159,7 +159,7 @@ async function getDatasetImagesForSubmit( async function uploadDatasetImages( client: DatasetPostClient, versionUrl: string, - image: ImageInputImage + image: ImageInputImage, ): Promise { if (image == null) return []; if (image.selected === -1) return []; diff --git a/client/src/features/project/dataset/datasetForm.slice.ts b/client/src/features/project/dataset/datasetForm.slice.ts index 5102949ca7..04a5ed7801 100644 --- a/client/src/features/project/dataset/datasetForm.slice.ts +++ b/client/src/features/project/dataset/datasetForm.slice.ts @@ -134,7 +134,7 @@ export const datasetFormSlice = createSlice({ }, initializeForDataset: ( state, - action: PayloadAction + action: PayloadAction, ) => { if (state.context.location.pathname === action.payload.location.pathname) return state; @@ -164,7 +164,7 @@ export const datasetFormSlice = createSlice({ }, setFiles: ( state, - action: PayloadAction + action: PayloadAction, ) => { state.form.files = action.payload; }, diff --git a/client/src/features/project/projectCloudStorage.api.ts b/client/src/features/project/projectCloudStorage.api.ts index ef1cb79ea5..c5104b2231 100644 --- a/client/src/features/project/projectCloudStorage.api.ts +++ b/client/src/features/project/projectCloudStorage.api.ts @@ -51,7 +51,7 @@ const projectCloudStorageApi = createApi({ ? [ ...result.map( ({ storage }) => - ({ id: storage.storage_id, type: "CloudStorage" } as const) + ({ id: storage.storage_id, type: "CloudStorage" }) as const, ), { id: "LIST", type: "CloudStorage" }, ] diff --git a/client/src/features/project/projectCoreApi.ts b/client/src/features/project/projectCoreApi.ts index 6a66d85f1a..31fe6a3a23 100644 --- a/client/src/features/project/projectCoreApi.ts +++ b/client/src/features/project/projectCoreApi.ts @@ -116,7 +116,7 @@ export const projectCoreApi = createApi({ metadataVersion: params.metadataVersion, apiVersion: params.apiVersion, }), - queryParams + queryParams, ), method: "GET", headers: new Headers(headers), @@ -306,7 +306,7 @@ export const projectCoreApi = createApi({ }); export const transformGetConfigRawResponse = ( - response: GetConfigRawResponse + response: GetConfigRawResponse, ): ProjectConfig => { if (response.error) { throw response.error; @@ -319,10 +319,10 @@ export const transformGetConfigRawResponse = ( ProjectConfigSection["sessions"] >["legacyConfig"] = { cpuRequest: safeParseFloat( - projectSessionsConfig["interactive.cpu_request"] + projectSessionsConfig["interactive.cpu_request"], ), memoryRequest: safeParseInt( - projectSessionsConfig["interactive.mem_request"] + projectSessionsConfig["interactive.mem_request"], ), gpuRequest: safeParseInt(projectSessionsConfig["interactive.gpu_request"]), }; @@ -330,10 +330,10 @@ export const transformGetConfigRawResponse = ( ProjectConfigSection["sessions"] >["legacyConfig"] = { cpuRequest: safeParseFloat( - defaultSessionsConfig["interactive.cpu_request"] + defaultSessionsConfig["interactive.cpu_request"], ), memoryRequest: safeParseInt( - defaultSessionsConfig["interactive.mem_request"] + defaultSessionsConfig["interactive.mem_request"], ), gpuRequest: safeParseInt(defaultSessionsConfig["interactive.gpu_request"]), }; @@ -344,7 +344,7 @@ export const transformGetConfigRawResponse = ( .reduce( // eslint-disable-next-line @typescript-eslint/no-explicit-any (obj, key) => ({ ...obj, [key]: (projectSessionsConfig as any)[key] }), - {} + {}, ); return { @@ -352,7 +352,7 @@ export const transformGetConfigRawResponse = ( sessions: { defaultUrl: projectSessionsConfig["interactive.default_url"], storage: safeParseInt( - projectSessionsConfig["interactive.disk_request"] + projectSessionsConfig["interactive.disk_request"], ), lfsAutoFetch: projectSessionsConfig["interactive.lfs_auto_fetch"] @@ -367,7 +367,7 @@ export const transformGetConfigRawResponse = ( sessions: { defaultUrl: defaultSessionsConfig["interactive.default_url"], storage: safeParseInt( - defaultSessionsConfig["interactive.disk_request"] + defaultSessionsConfig["interactive.disk_request"], ), legacyConfig: defaultLegacySessionsConfig, }, @@ -391,7 +391,7 @@ const safeParseFloat = (str: string | undefined): number | undefined => { const SESSION_CONFIG_PREFIX = "interactive"; const transformRenkuCoreErrorResponse = ( - error: FetchBaseQueryError + error: FetchBaseQueryError, ): FetchBaseQueryError => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const data = error.data as any; diff --git a/client/src/features/project/projectGitLab.api.ts b/client/src/features/project/projectGitLab.api.ts index 3db571f4f3..7614d05de9 100644 --- a/client/src/features/project/projectGitLab.api.ts +++ b/client/src/features/project/projectGitLab.api.ts @@ -70,7 +70,7 @@ const projectGitLabApi = createApi({ { jobName, pipelineIds, projectId }, _queryApi, _extraOptions, - fetchBaseQuery + fetchBaseQuery, ) => { for (const pipelineId of pipelineIds) { const url = `${projectId}/pipelines/${pipelineId}/jobs`; @@ -103,7 +103,7 @@ const projectGitLabApi = createApi({ result ? [ ...result.map( - ({ id }) => ({ id: `${id}`, type: "Pipeline" } as const) + ({ id }) => ({ id: `${id}`, type: "Pipeline" }) as const, ), "Pipeline", ] @@ -142,7 +142,7 @@ const projectGitLabApi = createApi({ { projectId }, _queryApi, _extraOptions, - fetchBaseQuery + fetchBaseQuery, ) => { const url = `${projectId}/registry/repositories`; @@ -194,7 +194,7 @@ const projectGitLabApi = createApi({ { perPage, projectId }, _queryApi, _extraOptions, - fetchBaseQuery + fetchBaseQuery, ) => { const url = `${projectId}/repository/branches`; @@ -221,7 +221,7 @@ const projectGitLabApi = createApi({ const responseHeaders = result.meta?.response?.headers; const pagination = processPaginationHeaders( - responseHeaders + responseHeaders, ) as Pagination; if (pagination.nextPage == null) { @@ -235,7 +235,7 @@ const projectGitLabApi = createApi({ result ? [ ...result.map( - ({ name }) => ({ type: "Branch", id: name } as const) + ({ name }) => ({ type: "Branch", id: name }) as const, ), "Branch", ] @@ -249,7 +249,7 @@ const projectGitLabApi = createApi({ { commit, projectId }, _queryApi, _extraOptions, - fetchBaseQuery + fetchBaseQuery, ) => { const filePath = encodeURIComponent(RENKU_CONFIG_FILE_PATH); const url = `${projectId}/repository/files/${filePath}/raw?ref=${commit}`; @@ -285,7 +285,7 @@ const projectGitLabApi = createApi({ const flattened = Object.entries(data.interactive ?? {}).reduce( (obj, [key, value]) => ({ ...obj, [`interactive.${key}`]: value }), - {} as Record + {} as Record, ); const projectConfig = transformGetConfigRawResponse({ result: { @@ -314,7 +314,7 @@ const projectGitLabApi = createApi({ { branch, perPage, projectId }, _queryApi, _extraOptions, - fetchBaseQuery + fetchBaseQuery, ) => { const url = `${projectId}/repository/commits`; @@ -342,7 +342,7 @@ const projectGitLabApi = createApi({ const responseHeaders = result.meta?.response?.headers; const pagination = processPaginationHeaders( - responseHeaders + responseHeaders, ) as Pagination; if (pagination.nextPage == null) { @@ -355,7 +355,7 @@ const projectGitLabApi = createApi({ providesTags: (result) => result ? [ - ...result.map(({ id }) => ({ type: "Commit", id } as const)), + ...result.map(({ id }) => ({ type: "Commit", id }) as const), "Commit", ] : ["Commit"], diff --git a/client/src/features/project/projectKg.api.ts b/client/src/features/project/projectKg.api.ts index 5c2d04fceb..2030326dd3 100644 --- a/client/src/features/project/projectKg.api.ts +++ b/client/src/features/project/projectKg.api.ts @@ -66,7 +66,7 @@ export const projectKgApi = createApi({ invalidatesTags: (result, error, projectId) => [ { type: "project-indexing", id: projectId }, ], - } + }, ), deleteProject: builder.mutation( { @@ -94,7 +94,7 @@ export const projectKgApi = createApi({ } return error; }, - } + }, ), getDatasetKg: builder.query({ query: (params: GetDatasetKgParams) => { @@ -128,7 +128,7 @@ export const projectKgApi = createApi({ if (errorData.status === 404 && errorData.data && "message") { if ( (errorData as ErrorDataMessage).data.message?.includes( - "project cannot be found" + "project cannot be found", ) ) return { activated: false }; @@ -145,7 +145,7 @@ export const projectKgApi = createApi({ dispatch( projectKgApi.util.invalidateTags([ { type: "project-kg-metadata", id: projectId }, - ]) + ]), ); } }); diff --git a/client/src/features/project/tests/migrations.test.ts b/client/src/features/project/tests/migrations.test.ts index 811ad73c64..385241c535 100644 --- a/client/src/features/project/tests/migrations.test.ts +++ b/client/src/features/project/tests/migrations.test.ts @@ -51,7 +51,7 @@ describe("Test helper functions", () => { expect(getCompareUrl("2.3.0", "2.3.0")).toBe(null); expect(getCompareUrl("2.3.0", "2.4.0")).not.toBe("2.3.0"); expect(getCompareUrl("2.3.0", "2.4.0")).toContain( - "compare/v2.3.0...v2.4.0" + "compare/v2.3.0...v2.4.0", ); }); }); @@ -63,7 +63,7 @@ describe("Test migration level functions", () => { object.expectedResult.level === "Level5" ? false : true; const level = getMigrationLevel( object.data as MigrationStatus, - backendAvailable + backendAvailable, ); const expectedLevel = ProjectMigrationLevel[ @@ -79,7 +79,7 @@ describe("Test migration level functions", () => { object.expectedResult.level === "Level5" ? false : true; const computedLevel = getRenkuLevel( object.data as MigrationStatus, - backendAvailable + backendAvailable, ); const expectedLevel = object.expectedResult .renku as unknown as RenkuMigrationLevel; diff --git a/client/src/features/project/useProjectCoreSupport.ts b/client/src/features/project/useProjectCoreSupport.ts index 5eb2f36fc3..8d145dcdf0 100644 --- a/client/src/features/project/useProjectCoreSupport.ts +++ b/client/src/features/project/useProjectCoreSupport.ts @@ -70,11 +70,11 @@ export const useCoreSupport = ({ const migrationStatusApiVersion = apiVersionForMetadataVersion( coreApiVersionedUrlConfig, undefined, - undefined // do not use the override for getting migration status + undefined, // do not use the override for getting migration status ); const getMigrationStatusQuery = useGetMigrationStatusQuery( { apiVersion: migrationStatusApiVersion, gitUrl: gitUrl ?? "", branch }, - { skip: !gitUrl || !branch } + { skip: !gitUrl || !branch }, ); const getCoreVersionsQuery = useGetCoreVersionsQuery(); @@ -87,7 +87,7 @@ export const useCoreSupport = ({ migrationStatus?.details?.core_compatibility_status.type === "detail" ? parseInt( migrationStatus.details.core_compatibility_status - .project_metadata_version + .project_metadata_version, ) : undefined; const backendErrorMessage = @@ -152,7 +152,7 @@ export const computeBackendData = ({ apiVersion: apiVersionForMetadataVersion( coreApiVersionedUrlConfig, projectVersion, - apiVersionOverride + apiVersionOverride, ), backendAvailable: true, backendErrorMessage: undefined, diff --git a/client/src/features/project/utils/migrations.ts b/client/src/features/project/utils/migrations.ts index 3b77d3b92a..1692dec645 100644 --- a/client/src/features/project/utils/migrations.ts +++ b/client/src/features/project/utils/migrations.ts @@ -65,7 +65,7 @@ export function getReleaseUrl(version?: string): string | null { */ export function getCompareUrl( projectVersion?: string, - latestVersion?: string + latestVersion?: string, ): React.ReactNode { if (!projectVersion || !latestVersion || projectVersion === latestVersion) return null; @@ -86,7 +86,7 @@ export function getCompareUrl( */ export function getMigrationLevel( migrationStatus: MigrationStatus | undefined, - backendAvailable: boolean + backendAvailable: boolean, ): ProjectMigrationLevel | null { // ? REF: https://www.notion.so/Project-status-889f7a0f16574c84a4b7af344683623b if (!migrationStatus) return null; @@ -140,7 +140,7 @@ export function getMigrationLevel( */ export function getRenkuLevel( migrationStatus?: MigrationStatus, - backendAvailable?: boolean + backendAvailable?: boolean, ): RenkuMigrationLevel | null { let automated = false; if (!migrationStatus) return null; @@ -178,7 +178,7 @@ export function getRenkuLevel( * and core service availability */ export function getTemplateLevel( - migrationStatus: MigrationStatus | undefined + migrationStatus: MigrationStatus | undefined, ): TemplateMigrationLevel | null { let automated = false; if (!migrationStatus) return null; @@ -213,7 +213,7 @@ export function getTemplateLevel( */ export function canUpdateProjectAutomatically( renkuMigrationLevel?: RenkuMigrationLevel | null, - templateMigrationLevel?: TemplateMigrationLevel | null + templateMigrationLevel?: TemplateMigrationLevel | null, ): boolean { if ( renkuMigrationLevel && diff --git a/client/src/features/project/utils/projectCloudStorage.utils.ts b/client/src/features/project/utils/projectCloudStorage.utils.ts index c558ead2cf..9bce11f385 100644 --- a/client/src/features/project/utils/projectCloudStorage.utils.ts +++ b/client/src/features/project/utils/projectCloudStorage.utils.ts @@ -24,7 +24,7 @@ import { } from "../projectCloudStorage.types"; export function parseCloudStorageConfiguration( - formattedConfiguration: string + formattedConfiguration: string, ): Record { // Parse lines of rclone configuration const configurationLineRegex = /^(?[^=]+)=(?.*)$/; @@ -45,7 +45,7 @@ export function parseCloudStorageConfiguration( return entries.reduce( (obj, { key, value }) => ({ ...obj, [key]: value }), - {} + {}, ); } @@ -64,7 +64,7 @@ export function formatCloudStorageConfiguration({ } export function getCredentialFieldDefinitions( - storageDefinition: CloudStorage + storageDefinition: CloudStorage, ): CloudStorageCredential[] | undefined { const { sensitive_fields, storage } = storageDefinition; const { configuration } = storage; @@ -79,7 +79,7 @@ export function getCredentialFieldDefinitions( } export function getProvidedSensitiveFields( - configuration: CloudStorageConfiguration["configuration"] + configuration: CloudStorageConfiguration["configuration"], ): string[] { return Object.entries(configuration) .filter(([, value]) => value === CLOUD_STORAGE_SENSITIVE_FIELD_TOKEN) diff --git a/client/src/features/projects/projectsApi.ts b/client/src/features/projects/projectsApi.ts index 4adc60ff15..44863fc137 100644 --- a/client/src/features/projects/projectsApi.ts +++ b/client/src/features/projects/projectsApi.ts @@ -53,7 +53,7 @@ function convertProjects(response: any): MemberProjectResponse { const projects = response?.data?.projects?.nodes; const pageInfo = response?.data?.projects?.pageInfo; const data = projects?.map((project: any) => - formatProjectMetadata(project) + formatProjectMetadata(project), ); return { endCursor: pageInfo.endCursor, @@ -145,16 +145,15 @@ export const projectsApi = createApi({ projectRequests.push( fetchWithBQ( `/projects/${encodeURIComponent( - project - )}?statistics=false&doNotTrack=true` - ) + project, + )}?statistics=false&doNotTrack=true`, + ), ); } try { - const resultAllProjectData = await Promise.allSettled( - projectRequests - ); + const resultAllProjectData = + await Promise.allSettled(projectRequests); const projectList = []; for (const projectData of resultAllProjectData) { if ( diff --git a/client/src/features/session/components/AboutSessionModal.tsx b/client/src/features/session/components/AboutSessionModal.tsx index 252c33d6d5..1a018dca4e 100644 --- a/client/src/features/session/components/AboutSessionModal.tsx +++ b/client/src/features/session/components/AboutSessionModal.tsx @@ -68,7 +68,7 @@ export default function AboutSessionModal({ function ProjectHeader() { const projectMetadata = useSelector( - (state) => state.stateModel.project.metadata + (state) => state.stateModel.project.metadata, ); const slug = projectMetadata.pathWithNamespace; @@ -126,7 +126,7 @@ function Help() { "text-decoration-none", "d-flex", "align-items-center", - "gap-2" + "gap-2", )} role="link" url={Docs.rtdTopicGuide("sessions/session-basics.html")} @@ -140,7 +140,7 @@ function Help() { "text-decoration-none", "d-flex", "align-items-center", - "gap-2" + "gap-2", )} role="link" url={Docs.READ_THE_DOCS_INTRODUCTION} diff --git a/client/src/features/session/components/AnonymousSessionsList.tsx b/client/src/features/session/components/AnonymousSessionsList.tsx index 92584287a4..1af836f8c6 100644 --- a/client/src/features/session/components/AnonymousSessionsList.tsx +++ b/client/src/features/session/components/AnonymousSessionsList.tsx @@ -36,7 +36,7 @@ export default function AnonymousSessionsList() { ).ANONYMOUS_SESSIONS; const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); if (!logged && !anonymousSessionsEnabled) { diff --git a/client/src/features/session/components/ProjectSessionsList.tsx b/client/src/features/session/components/ProjectSessionsList.tsx index 5c0bc6a44c..2d87997636 100644 --- a/client/src/features/session/components/ProjectSessionsList.tsx +++ b/client/src/features/session/components/ProjectSessionsList.tsx @@ -68,7 +68,7 @@ export function useProjectSessions({ ? Object.entries(sessions) .filter(([, session]) => { const annotations = NotebooksHelper.cleanAnnotations( - session.annotations + session.annotations, ) as Session["annotations"]; const fullPath = `${annotations["namespace"]}/${annotations["projectName"]}`; return ( @@ -78,10 +78,10 @@ export function useProjectSessions({ }) .reduce( (prev, [name, session]) => ({ ...prev, [name]: session }), - {} as Sessions + {} as Sessions, ) : null, - [projectPathWithNamespace, sessions] + [projectPathWithNamespace, sessions], ); return projectSessions; } diff --git a/client/src/features/session/components/ProjectSessionsRouter.tsx b/client/src/features/session/components/ProjectSessionsRouter.tsx index 7a4b3e4f68..1f7e91a5ec 100644 --- a/client/src/features/session/components/ProjectSessionsRouter.tsx +++ b/client/src/features/session/components/ProjectSessionsRouter.tsx @@ -26,13 +26,13 @@ import StartNewSession from "./StartNewSession"; export default function ProjectSessionsRouter() { const pathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const namespace = useSelector( - (state) => state.stateModel.project.metadata.namespace + (state) => state.stateModel.project.metadata.namespace, ); const path = useSelector( - (state) => state.stateModel.project.metadata.path + (state) => state.stateModel.project.metadata.path, ); const projectUrlData = { @@ -42,7 +42,7 @@ export default function ProjectSessionsRouter() { const sessionsListUrl = Url.get(Url.pages.project.session, projectUrlData); const startSessionUrl = Url.get( Url.pages.project.session.new, - projectUrlData + projectUrlData, ); const sessionShowUrl = Url.get(Url.pages.project.session.show, { namespace, diff --git a/client/src/features/session/components/ResourcesSessionModal.tsx b/client/src/features/session/components/ResourcesSessionModal.tsx index 01f2e352b3..03e8e0918a 100644 --- a/client/src/features/session/components/ResourcesSessionModal.tsx +++ b/client/src/features/session/components/ResourcesSessionModal.tsx @@ -54,7 +54,7 @@ export default function ResourcesSessionModal({ className={cx( styles.resourcesModal, "modal-fullscreen-lg-down", - "modal-xl" + "modal-xl", )} isOpen={isOpen} scrollable @@ -72,7 +72,7 @@ export default function ResourcesSessionModal({ "gap-sm-0", "gap-md-0", "gap-lg-3", - "gap-xl-3" + "gap-xl-3", )} >
Resources
diff --git a/client/src/features/session/components/SaveSessionModal.tsx b/client/src/features/session/components/SaveSessionModal.tsx index 80c20e1063..e2288c9237 100644 --- a/client/src/features/session/components/SaveSessionModal.tsx +++ b/client/src/features/session/components/SaveSessionModal.tsx @@ -94,10 +94,10 @@ function RunningSaveSessionContent({ toggleModal, }: RunningSaveSessionContentProps) { const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); const accessLevel = useSelector( - (state) => state.stateModel.project.metadata.accessLevel + (state) => state.stateModel.project.metadata.accessLevel, ); const { data, error, isLoading } = useHealthQuery({ @@ -197,7 +197,7 @@ function SaveSessionStatus({ }).unwrap(); setSucceeded(result.error == null); }, - [renkuSave, sessionName] + [renkuSave, sessionName], ); if (isFetching || data == null) { @@ -305,7 +305,7 @@ function SaveSessionBody({ toggleModal, }: SaveSessionBodyProps) { const [commitMessage, setCommitMessage] = useState( - undefined + undefined, ); const saveText = saving ? ( @@ -371,7 +371,7 @@ function MessageForm({ (event: ChangeEvent) => { setCommitMessage(event.target.value); }, - [setCommitMessage] + [setCommitMessage], ); if (gitStatus.result.clean) { diff --git a/client/src/features/session/components/SessionButton.tsx b/client/src/features/session/components/SessionButton.tsx index 1b7ab18cbd..8642947349 100644 --- a/client/src/features/session/components/SessionButton.tsx +++ b/client/src/features/session/components/SessionButton.tsx @@ -99,8 +99,8 @@ export default function SessionButton({ sessions && runningSessionName && runningSessionName in sessions ? sessions[runningSessionName] : sessions - ? getRunningSession({ autostartUrl: sessionAutostartUrl, sessions }) - : null; + ? getRunningSession({ autostartUrl: sessionAutostartUrl, sessions }) + : null; if (isLoading) { return ( @@ -173,7 +173,7 @@ function SessionActions({ className, session }: SessionActionsProps) { const { notifications } = useContext(AppContext); const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); const dispatch = useDispatch(); @@ -182,7 +182,7 @@ function SessionActions({ className, session }: SessionActionsProps) { }, [dispatch, session.name]); const annotations = NotebooksHelper.cleanAnnotations( - session.annotations + session.annotations, ) as NotebookAnnotations; const showSessionUrl = Url.get(Url.pages.project.session.show, { namespace: annotations.namespace, @@ -283,7 +283,7 @@ function SessionActions({ className, session }: SessionActionsProps) { const [showModalStopSession, setShowModalStopSession] = useState(false); const toggleStopSession = useCallback( () => setShowModalStopSession((show) => !show), - [] + [], ); const status = session.status.state; @@ -294,7 +294,7 @@ function SessionActions({ className, session }: SessionActionsProps) { "btn-sm", "btn-icon-text", "start-session-button", - "session-link-group" + "session-link-group", ); const defaultAction = @@ -547,10 +547,10 @@ function UnsavedWorkWarning({ annotations, status }: UnsavedWorkWarningProps) { const explanation = !hasHibernationInfo ? "uncommitted files and/or unsynced commits" : annotations["hibernationDirty"] && !annotations["hibernationSynchronized"] - ? "uncommitted files and unsynced commits" - : annotations["hibernationDirty"] - ? "uncommitted files" - : "unsynced commits"; + ? "uncommitted files and unsynced commits" + : annotations["hibernationDirty"] + ? "uncommitted files" + : "unsynced commits"; return ( @@ -574,14 +574,14 @@ function addErrorNotification({ "message" in error && error.message != null ? error.message : "error" in error && error.error != null - ? error.error - : "Unknown error"; + ? error.error + : "Unknown error"; notifications.addError( NOTIFICATION_TOPICS.SESSION_START, title, undefined, undefined, undefined, - `Error message: "${message}"` + `Error message: "${message}"`, ); } diff --git a/client/src/features/session/components/SessionFileButton.tsx b/client/src/features/session/components/SessionFileButton.tsx index 13a1565ec7..a81ac371d6 100644 --- a/client/src/features/session/components/SessionFileButton.tsx +++ b/client/src/features/session/components/SessionFileButton.tsx @@ -41,7 +41,7 @@ export default function SessionFileButton({ const location = useLocation(); const projectPathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const sessionStartUrl = Url.get(Url.pages.project.session.new, { namespace: "", @@ -87,7 +87,7 @@ export default function SessionFileButton({ status === SessionStatusStateEnum.hibernated ) { const annotations = NotebooksHelper.cleanAnnotations( - runningSession.annotations + runningSession.annotations, ) as NotebookAnnotations; const sessionUrl = Url.get(Url.pages.project.session.show, { namespace: annotations["namespace"], diff --git a/client/src/features/session/components/SessionHibernated.tsx b/client/src/features/session/components/SessionHibernated.tsx index f7df50eec6..b2dc7ba064 100644 --- a/client/src/features/session/components/SessionHibernated.tsx +++ b/client/src/features/session/components/SessionHibernated.tsx @@ -42,7 +42,7 @@ export default function SessionHibernated({ session }: SessionHibernatedProps) { const locationFilePath = location.state?.filePath; const pathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const projectUrlData = { @@ -125,14 +125,14 @@ function addErrorNotification({ "message" in error && error.message != null ? error.message : "error" in error && error.error != null - ? error.error - : "Unknown error"; + ? error.error + : "Unknown error"; notifications.addError( NOTIFICATION_TOPICS.SESSION_START, "Unable to stop the current session", undefined, undefined, undefined, - `Error message: "${message}"` + `Error message: "${message}"`, ); } diff --git a/client/src/features/session/components/SessionRowCommitInfo.tsx b/client/src/features/session/components/SessionRowCommitInfo.tsx index d71672600e..301147bad8 100644 --- a/client/src/features/session/components/SessionRowCommitInfo.tsx +++ b/client/src/features/session/components/SessionRowCommitInfo.tsx @@ -63,7 +63,7 @@ function SessionRowCommitInfoDetails({ isError, } = useGetRepositoryCommitQuery( { commitSha, projectId }, - { skip: !commitSha || !projectId } + { skip: !commitSha || !projectId }, ); const content = isLoading ? ( diff --git a/client/src/features/session/components/SessionSaveWarning.tsx b/client/src/features/session/components/SessionSaveWarning.tsx index 5fd5c15a49..15dbfbb142 100644 --- a/client/src/features/session/components/SessionSaveWarning.tsx +++ b/client/src/features/session/components/SessionSaveWarning.tsx @@ -36,7 +36,7 @@ export default function SessionSaveWarning() { const location = useLocation(); const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); const { accessLevel, externalUrl } = useSelector< RootStateOrAny, @@ -56,7 +56,7 @@ export default function SessionSaveWarning() { role="text" title="Sessions" url={Docs.rtdHowToGuide( - "renkulab/session-stopping-and-saving.html" + "renkulab/session-stopping-and-saving.html", )} /> , but you cannot save your work. diff --git a/client/src/features/session/components/SessionUnavailable.tsx b/client/src/features/session/components/SessionUnavailable.tsx index 00440dc210..7ceefd1177 100644 --- a/client/src/features/session/components/SessionUnavailable.tsx +++ b/client/src/features/session/components/SessionUnavailable.tsx @@ -26,7 +26,7 @@ import { Url } from "../../../utils/helpers/url"; export default function SessionUnavailable() { const pathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const projectUrlData = { @@ -36,7 +36,7 @@ export default function SessionUnavailable() { const sessionsListUrl = Url.get(Url.pages.project.session, projectUrlData); const startSessionUrl = Url.get( Url.pages.project.session.new, - projectUrlData + projectUrlData, ); return ( diff --git a/client/src/features/session/components/SessionsList.tsx b/client/src/features/session/components/SessionsList.tsx index 08ab0b6296..b0566d6e64 100644 --- a/client/src/features/session/components/SessionsList.tsx +++ b/client/src/features/session/components/SessionsList.tsx @@ -79,10 +79,10 @@ function SessionListItem({ .filter(([key]) => key.startsWith("renku.io")) .reduce( (annotations, [key, value]) => ({ ...annotations, [key]: value }), - {} as Session["annotations"] + {} as Session["annotations"], ); const cleanAnnotations = NotebooksHelper.cleanAnnotations( - renkuAnnotations + renkuAnnotations, ) as NotebookAnnotations; const status = session.status.state; const details = { @@ -223,7 +223,7 @@ function SessionRowFull({ "border-radius-8", "rk-search-result", "rk-search-result-100", - "cursor-auto" + "cursor-auto", )} data-cy="session-container" xs={12} @@ -237,7 +237,7 @@ function SessionRowFull({ "d-flex", "flex-column", "align-items-start", - "overflow-hidden" + "overflow-hidden", )} > {!disableProjectTitle && ( @@ -424,7 +424,7 @@ function SessionRowCompact({ "bg-white", "cursor-auto", "border-radius-8", - "border-0" + "border-0", )} data-cy="session-container" > @@ -490,10 +490,10 @@ function UnsavedWorkWarning({ const explanation = !hasHibernationInfo ? "uncommitted files and/or unsynced commits" : annotations["hibernationDirty"] && !annotations["hibernationSynchronized"] - ? "uncommitted files and unsynced commits" - : annotations["hibernationDirty"] - ? "uncommitted files" - : "unsynced commits"; + ? "uncommitted files and unsynced commits" + : annotations["hibernationDirty"] + ? "uncommitted files" + : "unsynced commits"; const content = ( <> diff --git a/client/src/features/session/components/ShowSession.tsx b/client/src/features/session/components/ShowSession.tsx index 4710a25c8f..f8cb7fef95 100644 --- a/client/src/features/session/components/ShowSession.tsx +++ b/client/src/features/session/components/ShowSession.tsx @@ -65,7 +65,7 @@ export default function ShowSession() { ).ANONYMOUS_SESSIONS; const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); const { server: sessionName } = useParams<{ server: string }>(); @@ -91,10 +91,10 @@ interface ShowSessionFullscreenProps { function ShowSessionFullscreen({ sessionName }: ShowSessionFullscreenProps) { const pathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const path = useSelector( - (state) => state.stateModel.project.metadata.path + (state) => state.stateModel.project.metadata.path, ); const sessionsListUrl = Url.get(Url.pages.project.session, { @@ -119,16 +119,16 @@ function ShowSessionFullscreen({ sessionName }: ShowSessionFullscreenProps) { const [showModalAboutData, setShowModalAboutData] = useState(false); const toggleModalAbout = useCallback( () => setShowModalAboutData((show) => !show), - [] + [], ); const [showModalResourcesData, setShowModalResourcesData] = useState(false); const toggleModalResources = useCallback( () => setShowModalResourcesData((show) => !show), - [] + [], ); const [activeResourcesTab, setActiveResourcesTab] = useState( - SESSION_TABS.commands + SESSION_TABS.commands, ); const toggleToResourcesLogs = useCallback(() => { setActiveResourcesTab(SESSION_TABS.logs); @@ -142,19 +142,19 @@ function ShowSessionFullscreen({ sessionName }: ShowSessionFullscreenProps) { const [showModalStopSession, setShowModalStopSession] = useState(false); const toggleStopSession = useCallback( () => setShowModalStopSession((show) => !show), - [] + [], ); const [showModalSaveSession, setShowModalSaveSession] = useState(false); const toggleSaveSession = useCallback( () => setShowModalSaveSession((show) => !show), - [] + [], ); const [showModalPullSession, setShowModalPullSession] = useState(false); const togglePullSession = useCallback( () => setShowModalPullSession((show) => !show), - [] + [], ); const { height } = useWindowSize(); @@ -255,7 +255,7 @@ function ShowSessionFullscreen({ sessionName }: ShowSessionFullscreenProps) { "d-flex", "gap-3", "flex-grow-0", - "align-items-center" + "align-items-center", )} > @@ -271,7 +271,7 @@ function ShowSessionFullscreen({ sessionName }: ShowSessionFullscreenProps) { "justify-content-between", "bg-primary", "flex-grow-1", - "py-2" + "py-2", )} >
@@ -312,7 +312,7 @@ function PullSessionBtn({ togglePullSession }: PullSessionBtnProps) { "bg-transparent", "text-dark", "p-0", - "no-focus" + "no-focus", )} data-cy="pull-changes-button" id="pull-changes-button" @@ -344,7 +344,7 @@ function SaveSessionBtn({ toggleSaveSession }: SaveSessionProps) { "bg-transparent", "text-dark", "p-0", - "no-focus" + "no-focus", )} id="save-session-button" innerRef={ref} @@ -374,7 +374,7 @@ function ResourcesBtn({ toggleModalResources }: ResourcesProps) { "bg-transparent", "text-dark", "p-0", - "no-focus" + "no-focus", )} data-cy="resources-button" id="resources-button" @@ -396,7 +396,7 @@ interface StopSessionBtnProps { } function StopSessionBtn({ toggleStopSession }: StopSessionBtnProps) { const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); const ref = useRef(null); @@ -417,7 +417,7 @@ function StopSessionBtn({ toggleStopSession }: StopSessionBtnProps) { "bg-transparent", "text-dark", "p-0", - "no-focus" + "no-focus", )} data-cy={buttonId} id={buttonId} @@ -447,7 +447,7 @@ function AboutBtn({ toggleModalAbout, projectName }: AboutBtnProps) { "no-focus", "text-rk-green", "p-0", - "fw-bold" + "fw-bold", )} data-cy="about-button" onClick={toggleModalAbout} diff --git a/client/src/features/session/components/SimpleSessionButton.tsx b/client/src/features/session/components/SimpleSessionButton.tsx index 02841b6458..43e436dd74 100644 --- a/client/src/features/session/components/SimpleSessionButton.tsx +++ b/client/src/features/session/components/SimpleSessionButton.tsx @@ -47,7 +47,7 @@ export default function SimpleSessionButton({ "btn-rk-green", "btn-icon-text", "start-session-button", - className_ + className_, ); const sessionAutostartUrl = Url.get(Url.pages.project.session.autostart, { @@ -99,7 +99,7 @@ function ResumeOrConnectButton({ const history = useHistory(); const annotations = NotebooksHelper.cleanAnnotations( - runningSession.annotations + runningSession.annotations, ) as Session["annotations"]; const showSessionUrl = Url.get(Url.pages.project.session.show, { namespace: annotations.namespace, @@ -119,7 +119,7 @@ function ResumeOrConnectButton({ resumeSession({ sessionName: runningSession.name, state: "running" }); setIsResuming(true); }, - [resumeSession, runningSession.name] + [resumeSession, runningSession.name], ); const { isWaiting: isWaitingForResumedSession } = useWaitForSessionStatus({ desiredStatus: ["starting", "running"], diff --git a/client/src/features/session/components/StartNewSession.tsx b/client/src/features/session/components/StartNewSession.tsx index 70bc854576..3f097cc857 100644 --- a/client/src/features/session/components/StartNewSession.tsx +++ b/client/src/features/session/components/StartNewSession.tsx @@ -81,12 +81,12 @@ export default function StartNewSession() { const location = useLocation(); const searchParams = useMemo( () => new URLSearchParams(location.search), - [location.search] + [location.search], ); const autostart = !!searchParams.get("autostart"); const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); const { starting, error } = useStartSessionSelector(); @@ -148,7 +148,7 @@ export default function StartNewSession() { function BackButton() { const pathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const projectUrlData = { namespace: "", @@ -163,8 +163,8 @@ function BackButton() { from && filePath ? `Back to ${filePath}` : from - ? "Back to notebook file" - : `Back to ${pathWithNamespace}`; + ? "Back to notebook file" + : `Back to ${pathWithNamespace}`; return ; } @@ -176,10 +176,10 @@ interface LocationState { function SessionStarting() { const namespace = useSelector( - (state) => state.stateModel.project.metadata.namespace + (state) => state.stateModel.project.metadata.namespace, ); const path = useSelector( - (state) => state.stateModel.project.metadata.path + (state) => state.stateModel.project.metadata.path, ); const steps = useStartSessionSelector(({ steps }) => steps); @@ -200,7 +200,7 @@ function SessionStarting() { setError({ error: "backend-error", errorMessage, - }) + }), ); } }, [dispatch, error]); @@ -235,7 +235,7 @@ function SessionStarting() { function SessionStartError() { const { error, errorMessage } = useStartSessionSelector( - ({ error, errorMessage }) => ({ error, errorMessage }) + ({ error, errorMessage }) => ({ error, errorMessage }), ); if (!error) { @@ -311,7 +311,7 @@ function SessionStartError() { function SessionStartSidebar() { const pathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); return ( @@ -341,7 +341,7 @@ function SessionStartSidebar() { function ProjectSessionLockAlert() { const lockStatus = useSelector( - (state) => state.stateModel.project.lockStatus + (state) => state.stateModel.project.lockStatus, ); if (lockStatus == null || !lockStatus.locked) { @@ -363,12 +363,12 @@ function StartNewSessionContent() { const location = useLocation(); const searchParams = useMemo( () => new URLSearchParams(location.search), - [location.search] + [location.search], ); const showCreateLink = !!searchParams.get("showCreateLink"); const projectPathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const projectSessions = useProjectSessions({ projectPathWithNamespace }); const validSessions = useMemo( @@ -376,10 +376,10 @@ function StartNewSessionContent() { projectSessions != null ? Object.values(projectSessions).filter( ({ status }) => - status.state !== "failed" && status.state !== "stopping" + status.state !== "failed" && status.state !== "stopping", ) : null, - [projectSessions] + [projectSessions], ); if (validSessions == null) { @@ -429,15 +429,15 @@ function SessionCreateLink() { const location = useLocation(); const searchParams = useMemo( () => new URLSearchParams(location.search), - [location.search] + [location.search], ); const filePath = searchParams.get("filePath") ?? ""; const namespace = useSelector( - (state) => state.stateModel.project.metadata.namespace + (state) => state.stateModel.project.metadata.namespace, ); const project = useSelector( - (state) => state.stateModel.project.metadata.path + (state) => state.stateModel.project.metadata.path, ); const { branch, commit, environmentVariables } = @@ -484,7 +484,7 @@ function SessionSaveWarning() { const location = useLocation(); const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); const { accessLevel, externalUrl } = useSelector< RootStateOrAny, @@ -504,7 +504,7 @@ function SessionSaveWarning() { role="text" title="Sessions" url={Docs.rtdHowToGuide( - "renkulab/session-stopping-and-saving.html" + "renkulab/session-stopping-and-saving.html", )} /> , but you cannot save your work. @@ -614,16 +614,16 @@ function StartSessionButton() { const location = useLocation(); const searchParams = useMemo( () => new URLSearchParams(location.search), - [location.search] + [location.search], ); const showCreateLink = !!searchParams.get("showCreateLink"); const filePath = searchParams.get("filePath") ?? ""; const namespace = useSelector( - (state) => state.stateModel.project.metadata.namespace + (state) => state.stateModel.project.metadata.namespace, ); const project = useSelector( - (state) => state.stateModel.project.metadata.path + (state) => state.stateModel.project.metadata.path, ); const { @@ -647,11 +647,11 @@ function StartSessionButton() { const providedSensitiveFields = getProvidedSensitiveFields(configuration); const requiredSensitiveFields = sensitive_fields?.filter(({ name }) => - providedSensitiveFields.includes(name) + providedSensitiveFields.includes(name), ); return requiredSensitiveFields?.find(({ value }) => !value); }), - [cloudStorage] + [cloudStorage], ); const enabled = @@ -670,7 +670,7 @@ function StartSessionButton() { .filter(({ name, value }) => name && value) .reduce( (obj, { name, value }) => ({ ...obj, [name]: value }), - {} as Record + {} as Record, ); const imageValidated = @@ -684,7 +684,7 @@ function StartSessionButton() { status: StatusStepProgressBar.EXECUTING, step: "Requesting session", }, - ]) + ]), ); startSession({ branch, diff --git a/client/src/features/session/components/StartSessionProgressBar.tsx b/client/src/features/session/components/StartSessionProgressBar.tsx index 643a676f20..744bcd2b9b 100644 --- a/client/src/features/session/components/StartSessionProgressBar.tsx +++ b/client/src/features/session/components/StartSessionProgressBar.tsx @@ -60,7 +60,7 @@ export default function StartSessionProgressBar({ } function getStatusData( - status: Pick | undefined + status: Pick | undefined, ): StepsProgressBar[] { const { details, state } = status ?? {}; diff --git a/client/src/features/session/components/StopSessionModal.tsx b/client/src/features/session/components/StopSessionModal.tsx index 999691b321..4c460f14f3 100644 --- a/client/src/features/session/components/StopSessionModal.tsx +++ b/client/src/features/session/components/StopSessionModal.tsx @@ -64,7 +64,7 @@ export default function StopSessionModal({ toggleModal, }: StopSessionModalProps) { const logged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); if (!logged) { @@ -94,7 +94,7 @@ function AnonymousStopSessionModal({ toggleModal, }: StopSessionModalProps) { const pathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const sessionsListUrl = Url.get(Url.pages.project.session, { namespace: "", @@ -177,7 +177,7 @@ function HibernateSessionModal({ toggleModal, }: StopSessionModalProps) { const pathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const sessionsListUrl = Url.get(Url.pages.project.session, { namespace: "", @@ -216,12 +216,12 @@ function HibernateSessionModal({ const annotations = session ? (NotebooksHelper.cleanAnnotations( - session.annotations + session.annotations, ) as NotebookAnnotations) : null; const hibernatedSecondsThreshold = parseInt( annotations?.hibernatedSecondsThreshold ?? "", - 10 + 10, ); const duration = isNaN(hibernatedSecondsThreshold) ? Duration.fromISO("") @@ -290,14 +290,14 @@ function addErrorNotification({ "message" in error && error.message != null ? error.message : "error" in error && error.error != null - ? error.error - : "Unknown error"; + ? error.error + : "Unknown error"; notifications.addError( NOTIFICATION_TOPICS.SESSION_START, "Unable to stop the current session", undefined, undefined, undefined, - `Error message: "${message}"` + `Error message: "${message}"`, ); } diff --git a/client/src/features/session/components/options/AutostartSessionOptions.tsx b/client/src/features/session/components/options/AutostartSessionOptions.tsx index d529502df2..6d1dff4e23 100644 --- a/client/src/features/session/components/options/AutostartSessionOptions.tsx +++ b/client/src/features/session/components/options/AutostartSessionOptions.tsx @@ -72,22 +72,22 @@ export default function AutostartSessionOptions() { function useAutostartSessionOptions(): void { const defaultBranch = useSelector( - (state) => state.stateModel.project.metadata.defaultBranch + (state) => state.stateModel.project.metadata.defaultBranch, ); const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const projectRepositoryUrl = useSelector( - (state) => state.stateModel.project.metadata.externalUrl + (state) => state.stateModel.project.metadata.externalUrl, ); const namespace = useSelector( - (state) => state.stateModel.project.metadata.namespace + (state) => state.stateModel.project.metadata.namespace, ); const project = useSelector( - (state) => state.stateModel.project.metadata.path + (state) => state.stateModel.project.metadata.path, ); const projectPathWithNamespace = useSelector( - (state) => state.stateModel.project.metadata.pathWithNamespace + (state) => state.stateModel.project.metadata.pathWithNamespace, ); const projectSessions = useProjectSessions({ projectPathWithNamespace }); const validSessions = useMemo( @@ -95,10 +95,10 @@ function useAutostartSessionOptions(): void { projectSessions != null ? Object.values(projectSessions).filter( ({ status }) => - status.state !== "failed" && status.state !== "stopping" + status.state !== "failed" && status.state !== "stopping", ) : null, - [projectSessions] + [projectSessions], ); const { @@ -118,7 +118,7 @@ function useAutostartSessionOptions(): void { { projectId: `${gitLabProjectId ?? 0}`, }, - { skip: !gitLabProjectId } + { skip: !gitLabProjectId }, ); const { data: commits, isFetching: commitsIsFetching } = useGetRepositoryCommitsQuery( @@ -126,7 +126,7 @@ function useAutostartSessionOptions(): void { branch: currentBranch, projectId: `${gitLabProjectId ?? 0}`, }, - { skip: !gitLabProjectId || !currentBranch } + { skip: !gitLabProjectId || !currentBranch }, ); const { coreSupport } = useCoreSupport({ gitUrl: projectRepositoryUrl ?? undefined, @@ -159,7 +159,7 @@ function useAutostartSessionOptions(): void { projectConfig?.config.sessions?.legacyConfig?.memoryRequest, storageRequest: projectConfig?.config.sessions?.storage, }, - { skip: !projectConfig } + { skip: !projectConfig }, ); const { data: notebooksVersion, isFetching: notebooksVersionIsFetching } = useGetNotebooksVersionsQuery(); @@ -174,7 +174,7 @@ function useAutostartSessionOptions(): void { notebooksVersion.cloudStorageEnabled.s3 || notebooksVersion.cloudStorageEnabled.azureBlob ), - } + }, ); const currentSessionClass = useMemo( @@ -182,7 +182,7 @@ function useAutostartSessionOptions(): void { resourcePools ?.flatMap(({ classes }) => classes) .find((c) => c.id === currentSessionClassId) ?? null, - [currentSessionClassId, resourcePools] + [currentSessionClassId, resourcePools], ); // Select default options @@ -210,7 +210,7 @@ function useAutostartSessionOptions(): void { setError({ error: "backend-error", errorMessage: "Error: This project is not supported", - }) + }), ); } }, [backendAvailable, coreSupportComputed, dispatch]); @@ -220,7 +220,7 @@ function useAutostartSessionOptions(): void { setError({ error: "backend-error", errorMessage: "Error while loading project configuration", - }) + }), ); } }, [dispatch, errorProjectConfig]); @@ -269,14 +269,14 @@ function useAutostartSessionOptions(): void { status: StatusStepProgressBar.WAITING, step: "Requesting session", }, - ]) + ]), ); }, [dispatch]); useEffect(() => { if (validSessions != null && validSessions.length == 0) { dispatch( - updateStepStatus({ id: 0, status: StatusStepProgressBar.READY }) + updateStepStatus({ id: 0, status: StatusStepProgressBar.READY }), ); return; } @@ -288,14 +288,14 @@ function useAutostartSessionOptions(): void { useEffect(() => { if (branchesIsFetching) { dispatch( - updateStepStatus({ id: 1, status: StatusStepProgressBar.EXECUTING }) + updateStepStatus({ id: 1, status: StatusStepProgressBar.EXECUTING }), ); } }, [branchesIsFetching, dispatch]); useEffect(() => { if (branches != null) { dispatch( - updateStepStatus({ id: 1, status: StatusStepProgressBar.READY }) + updateStepStatus({ id: 1, status: StatusStepProgressBar.READY }), ); } }, [branches, dispatch]); @@ -303,14 +303,14 @@ function useAutostartSessionOptions(): void { useEffect(() => { if (commitsIsFetching) { dispatch( - updateStepStatus({ id: 2, status: StatusStepProgressBar.EXECUTING }) + updateStepStatus({ id: 2, status: StatusStepProgressBar.EXECUTING }), ); } }, [commitsIsFetching, dispatch]); useEffect(() => { if (commits != null) { dispatch( - updateStepStatus({ id: 2, status: StatusStepProgressBar.READY }) + updateStepStatus({ id: 2, status: StatusStepProgressBar.READY }), ); } }, [commits, dispatch]); @@ -318,14 +318,14 @@ function useAutostartSessionOptions(): void { useEffect(() => { if (projectConfigIsFetching) { dispatch( - updateStepStatus({ id: 3, status: StatusStepProgressBar.EXECUTING }) + updateStepStatus({ id: 3, status: StatusStepProgressBar.EXECUTING }), ); } }, [dispatch, projectConfigIsFetching]); useEffect(() => { if (projectConfig != null) { dispatch( - updateStepStatus({ id: 3, status: StatusStepProgressBar.READY }) + updateStepStatus({ id: 3, status: StatusStepProgressBar.READY }), ); } }, [dispatch, projectConfig]); @@ -333,14 +333,14 @@ function useAutostartSessionOptions(): void { useEffect(() => { if (dockerImageStatus === "unknown") { dispatch( - updateStepStatus({ id: 4, status: StatusStepProgressBar.EXECUTING }) + updateStepStatus({ id: 4, status: StatusStepProgressBar.EXECUTING }), ); } }, [dispatch, dockerImageStatus]); useEffect(() => { if (dockerImageStatus === "available") { dispatch( - updateStepStatus({ id: 4, status: StatusStepProgressBar.READY }) + updateStepStatus({ id: 4, status: StatusStepProgressBar.READY }), ); } }, [dispatch, dockerImageStatus]); @@ -358,14 +358,14 @@ function useAutostartSessionOptions(): void { useEffect(() => { if (resourcePoolsIsFetching) { dispatch( - updateStepStatus({ id: 5, status: StatusStepProgressBar.EXECUTING }) + updateStepStatus({ id: 5, status: StatusStepProgressBar.EXECUTING }), ); } }, [dispatch, resourcePoolsIsFetching]); useEffect(() => { if (resourcePools != null) { dispatch( - updateStepStatus({ id: 5, status: StatusStepProgressBar.READY }) + updateStepStatus({ id: 5, status: StatusStepProgressBar.READY }), ); } }, [dispatch, resourcePools]); @@ -373,14 +373,14 @@ function useAutostartSessionOptions(): void { useEffect(() => { if (notebooksVersionIsFetching || storageIsFetching) { dispatch( - updateStepStatus({ id: 6, status: StatusStepProgressBar.EXECUTING }) + updateStepStatus({ id: 6, status: StatusStepProgressBar.EXECUTING }), ); } }, [dispatch, notebooksVersionIsFetching, storageIsFetching]); useEffect(() => { if (storageForProject != null) { dispatch( - updateStepStatus({ id: 6, status: StatusStepProgressBar.READY }) + updateStepStatus({ id: 6, status: StatusStepProgressBar.READY }), ); } }, [dispatch, storageForProject]); @@ -405,7 +405,7 @@ function useAutostartSessionOptions(): void { updateStepStatus({ id: 7, status: StatusStepProgressBar.EXECUTING, - }) + }), ); startSession({ branch: currentBranch, diff --git a/client/src/features/session/components/options/SessionBranchOption.tsx b/client/src/features/session/components/options/SessionBranchOption.tsx index d47fed1ba8..953e58a4e7 100644 --- a/client/src/features/session/components/options/SessionBranchOption.tsx +++ b/client/src/features/session/components/options/SessionBranchOption.tsx @@ -46,13 +46,13 @@ import styles from "./SessionBranchOption.module.scss"; export default function SessionBranchOption() { const defaultBranch = useSelector( - (state) => state.stateModel.project.metadata.defaultBranch + (state) => state.stateModel.project.metadata.defaultBranch, ); const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const externalUrl = useSelector( - (state) => state.stateModel.project.metadata.externalUrl + (state) => state.stateModel.project.metadata.externalUrl, ); const { @@ -64,7 +64,7 @@ export default function SessionBranchOption() { { projectId: `${gitLabProjectId ?? 0}`, }, - { skip: !gitLabProjectId } + { skip: !gitLabProjectId }, ); const currentBranch = useStartSessionOptionsSelector(({ branch }) => branch); @@ -78,7 +78,7 @@ export default function SessionBranchOption() { dispatch(setBranch(branch.name)); } }, - [branches, dispatch] + [branches, dispatch], ); useDefaultBranchOption({ branches, defaultBranch }); @@ -94,7 +94,7 @@ export default function SessionBranchOption() { const filteredBranches = includeMergedBranches ? branches : branches?.filter( - (branch) => !branch.merged || branch.name === currentBranch + (branch) => !branch.merged || branch.name === currentBranch, ); if (isFetching) { diff --git a/client/src/features/session/components/options/SessionClassOption.tsx b/client/src/features/session/components/options/SessionClassOption.tsx index c4608cf4df..b2d3a01d56 100644 --- a/client/src/features/session/components/options/SessionClassOption.tsx +++ b/client/src/features/session/components/options/SessionClassOption.tsx @@ -53,13 +53,13 @@ import styles from "./SessionClassOption.module.scss"; export const SessionClassOption = () => { // Project options const projectRepositoryUrl = useSelector( - (state) => state.stateModel.project.metadata.externalUrl + (state) => state.stateModel.project.metadata.externalUrl, ); const defaultBranch = useSelector( - (state) => state.stateModel.project.metadata.defaultBranch + (state) => state.stateModel.project.metadata.defaultBranch, ); const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const { coreSupport } = useCoreSupport({ gitUrl: projectRepositoryUrl ?? undefined, @@ -94,7 +94,7 @@ export const SessionClassOption = () => { projectConfig?.config.sessions?.legacyConfig?.memoryRequest, storageRequest: projectConfig?.config.sessions?.storage, }, - { skip: !projectConfig } + { skip: !projectConfig }, ); const defaultSessionClass = useMemo( @@ -102,7 +102,7 @@ export const SessionClassOption = () => { resourcePools?.flatMap((pool) => pool.classes).find((c) => c.default) ?? resourcePools?.find(() => true)?.classes[0] ?? undefined, - [resourcePools] + [resourcePools], ); const { sessionClass: currentSessionClassId } = @@ -112,7 +112,7 @@ export const SessionClassOption = () => { resourcePools ?.flatMap((pool) => pool.classes) .find((c) => c.id == currentSessionClassId), - [currentSessionClassId, resourcePools] + [currentSessionClassId, resourcePools], ); const dispatch = useDispatch(); @@ -122,7 +122,7 @@ export const SessionClassOption = () => { dispatch(setSessionClass(newValue?.id)); } }, - [dispatch] + [dispatch], ); // Set initial session class @@ -236,7 +236,7 @@ function SessionRequirements({ "flex-row", "flex-wrap", styles.requirements, - currentSessionClassNotMatching && styles.requirementsNotMet + currentSessionClassNotMatching && styles.requirementsNotMet, )} > Session requirements: @@ -295,7 +295,7 @@ function SessionClassWarning({
This session class does @@ -321,7 +321,7 @@ export const SessionClassSelector = ({ }: SessionClassSelectorProps) => { const options = useMemo( () => makeGroupedOptions(resourcePools), - [resourcePools] + [resourcePools], ); return ( @@ -362,7 +362,7 @@ const selectClassNames: ClassNamesConfig = { "border", "py-2", styles.control, - menuIsOpen && styles.controlIsOpen + menuIsOpen && styles.controlIsOpen, ), dropdownIndicator: () => cx("pe-3"), groupHeading: () => cx("pt-1", "px-3", "text-uppercase", styles.groupHeading), @@ -377,7 +377,7 @@ const selectClassNames: ClassNamesConfig = { "py-1", styles.option, isFocused && styles.optionIsFocused, - !isFocused && isSelected && styles.optionIsSelected + !isFocused && isSelected && styles.optionIsSelected, ), placeholder: () => cx("px-3"), singleValue: () => cx("d-grid", "gap-1", "px-3", styles.singleValue), @@ -424,7 +424,7 @@ const OptionOrSingleValueContent = ({ "text-wrap", "text-break", styles.label, - sessionClass.matching && styles.labelMatches + sessionClass.matching && styles.labelMatches, ); const detailValueClassName = cx(styles.detail, styles.detailValue); const detailLabelClassName = cx(styles.detail, styles.detailLabel); diff --git a/client/src/features/session/components/options/SessionCloudStorageOption.tsx b/client/src/features/session/components/options/SessionCloudStorageOption.tsx index 99cef48651..26d84107a5 100644 --- a/client/src/features/session/components/options/SessionCloudStorageOption.tsx +++ b/client/src/features/session/components/options/SessionCloudStorageOption.tsx @@ -145,7 +145,7 @@ function CloudStorageList() { const devAccess = accessLevel >= ACCESS_LEVELS.DEVELOPER; const cloudStorageList = useStartSessionOptionsSelector( - ({ cloudStorage }) => cloudStorage + ({ cloudStorage }) => cloudStorage, ); const dispatch = useDispatch(); @@ -159,12 +159,12 @@ function CloudStorageList() { { project_id: `${projectId}`, }, - { skip: !devAccess } + { skip: !devAccess }, ); const support = useMemo( () => (notebooksVersion?.cloudStorageEnabled.s3 ? "s3" : "azure"), - [notebooksVersion?.cloudStorageEnabled] + [notebooksVersion?.cloudStorageEnabled], ); // Populate session cloud storage from project's settings @@ -190,7 +190,7 @@ function CloudStorageList() { } : {}), ...storage, - }) + }), ); dispatch(setCloudStorage(initialCloudStorage)); }, [dispatch, storageForProject, support]); @@ -245,14 +245,14 @@ function CloudStorageItem({ index, storage }: CloudStorageItemProps) { const providedSensitiveFields = useMemo( () => getProvidedSensitiveFields(configuration), - [configuration] + [configuration], ); const requiredSensitiveFields = useMemo( () => sensitive_fields?.filter(({ name }) => - providedSensitiveFields.includes(name) + providedSensitiveFields.includes(name), ), - [providedSensitiveFields, sensitive_fields] + [providedSensitiveFields, sensitive_fields], ); const [isOpen, setIsOpen] = useState(false); @@ -267,7 +267,7 @@ function CloudStorageItem({ index, storage }: CloudStorageItemProps) { updateCloudStorageItem({ index, storage: { ...storage, active: !storage.active }, - }) + }), ); }, [dispatch, index, storage]); const onChangeCredential = useCallback( @@ -291,10 +291,10 @@ function CloudStorageItem({ index, storage }: CloudStorageItemProps) { ...storage, sensitive_fields: newSensitiveFields, }, - }) + }), ); }, - [dispatch, index, sensitive_fields, storage] + [dispatch, index, sensitive_fields, storage], ); const onRemoveItem = useCallback(() => { dispatch(removeCloudStorageItem({ index: index })); @@ -323,7 +323,7 @@ function CloudStorageItem({ index, storage }: CloudStorageItemProps) { "fw-bold", "m-0", "ms-2", - !active && ["text-decoration-line-through", "text-rk-text-light"] + !active && ["text-decoration-line-through", "text-rk-text-light"], )} > {name} @@ -334,7 +334,7 @@ function CloudStorageItem({ index, storage }: CloudStorageItemProps) { className={cx( "fst-italic", "fw-normal", - "text-rk-text-light" + "text-rk-text-light", )} > (temporary) @@ -358,7 +358,7 @@ function CloudStorageItem({ index, storage }: CloudStorageItemProps) { "bg-transparent", "border-0", "text-danger", - "p-0" + "p-0", )} onClick={onRemoveItem} > @@ -419,7 +419,7 @@ function CloudStorageItem({ index, storage }: CloudStorageItemProps) { "py-2", "bg-transparent", "border-0", - "border-top" + "border-top", )} onClick={toggle} type="button" @@ -472,18 +472,18 @@ function CloudStorageDetails({ index, storage }: CloudStorageItemProps) { const providedSensitiveFields = useMemo( () => getProvidedSensitiveFields(configuration), - [configuration] + [configuration], ); const requiredSensitiveFields = useMemo( () => storage.sensitive_fields?.filter(({ name }) => - providedSensitiveFields.includes(name) + providedSensitiveFields.includes(name), ), - [providedSensitiveFields, storage.sensitive_fields] + [providedSensitiveFields, storage.sensitive_fields], ); const configCredentials = (requiredSensitiveFields ?? []).reduce( (prev, { name, value }) => ({ ...prev, [name]: value }), - {} as Record + {} as Record, ); const configWithCredentials = { ...configuration, ...configCredentials }; const configContent = formatCloudStorageConfiguration({ @@ -500,10 +500,10 @@ function CloudStorageDetails({ index, storage }: CloudStorageItemProps) { updateCloudStorageItem({ index, storage: { ...storage, source_path: value }, - }) + }), ); }, - [dispatch, index, storage] + [dispatch, index, storage], ); const onChangeTargetPath = useCallback( (event: ChangeEvent) => { @@ -512,17 +512,17 @@ function CloudStorageDetails({ index, storage }: CloudStorageItemProps) { updateCloudStorageItem({ index, storage: { ...storage, target_path: value }, - }) + }), ); }, - [dispatch, index, storage] + [dispatch, index, storage], ); const onChangeReadWriteMode = useCallback(() => { dispatch( updateCloudStorageItem({ index, storage: { ...storage, readonly: !storage.readonly }, - }) + }), ); }, [dispatch, index, storage]); @@ -531,7 +531,7 @@ function CloudStorageDetails({ index, storage }: CloudStorageItemProps) { (event: ChangeEvent) => { setTempConfigContent(event.target.value); }, - [] + [], ); const onUpdateConfiguration = useCallback(() => { const parsedConfiguration = @@ -545,30 +545,30 @@ function CloudStorageDetails({ index, storage }: CloudStorageItemProps) { sensitiveFieldKeys.includes(key) ? [[key, CLOUD_STORAGE_SENSITIVE_FIELD_TOKEN] as const] : parsedConfiguration[key] != null - ? [[key, parsedConfiguration[key]] as const] - : [] + ? [[key, parsedConfiguration[key]] as const] + : [], ) .reduce( (obj, [key, value]) => ({ ...obj, [key]: value }), - {} as Record + {} as Record, ); const updatedNewConfiguration = Object.entries(parsedConfiguration) .filter(([key]) => !Object.keys(updateCloudStorageItem).includes(key)) .map(([key, value]) => sensitiveFieldKeys.includes(key) ? ([key, CLOUD_STORAGE_SENSITIVE_FIELD_TOKEN] as const) - : ([key, value] as const) + : ([key, value] as const), ) .reduce( (obj, [key, value]) => ({ ...obj, [key]: value }), - {} as Record + {} as Record, ); const updatedSensitiveFields = storage.sensitive_fields?.map( ({ name, help }) => parsedConfiguration[name] != null ? { name, help, value: parsedConfiguration[name] } - : { name, help, value: "" } + : { name, help, value: "" }, ); dispatch( @@ -582,7 +582,7 @@ function CloudStorageDetails({ index, storage }: CloudStorageItemProps) { }, sensitive_fields: updatedSensitiveFields, }, - }) + }), ); }, [configuration, dispatch, index, storage, tempConfigContent]); @@ -766,7 +766,7 @@ function AddTemporaryCloudStorageModal({ const configuration = parseCloudStorageConfiguration(data.configuration); validateCloudStorageConfiguration({ configuration }); }, - [validateCloudStorageConfiguration] + [validateCloudStorageConfiguration], ); useEffect(() => { @@ -785,7 +785,7 @@ function AddTemporaryCloudStorageModal({ storage_type: "", supported: true, target_path: data.name, - }) + }), ); toggle(); } @@ -918,7 +918,7 @@ function AddTemporaryCloudStorageModal({ ( - (state) => state.stateModel.project.metadata.defaultBranch + (state) => state.stateModel.project.metadata.defaultBranch, ); const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const currentBranch = useStartSessionOptionsSelector(({ branch }) => branch); @@ -63,7 +63,7 @@ export default function SessionCommitOption() { branch: currentBranch, projectId: `${gitLabProjectId ?? 0}`, }, - { skip: !gitLabProjectId || !currentBranch } + { skip: !gitLabProjectId || !currentBranch }, ); const dispatch = useDispatch(); @@ -73,7 +73,7 @@ export default function SessionCommitOption() { dispatch(setCommit(commitSha)); } }, - [dispatch] + [dispatch], ); useDefaultCommitOption({ commits }); @@ -169,7 +169,7 @@ function CommitOptionsButton({ (event: ChangeEvent) => { onChangeLimit(event.target.valueAsNumber); }, - [onChangeLimit] + [onChangeLimit], ); return ( diff --git a/client/src/features/session/components/options/SessionDockerImage.tsx b/client/src/features/session/components/options/SessionDockerImage.tsx index de8268ff44..e7fd97f916 100644 --- a/client/src/features/session/components/options/SessionDockerImage.tsx +++ b/client/src/features/session/components/options/SessionDockerImage.tsx @@ -26,13 +26,13 @@ import SessionProjectDockerImage from "./SessionProjectDockerImage"; export default function SessionDockerImage() { const projectRepositoryUrl = useSelector( - (state) => state.stateModel.project.metadata.externalUrl + (state) => state.stateModel.project.metadata.externalUrl, ); const defaultBranch = useSelector( - (state) => state.stateModel.project.metadata.defaultBranch + (state) => state.stateModel.project.metadata.defaultBranch, ); const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const { coreSupport } = useCoreSupport({ gitUrl: projectRepositoryUrl ?? undefined, diff --git a/client/src/features/session/components/options/SessionEnvironmentVariables.tsx b/client/src/features/session/components/options/SessionEnvironmentVariables.tsx index ff88796f7e..c098ec4bc8 100644 --- a/client/src/features/session/components/options/SessionEnvironmentVariables.tsx +++ b/client/src/features/session/components/options/SessionEnvironmentVariables.tsx @@ -33,7 +33,7 @@ import { export default function SessionEnvironmentVariables() { const environmentVariables = useStartSessionOptionsSelector( - ({ environmentVariables }) => environmentVariables + ({ environmentVariables }) => environmentVariables, ); const dispatch = useDispatch(); @@ -89,7 +89,7 @@ interface EnvironmentVariableProps { function EnvironmentVariable({ index, name, value }: EnvironmentVariableProps) { const environmentVariables = useStartSessionOptionsSelector( - ({ environmentVariables }) => environmentVariables + ({ environmentVariables }) => environmentVariables, ); const hasDuplicate = useMemo( @@ -97,7 +97,7 @@ function EnvironmentVariable({ index, name, value }: EnvironmentVariableProps) { !!name && environmentVariables.filter((variable) => variable.name === name).length > 1, - [environmentVariables, name] + [environmentVariables, name], ); const dispatch = useDispatch(); @@ -113,10 +113,10 @@ function EnvironmentVariable({ index, name, value }: EnvironmentVariableProps) { name: event.target.value, value, }, - }) + }), ); }, - [dispatch, index, value] + [dispatch, index, value], ); const onUpdateValue = useCallback( (event: ChangeEvent) => { @@ -127,10 +127,10 @@ function EnvironmentVariable({ index, name, value }: EnvironmentVariableProps) { name, value: event.target.value, }, - }) + }), ); }, - [dispatch, index, name] + [dispatch, index, name], ); return ( diff --git a/client/src/features/session/components/options/SessionPinnedDockerImage.tsx b/client/src/features/session/components/options/SessionPinnedDockerImage.tsx index be79336244..514a37c68d 100644 --- a/client/src/features/session/components/options/SessionPinnedDockerImage.tsx +++ b/client/src/features/session/components/options/SessionPinnedDockerImage.tsx @@ -45,7 +45,7 @@ export default function SessionPinnedDockerImage({ dockerImage, }: SessionPinnedDockerImageProps) { const status = useStartSessionOptionsSelector( - ({ dockerImageStatus }) => dockerImageStatus + ({ dockerImageStatus }) => dockerImageStatus, ); const { data: dockerImageStatus, isLoading } = useGetDockerImageQuery( @@ -57,7 +57,7 @@ export default function SessionPinnedDockerImage({ status === "not-available" ? SESSION_CI_PIPELINE_POLLING_INTERVAL_MS : 0, - } + }, ); const [show, setShow] = useState(false); @@ -75,10 +75,10 @@ export default function SessionPinnedDockerImage({ const newStatus: DockerImageStatus = isLoading ? "unknown" : dockerImageStatus == null - ? "not-available" - : dockerImageStatus.available - ? "available" - : "not-available"; + ? "not-available" + : dockerImageStatus.available + ? "available" + : "not-available"; if (newStatus !== status) { dispatch(setDockerImageStatus(newStatus)); } diff --git a/client/src/features/session/components/options/SessionProjectDockerImage.tsx b/client/src/features/session/components/options/SessionProjectDockerImage.tsx index a3106f14d6..3951f1e5c8 100644 --- a/client/src/features/session/components/options/SessionProjectDockerImage.tsx +++ b/client/src/features/session/components/options/SessionProjectDockerImage.tsx @@ -54,7 +54,7 @@ export default function SessionProjectDockerImage() { commit, dockerImageBuildStatus, dockerImageStatus, - }) + }), ); useDockerImageStatusStateMachine(); @@ -148,10 +148,10 @@ export default function SessionProjectDockerImage() { function BuildAgainButton() { const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const accessLevel = useSelector( - (state) => state.stateModel.project.metadata.accessLevel + (state) => state.stateModel.project.metadata.accessLevel, ); const commit = useStartSessionOptionsSelector(({ commit }) => commit); @@ -160,7 +160,7 @@ function BuildAgainButton() { const { data: pipelines } = useGetPipelinesQuery( { commit, projectId: gitLabProjectId ?? 0 }, - { skip: !gitLabProjectId } + { skip: !gitLabProjectId }, ); const { data: pipelineJob } = useGetPipelineJobByNameQuery( @@ -169,7 +169,7 @@ function BuildAgainButton() { pipelineIds: (pipelines ?? []).map(({ id }) => id), projectId: gitLabProjectId ?? 0, }, - { skip: !gitLabProjectId || !pipelines } + { skip: !gitLabProjectId || !pipelines }, ); const [retryPipeline] = useRetryPipelineMutation(); @@ -220,14 +220,14 @@ function BuildAgainButton() { function ViewPipelineLink() { const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const commit = useStartSessionOptionsSelector(({ commit }) => commit); const { data: pipelines } = useGetPipelinesQuery( { commit, projectId: gitLabProjectId ?? 0 }, - { skip: !gitLabProjectId } + { skip: !gitLabProjectId }, ); const { data: pipelineJob } = useGetPipelineJobByNameQuery( @@ -236,7 +236,7 @@ function ViewPipelineLink() { pipelineIds: (pipelines ?? []).map(({ id }) => id), projectId: gitLabProjectId ?? 0, }, - { skip: !gitLabProjectId || !pipelines } + { skip: !gitLabProjectId || !pipelines }, ); const pipelineJobUrl = pipelineJob?.web_url; @@ -269,10 +269,10 @@ function ViewPipelineLink() { function RunPipeline() { const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const accessLevel = useSelector( - (state) => state.stateModel.project.metadata.accessLevel + (state) => state.stateModel.project.metadata.accessLevel, ); const branch = useStartSessionOptionsSelector(({ branch }) => branch); @@ -314,7 +314,7 @@ function RunPipeline() { function useDockerImageStatusStateMachine() { const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const { commit, dockerImageBuildStatus: status } = @@ -360,7 +360,7 @@ function useDockerImageStatusStateMachine() { // ? async dispatch required here because of race conditions with state reset const timeout = window.setTimeout( () => dispatch(setDockerImageBuildStatus("checking-ci-registry-start")), - 0 + 0, ); return () => { window.clearTimeout(timeout); diff --git a/client/src/features/session/components/options/SessionStorageOption.tsx b/client/src/features/session/components/options/SessionStorageOption.tsx index b64a29361c..4cc6e8f91a 100644 --- a/client/src/features/session/components/options/SessionStorageOption.tsx +++ b/client/src/features/session/components/options/SessionStorageOption.tsx @@ -39,13 +39,13 @@ import styles from "./SessionStorageOption.module.scss"; export const SessionStorageOption = () => { // Project options const projectRepositoryUrl = useSelector( - (state) => state.stateModel.project.metadata.externalUrl + (state) => state.stateModel.project.metadata.externalUrl, ); const defaultBranch = useSelector( - (state) => state.stateModel.project.metadata.defaultBranch + (state) => state.stateModel.project.metadata.defaultBranch, ); const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const { coreSupport } = useCoreSupport({ gitUrl: projectRepositoryUrl ?? undefined, @@ -79,7 +79,7 @@ export const SessionStorageOption = () => { projectConfig?.config.sessions?.legacyConfig?.memoryRequest, storageRequest: projectConfig?.config.sessions?.storage, }, - { skip: !projectConfig } + { skip: !projectConfig }, ); const { storage, sessionClass: currentSessionClassId } = @@ -94,7 +94,7 @@ export const SessionStorageOption = () => { .find((c) => c.id === currentSessionClassId) ?? resourcePools?.find(() => true)?.classes[0] ?? undefined, - [currentSessionClassId, resourcePools] + [currentSessionClassId, resourcePools], ); // Set initial storage if configured @@ -125,7 +125,7 @@ export const SessionStorageOption = () => { }); dispatch(setStorage(newValue)); }, - [currentSessionClass, dispatch] + [currentSessionClass, dispatch], ); if (isLoading || !resourcePools || resourcePools.length == 0 || isError) { @@ -169,7 +169,7 @@ export const StorageSelector = ({ styles.container, "d-grid", "gap-sm-3", - "align-items-center" + "align-items-center", )} > { // Project options const projectRepositoryUrl = useSelector( - (state) => state.stateModel.project.metadata.externalUrl + (state) => state.stateModel.project.metadata.externalUrl, ); const defaultBranch = useSelector( - (state) => state.stateModel.project.metadata.defaultBranch + (state) => state.stateModel.project.metadata.defaultBranch, ); const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const { coreSupport } = useCoreSupport({ gitUrl: projectRepositoryUrl ?? undefined, @@ -94,10 +94,10 @@ export const StartNotebookServerOptions = () => { const message = serverOptionsIsLoading ? "Getting RenkuLab settings..." : projectConfigIsLoading - ? "Getting project settings..." - : !coreSupportComputed - ? "Checking project version and RenkuLab compatibility..." - : "Please wait..."; + ? "Getting project settings..." + : !coreSupportComputed + ? "Checking project version and RenkuLab compatibility..." + : "Please wait..."; return (
@@ -140,13 +140,13 @@ const DefaultUrlOption = () => { // Project options const projectRepositoryUrl = useSelector( - (state) => state.stateModel.project.metadata.externalUrl + (state) => state.stateModel.project.metadata.externalUrl, ); const defaultBranch = useSelector( - (state) => state.stateModel.project.metadata.defaultBranch + (state) => state.stateModel.project.metadata.defaultBranch, ); const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const { coreSupport } = useCoreSupport({ gitUrl: projectRepositoryUrl ?? undefined, @@ -183,7 +183,7 @@ const DefaultUrlOption = () => { dispatch(setDefaultUrl(value)); } }, - [dispatch] + [dispatch], ); useDefaultUrlOption({ projectConfig }); @@ -256,13 +256,13 @@ export const mergeDefaultUrlOptions = ({ const AutoFetchLfsOption = () => { // Project options const projectRepositoryUrl = useSelector( - (state) => state.stateModel.project.metadata.externalUrl + (state) => state.stateModel.project.metadata.externalUrl, ); const defaultBranch = useSelector( - (state) => state.stateModel.project.metadata.defaultBranch + (state) => state.stateModel.project.metadata.defaultBranch, ); const gitLabProjectId = useSelector( - (state) => state.stateModel.project.metadata.id ?? null + (state) => state.stateModel.project.metadata.id ?? null, ); const { coreSupport } = useCoreSupport({ gitUrl: projectRepositoryUrl ?? undefined, @@ -284,7 +284,7 @@ const AutoFetchLfsOption = () => { }); const lfsAutoFetch = useStartSessionOptionsSelector( - (state) => state.lfsAutoFetch + (state) => state.lfsAutoFetch, ); const dispatch = useDispatch(); @@ -313,7 +313,7 @@ interface ServerOptionEnumProps { disabled?: boolean; onChange: ( event: React.MouseEvent, - value: T + value: T, ) => void; options: T[]; selected?: T | null | undefined; @@ -423,7 +423,7 @@ export const ServerOptionEnum = ({ }; const approximateButtonGroupSizeInPixels = ( - options: T[] + options: T[], ): number => // padding in x direction options.length * 2 * 10 + diff --git a/client/src/features/session/components/status/SessionHibernationStatusDetails.tsx b/client/src/features/session/components/status/SessionHibernationStatusDetails.tsx index 4d41e3ab0d..32bab70959 100644 --- a/client/src/features/session/components/status/SessionHibernationStatusDetails.tsx +++ b/client/src/features/session/components/status/SessionHibernationStatusDetails.tsx @@ -40,7 +40,7 @@ export default function SessionHibernationStatusDetails({ const hibernatedSecondsThreshold = parseInt( annotations?.hibernatedSecondsThreshold ?? "", - 10 + 10, ); const hibernationThresholdDuration = isNaN(hibernatedSecondsThreshold) ? Duration.fromISO("") diff --git a/client/src/features/session/components/status/SessionStatusBadge.tsx b/client/src/features/session/components/status/SessionStatusBadge.tsx index 2b4c3f92f4..693c5e53a8 100644 --- a/client/src/features/session/components/status/SessionStatusBadge.tsx +++ b/client/src/features/session/components/status/SessionStatusBadge.tsx @@ -56,8 +56,8 @@ export default function SessionStatusBadge({ {status === "failed" ? "Error Details" : status === "running" - ? "Warning Details" - : "Paused Session"} + ? "Warning Details" + : "Paused Session"} {message} @@ -76,7 +76,7 @@ export default function SessionStatusBadge({ "d-flex", "align-items-center", "gap-1", - popover && "cursor-pointer" + popover && "cursor-pointer", )} ref={ref} > @@ -97,14 +97,14 @@ function displayedSessionStatus(status: SessionStatusState): string { return status === "running" ? "Running" : status === "starting" - ? "Starting" - : status === "stopping" - ? "Deleting" - : status === "hibernated" - ? "Paused" - : status === "failed" - ? "Error" - : "Unknown state"; + ? "Starting" + : status === "stopping" + ? "Deleting" + : status === "hibernated" + ? "Paused" + : status === "failed" + ? "Error" + : "Unknown state"; } interface UnsavedWorkWarningProps { @@ -133,7 +133,7 @@ function UnsavedWorkWarning({ annotations, status }: UnsavedWorkWarningProps) { "time-caption", "text-rk-text-light", "text-truncate", - "me-2" + "me-2", )} > new URLSearchParams(location.search), - [location.search] + [location.search], ); const branchFromUrl = searchParams.get("branch") ?? ""; @@ -54,7 +54,7 @@ export default function useDefaultBranchOption({ if (branchFromUrl !== "") { const matchedBranch = branches.find( - (branch) => branch.name === branchFromUrl + (branch) => branch.name === branchFromUrl, ); if (matchedBranch != null) { dispatch(setBranch(matchedBranch.name)); @@ -62,13 +62,13 @@ export default function useDefaultBranchOption({ } dispatch( - setError({ error: "invalid-branch", errorMessage: branchFromUrl }) + setError({ error: "invalid-branch", errorMessage: branchFromUrl }), ); // Continue with the code below so that we set the branch to the default } const matchedDefaultBranch = branches.find( - (branch) => branch.name === defaultBranch + (branch) => branch.name === defaultBranch, ); const branch = matchedDefaultBranch ?? branches[0]; dispatch(setBranch(branch.name)); diff --git a/client/src/features/session/hooks/options/useDefaultCloudStorageOption.hook.ts b/client/src/features/session/hooks/options/useDefaultCloudStorageOption.hook.ts index bdf82141da..7752818b6a 100644 --- a/client/src/features/session/hooks/options/useDefaultCloudStorageOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultCloudStorageOption.hook.ts @@ -38,7 +38,7 @@ export default function useDefaultCloudStorageOption({ const support = useMemo( () => (notebooksVersion?.cloudStorageEnabled.s3 ? "s3" : "azure"), - [notebooksVersion?.cloudStorageEnabled] + [notebooksVersion?.cloudStorageEnabled], ); // Populate session cloud storage from project's settings @@ -48,7 +48,7 @@ export default function useDefaultCloudStorageOption({ } const initialCloudStorage: SessionCloudStorage[] = storageForProject.map( - getInitialCloudStorageItem(support) + getInitialCloudStorageItem(support), ); const missingCredentialsStorage = initialCloudStorage @@ -57,7 +57,7 @@ export default function useDefaultCloudStorageOption({ const providedSensitiveFields = getProvidedSensitiveFields(configuration); const requiredSensitiveFields = sensitive_fields?.filter(({ name }) => - providedSensitiveFields.includes(name) + providedSensitiveFields.includes(name), ); return requiredSensitiveFields?.find(({ value }) => !value); }); @@ -71,7 +71,7 @@ export default function useDefaultCloudStorageOption({ } function getInitialCloudStorageItem( - support: "s3" | "azure" + support: "s3" | "azure", ): (storageDefinition: CloudStorage) => SessionCloudStorage { return ({ storage, sensitive_fields }) => ({ active: diff --git a/client/src/features/session/hooks/options/useDefaultCommitOption.hook.ts b/client/src/features/session/hooks/options/useDefaultCommitOption.hook.ts index f582335bf4..3e7b1cf1f2 100644 --- a/client/src/features/session/hooks/options/useDefaultCommitOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultCommitOption.hook.ts @@ -33,7 +33,7 @@ export default function useDefaultCommitOption({ const location = useLocation(); const searchParams = useMemo( () => new URLSearchParams(location.search), - [location.search] + [location.search], ); const commitFromUrl = searchParams.get("commit") ?? ""; @@ -52,7 +52,7 @@ export default function useDefaultCommitOption({ if (commitFromUrl !== "") { const matchedCommit = commits.find( - (commit) => commit.id === commitFromUrl + (commit) => commit.id === commitFromUrl, ); if (matchedCommit != null) { dispatch(setCommit(matchedCommit.id)); @@ -60,7 +60,7 @@ export default function useDefaultCommitOption({ } dispatch( - setError({ error: "invalid-commit", errorMessage: commitFromUrl }) + setError({ error: "invalid-commit", errorMessage: commitFromUrl }), ); // Continue with the code below so that we set the commit to the latest one } diff --git a/client/src/features/session/hooks/options/useDefaultSessionClassOption.hook.ts b/client/src/features/session/hooks/options/useDefaultSessionClassOption.hook.ts index 5f8ca97c70..bbb43b406d 100644 --- a/client/src/features/session/hooks/options/useDefaultSessionClassOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultSessionClassOption.hook.ts @@ -39,7 +39,7 @@ export default function useDefaultSessionClassOption({ .find((c) => c.default) ?? resourcePools?.find(() => true)?.classes[0] ?? null, - [resourcePools] + [resourcePools], ); // Set initial session class for autostart diff --git a/client/src/features/session/hooks/options/useDefaultUrlOption.hook.ts b/client/src/features/session/hooks/options/useDefaultUrlOption.hook.ts index e6cccda334..dccef363b5 100644 --- a/client/src/features/session/hooks/options/useDefaultUrlOption.hook.ts +++ b/client/src/features/session/hooks/options/useDefaultUrlOption.hook.ts @@ -37,8 +37,8 @@ export default function useDefaultUrlOption({ setDefaultUrl( projectConfig.config.sessions?.defaultUrl ?? projectConfig.default.sessions?.defaultUrl ?? - "" - ) + "", + ), ); } }, [dispatch, projectConfig]); diff --git a/client/src/features/session/hooks/usePatchedProjectConfig.hook.ts b/client/src/features/session/hooks/usePatchedProjectConfig.hook.ts index dbd6c44578..5bfa811347 100644 --- a/client/src/features/session/hooks/usePatchedProjectConfig.hook.ts +++ b/client/src/features/session/hooks/usePatchedProjectConfig.hook.ts @@ -47,13 +47,13 @@ export default function usePatchedProjectConfig({ metadataVersion, projectRepositoryUrl, }, - { skip: skip || !commit } + { skip: skip || !commit }, ); const getConfigFromRepositoryResult = useGetConfigFromRepositoryQuery( { commit, projectId: gitLabProjectId ?? 0 }, { skip: skip || !commit || !gitLabProjectId, - } + }, ); const patchedData = useMemo(() => { diff --git a/client/src/features/session/sessions.api.ts b/client/src/features/session/sessions.api.ts index 18646ab1c4..ef216404eb 100644 --- a/client/src/features/session/sessions.api.ts +++ b/client/src/features/session/sessions.api.ts @@ -71,7 +71,7 @@ const sessionsApi = createApi({ ({ id: sessionName, type: "Session", - } as const) + }) as const, ), "Session", ] diff --git a/client/src/features/session/sessions.api.utils.ts b/client/src/features/session/sessions.api.utils.ts index 9ee3f6f113..4146a8bbdd 100644 --- a/client/src/features/session/sessions.api.utils.ts +++ b/client/src/features/session/sessions.api.utils.ts @@ -20,7 +20,7 @@ import { CloudStorageDefinitionForSessionApi } from "./sessions.types"; import { SessionCloudStorage } from "./startSessionOptions.types"; export function convertCloudStorageForSessionApi( - cloudStorage: SessionCloudStorage + cloudStorage: SessionCloudStorage, ): CloudStorageDefinitionForSessionApi | null { const { configuration, @@ -36,20 +36,20 @@ export function convertCloudStorageForSessionApi( configuration["endpoint"] && configuration["endpoint"].startsWith("http") ? configuration["endpoint"] : configuration["endpoint"] - ? `https://${configuration["endpoint"]}` - : configuration["region"] - ? `https://s3.${configuration["region"]}.amazonaws.com` - : "https://s3.amazonaws.com"; + ? `https://${configuration["endpoint"]}` + : configuration["region"] + ? `https://s3.${configuration["region"]}.amazonaws.com` + : "https://s3.amazonaws.com"; return { configuration: { type: "s3", endpoint, access_key_id: sensitive_fields?.find( - ({ name }) => name === "access_key_id" + ({ name }) => name === "access_key_id", )?.value, secret_access_key: sensitive_fields?.find( - ({ name }) => name === "secret_access_key" + ({ name }) => name === "secret_access_key", )?.value, }, readonly, diff --git a/client/src/features/session/sessions.utils.ts b/client/src/features/session/sessions.utils.ts index 79b48d0aab..05bf2dcfe0 100644 --- a/client/src/features/session/sessions.utils.ts +++ b/client/src/features/session/sessions.utils.ts @@ -32,7 +32,7 @@ export function getRunningSession({ }: GetRunningSessionArgs) { const runningSessions = Object.values(sessions).filter((session) => { const annotations = NotebooksHelper.cleanAnnotations( - session.annotations + session.annotations, ) as Session["annotations"]; const thisAutostartUrl = Url.get(Url.pages.project.session.autostart, { namespace: annotations.namespace, @@ -41,7 +41,7 @@ export function getRunningSession({ return thisAutostartUrl.toLowerCase() === autostartUrl.toLowerCase(); }); const sorted = runningSessions.sort((a, b) => - DateTime.fromISO(b.started).diff(DateTime.fromISO(a.started)).valueOf() + DateTime.fromISO(b.started).diff(DateTime.fromISO(a.started)).valueOf(), ); return sorted.at(0); } diff --git a/client/src/features/session/startSession.slice.ts b/client/src/features/session/startSession.slice.ts index 4473d21ea9..a4a403a67f 100644 --- a/client/src/features/session/startSession.slice.ts +++ b/client/src/features/session/startSession.slice.ts @@ -46,7 +46,7 @@ const startSessionSlice = createSlice({ }, updateStepStatus: ( state, - action: PayloadAction> + action: PayloadAction>, ) => { const step = state.steps.find((step) => step.id === action.payload.id); if (step) { diff --git a/client/src/features/session/startSessionOptionsSlice.ts b/client/src/features/session/startSessionOptionsSlice.ts index 3ddd691bf5..325dad1bc4 100644 --- a/client/src/features/session/startSessionOptionsSlice.ts +++ b/client/src/features/session/startSessionOptionsSlice.ts @@ -47,7 +47,7 @@ export const startSessionOptionsSlice = createSlice({ reducers: { addCloudStorageItem: ( state, - action: PayloadAction + action: PayloadAction, ) => { state.cloudStorage.push(action.payload); }, @@ -56,13 +56,13 @@ export const startSessionOptionsSlice = createSlice({ }, removeCloudStorageItem: ( state, - action: PayloadAction<{ index: number }> + action: PayloadAction<{ index: number }>, ) => { state.cloudStorage.splice(action.payload.index, 1); }, removeEnvironmentVariable: ( state, - action: PayloadAction<{ index: number }> + action: PayloadAction<{ index: number }>, ) => { state.environmentVariables.splice(action.payload.index, 1); }, @@ -87,7 +87,7 @@ export const startSessionOptionsSlice = createSlice({ }, setDockerImageBuildStatus: ( state, - action: PayloadAction + action: PayloadAction, ) => { state.dockerImageBuildStatus = action.payload; }, @@ -108,7 +108,7 @@ export const startSessionOptionsSlice = createSlice({ }, updateCloudStorageItem: ( state, - action: PayloadAction<{ index: number; storage: SessionCloudStorage }> + action: PayloadAction<{ index: number; storage: SessionCloudStorage }>, ) => { state.cloudStorage[action.payload.index] = action.payload.storage; }, @@ -117,7 +117,7 @@ export const startSessionOptionsSlice = createSlice({ action: PayloadAction<{ index: number; variable: SessionEnvironmentVariable; - }> + }>, ) => { state.environmentVariables[action.payload.index] = action.payload.variable; @@ -147,5 +147,5 @@ export const { } = startSessionOptionsSlice.actions; export const useStartSessionOptionsSelector = createSliceSelector( - startSessionOptionsSlice + startSessionOptionsSlice, ); diff --git a/client/src/features/session/utils/sessionStatus.utils.ts b/client/src/features/session/utils/sessionStatus.utils.ts index 96252e5f86..60d480d136 100644 --- a/client/src/features/session/utils/sessionStatus.utils.ts +++ b/client/src/features/session/utils/sessionStatus.utils.ts @@ -30,10 +30,10 @@ export function getSessionStatusColor({ return status === "running" && defaultImage ? "warning" : status === "running" - ? "success" - : status === "starting" || status === "stopping" - ? "warning" - : status === "hibernated" - ? "rk-text-light" - : "danger"; + ? "success" + : status === "starting" || status === "stopping" + ? "warning" + : status === "hibernated" + ? "rk-text-light" + : "danger"; } diff --git a/client/src/features/versions/versionsApi.ts b/client/src/features/versions/versionsApi.ts index 0ed0c390dc..d62298fa08 100644 --- a/client/src/features/versions/versionsApi.ts +++ b/client/src/features/versions/versionsApi.ts @@ -53,7 +53,7 @@ export const versionsApi = createApi({ if (content.versions?.length >= 1) { for (const coreVersionObject of content.versions) { const metadataVersion = parseInt( - coreVersionObject.data.metadata_version + coreVersionObject.data.metadata_version, ); if (metadataVersion) { const coreVersionString = coreVersionObject.version; diff --git a/client/src/features/workflows/WorkflowsApi.ts b/client/src/features/workflows/WorkflowsApi.ts index 0e4a8f968e..0032b2f891 100644 --- a/client/src/features/workflows/WorkflowsApi.ts +++ b/client/src/features/workflows/WorkflowsApi.ts @@ -55,7 +55,7 @@ function stringifyCreators(creators: Array>): string { function adjustWorkflowsList( // eslint-disable-next-line @typescript-eslint/no-explicit-any workflowsList: Array>, - fullPath: string + fullPath: string, ): WorkflowListElement[] { return workflowsList.map((workflow) => { return { @@ -96,7 +96,7 @@ function adjustWorkflowsList( */ function adjustWorkflowDetails( workflowDetails: Record, - fullPath: string + fullPath: string, ): WorkflowDetails { return { ...workflowDetails, diff --git a/client/src/features/workflows/WorkflowsSlice.ts b/client/src/features/workflows/WorkflowsSlice.ts index b466b74799..3e7c06549d 100644 --- a/client/src/features/workflows/WorkflowsSlice.ts +++ b/client/src/features/workflows/WorkflowsSlice.ts @@ -49,7 +49,7 @@ export const workflowsSlice = createSlice({ toggleExpanded(state, action: PayloadAction) { if (state.expanded.includes(action.payload.workflowId)) state.expanded = state.expanded.filter( - (e: any) => e !== action.payload.workflowId + (e: any) => e !== action.payload.workflowId, ); else state.expanded = [...state.expanded, action.payload.workflowId]; }, @@ -61,7 +61,7 @@ export const workflowsSlice = createSlice({ }, setOrderProperty( state, - action: PayloadAction + action: PayloadAction, ) { state.orderProperty = action.payload.newProperty; }, diff --git a/client/src/file/CodePreview.tsx b/client/src/file/CodePreview.tsx index a54d506538..3d03a3cfa0 100644 --- a/client/src/file/CodePreview.tsx +++ b/client/src/file/CodePreview.tsx @@ -31,7 +31,7 @@ export default function CodePreview(props: CodePreviewProps) { useEffect(() => { if (codeBlock.current) { codeBlock.current.innerHTML = DOMPurify.sanitize( - codeBlock.current.innerHTML + codeBlock.current.innerHTML, ); hljs.highlightBlock(codeBlock.current); } diff --git a/client/src/file/File.present.js b/client/src/file/File.present.js index 2ed20f277e..a60bee08c7 100644 --- a/client/src/file/File.present.js +++ b/client/src/file/File.present.js @@ -123,7 +123,7 @@ class FileCard extends React.Component { styles.fileIconLinks, "d-flex", "align-items-center", - "gap-3" + "gap-3", )} > {this.props.buttonShareLinkSession} @@ -374,7 +374,7 @@ function tweakCellMetadataDefault(cell, accumulator) { */ function tweakCellMetadata( nb, - displayMode = NotebookSourceDisplayMode.DEFAULT + displayMode = NotebookSourceDisplayMode.DEFAULT, ) { // Scan the cell metadata, and, if jupyter.source_hidden === true, set hide_input = true const result = { ...nb }; @@ -383,8 +383,8 @@ function tweakCellMetadata( displayMode === NotebookSourceDisplayMode.DEFAULT ? tweakCellMetadataDefault : displayMode === NotebookSourceDisplayMode.HIDDEN - ? tweakCellMetadataHidden - : tweakCellMetadataShow; + ? tweakCellMetadataHidden + : tweakCellMetadataShow; nb.cells.forEach((cell) => cellMetadataFunction(cell, result.cells)); if (displayMode === NotebookSourceDisplayMode.SHOWN) { // Set the hide_input to false; @@ -435,7 +435,7 @@ function NotebookDisplayForm(props) { const displayMode = props.displayMode; const setDisplayMode = props.setDisplayMode; const [overrideMode, setOverrideMode] = useState( - NotebookSourceDisplayMode.SHOWN + NotebookSourceDisplayMode.SHOWN, ); function setOverride(override) { @@ -492,13 +492,13 @@ function NotebookDisplayForm(props) { const StyledNotebook = memo((props) => { const [displayMode, setDisplayMode] = useState( - NotebookSourceDisplayMode.DEFAULT + NotebookSourceDisplayMode.DEFAULT, ); if (props.notebook == null) return
Loading...
; const notebook = sanitizeNotebook( - tweakCellMetadata(props.notebook, displayMode) + tweakCellMetadata(props.notebook, displayMode), ); return [ { it("handles default mode correctly", () => { const result = tweakCellMetadata( modeNotebook, - NotebookSourceDisplayMode.DEFAULT + NotebookSourceDisplayMode.DEFAULT, ); expect(result.cells[0]).toEqual(modeNotebook.cells[0]); expect(modeNotebook.cells[1].metadata.hide_input).toEqual(undefined); @@ -274,7 +274,7 @@ describe("cell metadata messaging", () => { it("handles hidden mode correctly", () => { const result = tweakCellMetadata( modeNotebook, - NotebookSourceDisplayMode.HIDDEN + NotebookSourceDisplayMode.HIDDEN, ); expect(modeNotebook.cells[0].metadata.hide_input).toEqual(undefined); expect(result.cells[0].metadata.hide_input).toEqual(true); @@ -284,7 +284,7 @@ describe("cell metadata messaging", () => { it("handles shown mode correctly", () => { const result = tweakCellMetadata( modeNotebook, - NotebookSourceDisplayMode.SHOWN + NotebookSourceDisplayMode.SHOWN, ); expect(modeNotebook.cells[0].metadata.hide_input).toEqual(undefined); expect(result.cells[0].metadata.hide_input).toEqual(false); diff --git a/client/src/file/FilePreview.tsx b/client/src/file/FilePreview.tsx index da19727035..a0febe2440 100644 --- a/client/src/file/FilePreview.tsx +++ b/client/src/file/FilePreview.tsx @@ -115,7 +115,7 @@ type FileType = | "unknown"; function fileInfoToType( hashElement?: HashElement, - filename?: string + filename?: string, ): FileType { // This needs to be checked first if (hashElement && hashElement.isLfs) return "lfs"; diff --git a/client/src/file/LazyCodePreview.tsx b/client/src/file/LazyCodePreview.tsx index 0de4f301c9..aca8eac052 100644 --- a/client/src/file/LazyCodePreview.tsx +++ b/client/src/file/LazyCodePreview.tsx @@ -24,7 +24,7 @@ const CodePreview = lazy(() => import("./CodePreview")); // ? Lazy loading of CodePreview allows us to split off ~300kB from // ? the main bundle. export default function LazyCodePreview( - props: ComponentProps + props: ComponentProps, ) { return ( }> diff --git a/client/src/file/LazyFileLineage.tsx b/client/src/file/LazyFileLineage.tsx index 701fee5ca9..cb0880dd95 100644 --- a/client/src/file/LazyFileLineage.tsx +++ b/client/src/file/LazyFileLineage.tsx @@ -22,13 +22,13 @@ import { Loader } from "../components/Loader"; const FileLineage = lazy(() => import("./Lineage.container").then((module) => ({ default: module.FileLineage, - })) + })), ); // ? Lazy loading of FileLineage allows us to split off ~107kB from // ? the main bundle. export default function LazyFileLineage( - props: ComponentProps + props: ComponentProps, ) { return ( }> diff --git a/client/src/file/Lineage.present.js b/client/src/file/Lineage.present.js index 836238bbd8..254a980b38 100644 --- a/client/src/file/Lineage.present.js +++ b/client/src/file/Lineage.present.js @@ -54,7 +54,7 @@ function getNodeLabel(node, NODE_COUNT, lineagesUrl) { .concat(stringArray.slice(stringArray.length - 3)) : stringArray; const shortenArray = smallerArray.map((e) => - cropLabelStart(LABEL_LIMIT, e.trim()) + cropLabelStart(LABEL_LIMIT, e.trim()), ); // crop long labels const label = shortenArray.join(BREAKING_LINE); // break line at each arg diff --git a/client/src/help/HelpRelease.tsx b/client/src/help/HelpRelease.tsx index 02b4f94dc9..4fb05496d4 100644 --- a/client/src/help/HelpRelease.tsx +++ b/client/src/help/HelpRelease.tsx @@ -30,14 +30,14 @@ import { RenkuRepositories } from "../utils/constants/Repositories"; function componentDocsUrl( componentUrl: string, taggedVersion: string | undefined, - devHash: string | undefined | null + devHash: string | undefined | null, ) { const releasesUrl = `${componentUrl}/releases/`; return taggedVersion == null ? releasesUrl : devHash == null - ? `${componentUrl}/releases/tag/${taggedVersion}` - : releasesUrl; + ? `${componentUrl}/releases/tag/${taggedVersion}` + : releasesUrl; } /** diff --git a/client/src/index.js b/client/src/index.js index c10b0c2d74..372c6531ae 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -60,7 +60,7 @@ Promise.all([configFetch, privacyFetch]).then((valuesRead) => { const client = new APIClient( params.UISERVER_URL + "/api", params.UISERVER_URL, - coreApiVersionedUrlConfig + coreApiVersionedUrlConfig, ); // Create the global model containing the formal schema definition and the redux store @@ -72,7 +72,7 @@ Promise.all([configFetch, privacyFetch]).then((valuesRead) => { root.render( - + , ); return; } @@ -91,7 +91,7 @@ Promise.all([configFetch, privacyFetch]).then((valuesRead) => { params.UI_VERSION, params.TELEPRESENCE, params.SENTRY_SAMPLE_RATE, - [params.UISERVER_URL] + [params.UISERVER_URL], ); const profiler = !!params.SENTRY_SAMPLE_RATE; if (profiler) uiApplication = Sentry.withProfiler(App); @@ -129,7 +129,7 @@ Promise.all([configFetch, privacyFetch]).then((valuesRead) => { /> - + , ); }); }); diff --git a/client/src/landing/AdminDropdownItem.tsx b/client/src/landing/AdminDropdownItem.tsx index 616faf6eac..0d06dd63c0 100644 --- a/client/src/landing/AdminDropdownItem.tsx +++ b/client/src/landing/AdminDropdownItem.tsx @@ -23,7 +23,7 @@ import { useGetUserInfoQuery } from "../features/user/keycloakUser.api"; export default function AdminDropdownItem() { const userLogged = useSelector( - (state) => state.stateModel.user.logged + (state) => state.stateModel.user.logged, ); const { data: userInfo } = useGetUserInfoQuery(); diff --git a/client/src/landing/Landing.test.js b/client/src/landing/Landing.test.js index 5c0a3e79da..47098fe039 100644 --- a/client/src/landing/Landing.test.js +++ b/client/src/landing/Landing.test.js @@ -78,7 +78,7 @@ describe("rendering", () => { /> - + , ); }); }); @@ -95,7 +95,7 @@ describe("rendering", () => { - + , ); }); }); diff --git a/client/src/landing/NavBar.js b/client/src/landing/NavBar.js index 928e02ac25..8c7054bbbc 100644 --- a/client/src/landing/NavBar.js +++ b/client/src/landing/NavBar.js @@ -41,7 +41,7 @@ import "./NavBar.css"; function RenkuNavBar(props) { const { user } = props; const projectMetadata = useSelector( - (state) => state.stateModel.project?.metadata + (state) => state.stateModel.project?.metadata, ); const sessionShowUrl = Url.get(Url.pages.project.session.show, { namespace: projectMetadata["namespace"], @@ -109,7 +109,7 @@ function FooterNavbarLoggedInLinks({ privacyLink }) { function FooterNavbar({ location, params }) { const projectMetadata = useSelector( - (state) => state.stateModel.project?.metadata + (state) => state.stateModel.project?.metadata, ); const user = useSelector((state) => state.stateModel.user); const sessionShowUrl = Url.get(Url.pages.project.session.show, { @@ -130,8 +130,8 @@ function FooterNavbar({ location, params }) { taggedVersion == null ? "unknown" : isDevVersion - ? `${taggedVersion} (dev)` - : taggedVersion; + ? `${taggedVersion} (dev)` + : taggedVersion; const footer = (