Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User interface with React and antd #785

Merged
merged 19 commits into from
Oct 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
/.vscode
/db.sqlite3
/keys
/cvat-canvas
**/node_modules
cvat-ui
cvat-canvas

20 changes: 14 additions & 6 deletions cvat-ui/Dockerfile → Dockerfile.ui
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,27 @@ ENV LANG='C.UTF-8' \
RUN apt update && apt install -yq nodejs npm curl && \
npm install -g n && n 10.16.3

# Create output directory
RUN mkdir /tmp/cvat-ui
WORKDIR /tmp/cvat-ui/
# Create output directories
RUN mkdir /tmp/cvat-ui /tmp/cvat-core

# Install dependencies
COPY package*.json /tmp/cvat-ui/
COPY cvat-core/package*.json /tmp/cvat-core/
COPY cvat-ui/package*.json /tmp/cvat-ui/

# Install cvat-core dependencies
WORKDIR /tmp/cvat-core/
RUN npm install

# Install cvat-ui dependencies
WORKDIR /tmp/cvat-ui/
RUN npm install

# Build source code
COPY . /tmp/cvat-ui/
COPY cvat-core/ /tmp/cvat-core/
COPY cvat-ui/ /tmp/cvat-ui/
RUN mv .env.production .env && npm run build

FROM nginx
# Replace default.conf configuration to remove unnecessary rules
COPY react_nginx.conf /etc/nginx/conf.d/default.conf
COPY cvat-ui/react_nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=cvat-ui /tmp/cvat-ui/dist /usr/share/nginx/html/
8 changes: 4 additions & 4 deletions cvat-core/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dist
docs
node_modules
reports
/dist
/docs
/node_modules
/reports

2 changes: 1 addition & 1 deletion cvat-core/src/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
* You need upload annotations from a server again after successful executing
* @method upload
* @memberof Session.annotations
* @param {File} annotations - a text file with annotations
* @param {File} annotations - a file with annotations
* @param {module:API.cvat.classes.Loader} loader - a loader
* which will be used to upload
* @instance
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/.dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules
/node_modules
1 change: 0 additions & 1 deletion cvat-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

/node_modules
/dist
!/dist/assets

Binary file added cvat-ui/dist/favicon.ico
Binary file not shown.
60 changes: 20 additions & 40 deletions cvat-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cvat-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"webpack-dev-server": "^3.8.0"
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@types/react": "^16.9.2",
"@types/react-dom": "^16.9.0",
"@types/react-redux": "^7.1.2",
Expand Down
27 changes: 0 additions & 27 deletions cvat-ui/public/cvat-core.node.js

This file was deleted.

Loading