Skip to content

Commit b7a50ac

Browse files
Andrey ZhavoronkovbsekachevBoris SekachevNikita Manovich
authored
Added information about OpenVINO toolkit to login page (cvat-ai#4077)
Co-authored-by: Boris Sekachev <[email protected]> Co-authored-by: Boris Sekachev <[email protected]> Co-authored-by: Nikita Manovich <[email protected]>
1 parent 7bdac66 commit b7a50ac

File tree

17 files changed

+86
-26
lines changed

17 files changed

+86
-26
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
- Dataset importing to a project (<https://github.com/openvinotoolkit/cvat/pull/3790>)
2727
- User is able to customize information that text labels show (<https://github.com/openvinotoolkit/cvat/pull/4029>)
2828
- Support for uploading manifest with any name (<https://github.com/openvinotoolkit/cvat/pull/4041>)
29+
- Added information about OpenVINO toolkit to login page (<https://github.com/openvinotoolkit/cvat/pull/4077>)
2930

3031
### Changed
3132
- Users don't have access to a task object anymore if they are assigneed only on some jobs of the task (<https://github.com/openvinotoolkit/cvat/pull/3788>)

cvat-ui/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cvat-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cvat-ui",
3-
"version": "1.32.1",
3+
"version": "1.32.2",
44
"description": "CVAT single-page application",
55
"main": "src/index.tsx",
66
"scripts": {

cvat-ui/src/assets/openvino.svg

+14
Loading

cvat-ui/src/components/annotation-page/standard-workspace/context-image/context-image.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// SPDX-License-Identifier: MIT
44

55
import React, { useEffect, useState } from 'react';
6-
import { notification } from 'antd';
6+
import notification from 'antd/lib/notification';
77
import { useDispatch, useSelector } from 'react-redux';
88
import { QuestionCircleOutlined, ShrinkOutlined } from '@ant-design/icons';
99
import Spin from 'antd/lib/spin';

cvat-ui/src/components/annotation-page/top-bar/filters-modal.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import AntdWidgets from 'react-awesome-query-builder/lib/components/widgets/antd
1111
import AntdConfig from 'react-awesome-query-builder/lib/config/antd';
1212
import 'react-awesome-query-builder/lib/css/styles.css';
1313
import { DownOutlined } from '@ant-design/icons';
14-
import { Dropdown, Menu } from 'antd';
14+
import Dropdown from 'antd/lib/dropdown';
15+
import Menu from 'antd/lib/menu';
1516
import Button from 'antd/lib/button';
1617
import Modal from 'antd/lib/modal';
1718
import { omit } from 'lodash';
@@ -212,8 +213,9 @@ function FiltersModalComponent(): JSX.Element {
212213
applyFilters([QbUtils.jsonLogicFormat(state.tree, config).logic]);
213214
};
214215

215-
const isModalConfirmable = (): boolean =>
216-
QbUtils.queryString(state.tree, config)?.trim().length > 0 && QbUtils.isValidTree(state.tree);
216+
const isModalConfirmable = (): boolean => (
217+
(QbUtils.queryString(state.tree, config) || '').trim().length > 0 && QbUtils.isValidTree(state.tree)
218+
);
217219

218220
const renderBuilder = (builderProps: any): JSX.Element => (
219221
<div className='query-builder-container'>

cvat-ui/src/components/create-cloud-storage-page/cloud-storage-form.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { createCloudStorageAsync, updateCloudStorageAsync } from 'actions/cloud-
1919
import { ProviderType, CredentialsType } from 'utils/enums';
2020
import { QuestionCircleOutlined, UploadOutlined } from '@ant-design/icons';
2121
import Upload, { RcFile } from 'antd/lib/upload';
22-
import { Space } from 'antd';
22+
import Space from 'antd/lib/space';
2323
import { AzureProvider, S3Provider, GoogleCloudProvider } from '../../icons';
2424
import S3Region from './s3-region';
2525
import GCSLocation from './gcs-locatiion';

cvat-ui/src/components/create-project-page/create-project-content.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import React, {
77
} from 'react';
88
import { useDispatch, useSelector } from 'react-redux';
99
import { useHistory } from 'react-router';
10-
import { Switch, Select } from 'antd';
10+
import Switch from 'antd/lib/switch';
11+
import Select from 'antd/lib/select';
1112
import { Col, Row } from 'antd/lib/grid';
1213
import Text from 'antd/lib/typography/Text';
1314
import Form, { FormInstance } from 'antd/lib/form';

cvat-ui/src/components/header/header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import Menu from 'antd/lib/menu';
2727
import Dropdown from 'antd/lib/dropdown';
2828
import Modal from 'antd/lib/modal';
2929
import Text from 'antd/lib/typography/Text';
30+
import Select from 'antd/lib/select';
3031

3132
import getCore from 'cvat-core-wrapper';
3233
import consts from 'consts';
@@ -37,7 +38,6 @@ import CVATTooltip from 'components/common/cvat-tooltip';
3738
import { switchSettingsDialog as switchSettingsDialogAction } from 'actions/settings-actions';
3839
import { logoutAsync, authActions } from 'actions/auth-actions';
3940
import { CombinedState } from 'reducers/interfaces';
40-
import { Select } from 'antd';
4141
import SettingsModal from './settings-modal/settings-modal';
4242

4343
const core = getCore();

cvat-ui/src/components/login-page/intel-footer-drawer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// SPDX-License-Identifier: MIT
44

55
import React from 'react';
6-
import { Layout } from 'antd';
6+
import Layout from 'antd/lib/layout';
77

88
import { isPublic } from 'utils/enviroment';
99
import consts from 'consts';

cvat-ui/src/components/login-page/login-page.tsx

+28-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22
//
33
// SPDX-License-Identifier: MIT
44

5+
import './styles.scss';
56
import React from 'react';
67
import { RouteComponentProps } from 'react-router';
78
import { Link, withRouter } from 'react-router-dom';
89
import Title from 'antd/lib/typography/Title';
910
import Text from 'antd/lib/typography/Text';
1011
import { Row, Col } from 'antd/lib/grid';
11-
import { Layout } from 'antd';
12+
import Button from 'antd/lib/button';
13+
import Divider from 'antd/lib/divider';
14+
import Layout from 'antd/lib/layout';
1215

1316
import FooterDrawer from 'components/login-page/intel-footer-drawer';
1417

18+
import consts from 'consts';
19+
import { OpenVINOIcon } from 'icons';
1520
import LoginForm, { LoginData } from './login-form';
1621

1722
interface LoginPageComponentProps {
@@ -22,11 +27,9 @@ interface LoginPageComponentProps {
2227

2328
function LoginPageComponent(props: LoginPageComponentProps & RouteComponentProps): JSX.Element {
2429
const sizes = {
25-
xs: { span: 14 },
26-
sm: { span: 14 },
27-
md: { span: 10 },
28-
lg: { span: 4 },
29-
xl: { span: 4 },
30+
style: {
31+
width: 400,
32+
},
3033
};
3134

3235
const { Content } = Layout;
@@ -36,7 +39,8 @@ function LoginPageComponent(props: LoginPageComponentProps & RouteComponentProps
3639
return (
3740
<Layout>
3841
<Content>
39-
<Row justify='center' align='middle' style={{ height: '100%' }}>
42+
<Row style={{ height: '33%' }} />
43+
<Row justify='center' align='middle'>
4044
<Col {...sizes}>
4145
<Title level={2}> Login </Title>
4246
<LoginForm
@@ -62,6 +66,23 @@ function LoginPageComponent(props: LoginPageComponentProps & RouteComponentProps
6266
</Col>
6367
</Row>
6468
)}
69+
70+
</Col>
71+
</Row>
72+
<Row className='cvat-login-openvino-block' justify='center'>
73+
<Col {...sizes}>
74+
<Divider />
75+
<Text type='secondary'>
76+
Learn more about products of
77+
<a target='_blank' rel='noopener noreferrer' href={consts.OPENVINO_URL}> OpenVINO™ Toolkit </a>
78+
</Text>
79+
<Button
80+
href={consts.OPENVINO_URL}
81+
icon={<OpenVINOIcon />}
82+
block
83+
type='link'
84+
target='_blank'
85+
/>
6586
</Col>
6687
</Row>
6788
</Content>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (C) 2021 Intel Corporation
2+
//
3+
// SPDX-License-Identifier: MIT
4+
5+
@import './../../base.scss';
6+
7+
.cvat-login-openvino-block {
8+
> div {
9+
text-align: center;
10+
11+
.ant-divider {
12+
margin-bottom: $grid-unit-size;
13+
}
14+
15+
> a {
16+
margin-top: $grid-unit-size;
17+
}
18+
}
19+
}

cvat-ui/src/components/register-page/register-page.tsx

+4-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Link, withRouter } from 'react-router-dom';
99
import Title from 'antd/lib/typography/Title';
1010
import Text from 'antd/lib/typography/Text';
1111
import { Row, Col } from 'antd/lib/grid';
12-
import { Layout } from 'antd';
12+
import Layout from 'antd/lib/layout';
1313

1414
import { UserAgreement } from 'reducers/interfaces';
1515
import FooterDrawer from 'components/login-page/intel-footer-drawer';
@@ -31,11 +31,9 @@ interface RegisterPageComponentProps {
3131

3232
function RegisterPageComponent(props: RegisterPageComponentProps & RouteComponentProps): JSX.Element {
3333
const sizes = {
34-
xs: { span: 14 },
35-
sm: { span: 14 },
36-
md: { span: 10 },
37-
lg: { span: 6 },
38-
xl: { span: 5 },
34+
style: {
35+
width: 400,
36+
},
3937
};
4038

4139
const { fetching, userAgreements, onRegister } = props;

cvat-ui/src/components/reset-password-confirm-page/reset-password-confirm-page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import React from 'react';
66
import { connect } from 'react-redux';
77
import Title from 'antd/lib/typography/Title';
88
import { Row, Col } from 'antd/lib/grid';
9-
import { Layout } from 'antd';
9+
import Layout from 'antd/lib/layout';
1010

1111
import { CombinedState } from 'reducers/interfaces';
1212
import { resetPasswordAsync } from 'actions/auth-actions';

cvat-ui/src/components/reset-password-page/reset-password-page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { connect } from 'react-redux';
88
import Title from 'antd/lib/typography/Title';
99
import Text from 'antd/lib/typography/Text';
1010
import { Row, Col } from 'antd/lib/grid';
11-
import { Layout } from 'antd';
11+
import Layout from 'antd/lib/layout';
1212

1313
import { requestPasswordResetAsync } from 'actions/auth-actions';
1414
import { CombinedState } from 'reducers/interfaces';

cvat-ui/src/consts.ts

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const DEFAULT_PROJECT_SUBSETS = ['Train', 'Test', 'Validation'];
2525
const INTEL_TERMS_OF_USE_URL = 'https://www.intel.com/content/www/us/en/legal/terms-of-use.html';
2626
const INTEL_COOKIES_URL = 'https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html';
2727
const INTEL_PRIVACY_URL = 'https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html';
28+
const OPENVINO_URL = 'https://docs.openvino.ai';
2829
const DEFAULT_AWS_S3_REGIONS: string[][] = [
2930
['us-east-1', 'US East (N. Virginia)'],
3031
['us-east-2', 'US East (Ohio)'],
@@ -106,6 +107,7 @@ export default {
106107
INTEL_TERMS_OF_USE_URL,
107108
INTEL_COOKIES_URL,
108109
INTEL_PRIVACY_URL,
110+
OPENVINO_URL,
109111
DEFAULT_AWS_S3_REGIONS,
110112
DEFAULT_GOOGLE_CLOUD_STORAGE_LOCATIONS,
111113
};

cvat-ui/src/icons.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import SVGFilterIcon from './assets/object-filter-icon.svg';
5252
import SVGCVATAzureProvider from './assets/vscode-icons_file-type-azure.svg';
5353
import SVGCVATS3Provider from './assets/S3.svg';
5454
import SVGCVATGoogleCloudProvider from './assets/google-cloud.svg';
55+
import SVGOpenVINO from './assets/openvino.svg';
5556

5657
export const CVATLogo = React.memo((): JSX.Element => <SVGCVATLogo />);
5758
export const EmptyTasksIcon = React.memo((): JSX.Element => <SVGEmptyTasksIcon />);
@@ -101,3 +102,4 @@ export const FilterIcon = React.memo((): JSX.Element => <SVGFilterIcon />);
101102
export const AzureProvider = React.memo((): JSX.Element => <SVGCVATAzureProvider />);
102103
export const S3Provider = React.memo((): JSX.Element => <SVGCVATS3Provider />);
103104
export const GoogleCloudProvider = React.memo((): JSX.Element => <SVGCVATGoogleCloudProvider />);
105+
export const OpenVINOIcon = React.memo((): JSX.Element => <SVGOpenVINO />);

0 commit comments

Comments
 (0)