-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR introduces new page with information about data processing(status and progress). For now it will support: task creation, import/export. For previous discussions refer to: #7537 Co-authored-by: Maria Khrustaleva <maria@cvat.ai> Co-authored-by: Boris Sekachev <sekachev.bs@gmail.com>
- Loading branch information
1 parent
b17d293
commit c9f1cff
Showing
116 changed files
with
5,295 additions
and
1,917 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Added | ||
|
||
- Set of features to track background activities: importing/exporting datasets, annotations or backups, creating tasks. | ||
Now you may find these processes on Requests page, it allows a user to understand current status of these activities | ||
and enhances user experience, not losing progress when the browser tab is closed | ||
(<https://github.com/cvat-ai/cvat/pull/7537>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// Copyright (C) 2024 CVAT.ai Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
import { RQStatus } from './enums'; | ||
import User from './user'; | ||
import { SerializedRequest } from './server-response-types'; | ||
|
||
type Operation = { | ||
target: string; | ||
type: string; | ||
format: string; | ||
jobID: number | null; | ||
taskID: number | null; | ||
projectID: number | null; | ||
}; | ||
|
||
export class Request { | ||
#id: string; | ||
#status: RQStatus; | ||
#operation: Partial<SerializedRequest['operation']>; | ||
#message: string; | ||
#progress: number; | ||
#resultUrl: string; | ||
#resultID: number; | ||
#createdDate: string; | ||
#startedDate: string; | ||
#finishedDate: string; | ||
#expiryDate: string; | ||
#owner: User; | ||
|
||
constructor(initialData: SerializedRequest) { | ||
this.#id = initialData.id; | ||
this.#status = initialData.status as RQStatus; | ||
this.#operation = initialData.operation; | ||
this.#progress = initialData.progress; | ||
this.#message = initialData.message; | ||
this.#resultUrl = initialData.result_url; | ||
this.#resultID = initialData.result_id; | ||
|
||
this.#createdDate = initialData.created_date; | ||
this.#startedDate = initialData.started_date; | ||
this.#finishedDate = initialData.finished_date; | ||
this.#expiryDate = initialData.expiry_date; | ||
|
||
if (initialData.owner) { | ||
this.#owner = new User(initialData.owner); | ||
} | ||
} | ||
|
||
get id(): string { | ||
return this.#id; | ||
} | ||
|
||
get status(): RQStatus { | ||
return this.#status.toLowerCase() as RQStatus; | ||
} | ||
|
||
get progress(): number { | ||
return this.#progress; | ||
} | ||
|
||
get message(): string { | ||
return this.#message; | ||
} | ||
|
||
get operation(): Operation { | ||
return { | ||
target: this.#operation.target, | ||
type: this.#operation.type, | ||
format: this.#operation.format, | ||
jobID: this.#operation.job_id, | ||
taskID: this.#operation.task_id, | ||
projectID: this.#operation.project_id, | ||
}; | ||
} | ||
|
||
get url(): string { | ||
return this.#resultUrl; | ||
} | ||
|
||
get resultID(): number { | ||
return this.#resultID; | ||
} | ||
|
||
get createdDate(): string { | ||
return this.#createdDate; | ||
} | ||
|
||
get startedDate(): string { | ||
return this.#startedDate; | ||
} | ||
|
||
get finishedDate(): string { | ||
return this.#finishedDate; | ||
} | ||
|
||
get expiryDate(): string { | ||
return this.#expiryDate; | ||
} | ||
|
||
get owner(): User { | ||
return this.#owner; | ||
} | ||
} |
Oops, something went wrong.