Fixed copy job list feature (#3749)

* Fixed copy job list feature

* Updated version & changelog
main
Boris Sekachev 4 years ago committed by GitHub
parent 54ac8c08e9
commit 51ee7cbca2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Display a more user-friendly exception message (<https://github.com/openvinotoolkit/cvat/pull/3721>) - Display a more user-friendly exception message (<https://github.com/openvinotoolkit/cvat/pull/3721>)
- Exception `DataCloneError: The object could not be cloned` (<https://github.com/openvinotoolkit/cvat/pull/3733>) - Exception `DataCloneError: The object could not be cloned` (<https://github.com/openvinotoolkit/cvat/pull/3733>)
- Fixed extension comparison in task frames CLI (<https://github.com/openvinotoolkit/cvat/pull/3674>) - Fixed extension comparison in task frames CLI (<https://github.com/openvinotoolkit/cvat/pull/3674>)
- Incorrect work when copy job list with "Copy" button (<https://github.com/openvinotoolkit/cvat/pull/3749>)
### Security ### Security

@ -1,6 +1,6 @@
{ {
"name": "cvat-ui", "name": "cvat-ui",
"version": "1.24.0", "version": "1.24.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

@ -1,6 +1,6 @@
{ {
"name": "cvat-ui", "name": "cvat-ui",
"version": "1.24.0", "version": "1.24.1",
"description": "CVAT single-page application", "description": "CVAT single-page application",
"main": "src/index.tsx", "main": "src/index.tsx",
"scripts": { "scripts": {

@ -15,14 +15,8 @@ import moment from 'moment';
import copy from 'copy-to-clipboard'; import copy from 'copy-to-clipboard';
import CVATTooltip from 'components/common/cvat-tooltip'; import CVATTooltip from 'components/common/cvat-tooltip';
import getCore from 'cvat-core-wrapper';
import UserSelector, { User } from './user-selector'; import UserSelector, { User } from './user-selector';
const core = getCore();
const baseURL = core.config.backendAPI.slice(0, -7);
interface Props { interface Props {
taskInstance: any; taskInstance: any;
onJobUpdate(jobInstance: any): void; onJobUpdate(jobInstance: any): void;
@ -292,8 +286,9 @@ function JobListComponent(props: Props & RouteComponentProps): JSX.Element {
let serialized = ''; let serialized = '';
const [latestJob] = [...taskInstance.jobs].reverse(); const [latestJob] = [...taskInstance.jobs].reverse();
for (const job of taskInstance.jobs) { for (const job of taskInstance.jobs) {
const baseURL = window.location.origin;
serialized += `Job #${job.id}`.padEnd(`${latestJob.id}`.length + 6, ' '); serialized += `Job #${job.id}`.padEnd(`${latestJob.id}`.length + 6, ' ');
serialized += `: ${baseURL}/?id=${job.id}`.padEnd( serialized += `: ${baseURL}/tasks/${taskInstance.id}/jobs/${job.id}`.padEnd(
`${latestJob.id}`.length + baseURL.length + 8, `${latestJob.id}`.length + baseURL.length + 8,
' ', ' ',
); );

Loading…
Cancel
Save