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( {
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}
{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 (
<>