diff --git a/cvat/apps/dashboard/__init__.py b/cvat/apps/dashboard/__init__.py index d8e62e54b35..da270801d9c 100644 --- a/cvat/apps/dashboard/__init__.py +++ b/cvat/apps/dashboard/__init__.py @@ -3,3 +3,6 @@ # # SPDX-License-Identifier: MIT +from cvat.settings.base import JS_3RDPARTY + +JS_3RDPARTY['engine'] = JS_3RDPARTY.get('engine', []) + ['dashboard/js/enginePlugin.js'] diff --git a/cvat/apps/dashboard/static/dashboard/js/enginePlugin.js b/cvat/apps/dashboard/static/dashboard/js/enginePlugin.js new file mode 100644 index 00000000000..4c95fa66bff --- /dev/null +++ b/cvat/apps/dashboard/static/dashboard/js/enginePlugin.js @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2018 Intel Corporation + * + * SPDX-License-Identifier: MIT + */ + +"use strict"; + +window.addEventListener('DOMContentLoaded', () => { + $(``).on('click', () => { + let win = window.open(`${window.location.origin }/dashboard/?jid=${window.cvat.job.id}`, '_blank'); + win.focus(); + }).prependTo('#engineMenuButtons'); +}); + diff --git a/cvat/apps/dashboard/templates/dashboard/task.html b/cvat/apps/dashboard/templates/dashboard/task.html index 46f10255cc7..da017006b59 100644 --- a/cvat/apps/dashboard/templates/dashboard/task.html +++ b/cvat/apps/dashboard/templates/dashboard/task.html @@ -3,22 +3,22 @@ SPDX-License-Identifier: MIT --> -
{{segment.url}} | -
{{base_url}}?id={{job.id}} | +