diff --git a/CHANGELOG.md b/CHANGELOG.md index d8a3778c9f9..d8f0c052124 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Dialog window with some helpful information about using filters - Ability to display a bitmap in the new UI - Button to reset colors settings (brightness, saturation, contrast) in the new UI -- Added option to display shape text always +- Option to display shape text always +- Dedicated message with clarifications when share is unmounted (https://github.com/opencv/cvat/pull/1373) ### Changed - Increase preview size of a task till 256, 256 on the server diff --git a/cvat-ui/src/components/create-model-page/create-model-content.tsx b/cvat-ui/src/components/create-model-page/create-model-content.tsx index 03efda5fff9..a320b805643 100644 --- a/cvat-ui/src/components/create-model-page/create-model-content.tsx +++ b/cvat-ui/src/components/create-model-page/create-model-content.tsx @@ -3,20 +3,16 @@ // SPDX-License-Identifier: MIT import React from 'react'; - -import { - Row, - Col, - Icon, - Alert, - Button, - Tooltip, - message, - notification, -} from 'antd'; - +import { Row, Col } from 'antd/lib/grid'; +import Icon from 'antd/lib/icon'; +import Alert from 'antd/lib/alert'; +import Button from 'antd/lib/button'; +import Tooltip from 'antd/lib/tooltip'; +import message from 'antd/lib/message'; +import notification from 'antd/lib/notification'; import Text from 'antd/lib/typography/Text'; +import consts from 'consts'; import ConnectedFileManager, { FileManagerContainer, } from 'containers/file-manager/file-manager'; @@ -107,7 +103,7 @@ export default class CreateModelContent extends React.PureComponent { const status = modelCreatingStatus && modelCreatingStatus !== 'CREATED' ? modelCreatingStatus : ''; - const guideLink = 'https://github.com/opencv/cvat/blob/develop/cvat/apps/auto_annotation/README.md'; + const { AUTO_ANNOTATION_GUIDE_URL } = consts; return ( @@ -116,7 +112,7 @@ export default class CreateModelContent extends React.PureComponent { onClick={(): void => { // false positive // eslint-disable-next-line - window.open(guideLink, '_blank'); + window.open(AUTO_ANNOTATION_GUIDE_URL, '_blank'); }} type='question-circle' /> diff --git a/cvat-ui/src/components/feedback/feedback.tsx b/cvat-ui/src/components/feedback/feedback.tsx index b61ba1f549e..cc1869c720c 100644 --- a/cvat-ui/src/components/feedback/feedback.tsx +++ b/cvat-ui/src/components/feedback/feedback.tsx @@ -4,13 +4,10 @@ import './styles.scss'; import React from 'react'; - -import { - Button, - Icon, - Popover, -} from 'antd'; - +import Button from 'antd/lib/button'; +import Icon from 'antd/lib/icon'; +import Popover from 'antd/lib/popover'; +import Text from 'antd/lib/typography/Text'; import { FacebookShareButton, LinkedinShareButton, @@ -30,59 +27,59 @@ import { LinkedinIcon, } from 'react-share'; -import Text from 'antd/lib/typography/Text'; +import consts from 'consts'; function renderContent(): JSX.Element { - const githubURL = 'https://github.com/opencv/cvat'; - const githubImage = 'https://raw.githubusercontent.com/opencv/' - + 'cvat/develop/cvat/apps/documentation/static/documentation/images/cvat.jpg'; - const questionsURL = 'https://gitter.im/opencv-cvat/public'; - const feedbackURL = 'https://gitter.im/opencv-cvat/public'; + const { + GITHUB_URL, + GITHUB_IMAGE_URL, + GITTER_PUBLIC_URL, + } = consts; return ( <> Star us on - GitHub + GitHub
Leave a - feedback + feedback
- + - + - + - + - + - + - + - +

Do you need help? Contact us on - gitter + gitter ); diff --git a/cvat-ui/src/components/file-manager/file-manager.tsx b/cvat-ui/src/components/file-manager/file-manager.tsx index 98de269786c..3e2f2551245 100644 --- a/cvat-ui/src/components/file-manager/file-manager.tsx +++ b/cvat-ui/src/components/file-manager/file-manager.tsx @@ -4,17 +4,16 @@ import './styles.scss'; import React from 'react'; - -import { - Tabs, - Icon, - Input, - Upload, -} from 'antd'; - -import Tree, { AntTreeNode, TreeNodeNormal } from 'antd/lib/tree/Tree'; -import { RcFile } from 'antd/lib/upload'; +import Tabs from 'antd/lib/tabs'; +import Icon from 'antd/lib/icon'; +import Input from 'antd/lib/input'; import Text from 'antd/lib/typography/Text'; +import Paragraph from 'antd/lib/typography/Paragraph'; +import Upload, { RcFile } from 'antd/lib/upload'; +import Empty from 'antd/lib/empty'; +import Tree, { AntTreeNode, TreeNodeNormal } from 'antd/lib/tree/Tree'; + +import consts from 'consts'; export interface Files { local: File[]; @@ -148,6 +147,7 @@ export default class FileManager extends React.PureComponent { }); } + const { SHARE_MOUNT_GUIDE_URL } = consts; const { treeData } = this.props; const { expandedKeys, @@ -156,7 +156,7 @@ export default class FileManager extends React.PureComponent { return ( - { treeData.length + { treeData[0].children && treeData[0].children.length ? ( { > { renderTreeNodes(treeData) } - ) : No data found} + ) : ( +
+ + + Please, be sure you had + + mounted + + share before you built CVAT and the shared storage contains files + +
+ )}
); } diff --git a/cvat-ui/src/components/file-manager/styles.scss b/cvat-ui/src/components/file-manager/styles.scss index bff7e5a0c01..7c72d764f66 100644 --- a/cvat-ui/src/components/file-manager/styles.scss +++ b/cvat-ui/src/components/file-manager/styles.scss @@ -10,3 +10,9 @@ max-height: 20em; overflow: auto; } + +.cvat-empty-share-tree { + > .ant-typography { + margin-top: 10px; + } +} diff --git a/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx b/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx index 3c132fd9f9b..aeee46b7638 100644 --- a/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx +++ b/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx @@ -19,6 +19,7 @@ import ErrorStackParser from 'error-stack-parser'; import { resetAfterErrorAsync } from 'actions/boundaries-actions'; import { CombinedState } from 'reducers/interfaces'; import logger, { LogType } from 'cvat-logger'; +import consts from 'consts'; interface StateToProps { job: any | null; @@ -161,7 +162,7 @@ class GlobalErrorBoundary extends React.PureComponent {
  • Notify an administrator or submit the issue directly on - GitHub. + GitHub. Please, provide also:
    • Steps to reproduce the issue
    • diff --git a/cvat-ui/src/components/header/header.tsx b/cvat-ui/src/components/header/header.tsx index 1c114ae9a7a..38925dbb834 100644 --- a/cvat-ui/src/components/header/header.tsx +++ b/cvat-ui/src/components/header/header.tsx @@ -16,6 +16,7 @@ import Modal from 'antd/lib/modal'; import Text from 'antd/lib/typography/Text'; import { CVATLogo, AccountIcon } from 'icons'; +import consts from 'consts'; interface HeaderContainerProps { onLogout: () => void; @@ -60,12 +61,15 @@ function HeaderContainer(props: Props): JSX.Element { || installedTFAnnotation || installedTFSegmentation; - function aboutModal(): void { - const CHANGELOG = 'https://github.com/opencv/cvat/blob/develop/CHANGELOG.md'; - const LICENSE = 'https://github.com/opencv/cvat/blob/develop/LICENSE'; - const GITTER = 'https://gitter.im/opencv-cvat'; - const FORUM = 'https://software.intel.com/en-us/forums/intel-distribution-of-openvino-toolkit'; + const { + CHANGELOG_URL, + LICENSE_URL, + GITTER_URL, + FORUM_URL, + GITHUB_URL, + } = consts; + function aboutModal(): void { Modal.info({ title: `${toolName}`, content: ( @@ -106,10 +110,10 @@ function HeaderContainer(props: Props): JSX.Element {

      - {'What\'s new?'} - License - Need help? - Forum on Intel Developer Zone + {'What\'s new?'} + License + Need help? + Forum on Intel Developer Zone ), @@ -199,7 +203,9 @@ function HeaderContainer(props: Props): JSX.Element { type='link' onClick={ (): void => { - window.open('https://github.com/opencv/cvat', '_blank'); + // false positive + // eslint-disable-next-line security/detect-non-literal-fs-filename + window.open(GITHUB_URL, '_blank'); } } > diff --git a/cvat-ui/src/consts.ts b/cvat-ui/src/consts.ts index b5942c32424..dfece049046 100644 --- a/cvat-ui/src/consts.ts +++ b/cvat-ui/src/consts.ts @@ -4,8 +4,26 @@ const UNDEFINED_ATTRIBUTE_VALUE = '__undefined__'; const NO_BREAK_SPACE = '\u00a0'; +const CHANGELOG_URL = 'https://github.com/opencv/cvat/blob/develop/CHANGELOG.md'; +const LICENSE_URL = 'https://github.com/opencv/cvat/blob/develop/LICENSE'; +const GITTER_URL = 'https://gitter.im/opencv-cvat'; +const GITTER_PUBLIC_URL = 'https://gitter.im/opencv-cvat/public'; +const FORUM_URL = 'https://software.intel.com/en-us/forums/intel-distribution-of-openvino-toolkit'; +const GITHUB_URL = 'https://github.com/opencv/cvat'; +const GITHUB_IMAGE_URL = 'https://raw.githubusercontent.com/opencv/cvat/develop/cvat/apps/documentation/static/documentation/images/cvat.jpg'; +const AUTO_ANNOTATION_GUIDE_URL = 'https://github.com/opencv/cvat/blob/develop/cvat/apps/auto_annotation/README.md'; +const SHARE_MOUNT_GUIDE_URL = 'https://github.com/opencv/cvat/blob/master/cvat/apps/documentation/installation.md#share-path'; export default { UNDEFINED_ATTRIBUTE_VALUE, NO_BREAK_SPACE, + CHANGELOG_URL, + LICENSE_URL, + GITTER_URL, + GITTER_PUBLIC_URL, + FORUM_URL, + GITHUB_URL, + GITHUB_IMAGE_URL, + AUTO_ANNOTATION_GUIDE_URL, + SHARE_MOUNT_GUIDE_URL, };