diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index b294689d44..d39df40cfb 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -27,6 +27,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Fixed a bug where NMLs with huge tree IDs uploaded via back-end produced broken annotations. [#5484](https://github.com/scalableminds/webknossos/pull/5484) - Fixed a bug where the upload of multiple NMLs failed if some of them have an organization attribute and others don’t. [#5483](https://github.com/scalableminds/webknossos/pull/5483) - Fixed a bug in the application of agglomerate files where the `cumsum.json` was not used correctly. [#5499](https://github.com/scalableminds/webknossos/pull/5499) +- Fixed an innocuous error toast when opening the dataset import view. [#5526](https://github.com/scalableminds/webknossos/pull/5526) ### Removed - Removed the button to load or refresh the isosurface of the centered cell from the 3D view. Instead, this action can be triggered from the "Meshes" tab. [#5440](https://github.com/scalableminds/webknossos/pull/5440) diff --git a/frontend/javascripts/admin/admin_rest_api.js b/frontend/javascripts/admin/admin_rest_api.js index 96333980e9..4ae833cea7 100644 --- a/frontend/javascripts/admin/admin_rest_api.js +++ b/frontend/javascripts/admin/admin_rest_api.js @@ -126,19 +126,20 @@ export function doWithToken(fn: (token: string) => Promise, tries: number }); } -export function sendAnalyticsEvent(eventType: string, eventProperties: Object): void { +export function sendAnalyticsEvent(eventType: string, eventProperties: {} = {}): void { // Note that the Promise from sendJSONReceiveJSON is not awaited or returned here, // since failing analytics events should not have an impact on the application logic. Request.sendJSONReceiveJSON(`/api/analytics/${eventType}`, { method: "POST", data: eventProperties, + showErrorToast: false, }); } export function sendFailedRequestAnalyticsEvent( requestType: string, error: Object, - requestProperties: Object, + requestProperties: {}, ): void { const eventProperties = { request_type: requestType, @@ -1035,10 +1036,7 @@ export function createResumableUpload( ); } -export function finishDatasetUpload( - datastoreHost: string, - uploadInformation: Object, -): Promise { +export function finishDatasetUpload(datastoreHost: string, uploadInformation: {}): Promise { return doWithToken(token => Request.sendJSONReceiveJSON(`/data/datasets/finishUpload?token=${token}`, { data: uploadInformation,