Skip to content

Commit

Permalink
Merge branch 'master' into improve-tree-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
philippotto authored Dec 2, 2024
2 parents 7bbb282 + 6b4f176 commit 95f002c
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 94 deletions.
15 changes: 8 additions & 7 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Allowed to train an AI model using differently sized bounding boxes. We recommend all bounding boxes to have equal dimensions or to have dimensions which are multiples of the smallest bounding box. [#8222](https://github.com/scalableminds/webknossos/pull/8222)

### Fixed
- Fix performance bottleneck when deleting a lot of trees at once. [#8176](https://github.com/scalableminds/webknossos/pull/8176)
- Fix that listing datasets with the `api/datasets` route without compression failed due to missing permissions regarding public datasets. [#8249](https://github.com/scalableminds/webknossos/pull/8249)
- Fix a bug where changing the color of a segment via the menu in the segments tab would update the segment color of the previous segment, on which the context menu was opened. [#8225](https://github.com/scalableminds/webknossos/pull/8225)
- Fix a bug where in the add remote dataset view the dataset name setting was not in sync with the datasource setting of the advanced tab making the form not submittable. [#8245](https://github.com/scalableminds/webknossos/pull/8245)
- Fix a bug when importing an NML with groups when only groups but no trees exist in an annotation. [#8176](https://github.com/scalableminds/webknossos/pull/8176)
- Fixed performance bottleneck when deleting a lot of trees at once. [#8176](https://github.com/scalableminds/webknossos/pull/8176)
- Fixed that listing datasets with the `api/datasets` route without compression failed due to missing permissions regarding public datasets. [#8249](https://github.com/scalableminds/webknossos/pull/8249)
- Fixed a bug where changing the color of a segment via the menu in the segments tab would update the segment color of the previous segment, on which the context menu was opened. [#8225](https://github.com/scalableminds/webknossos/pull/8225)
- Fixed a bug where in the add remote dataset view the dataset name setting was not in sync with the datasource setting of the advanced tab making the form not submittable. [#8245](https://github.com/scalableminds/webknossos/pull/8245)
- Fixed a bug when importing an NML with groups when only groups but no trees exist in an annotation. [#8176](https://github.com/scalableminds/webknossos/pull/8176)
- Added missing legacy support for `isValidNewName` route. [#8252](https://github.com/scalableminds/webknossos/pull/8252)
- Fix a bug where trying to delete a non-existing node (via the API, for example) would delete the whole active tree. [#8176](https://github.com/scalableminds/webknossos/pull/8176)
- Fix a bug where dataset uploads would fail if the organization directory on disk is missing. [#8230](https://github.com/scalableminds/webknossos/pull/8230)
- Fixed a bug where trying to delete a non-existing node (via the API, for example) would delete the whole active tree. [#8176](https://github.com/scalableminds/webknossos/pull/8176)
- Fixed a bug where dataset uploads would fail if the organization directory on disk is missing. [#8230](https://github.com/scalableminds/webknossos/pull/8230)
- Fixed some layout issues in the upload view. [#8231](https://github.com/scalableminds/webknossos/pull/8231)

### Removed
- Removed support for HTTP API versions 3 and 4. [#8075](https://github.com/scalableminds/webknossos/pull/8075)
Expand Down
72 changes: 33 additions & 39 deletions frontend/javascripts/admin/dataset/dataset_add_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,48 +307,42 @@ const getPostUploadModal = (
{datasetNeedsConversion ? " and a conversion job was started" : null}.
<br />
<div
className="centered-items"
style={{
display: "flex",
marginTop: 10,
}}
>
<div
className="centered-items"
style={{
marginTop: 10,
}}
>
{datasetNeedsConversion ? (
<React.Fragment>
<Button type="primary" onClick={() => history.push("/jobs")}>
View the Jobs Queue
</Button>
<Button onClick={() => history.push("/dashboard/datasets")}>Go to Dashboard</Button>
</React.Fragment>
) : (
<React.Fragment>
<Button
type="primary"
onClick={() =>
history.push(
`/datasets/${getReadableURLPart({ name: uploadedDatasetName, id: datasetId })}/view`,
)
}
>
View the Dataset
</Button>
<Button
onClick={() =>
history.push(
`/datasets/${getReadableURLPart({ name: uploadedDatasetName, id: datasetId })}/edit`,
)
}
>
Go to Dataset Settings
</Button>
<Button onClick={() => history.push("/dashboard/datasets")}>Go to Dashboard</Button>
</React.Fragment>
)}
</div>
{datasetNeedsConversion ? (
<React.Fragment>
<Button type="primary" onClick={() => history.push("/jobs")}>
View the Jobs Queue
</Button>
<Button onClick={() => history.push("/dashboard/datasets")}>Go to Dashboard</Button>
</React.Fragment>
) : (
<React.Fragment>
<Button
type="primary"
onClick={() =>
history.push(
`/datasets/${getReadableURLPart({ name: uploadedDatasetName, id: datasetId })}/view`,
)
}
>
View the Dataset
</Button>
<Button
onClick={() =>
history.push(
`/datasets/${getReadableURLPart({ name: uploadedDatasetName, id: datasetId })}/edit`,
)
}
>
Go to Dataset Settings
</Button>
<Button onClick={() => history.push("/dashboard/datasets")}>Go to Dashboard</Button>
</React.Fragment>
)}
</div>
</div>{" "}
</Modal>
Expand Down
69 changes: 32 additions & 37 deletions frontend/javascripts/admin/dataset/dataset_upload_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
FolderOutlined,
InboxOutlined,
HourglassOutlined,
LoadingOutlined,
} from "@ant-design/icons";
import { connect } from "react-redux";
import React from "react";
Expand Down Expand Up @@ -270,9 +271,9 @@ class DatasetUploadView extends React.Component<PropsWithFormAndRouter, State> {
return;
}

Toast.info("Uploading dataset");
this.setState({
isUploading: true,
uploadProgress: 0,
});

const beforeUnload = (
Expand Down Expand Up @@ -351,7 +352,6 @@ class DatasetUploadView extends React.Component<PropsWithFormAndRouter, State> {
});
finishDatasetUpload(datastoreUrl, uploadInfo).then(
async ({ newDatasetId }) => {
Toast.success(messages["dataset.upload_success"]);
let maybeError;

if (this.state.needsConversion) {
Expand All @@ -371,25 +371,12 @@ class DatasetUploadView extends React.Component<PropsWithFormAndRouter, State> {
maybeError = error;
}

if (maybeError == null) {
Toast.info(
<React.Fragment>
The conversion for the uploaded dataset was started.
<br />
See{" "}
<a target="_blank" href="/jobs" rel="noopener noreferrer">
Processing Jobs
</a>{" "}
for an overview of running jobs.
</React.Fragment>,
);
} else {
if (maybeError != null) {
Toast.error(
"The conversion for the uploaded dataset could not be started. Please try again or contact us if this issue occurs again.",
"The upload was successful, but the conversion for the dataset could not be started. Please try again or contact us if this issue occurs again.",
);
}
}

this.setState({
isUploading: false,
isFinishing: false,
Expand Down Expand Up @@ -509,26 +496,34 @@ class DatasetUploadView extends React.Component<PropsWithFormAndRouter, State> {
flexDirection: "column",
}}
>
<Spin spinning={isFinishing} style={{ marginTop: 4 }} tip="Processing uploaded files …">
<FolderOutlined
style={{
fontSize: 50,
}}
/>
<br />
{isRetrying
? `Upload of dataset ${form.getFieldValue("name")} froze.`
: `Uploading Dataset ${form.getFieldValue("name")}.`}
<br />
{isRetrying ? "Retrying to continue the upload …" : null}
<br />
<Progress
// Round to 1 digit after the comma, but use floor
// to avoid that 100% are displayed even though the progress is lower.
percent={Math.floor(uploadProgress * 1000) / 10}
status="active"
/>
</Spin>
{isFinishing ? (
<>
<Spin indicator={<LoadingOutlined style={{ fontSize: 48 }} spin />} />
<br />
Processing uploaded files …
</>
) : (
<>
<FolderOutlined
style={{
fontSize: 50,
marginBottom: 8,
}}
/>
{isRetrying
? `Upload of dataset ${form.getFieldValue("name")} froze.`
: `Uploading Dataset ${form.getFieldValue("name")}.`}
<br />
{isRetrying ? "Retrying to continue the upload …" : null}
<br />
<Progress
// Round to 1 digit after the comma, but use floor
// to avoid that 100% are displayed even though the progress is lower.
percent={Math.floor(uploadProgress * 1000) / 10}
status="active"
/>
</>
)}
</div>
</Modal>
);
Expand Down
22 changes: 12 additions & 10 deletions frontend/javascripts/components/brain_spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,18 @@ export function BrainSpinnerWithError({
<div style={{ textAlign: "center" }}>
{gotUnhandledError ? messages["tracing.unhandled_initialization_error"] : message}
</div>
{organizationToSwitchTo != null ? <div>{switchToOwningOrganizationButton}</div> : null}
<div>
<Link
to="/"
style={{
marginTop: 16,
}}
>
<Button type="primary">Return to dashboard</Button>
</Link>
<div className="flex-center-child" style={{ gap: 8 }}>
{organizationToSwitchTo != null ? <div>{switchToOwningOrganizationButton}</div> : null}
<div>
<Link
to="/"
style={{
marginTop: 16,
}}
>
<Button type="primary">Return to dashboard</Button>
</Link>
</div>
</div>
</>
}
Expand Down
1 change: 0 additions & 1 deletion frontend/javascripts/messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ instead. Only enable this option if you understand its effect. All layers will n
"Resets this task instance to its initial state, undoing any annotation work of the assigned user. The task will remain assigned to this user for further annotation work.",
"task.tooltip_explain_reset_cancel":
"Resets this task instance to its initial state, undoing any annotation work of the assigned user. Furthermore, the task assignment will be removed from the user’s account and recycled into the pool of available tasks for other users. The currently assigned user will not be assigned to this task again (unless they are an Admin).",
"dataset.upload_success": "The dataset was uploaded successfully.",
"dataset.upload_failed": "The dataset upload failed.",
"dataset.upload_cancel": "The dataset upload was cancelled.",
"dataset.unsupported_file_type":
Expand Down

0 comments on commit 95f002c

Please sign in to comment.