Skip to content

Commit

Permalink
Integration of REST/API in client #4 (#364)
Browse files Browse the repository at this point in the history
* Fixed labels with ',' character
* Updated defian, fixed filter
* Added defiant.min.js
* Shape splitter fixed
* Fixed group id
* Fixed tensorflow annotation without OpenVINO (#359)
* Updated unit tests
* Fixed: Property 'close()' of undefined (#360)
* Unit tests for listener interface and player
* Fixed tests
* Fixed tests
* Codacy issues, open a task from a job
  • Loading branch information
bsekachev authored and nmanovic committed Mar 29, 2019
1 parent b683a19 commit 30a5eb8
Show file tree
Hide file tree
Showing 19 changed files with 742 additions and 2,257 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
"airbnb",
],
"rules": {
"no-new": [0],
"class-methods-use-this": [0],
"no-restricted-properties": [0, {
"object": "Math",
"property": "pow",
}],
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
"no-restricted-syntax": [0, {"selector": "ForOfStatement"}],
"no-unsafe-innerhtml/no-unsafe-innerhtml": 1,
// This rule actual for user input data on the node.js environment mainly.
"security/detect-object-injection": 0,
Expand Down
10 changes: 10 additions & 0 deletions cvat/apps/dashboard/static/dashboard/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ class DashboardView {
}
}

function validateBugTracker(bugTracker) {
return !bugTracker || !!bugTracker.match(/^http[s]?/);
}

function validateSegmentSize(segmentSize) {
return (segmentSize >= 100 && segmentSize <= 50000);
}
Expand Down Expand Up @@ -589,6 +593,12 @@ class DashboardView {
return;
}

if (!validateBugTracker(bugTrackerLink)) {
taskMessage.css('color', 'red');
taskMessage.text('Bad bag tracker link');
return;
}

if (!validateOverlapSize(overlapSize, segmentSize)) {
taskMessage.css('color', 'red');
taskMessage.text('Overlap size must be positive and not more then segment size');
Expand Down
7 changes: 2 additions & 5 deletions cvat/apps/dashboard/static/dashboard/js/enginePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
* SPDX-License-Identifier: MIT
*/

"use strict";

window.addEventListener('DOMContentLoaded', () => {
$(`<button class="menuButton semiBold h2"> Open Task </button>`).on('click', () => {
let win = window.open(`${window.location.origin }/dashboard/?jid=${window.cvat.job.id}`, '_blank');
$('<button class="menuButton semiBold h2"> Open Task </button>').on('click', () => {
const win = window.open(`${window.location.origin}/dashboard/?id=${window.cvat.job.task_id}`, '_blank');
win.focus();
}).prependTo('#engineMenuButtons');
});

59 changes: 18 additions & 41 deletions cvat/apps/engine/static/engine/js/3rdparty.patch

Large diffs are not rendered by default.

Loading

0 comments on commit 30a5eb8

Please sign in to comment.