Browse Source

Merge branch 'master' into feature/auto-labeling

pull/1206/head
Hironsan 3 years ago
parent
commit
3cde1909f0
5 changed files with 13 additions and 6 deletions
  1. 2
      Dockerfile
  2. 2
      app/Dockerfile.dev
  3. 2
      app/Dockerfile.prod
  4. 6
      frontend/components/organisms/labels/LabelImportForm.vue
  5. 7
      frontend/rules/index.js

2
Dockerfile

@ -17,7 +17,7 @@ FROM python:${PYTHON_VERSION}-slim-buster AS backend-builder
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
netcat=1.10-41.1 \
libpq-dev=11.9-0+deb10u1 \
libpq-dev=11.10-0+deb10u1 \
unixodbc-dev=2.3.6-0.1 \
g++=4:8.3.0-1 \
libssl-dev=1.1.1d-0+deb10u4 \

2
app/Dockerfile.dev

@ -5,7 +5,7 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \
wget=1.20.1-1.1 \
netcat=1.10-41.1 \
libpq-dev=11.9-0+deb10u1 \
libpq-dev=11.10-0+deb10u1 \
unixodbc-dev=2.3.6-0.1 \
g++=4:8.3.0-1 \
libssl-dev=1.1.1d-0+deb10u4 \

2
app/Dockerfile.prod

@ -15,7 +15,7 @@ COPY ./Pipfile* /app/
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
netcat=1.10-41.1 \
libpq-dev=11.9-0+deb10u1 \
libpq-dev=11.10-0+deb10u1 \
unixodbc-dev=2.3.6-0.1 \
g++=4:8.3.0-1 \
&& pip install --no-cache-dir pipenv==2020.11.15 \

6
frontend/components/organisms/labels/LabelImportForm.vue

@ -32,7 +32,7 @@
<h2>{{ $t('labels.importMessage2') }}</h2>
<v-file-input
v-model="file"
:rules="uploadFileRules($t('rules.uploadFileRules'))"
:rules="uploadSingleFileRules($t('rules.uploadFileRules'))"
accept=".json"
:label="$t('labels.filePlaceholder')"
/>
@ -43,7 +43,7 @@
<script>
import BaseCard from '@/components/molecules/BaseCard'
import { uploadFileRules } from '@/rules/index'
import { uploadSingleFileRules } from '@/rules/index'
export default {
components: {
@ -60,7 +60,7 @@ export default {
return {
valid: false,
file: null,
uploadFileRules,
uploadSingleFileRules,
showError: false
}
},

7
frontend/rules/index.js

@ -61,6 +61,13 @@ export const uploadFileRules = (msg) => {
]
}
export const uploadSingleFileRules = (msg) => {
return [
v => !!v || msg.fileRequired,
v => !v || v.size < 1000000 || msg.fileLessThan1MB
]
}
// Rules for user.
export const passwordRules = (msg) => {
return [

Loading…
Cancel
Save