From 2dfe6dba8dc16ef3f4f8c809eb8adb2bb9d1d90b Mon Sep 17 00:00:00 2001
From: Andrey Zhavoronkov
Date: Mon, 2 Oct 2023 17:22:17 +0300
Subject: [PATCH 01/12] Fixed error when getting data from CS and cache=True
(#6932)
Fix
```python
AttributeError: 'tuple' object has no attribute 'tobytes'
```
---
CHANGELOG.md | 2 ++
cvat/apps/engine/cache.py | 2 +-
tests/python/rest_api/test_tasks.py | 30 +++++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa475ea8025b..2e512b67fb86 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Incorrectly determined video frame count when the video contains an MP4 edit list
()
+- Internal server error when retrieving data from CS and cache=True
+ ()
### Security
diff --git a/cvat/apps/engine/cache.py b/cvat/apps/engine/cache.py
index 1d4c7925df8d..6f88ed51290c 100644
--- a/cvat/apps/engine/cache.py
+++ b/cvat/apps/engine/cache.py
@@ -169,7 +169,7 @@ def _get_images(db_data, chunk_number):
cloud_storage_instance.bulk_download_to_dir(files=files_to_download, upload_dir=tmp_dir)
- for checksum, fs_filename in zip(checksums, images):
+ for checksum, (_, fs_filename, _) in zip(checksums, images):
if checksum and not md5_hash(fs_filename) == checksum:
slogger.cloud_storage[db_cloud_storage.id].warning('Hash sums of files {} do not match'.format(file_name))
else:
diff --git a/tests/python/rest_api/test_tasks.py b/tests/python/rest_api/test_tasks.py
index 35d842bfc8c0..9d646565f3e2 100644
--- a/tests/python/rest_api/test_tasks.py
+++ b/tests/python/rest_api/test_tasks.py
@@ -1418,6 +1418,36 @@ def test_create_task_with_file_pattern(
status = self._test_cannot_create_task(self._USERNAME, task_spec, data_spec)
assert "No media data found" in status.message
+ @pytest.mark.with_external_services
+ @pytest.mark.parametrize(
+ "cloud_storage_id, org",
+ [
+ (1, ""),
+ ],
+ )
+ def test_create_task_with_cloud_storage_and_retrieve_data(
+ self,
+ cloud_storage_id,
+ cloud_storages,
+ request,
+ org,
+ ):
+ cloud_storage = cloud_storages[cloud_storage_id]
+ task_id, _ = self._create_task_with_cloud_data(
+ request=request,
+ cloud_storage=cloud_storage,
+ use_manifest=True,
+ use_cache=True,
+ server_files=[],
+ org=org,
+ )
+
+ with make_api_client(self._USERNAME) as api_client:
+ (_, response) = api_client.tasks_api.retrieve_data(
+ task_id, type="chunk", quality="compressed", number=0
+ )
+ assert response.status == HTTPStatus.OK
+
def test_can_specify_file_job_mapping(self):
task_spec = {
"name": f"test file-job mapping",
From cc226e26897dffe2253f89f4b046bd17ff7d2465 Mon Sep 17 00:00:00 2001
From: Andrey Zhavoronkov
Date: Mon, 2 Oct 2023 17:31:10 +0300
Subject: [PATCH 02/12] Bump version to 2.7.3
---
CHANGELOG.md | 11 +----------
cvat-cli/requirements/base.txt | 2 +-
cvat-cli/src/cvat_cli/version.py | 2 +-
cvat-sdk/gen/generate.sh | 2 +-
cvat/__init__.py | 2 +-
cvat/schema.yml | 2 +-
docker-compose.yml | 18 +++++++++---------
helm-chart/values.yaml | 4 ++--
8 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2e512b67fb86..256abbbf7a49 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,20 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## \[Unreleased\]
+## \[2.7.3\] - 2023-10-02
### Added
- New , form-based Issue templates for Github repository
-- TDB
-
-### Changed
-
-- TDB
-
-### Deprecated
-
-- TDB
### Removed
diff --git a/cvat-cli/requirements/base.txt b/cvat-cli/requirements/base.txt
index 8024a5ce2b7f..b190e4860ed7 100644
--- a/cvat-cli/requirements/base.txt
+++ b/cvat-cli/requirements/base.txt
@@ -1,3 +1,3 @@
-cvat-sdk~=2.8.0
+cvat-sdk~=2.7.3
Pillow>=10.0.1
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
diff --git a/cvat-cli/src/cvat_cli/version.py b/cvat-cli/src/cvat_cli/version.py
index 7035cc17c429..24e1a09a45dc 100644
--- a/cvat-cli/src/cvat_cli/version.py
+++ b/cvat-cli/src/cvat_cli/version.py
@@ -1 +1 @@
-VERSION = "2.8.0"
+VERSION = "2.7.3"
diff --git a/cvat-sdk/gen/generate.sh b/cvat-sdk/gen/generate.sh
index 77f513803a68..4a82f2613e16 100755
--- a/cvat-sdk/gen/generate.sh
+++ b/cvat-sdk/gen/generate.sh
@@ -8,7 +8,7 @@ set -e
GENERATOR_VERSION="v6.0.1"
-VERSION="2.8.0"
+VERSION="2.7.3"
LIB_NAME="cvat_sdk"
LAYER1_LIB_NAME="${LIB_NAME}/api_client"
DST_DIR="$(cd "$(dirname -- "$0")/.." && pwd)"
diff --git a/cvat/__init__.py b/cvat/__init__.py
index 989bc3512008..27dc3d59c5c0 100644
--- a/cvat/__init__.py
+++ b/cvat/__init__.py
@@ -4,6 +4,6 @@
from cvat.utils.version import get_version
-VERSION = (2, 8, 0, 'alpha', 0)
+VERSION = (2, 7, 3, 'final', 0)
__version__ = get_version(VERSION)
diff --git a/cvat/schema.yml b/cvat/schema.yml
index 2dc187c5ff63..103e182f3c32 100644
--- a/cvat/schema.yml
+++ b/cvat/schema.yml
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: CVAT REST API
- version: 2.8.0
+ version: 2.7.3
description: REST API for Computer Vision Annotation Tool (CVAT)
termsOfService: https://www.google.com/policies/terms/
contact:
diff --git a/docker-compose.yml b/docker-compose.yml
index 2db3f665373c..2259024bf6c6 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -34,7 +34,7 @@ services:
cvat_server:
container_name: cvat_server
- image: cvat/server:${CVAT_VERSION:-dev}
+ image: cvat/server:${CVAT_VERSION:-v2.7.3}
restart: always
depends_on:
- cvat_redis
@@ -73,7 +73,7 @@ services:
cvat_utils:
container_name: cvat_utils
- image: cvat/server:${CVAT_VERSION:-dev}
+ image: cvat/server:${CVAT_VERSION:-v2.7.3}
restart: always
depends_on:
- cvat_redis
@@ -98,7 +98,7 @@ services:
cvat_worker_import:
container_name: cvat_worker_import
- image: cvat/server:${CVAT_VERSION:-dev}
+ image: cvat/server:${CVAT_VERSION:-v2.7.3}
restart: always
depends_on:
- cvat_redis
@@ -121,7 +121,7 @@ services:
cvat_worker_export:
container_name: cvat_worker_export
- image: cvat/server:${CVAT_VERSION:-dev}
+ image: cvat/server:${CVAT_VERSION:-v2.7.3}
restart: always
depends_on:
- cvat_redis
@@ -144,7 +144,7 @@ services:
cvat_worker_annotation:
container_name: cvat_worker_annotation
- image: cvat/server:${CVAT_VERSION:-dev}
+ image: cvat/server:${CVAT_VERSION:-v2.7.3}
restart: always
depends_on:
- cvat_redis
@@ -167,7 +167,7 @@ services:
cvat_worker_webhooks:
container_name: cvat_worker_webhooks
- image: cvat/server:${CVAT_VERSION:-dev}
+ image: cvat/server:${CVAT_VERSION:-v2.7.3}
restart: always
depends_on:
- cvat_redis
@@ -191,7 +191,7 @@ services:
cvat_worker_quality_reports:
container_name: cvat_worker_quality_reports
- image: cvat/server:${CVAT_VERSION:-dev}
+ image: cvat/server:${CVAT_VERSION:-v2.7.3}
restart: always
depends_on:
- cvat_redis
@@ -213,7 +213,7 @@ services:
cvat_worker_analytics_reports:
container_name: cvat_worker_analytics_reports
- image: cvat/server:${CVAT_VERSION:-dev}
+ image: cvat/server:${CVAT_VERSION:-v2.7.3}
restart: always
depends_on:
- cvat_redis
@@ -236,7 +236,7 @@ services:
cvat_ui:
container_name: cvat_ui
- image: cvat/ui:${CVAT_VERSION:-dev}
+ image: cvat/ui:${CVAT_VERSION:-v2.7.3}
restart: always
depends_on:
- cvat_server
diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml
index e993400e1b4e..420e3647840f 100644
--- a/helm-chart/values.yaml
+++ b/helm-chart/values.yaml
@@ -104,7 +104,7 @@ cvat:
additionalVolumeMounts: []
replicas: 1
image: cvat/server
- tag: dev
+ tag: v2.7.3
imagePullPolicy: Always
permissionFix:
enabled: true
@@ -128,7 +128,7 @@ cvat:
frontend:
replicas: 1
image: cvat/ui
- tag: dev
+ tag: v2.7.3
imagePullPolicy: Always
labels: {}
# test: test
From 797de03f473a496f60e1d4a81a60318f5b75a69b Mon Sep 17 00:00:00 2001
From: Andrey Zhavoronkov
Date: Mon, 2 Oct 2023 17:34:27 +0300
Subject: [PATCH 03/12] Prepare to new version
---
CHANGELOG.md | 26 ++++++++++++++++++++++++++
cvat-cli/requirements/base.txt | 2 +-
cvat-cli/src/cvat_cli/version.py | 2 +-
cvat-sdk/gen/generate.sh | 2 +-
cvat/__init__.py | 2 +-
cvat/schema.yml | 2 +-
docker-compose.yml | 18 +++++++++---------
helm-chart/values.yaml | 4 ++--
8 files changed, 42 insertions(+), 16 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 256abbbf7a49..af41a9bc6d1e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## \[Unreleased\]
+
+### Added
+
+- TDB
+
+### Changed
+
+- TDB
+
+### Deprecated
+
+- TDB
+
+### Removed
+
+- TDB
+
+### Fixed
+
+- TDB
+
+### Security
+
+- TDB
+
## \[2.7.3\] - 2023-10-02
### Added
diff --git a/cvat-cli/requirements/base.txt b/cvat-cli/requirements/base.txt
index b190e4860ed7..8024a5ce2b7f 100644
--- a/cvat-cli/requirements/base.txt
+++ b/cvat-cli/requirements/base.txt
@@ -1,3 +1,3 @@
-cvat-sdk~=2.7.3
+cvat-sdk~=2.8.0
Pillow>=10.0.1
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
diff --git a/cvat-cli/src/cvat_cli/version.py b/cvat-cli/src/cvat_cli/version.py
index 24e1a09a45dc..7035cc17c429 100644
--- a/cvat-cli/src/cvat_cli/version.py
+++ b/cvat-cli/src/cvat_cli/version.py
@@ -1 +1 @@
-VERSION = "2.7.3"
+VERSION = "2.8.0"
diff --git a/cvat-sdk/gen/generate.sh b/cvat-sdk/gen/generate.sh
index 4a82f2613e16..77f513803a68 100755
--- a/cvat-sdk/gen/generate.sh
+++ b/cvat-sdk/gen/generate.sh
@@ -8,7 +8,7 @@ set -e
GENERATOR_VERSION="v6.0.1"
-VERSION="2.7.3"
+VERSION="2.8.0"
LIB_NAME="cvat_sdk"
LAYER1_LIB_NAME="${LIB_NAME}/api_client"
DST_DIR="$(cd "$(dirname -- "$0")/.." && pwd)"
diff --git a/cvat/__init__.py b/cvat/__init__.py
index 27dc3d59c5c0..989bc3512008 100644
--- a/cvat/__init__.py
+++ b/cvat/__init__.py
@@ -4,6 +4,6 @@
from cvat.utils.version import get_version
-VERSION = (2, 7, 3, 'final', 0)
+VERSION = (2, 8, 0, 'alpha', 0)
__version__ = get_version(VERSION)
diff --git a/cvat/schema.yml b/cvat/schema.yml
index 103e182f3c32..2dc187c5ff63 100644
--- a/cvat/schema.yml
+++ b/cvat/schema.yml
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: CVAT REST API
- version: 2.7.3
+ version: 2.8.0
description: REST API for Computer Vision Annotation Tool (CVAT)
termsOfService: https://www.google.com/policies/terms/
contact:
diff --git a/docker-compose.yml b/docker-compose.yml
index 2259024bf6c6..2db3f665373c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -34,7 +34,7 @@ services:
cvat_server:
container_name: cvat_server
- image: cvat/server:${CVAT_VERSION:-v2.7.3}
+ image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on:
- cvat_redis
@@ -73,7 +73,7 @@ services:
cvat_utils:
container_name: cvat_utils
- image: cvat/server:${CVAT_VERSION:-v2.7.3}
+ image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on:
- cvat_redis
@@ -98,7 +98,7 @@ services:
cvat_worker_import:
container_name: cvat_worker_import
- image: cvat/server:${CVAT_VERSION:-v2.7.3}
+ image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on:
- cvat_redis
@@ -121,7 +121,7 @@ services:
cvat_worker_export:
container_name: cvat_worker_export
- image: cvat/server:${CVAT_VERSION:-v2.7.3}
+ image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on:
- cvat_redis
@@ -144,7 +144,7 @@ services:
cvat_worker_annotation:
container_name: cvat_worker_annotation
- image: cvat/server:${CVAT_VERSION:-v2.7.3}
+ image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on:
- cvat_redis
@@ -167,7 +167,7 @@ services:
cvat_worker_webhooks:
container_name: cvat_worker_webhooks
- image: cvat/server:${CVAT_VERSION:-v2.7.3}
+ image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on:
- cvat_redis
@@ -191,7 +191,7 @@ services:
cvat_worker_quality_reports:
container_name: cvat_worker_quality_reports
- image: cvat/server:${CVAT_VERSION:-v2.7.3}
+ image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on:
- cvat_redis
@@ -213,7 +213,7 @@ services:
cvat_worker_analytics_reports:
container_name: cvat_worker_analytics_reports
- image: cvat/server:${CVAT_VERSION:-v2.7.3}
+ image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on:
- cvat_redis
@@ -236,7 +236,7 @@ services:
cvat_ui:
container_name: cvat_ui
- image: cvat/ui:${CVAT_VERSION:-v2.7.3}
+ image: cvat/ui:${CVAT_VERSION:-dev}
restart: always
depends_on:
- cvat_server
diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml
index 420e3647840f..e993400e1b4e 100644
--- a/helm-chart/values.yaml
+++ b/helm-chart/values.yaml
@@ -104,7 +104,7 @@ cvat:
additionalVolumeMounts: []
replicas: 1
image: cvat/server
- tag: v2.7.3
+ tag: dev
imagePullPolicy: Always
permissionFix:
enabled: true
@@ -128,7 +128,7 @@ cvat:
frontend:
replicas: 1
image: cvat/ui
- tag: v2.7.3
+ tag: dev
imagePullPolicy: Always
labels: {}
# test: test
From e9d485a24cbe670f71a6079e7090cd51b33ab1c2 Mon Sep 17 00:00:00 2001
From: Roman Donchenko
Date: Tue, 3 Oct 2023 09:44:27 +0300
Subject: [PATCH 04/12] Remove unused class KeyFramesVideoStreamReader (#6935)
As far as I can see, the `only_key_frames` parameter to
`VideoManifestManager.link` is not, and has never been, used, and
therefore `KeyFramesVideoStreamReader` is unused as well.
---
utils/dataset_manifest/core.py | 40 ++--------------------------------
1 file changed, 2 insertions(+), 38 deletions(-)
diff --git a/utils/dataset_manifest/core.py b/utils/dataset_manifest/core.py
index e049e0217c71..bbc55968fa3b 100644
--- a/utils/dataset_manifest/core.py
+++ b/utils/dataset_manifest/core.py
@@ -112,41 +112,6 @@ def __iter__(self):
if not self._frames_number:
self._frames_number = index
-class KeyFramesVideoStreamReader(VideoStreamReader):
- def __init__(self, **kwargs):
- super().__init__(**kwargs)
-
- def __iter__(self):
- with closing(av.open(self.source_path, mode='r')) as container:
- video_stream = self._get_video_stream(container)
- frame_pts, frame_dts = -1, -1
- index, key_frame_number = 0, 0
- for packet in container.demux(video_stream):
- for frame in packet.decode():
- if None not in {frame.pts, frame_pts} and frame.pts <= frame_pts:
- raise InvalidVideoFrameError('Invalid pts sequences')
- if None not in {frame.dts, frame_dts} and frame.dts <= frame_dts:
- raise InvalidVideoFrameError('Invalid dts sequences')
- frame_pts, frame_dts = frame.pts, frame.dts
-
- if frame.key_frame:
- key_frame_number += 1
- ratio = (index + 1) // key_frame_number
- if ratio >= self._upper_bound and not self._force:
- raise AssertionError('Too few keyframes')
- key_frame = {
- 'index': index,
- 'pts': frame.pts,
- 'md5': md5_hash(frame)
- }
-
- with closing(av.open(self.source_path, mode='r')) as checked_container:
- checked_container.seek(offset=key_frame['pts'], stream=video_stream)
- isValid = self.validate_key_frame(checked_container, video_stream, key_frame)
- if isValid:
- yield (index, key_frame['pts'], key_frame['md5'])
- index += 1
-
class DatasetImagesReader:
def __init__(self,
sources: Union[List[str], List[BytesIO]],
@@ -474,9 +439,8 @@ def __init__(self, manifest_path, create_index=True):
setattr(self._manifest, 'TYPE', 'video')
self.BASE_INFORMATION['properties'] = 3
- def link(self, media_file, upload_dir=None, chunk_size=36, force=False, only_key_frames=False, **kwargs):
- ReaderClass = VideoStreamReader if not only_key_frames else KeyFramesVideoStreamReader
- self._reader = ReaderClass(
+ def link(self, media_file, upload_dir=None, chunk_size=36, force=False, **kwargs):
+ self._reader = VideoStreamReader(
os.path.join(upload_dir, media_file) if upload_dir else media_file,
chunk_size,
force)
From bca5f574fd1787e2a897d99a4735d7e4da5f1728 Mon Sep 17 00:00:00 2001
From: Kirill Lakhov
Date: Tue, 3 Oct 2023 14:51:51 +0300
Subject: [PATCH 05/12] Improved Cloud Storage form/create task error message
(#6890)
### Motivation and context
Added form validation. CS manifest can be only in `.jsonl` format
![image](https://github.com/opencv/cvat/assets/50956430/c1f0b8b4-c2c4-4771-a893-9b43682660b5)
Improved error message on task creation form if some incorrect files are
selected. Shown their extensions
![image](https://github.com/opencv/cvat/assets/50956430/78c8ea2c-a6ab-445a-a3a0-16e5d0d94423)
### How has this been tested?
### Checklist
- [x] I submit my changes into the `develop` branch
- [x] I have added a description of my changes into the
[CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md)
file
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [x] I have linked related issues (see [GitHub docs](
https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- [x] I have increased versions of npm packages if it is necessary
([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning),
[cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning),
[cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning)
and
[cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))
### License
- [ ] I submit _my code changes_ under the same [MIT License](
https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the
project.
Feel free to contact the maintainers if that's a concern.
---
CHANGELOG.md | 2 +
cvat-ui/package.json | 2 +-
.../manifests-manager.tsx | 5 +++
.../create-task-page/create-task-content.tsx | 42 +++++++++++++------
.../file-manager/remote-browser.tsx | 2 +-
5 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index af41a9bc6d1e..14a492c09bf3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -68,6 +68,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Downloading additional data from cloud storage if use_cache=true and job_file_mapping are specified
()
- Leaving an organization ()
+- Validation on Cloud Storage form / error message on create task form ()
+
## \[2.7.1\] - 2023-09-15
diff --git a/cvat-ui/package.json b/cvat-ui/package.json
index b24ee60adba6..ef151fdee642 100644
--- a/cvat-ui/package.json
+++ b/cvat-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
- "version": "1.57.0",
+ "version": "1.57.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 36a646f85540..2a5809b5268d 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
@@ -90,6 +90,11 @@ export default function ManifestsManager(props: Props): JSX.Element {
required: true,
message: 'Please specify a manifest name',
},
+ {
+ type: 'string',
+ pattern: /^.*\.(jsonl)$/,
+ message: 'Manifest file must have .jsonl extension',
+ },
]}
initialValue={field.name}
>
diff --git a/cvat-ui/src/components/create-task-page/create-task-content.tsx b/cvat-ui/src/components/create-task-page/create-task-content.tsx
index 362e32ca31be..a1ab6c27b177 100644
--- a/cvat-ui/src/components/create-task-page/create-task-content.tsx
+++ b/cvat-ui/src/components/create-task-page/create-task-content.tsx
@@ -99,26 +99,44 @@ const defaultState: State = {
};
const UploadFileErrorMessages = {
- one: 'It can not be processed. You can upload an archive with images, a video, a pdf file or multiple images',
- multi: 'It can not be processed. You can upload one or more videos',
+ one: 'Wrong list of files. You can upload an archive with images, a video, a pdf file or multiple images. ',
+ multi: 'Wrong list of files. You can upload one or more videos. ',
};
+function receiveExtensions(files: RemoteFile[]): string[] {
+ const fileTypes = files.filter((file: RemoteFile) => file.name.includes('.'))
+ .map((file: RemoteFile) => `.${file.name.split('.').pop()}`);
+ return fileTypes;
+}
+
+function checkFiles(files: RemoteFile[], type: SupportedShareTypes, baseError: string): string {
+ const erroredFiles = files.filter(
+ (it) => it.mimeType !== type,
+ );
+ if (erroredFiles.length !== 0) {
+ const unsupportedTypes = receiveExtensions(erroredFiles);
+ const extensionList = Array.from(new Set(unsupportedTypes));
+ return extensionList.length ? `${baseError} Found unsupported types: ${extensionList.join(', ')}. ` : baseError;
+ }
+ return '';
+}
+
function validateRemoteFiles(remoteFiles: RemoteFile[], many: boolean): string {
let uploadFileErrorMessage = '';
- let filteredFiles = remoteFiles;
const regFiles = remoteFiles.filter((file) => file.type === 'REG');
const excludedManifests = regFiles.filter((file) => !file.key.endsWith('.jsonl'));
if (!many && excludedManifests.length > 1) {
- uploadFileErrorMessage = excludedManifests.every(
- (it) => it.mimeType === SupportedShareTypes.IMAGE,
- ) ? '' : UploadFileErrorMessages.one;
+ uploadFileErrorMessage = checkFiles(
+ excludedManifests,
+ SupportedShareTypes.IMAGE,
+ UploadFileErrorMessages.one,
+ );
} else if (many) {
- filteredFiles = filteredFiles.filter((it) => it.mimeType === SupportedShareTypes.VIDEO);
- // something is selected and no one video
- // or something except of videos selected (excluding directories)
- uploadFileErrorMessage = remoteFiles.length && (
- !filteredFiles.length || filteredFiles.length !== regFiles.length
- ) ? UploadFileErrorMessages.multi : '';
+ uploadFileErrorMessage = checkFiles(
+ regFiles,
+ SupportedShareTypes.VIDEO,
+ UploadFileErrorMessages.multi,
+ );
}
return uploadFileErrorMessage;
}
diff --git a/cvat-ui/src/components/file-manager/remote-browser.tsx b/cvat-ui/src/components/file-manager/remote-browser.tsx
index a9e7266f35a6..ceb74330a4ac 100644
--- a/cvat-ui/src/components/file-manager/remote-browser.tsx
+++ b/cvat-ui/src/components/file-manager/remote-browser.tsx
@@ -29,7 +29,7 @@ interface Node {
nextToken?: string | null;
}
-export type RemoteFile = Pick;
+export type RemoteFile = Pick;
interface Props {
resource: 'share' | CloudStorage;
From 0be063ed4f572823125ab08ee9dbc33a5321bb23 Mon Sep 17 00:00:00 2001
From: Kirill Lakhov
Date: Wed, 4 Oct 2023 10:28:35 +0300
Subject: [PATCH 06/12] Add support for about plugins (#6928)
### Motivation and context
### How has this been tested?
### Checklist
- [ ] I submit my changes into the `develop` branch
- [ ] I have added a description of my changes into the
[CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md)
file
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] I have linked related issues (see [GitHub docs](
https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- [ ] I have increased versions of npm packages if it is necessary
([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning),
[cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning),
[cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning)
and
[cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))
### License
- [ ] I submit _my code changes_ under the same [MIT License](
https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the
project.
Feel free to contact the maintainers if that's a concern.
---
cvat-ui/src/components/header/header.tsx | 56 +++++++++++++++---------
cvat-ui/src/reducers/index.ts | 7 ++-
cvat-ui/src/reducers/plugins-reducer.ts | 5 +++
3 files changed, 47 insertions(+), 21 deletions(-)
diff --git a/cvat-ui/src/components/header/header.tsx b/cvat-ui/src/components/header/header.tsx
index b78dc6fe63f8..340f8058b2b0 100644
--- a/cvat-ui/src/components/header/header.tsx
+++ b/cvat-ui/src/components/header/header.tsx
@@ -168,6 +168,40 @@ function HeaderComponent(props: Props): JSX.Element {
},
};
+ const aboutPlugins = usePlugins((state: CombinedState) => state.plugins.components.about.links.items, props);
+ const aboutLinks: [JSX.Element, number][] = [];
+ aboutLinks.push([(
+
+
+ What's new?
+
+
+ ), 0]);
+ aboutLinks.push([(
+
+
+ MIT License
+
+
+ ), 10]);
+ aboutLinks.push([(
+
+
+ Need help?
+
+
+ ), 20]);
+ aboutLinks.push([(
+
+
+ Find us on Discord
+
+
+ ), 30]);
+ aboutLinks.push(...aboutPlugins.map(({ component: Component, weight }, index: number) => (
+ [, weight] as [JSX.Element, number]
+ )));
+
const showAboutModal = useCallback((): void => {
Modal.info({
title: `${about.server.name}`,
@@ -191,26 +225,8 @@ function HeaderComponent(props: Props): JSX.Element {
{` ${about.packageVersion.ui}`}
-
-
- What's new?
-
-
-
-
- MIT License
-
-
-
-
- Need help?
-
-
-
-
- Find us on Discord
-
-
+ { aboutLinks.sort((item1, item2) => item1[1] - item2[1])
+ .map((item) => item[0]) }
),
diff --git a/cvat-ui/src/reducers/index.ts b/cvat-ui/src/reducers/index.ts
index 01ff3bcc1e86..cb23cc7d60f0 100644
--- a/cvat-ui/src/reducers/index.ts
+++ b/cvat-ui/src/reducers/index.ts
@@ -313,7 +313,12 @@ export interface PluginsState {
};
};
settings: {
- player: PluginComponent[],
+ player: PluginComponent[];
+ }
+ about: {
+ links: {
+ items: PluginComponent[];
+ }
}
router: PluginComponent[];
loggedInModals: PluginComponent[];
diff --git a/cvat-ui/src/reducers/plugins-reducer.ts b/cvat-ui/src/reducers/plugins-reducer.ts
index 62c4d3796c84..6c0ec2379c0f 100644
--- a/cvat-ui/src/reducers/plugins-reducer.ts
+++ b/cvat-ui/src/reducers/plugins-reducer.ts
@@ -45,6 +45,11 @@ const defaultState: PluginsState = {
settings: {
player: [],
},
+ about: {
+ links: {
+ items: [],
+ },
+ },
},
};
From 060d05c964a57d1036fd132eace92a3d8435f9d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Kotiuk?=
Date: Wed, 4 Oct 2023 11:12:45 +0200
Subject: [PATCH 07/12] Bump Grafana version (#6912)
Bump Grafana version to 10.1.2
---
CHANGELOG.md | 2 +-
docker-compose.yml | 2 +-
helm-chart/Chart.yaml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 14a492c09bf3..164a3c560e98 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,7 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security
-- TDB
+- Update Grafana from 9.3.6 to 10.1.2
## \[2.7.3\] - 2023-10-02
diff --git a/docker-compose.yml b/docker-compose.yml
index 2db3f665373c..3a558b5904a6 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -331,7 +331,7 @@ services:
- ./components/analytics/vector/vector.toml:/etc/vector/vector.toml:ro
cvat_grafana:
- image: grafana/grafana-oss:9.3.6
+ image: grafana/grafana-oss:10.1.2
container_name: cvat_grafana
environment:
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml
index 7cbfc7c923aa..d5439dee7f71 100644
--- a/helm-chart/Chart.yaml
+++ b/helm-chart/Chart.yaml
@@ -46,7 +46,7 @@ dependencies:
condition: analytics.enabled
- name: grafana
- version: "6.51.*"
+ version: "6.60.*"
repository: https://grafana.github.io/helm-charts
condition: analytics.enabled
From b2b4974d0f19ad530f8a60259193b08520aa43da Mon Sep 17 00:00:00 2001
From: Nikita Manovich
Date: Wed, 4 Oct 2023 13:35:45 +0300
Subject: [PATCH 08/12] [Snyk] Security upgrade urllib3 from 1.26.16 to 1.26.17
(#6936)
Co-authored-by: snyk-bot
---
cvat/requirements/base.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cvat/requirements/base.txt b/cvat/requirements/base.txt
index 7a549671d56f..2718bb916b17 100644
--- a/cvat/requirements/base.txt
+++ b/cvat/requirements/base.txt
@@ -382,7 +382,7 @@ uritemplate==4.1.1
# via
# coreapi
# drf-spectacular
-urllib3==1.26.16
+urllib3==1.26.17
# via
# botocore
# clickhouse-connect
From 3b15362e1d016b61d4fa152056c504b32a6b0748 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 4 Oct 2023 14:55:22 +0300
Subject: [PATCH 09/12] Bump postcss from 8.3.9 to 8.4.31 in /site (#6939)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
site/package-lock.json | 88 ++++++++++++++++++++++++++++--------------
site/package.json | 2 +-
2 files changed, 60 insertions(+), 30 deletions(-)
diff --git a/site/package-lock.json b/site/package-lock.json
index f8c33df11784..13c34a455a88 100644
--- a/site/package-lock.json
+++ b/site/package-lock.json
@@ -10,7 +10,7 @@
"license": "MIT",
"devDependencies": {
"autoprefixer": "^10.2.5",
- "postcss": "^8.2.15",
+ "postcss": "^8.4.31",
"postcss-cli": "^8.3.1"
}
},
@@ -604,10 +604,16 @@
"dev": true
},
"node_modules/nanoid": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
- "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==",
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
"bin": {
"nanoid": "bin/nanoid.cjs"
},
@@ -676,21 +682,31 @@
}
},
"node_modules/postcss": {
- "version": "8.3.9",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.9.tgz",
- "integrity": "sha512-f/ZFyAKh9Dnqytx5X62jgjhhzttjZS7hMsohcI7HEI5tjELX/HxCy3EFhsRxyzGvrzFF+82XPvCS8T9TFleVJw==",
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
"dependencies": {
- "nanoid": "^3.1.28",
- "picocolors": "^0.2.1",
- "source-map-js": "^0.6.2"
+ "nanoid": "^3.3.6",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
},
"engines": {
"node": "^10 || ^12 || >=14"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-cli": {
@@ -778,6 +794,12 @@
"integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==",
"dev": true
},
+ "node_modules/postcss/node_modules/picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ },
"node_modules/pretty-hrtime": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
@@ -889,9 +911,9 @@
}
},
"node_modules/source-map-js": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz",
- "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"dev": true,
"engines": {
"node": ">=0.10.0"
@@ -1448,9 +1470,9 @@
"dev": true
},
"nanoid": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
- "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==",
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"dev": true
},
"node-releases": {
@@ -1496,14 +1518,22 @@
"dev": true
},
"postcss": {
- "version": "8.3.9",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.9.tgz",
- "integrity": "sha512-f/ZFyAKh9Dnqytx5X62jgjhhzttjZS7hMsohcI7HEI5tjELX/HxCy3EFhsRxyzGvrzFF+82XPvCS8T9TFleVJw==",
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"dev": true,
"requires": {
- "nanoid": "^3.1.28",
- "picocolors": "^0.2.1",
- "source-map-js": "^0.6.2"
+ "nanoid": "^3.3.6",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ },
+ "dependencies": {
+ "picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ }
}
},
"postcss-cli": {
@@ -1621,9 +1651,9 @@
"dev": true
},
"source-map-js": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz",
- "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"dev": true
},
"string-width": {
diff --git a/site/package.json b/site/package.json
index 8b9a0a2d8ed4..11506140da5a 100644
--- a/site/package.json
+++ b/site/package.json
@@ -7,7 +7,7 @@
"devDependencies": {
"autoprefixer": "^10.2.5",
"postcss-cli": "^8.3.1",
- "postcss": "^8.2.15"
+ "postcss": "^8.4.31"
},
"repository": {
"type": "git",
From 9501bae63b6fbc226355bf38d888bf175078964b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 4 Oct 2023 17:55:47 +0300
Subject: [PATCH 10/12] Bump postcss from 8.4.25 to 8.4.31 (#6938)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
yarn.lock | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/yarn.lock b/yarn.lock
index cccc54e47988..2a2d6e95bd4c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3553,7 +3553,7 @@ cjs-module-lexer@^1.0.0:
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40"
integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==
-classnames@2.x, classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1:
+classnames@2.x, classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1, classnames@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924"
integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==
@@ -4066,7 +4066,7 @@ custom-error-instance@2.1.1:
svg.select.js "3.0.1"
"cvat-core@link:./cvat-core":
- version "11.0.3"
+ version "11.1.0"
dependencies:
"@types/lodash" "^4.14.191"
axios "^0.27.2"
@@ -9343,19 +9343,10 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
-postcss@8:
- version "8.4.25"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.25.tgz#4a133f5e379eda7f61e906c3b1aaa9b81292726f"
- integrity sha512-7taJ/8t2av0Z+sQEvNzCkpDynl0tX3uJMCODi6nT3PfASC7dYCWV9aQ+uiCf+KBD4SEFcu+GvJdGdwzQ6OSjCw==
- dependencies:
- nanoid "^3.3.6"
- picocolors "^1.0.0"
- source-map-js "^1.0.2"
-
-postcss@^8.4.21, postcss@^8.4.25:
- version "8.4.27"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.27.tgz#234d7e4b72e34ba5a92c29636734349e0d9c3057"
- integrity sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==
+postcss@8, postcss@^8.4.21, postcss@^8.4.25:
+ version "8.4.31"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d"
+ integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==
dependencies:
nanoid "^3.3.6"
picocolors "^1.0.0"
From bfc86ae154071c2f29f5d821f7a2523f81c55cf1 Mon Sep 17 00:00:00 2001
From: Boris Sekachev
Date: Thu, 5 Oct 2023 11:36:11 +0300
Subject: [PATCH 11/12] Improved issues comments pipeline (#6937)
---
CHANGELOG.md | 4 +-
cvat-canvas/package.json | 2 +-
cvat-canvas/src/typescript/canvasView.ts | 12 +-
cvat-ui/package.json | 2 +-
.../review/hidden-issue-label.tsx | 6 +-
.../annotation-page/review/issue-dialog.tsx | 5 +-
.../annotation-page/review/styles.scss | 5 +-
.../objects-side-bar/issues-list.tsx | 119 +++++++++++-------
.../objects-side-bar/styles.scss | 20 +--
.../objects-side-bar/objects-list.tsx | 3 +-
10 files changed, 103 insertions(+), 75 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 164a3c560e98..fdd6a230897d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
-- TDB
+- The latest comment displayed in issues sidebar ()
### Changed
@@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
-- TDB
+- It was not possible to copy issue comment from issue dialog ()
### Security
diff --git a/cvat-canvas/package.json b/cvat-canvas/package.json
index 19404cdedda0..e2fac71846e0 100644
--- a/cvat-canvas/package.json
+++ b/cvat-canvas/package.json
@@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
- "version": "2.17.5",
+ "version": "2.17.6",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {
diff --git a/cvat-canvas/src/typescript/canvasView.ts b/cvat-canvas/src/typescript/canvasView.ts
index bd279d2c3a60..cfe1c9ce8aab 100644
--- a/cvat-canvas/src/typescript/canvasView.ts
+++ b/cvat-canvas/src/typescript/canvasView.ts
@@ -1258,13 +1258,11 @@ export class CanvasViewImpl implements CanvasView, Listener {
window.document.addEventListener('keydown', this.onShiftKeyDown);
window.document.addEventListener('keyup', this.onShiftKeyUp);
- this.attachmentBoard.addEventListener('wheel', (event) => {
- event.stopPropagation();
- });
-
- this.attachmentBoard.addEventListener('mousemove', (event) => {
- event.stopPropagation();
- });
+ for (const eventName of ['wheel', 'mousedown', 'dblclick', 'contextmenu']) {
+ this.attachmentBoard.addEventListener(eventName, (event) => {
+ event.stopPropagation();
+ });
+ }
this.canvas.addEventListener('wheel', (event): void => {
if (event.ctrlKey) return;
diff --git a/cvat-ui/package.json b/cvat-ui/package.json
index ef151fdee642..4fbfa49cd725 100644
--- a/cvat-ui/package.json
+++ b/cvat-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
- "version": "1.57.1",
+ "version": "1.57.2",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
diff --git a/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx b/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx
index 747730b66e26..9518090b1406 100644
--- a/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx
+++ b/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx
@@ -8,7 +8,7 @@ import React, {
} from 'react';
import ReactDOM from 'react-dom';
import Tag from 'antd/lib/tag';
-import { CheckCircleOutlined, CloseCircleOutlined, WarningOutlined } from '@ant-design/icons';
+import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
import { Issue } from 'cvat-core-wrapper';
import CVATTooltip from 'components/common/cvat-tooltip';
@@ -63,7 +63,7 @@ export default function HiddenIssueLabel(props: Props): ReactPortal {
const elementID = `cvat-hidden-issue-label-${id}`;
return ReactDOM.createPortal(
-
+
)}
- {comments[0]?.message || }
+ {comments[0]?.message || null}
,
window.document.getElementById('cvat_canvas_attachment_board') as HTMLElement,
diff --git a/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx b/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx
index 3b4d1954ab79..36a6b2f5f382 100644
--- a/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx
+++ b/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx
@@ -15,7 +15,6 @@ import Comment from 'antd/lib/comment';
import Text from 'antd/lib/typography/Text';
import Title from 'antd/lib/typography/Title';
import Button from 'antd/lib/button';
-import Spin from 'antd/lib/spin';
import Input from 'antd/lib/input';
import moment from 'moment';
import CVATTooltip from 'components/common/cvat-tooltip';
@@ -148,7 +147,9 @@ export default function IssueDialog(props: Props): JSX.Element {
{
- lines.length > 0 ? {lines} :
+ lines.length > 0 ? {lines} : (
+ No comments found
+ )
}
diff --git a/cvat-ui/src/components/annotation-page/review/styles.scss b/cvat-ui/src/components/annotation-page/review/styles.scss
index aa246cec78cd..bb948207c495 100644
--- a/cvat-ui/src/components/annotation-page/review/styles.scss
+++ b/cvat-ui/src/components/annotation-page/review/styles.scss
@@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT
-@import 'base.scss';
+@import 'base';
.cvat-create-issue-dialog {
position: absolute;
@@ -72,7 +72,6 @@
transform-origin: top left;
box-shadow: $box-shadow-base;
border-radius: 0.5 * $grid-unit-size;
- opacity: 0.95;
.cvat-issue-dialog-chat {
> div {
@@ -93,7 +92,7 @@
}
}
- border-radius: 0.5 * $grid-unit-size;
+ user-select: all;
background: $background-color-1;
padding: $grid-unit-size;
max-height: $grid-unit-size * 45;
diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx
index 0c74413fd478..4499f3e28c1e 100644
--- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx
+++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/issues-list.tsx
@@ -18,29 +18,29 @@ import CVATTooltip from 'components/common/cvat-tooltip';
import { ActiveControl, CombinedState, Workspace } from 'reducers';
import moment from 'moment';
import Paragraph from 'antd/lib/typography/Paragraph';
-import { ConflictSeverity, QualityConflict } from 'cvat-core-wrapper';
+import { ConflictSeverity, QualityConflict, Issue } from 'cvat-core-wrapper';
import { changeShowGroundTruth } from 'actions/settings-actions';
import { ShowGroundTruthIcon } from 'icons';
export default function LabelsListComponent(): JSX.Element {
const dispatch = useDispatch();
const frame = useSelector((state: CombinedState): number => state.annotation.player.frame.number);
- const frameIssues = useSelector((state: CombinedState): any[] => state.review.frameIssues);
+ const frameIssues = useSelector((state: CombinedState): Issue[] => state.review.frameIssues);
const frameConflicts = useSelector((state: CombinedState) => state.review.frameConflicts);
const showGroundTruth = useSelector((state: CombinedState) => state.settings.shapes.showGroundTruth);
- const issues = useSelector((state: CombinedState): any[] => state.review.issues);
+ const issues = useSelector((state: CombinedState): Issue[] => state.review.issues);
const conflicts = useSelector((state: CombinedState) => state.review.conflicts);
- const issuesHidden = useSelector((state: CombinedState): any => state.review.issuesHidden);
- const issuesResolvedHidden = useSelector((state: CombinedState): any => state.review.issuesResolvedHidden);
+ const issuesHidden = useSelector((state: CombinedState) => state.review.issuesHidden);
+ const issuesResolvedHidden = useSelector((state: CombinedState) => state.review.issuesResolvedHidden);
const highlightedConflict = useSelector((state: CombinedState) => state.annotation.annotations.highlightedConflict);
const workspace = useSelector((state: CombinedState) => state.annotation.workspace);
const ready = useSelector((state: CombinedState) => state.annotation.canvas.ready);
const activeControl = useSelector((state: CombinedState) => state.annotation.canvas.activeControl);
- let frames = issues.map((issue: any): number => issue.frame).sort((a: number, b: number) => +a - +b);
+ let frames = issues.map((issue: Issue): number => issue.frame).sort((a: number, b: number) => +a - +b);
if (showGroundTruth) {
const conflictFrames = conflicts
- .map((issue: any): number => issue.frame).sort((a: number, b: number) => +a - +b);
+ .map((conflict): number => conflict.frame).sort((a: number, b: number) => +a - +b);
frames = [...new Set([...frames, ...conflictFrames])];
}
const nearestLeft = frames.filter((_frame: number): boolean => _frame < frame).reverse()[0];
@@ -131,45 +131,74 @@ export default function LabelsListComponent(): JSX.Element {
{frameIssues.map(
- (frameIssue: any): JSX.Element => (
-
+ );
+ },
)}
{showGroundTruth && frameConflicts.map(
(frameConflict: QualityConflict): JSX.Element => (
diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/styles.scss b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/styles.scss
index a34ebc704146..d2496a654209 100644
--- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/styles.scss
+++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/styles.scss
@@ -3,7 +3,7 @@
//
// SPDX-License-Identifier: MIT
-@import 'base.scss';
+@import 'base';
.cvat-objects-appearance-collapse.ant-collapse {
width: 100%;
@@ -123,6 +123,12 @@
padding: $grid-unit-size $grid-unit-size $grid-unit-size $grid-unit-size * 8;
}
+ > .ant-row {
+ .ant-typography {
+ margin-bottom: 0;
+ }
+ }
+
p {
margin-bottom: 0;
}
@@ -217,7 +223,7 @@
.cvat-objects-sidebar-state-item {
width: 100%;
- padding: 5px 3px 3px 3px;
+ padding: 5px 3px 3px;
opacity: 1;
> div:nth-child(1) {
@@ -297,7 +303,7 @@
.cvat-object-item-radio-attribute {
border: 1px double $border-color-hover;
- border-radius: 7px 7px 7px 7px;
+ border-radius: 7px;
> legend {
text-align: center;
@@ -316,7 +322,7 @@
> .ant-radio-group {
display: grid;
- padding: 1px 5px 1px 5px;
+ padding: 1px 5px;
}
}
@@ -337,7 +343,7 @@
.cvat-objects-sidebar-label-item {
height: 2.5em;
border-bottom: 1px solid $border-color-1;
- padding: 5px 3px 3px 3px;
+ padding: 5px 3px 3px;
span {
@extend .cvat-object-sidebar-icon;
@@ -469,10 +475,6 @@
padding: $grid-unit-size * 0.5;
border: 1px solid $object-item-border-color;
border-bottom: 0;
- padding-top: 1px;
- padding-left: 1px;
- padding-right: 1px;
- padding-bottom: 2px;
&:last-child {
border-bottom: 1px solid $object-item-border-color;
diff --git a/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/objects-list.tsx b/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/objects-list.tsx
index 8eb297feef86..a7ef3808ada9 100644
--- a/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/objects-list.tsx
+++ b/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/objects-list.tsx
@@ -488,8 +488,7 @@ class ObjectsListContainer extends React.PureComponent
{
updateAnnotations([state]);
}
},
- COPY_SHAPE: (event: KeyboardEvent | undefined) => {
- preventDefault(event);
+ COPY_SHAPE: () => {
const state = activatedState();
if (state && !readonly) {
copyShape(state);
From ae1dc1b14d1cab584f2ba6a18b0cb3aa00d7e429 Mon Sep 17 00:00:00 2001
From: Kirill Sizov
Date: Thu, 5 Oct 2023 15:42:15 +0300
Subject: [PATCH 12/12] Sort frames during project dumping (#6927)
When we export a task or project in CVAT format [our code
uses](https://github.com/opencv/cvat/blob/d497bb6a90dd3c9625c3c8e8f73278019e21983d/cvat/apps/dataset_manager/formats/cvat.py#L717)
the `group_by_frame` function. For tasks and for projects behaviour of
this function is different since for tasks [we perform sorting
frames](https://github.com/opencv/cvat/blob/d497bb6a90dd3c9625c3c8e8f73278019e21983d/cvat/apps/dataset_manager/bindings.py#L420-L421)
but for projects [we
don't](https://github.com/opencv/cvat/blob/d497bb6a90dd3c9625c3c8e8f73278019e21983d/cvat/apps/dataset_manager/bindings.py#L1152-L1154).
As a result, we can have a situation when our annotation file for the
project will have a list of images in unsorted form. So this PR adds
sorting frames during project export as well.
---
CHANGELOG.md | 2 +-
cvat/apps/dataset_manager/bindings.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fdd6a230897d..0bd8ca44652d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -68,9 +68,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Downloading additional data from cloud storage if use_cache=true and job_file_mapping are specified
()
- Leaving an organization ()
+- Order of images in annotation file when dumping project in CVAT format ()
- Validation on Cloud Storage form / error message on create task form ()
-
## \[2.7.1\] - 2023-09-15
### Fixed
diff --git a/cvat/apps/dataset_manager/bindings.py b/cvat/apps/dataset_manager/bindings.py
index d1f52e795464..5d6a48b6f029 100644
--- a/cvat/apps/dataset_manager/bindings.py
+++ b/cvat/apps/dataset_manager/bindings.py
@@ -1149,7 +1149,7 @@ def get_frame(task_id: int, idx: int) -> ProjectData.Frame:
return frames[(frame_info["subset"], abs_frame)]
if include_empty:
- for ident in self._frame_info:
+ for ident in sorted(self._frame_info):
if ident not in self._deleted_frames:
get_frame(*ident)