From d73102af0862b635993739e0d23f8fe036cecaf2 Mon Sep 17 00:00:00 2001 From: Gritta Weisheit Date: Wed, 12 Aug 2020 14:16:35 +0200 Subject: [PATCH 1/4] put dataset permissions in sharing tab --- .../dashboard/dataset/dataset_import_view.js | 10 +++++++--- .../dataset/import_general_component.js | 20 +------------------ .../dataset/import_sharing_component.js | 20 ++++++++++++++++++- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/frontend/javascripts/dashboard/dataset/dataset_import_view.js b/frontend/javascripts/dashboard/dataset/dataset_import_view.js index 940488c607..c4568f2792 100644 --- a/frontend/javascripts/dashboard/dataset/dataset_import_view.js +++ b/frontend/javascripts/dashboard/dataset/dataset_import_view.js @@ -499,9 +499,13 @@ class DatasetImportView extends React.PureComponent { - Sharing} key="sharing" forceRender> + Sharing & Permissions} key="sharing" forceRender> @@ -515,7 +519,7 @@ class DatasetImportView extends React.PureComponent { forceRender > diff --git a/frontend/javascripts/dashboard/dataset/import_general_component.js b/frontend/javascripts/dashboard/dataset/import_general_component.js index cc80fa6ddd..5fd74c4789 100644 --- a/frontend/javascripts/dashboard/dataset/import_general_component.js +++ b/frontend/javascripts/dashboard/dataset/import_general_component.js @@ -3,32 +3,15 @@ import { Input, Col, Row, DatePicker } from "antd"; import React from "react"; -import TeamSelectionComponent from "dashboard/dataset/team_selection_component"; - import { FormItemWithInfo } from "./helper_components"; type Props = { form: Object, - hasNoAllowedTeams: boolean, }; -export default function ImportGeneralComponent({ form, hasNoAllowedTeams }: Props) { +export default function ImportGeneralComponent({ form }: Props) { const { getFieldDecorator } = form; - const allowedTeamsComponent = ( - - {getFieldDecorator("dataset.allowedTeams", {})()} - - ); return (
@@ -51,7 +34,6 @@ export default function ImportGeneralComponent({ form, hasNoAllowedTeams }: Prop - {allowedTeamsComponent} (null); + const allowedTeamsComponent = ( + + {getFieldDecorator("dataset.allowedTeams", {})()} + + ); async function fetch() { const newSharingToken = await getDatasetSharingToken(datasetId); @@ -84,6 +101,7 @@ export default function ImportSharingComponent({ form, datasetId }: Props) { Make dataset publicly accessible , )} + {allowedTeamsComponent} Date: Wed, 12 Aug 2020 15:36:00 +0200 Subject: [PATCH 2/4] fix warning icon location --- .../dashboard/dataset/dataset_import_view.js | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/frontend/javascripts/dashboard/dataset/dataset_import_view.js b/frontend/javascripts/dashboard/dataset/dataset_import_view.js index c4568f2792..d85c638d2e 100644 --- a/frontend/javascripts/dashboard/dataset/dataset_import_view.js +++ b/frontend/javascripts/dashboard/dataset/dataset_import_view.js @@ -499,7 +499,16 @@ class DatasetImportView extends React.PureComponent { - Sharing & Permissions} key="sharing" forceRender> + + Sharing & Permissions{" "} + {formErrors.general ? errorIcon : hasNoAllowedTeamsWarning} + + } + key="sharing" + forceRender + > - - Metadata {formErrors.general ? errorIcon : hasNoAllowedTeamsWarning} - - } - key="general" - forceRender - > + Metadata} key="general" forceRender> From 95b912c4be806fc845575b0620ac8cc2f932c617 Mon Sep 17 00:00:00 2001 From: Gritta Weisheit Date: Wed, 12 Aug 2020 15:41:20 +0200 Subject: [PATCH 3/4] update changelog --- CHANGELOG.unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 8727d164d1..946172a086 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -20,6 +20,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Disabled the autofill feature of the brush when using this tool to erase data. [#4729](https://github.com/scalableminds/webknossos/pull/4729) - The rotation buttons of the 3D-viewport no longer change the zoom. [#4750](https://github.com/scalableminds/webknossos/pull/4750) - Improved the performance of applying agglomerate files. [#4706](https://github.com/scalableminds/webknossos/pull/4706) +- Moved a dataset's permission settings to the sharing tab. [#4683](https://github.com/scalableminds/webknossos/pull/4763) ### Fixed - Speed up NML import in existing tracings for NMLs with many trees (20,000+). [#4742](https://github.com/scalableminds/webknossos/pull/4742) From 1d5dbe6cba98d4fcd1f1a3a333b0ea06f03ea8bf Mon Sep 17 00:00:00 2001 From: grittaweisheit <44833037+grittaweisheit@users.noreply.github.com> Date: Wed, 12 Aug 2020 15:49:08 +0200 Subject: [PATCH 4/4] Update CHANGELOG.unreleased.md Co-authored-by: Philipp Otto --- CHANGELOG.unreleased.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index a987be58be..e70246d420 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -21,7 +21,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Disabled the autofill feature of the brush when using this tool to erase data. [#4729](https://github.com/scalableminds/webknossos/pull/4729) - The rotation buttons of the 3D-viewport no longer change the zoom. [#4750](https://github.com/scalableminds/webknossos/pull/4750) - Improved the performance of applying agglomerate files. [#4706](https://github.com/scalableminds/webknossos/pull/4706) -- Moved a dataset's permission settings to the sharing tab. [#4683](https://github.com/scalableminds/webknossos/pull/4763) +- In the Edit/Import Dataset form, the "Sharing" tab was renamed to "Sharing & Permissions". Also, existing permission-related settings were moved to that tab. [#4683](https://github.com/scalableminds/webknossos/pull/4763) ### Fixed - Speed up NML import in existing tracings for NMLs with many trees (20,000+). [#4742](https://github.com/scalableminds/webknossos/pull/4742)