diff --git a/CHANGELOG.md b/CHANGELOG.md index fce7cd2fba7a..cd468218adc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TDB ### Removed -- TDB +- Limit on the maximum number of manifest files that can be added for cloud storage () ### Fixed - Helm: Empty password for Redis () diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 9fb7069742fc..55083ac82d9d 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.48.0", + "version": "1.48.1", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/components/create-cloud-storage-page/manifests-manager.tsx b/cvat-ui/src/components/create-cloud-storage-page/manifests-manager.tsx index 72d6dab5871a..113951d85a3f 100644 --- a/cvat-ui/src/components/create-cloud-storage-page/manifests-manager.tsx +++ b/cvat-ui/src/components/create-cloud-storage-page/manifests-manager.tsx @@ -1,8 +1,9 @@ // Copyright (C) 2021-2022 Intel Corporation +// Copyright (C) 2023 CVAT.ai Corporation // // SPDX-License-Identifier: MIT -import React, { useEffect, useRef, useState } from 'react'; +import React, { useEffect } from 'react'; import { DeleteOutlined, PlusCircleOutlined, QuestionCircleOutlined } from '@ant-design/icons'; import Button from 'antd/lib/button'; import Col from 'antd/lib/col'; @@ -10,7 +11,6 @@ import Form, { RuleObject } from 'antd/lib/form'; import { FormListFieldData, FormListOperation } from 'antd/lib/form/FormList'; import Input from 'antd/lib/input'; import Row from 'antd/lib/row'; -import notification from 'antd/lib/notification'; import Tooltip from 'antd/lib/tooltip'; import config from 'config'; @@ -22,8 +22,6 @@ interface Props { export default function ManifestsManager(props: Props): JSX.Element { const { form, manifestNames, setManifestNames } = props; - const maxManifestsCount = useRef(5); - const [limitingAddingManifestNotification, setLimitingAddingManifestNotification] = useState(false); const { DATASET_MANIFEST_GUIDE_URL } = config; const updateManifestFields = (): void => { @@ -40,15 +38,6 @@ export default function ManifestsManager(props: Props): JSX.Element { updateManifestFields(); }, [manifestNames]); - useEffect(() => { - if (limitingAddingManifestNotification) { - notification.warning({ - message: `Unable to add manifest. The maximum number of files is ${maxManifestsCount.current}`, - className: 'cvat-notification-limiting-adding-manifest', - }); - } - }, [limitingAddingManifestNotification]); - const onChangeManifestPath = (manifestName: string | undefined, manifestId: number): void => { if (manifestName !== undefined) { setManifestNames(manifestNames.map((name, idx) => (idx !== manifestId ? name : manifestName))); @@ -56,18 +45,11 @@ export default function ManifestsManager(props: Props): JSX.Element { }; const onDeleteManifestItem = (key: number): void => { - if (maxManifestsCount.current === manifestNames.length && limitingAddingManifestNotification) { - setLimitingAddingManifestNotification(false); - } setManifestNames(manifestNames.filter((name, idx) => idx !== key)); }; const onAddManifestItem = (): void => { - if (maxManifestsCount.current <= manifestNames.length) { - setLimitingAddingManifestNotification(true); - } else { - setManifestNames(manifestNames.concat([''])); - } + setManifestNames(manifestNames.concat([''])); }; return (