Skip to content

Commit

Permalink
add note to add remote view, too
Browse files Browse the repository at this point in the history
  • Loading branch information
knollengewaechs committed Feb 1, 2025
1 parent 893c8b1 commit 370f00f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { useHistory } from "react-router-dom";
import type { APIDataStore, APIUser } from "types/api_flow_types";
import type { ArbitraryObject } from "types/globals";
import type { DataLayer, DatasourceConfiguration } from "types/schemas/datasource.types";
import { dataPrivacyInfo } from "./dataset_upload_view";

const FormItem = Form.Item;
const RadioGroup = Radio.Group;
Expand Down Expand Up @@ -312,7 +313,10 @@ function DatasetAddRemoteView(props: Props) {
// Using Forms here only to validate fields and for easy layout
<div style={{ padding: 5 }}>
{showLoadingOverlay ? <BrainSpinner /> : null}
<CardContainer title="Add Remote Zarr / Neuroglancer Precomputed / N5 Dataset">
<CardContainer
title="Add Remote Zarr / Neuroglancer Precomputed / N5 Dataset"
subtitle={dataPrivacyInfo}
>
<Form form={form} layout="vertical">
<DatastoreFormItem datastores={uploadableDatastores} hidden={hasOnlyOneDatastoreOrNone} />
<Modal
Expand Down
28 changes: 13 additions & 15 deletions frontend/javascripts/admin/dataset/dataset_upload_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ type UploadFormFieldTypes = {
datastoreUrl: string;
};

export const dataPrivacyInfo = (
<Space direction="horizontal" size={4}>
Per default, imported data is private and only visible within your organization.
<Link
style={{ color: "var(--ant-color-primary)" }}
to="https://docs.webknossos.org/webknossos/datasets/settings.html#sharing-permissions-tab"
>
Read more
</Link>
</Space>
);

class DatasetUploadView extends React.Component<PropsWithFormAndRouter, State> {
state: State = {
isUploading: false,
Expand Down Expand Up @@ -708,21 +720,7 @@ class DatasetUploadView extends React.Component<PropsWithFormAndRouter, State> {
padding: 5,
}}
>
<CardContainer
withoutCard={withoutCard}
title="Upload Dataset"
subtitle={
<Space direction="horizontal" size={4}>
Per default, uploaded data is private and only visible within your organization.
<Link
style={{ color: "var(--ant-color-primary)" }}
to="https://docs.webknossos.org/webknossos/datasets/settings.html#sharing-permissions-tab"
>
Read more
</Link>
</Space>
}
>
<CardContainer withoutCard={withoutCard} title="Upload Dataset" subtitle={dataPrivacyInfo}>
{hasPricingPlanExceededStorage(this.props.organization) ? (
<Alert
type="error"
Expand Down

0 comments on commit 370f00f

Please sign in to comment.