Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid double info request for compound annotations #4619

Merged
merged 8 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- When activating an agglomerate file-based ID mapping, only the segmentation layer will be reloaded from now on. This will improve mapping activation performance. [#4600](https://github.com/scalableminds/webknossos/pull/4600)
- Fixed retrying of failed save requests sent during tracingstore restart. [#4591](https://github.com/scalableminds/webknossos/pull/4591)
- Fixed the initial loading of agglomerate mappings, where some buckets remained black. [#4601](https://github.com/scalableminds/webknossos/pull/4601)
- Fixed occasional error during loading of compound annotations (such as viewing multiple finished task instances in one view). [#4619](https://github.com/scalableminds/webknossos/pull/4619)

### Removed

Expand Down
2 changes: 1 addition & 1 deletion frontend/javascripts/components/secured_route.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SecuredRoute extends React.PureComponent<Props, State> {
}

async fetchData() {
if (this.props.serverAuthenticationCallback != null) {
if (!this.props.isAuthenticated && this.props.serverAuthenticationCallback != null) {
const isAdditionallyAuthenticated = await this.props.serverAuthenticationCallback({
match: this.props.computedMatch,
location: this.props.location,
Expand Down
2 changes: 2 additions & 0 deletions frontend/javascripts/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ In order to restore the current window, a reload is necessary.`,
"data.disabled_render_missing_data_black": `You just disabled the option to render missing
data black. This means that in case of missing data, data of lower quality is rendered
instead. Only enable this option if you understand its effect. All layers will now be reloaded.`,
"tracing.unhandled_initialization_error":
"Initialization error. Please refresh the page to retry. If the error persists, please contact an administrator.",
"tracing.out_of_dataset_bounds":
"The current position is outside of the dataset's bounding box. No data will be shown here.",
"tracing.out_of_task_bounds": "The current position is outside of the task's bounding box.",
Expand Down
16 changes: 14 additions & 2 deletions frontend/javascripts/oxalis/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,17 @@ type StateProps = {|
type Props = {| ...OwnProps, ...StateProps |};
type PropsWithRouter = {| ...Props, history: RouterHistory |};

type State = {};
type State = {
gotUnhandledError: boolean,
};

class Controller extends React.PureComponent<PropsWithRouter, State> {
keyboard: InputKeyboard;
keyboardNoLoop: InputKeyboardNoLoop;
isMounted: boolean;
state = {
gotUnhandledError: false,
};

// Main controller, responsible for setting modes and everything
// that has to be controlled in any mode.
Expand Down Expand Up @@ -110,6 +115,10 @@ class Controller extends React.PureComponent<PropsWithRouter, State> {
this.props.setControllerStatus("failedLoading");
// Don't throw errors for errors already handled by the model.
if (error !== HANDLED_ERROR) {
Toast.error(`${messages["tracing.unhandled_initialization_error"]} ${error.toString()}`, {
sticky: true,
});
this.setState({ gotUnhandledError: true });
throw error;
}
});
Expand Down Expand Up @@ -275,14 +284,17 @@ class Controller extends React.PureComponent<PropsWithRouter, State> {
render() {
const status = this.props.controllerStatus;
const { user, viewMode } = this.props;
const { gotUnhandledError } = this.state;
if (status === "loading") {
return <BrainSpinner />;
} else if (status === "failedLoading" && user != null) {
return (
<BrainSpinner
message={
<div style={{ textAlign: "center" }}>
Either the dataset does not exist or you do not have the necessary access rights.
{gotUnhandledError
? messages["tracing.unhandled_initialization_error"]
: "Either the dataset does not exist or you do not have the necessary access rights."}
<br />
<Link to="/" style={{ marginTop: 16, display: "inline-block" }}>
<Button type="primary">Return to dashboard</Button>
Expand Down