Commit 4a4489c8 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

Merge branch 'front-vue' into 'master'

Front vue

See merge request !1
parents 71f1917a ce1005bc
Pipeline #12694 passed with stage
in 59 seconds
......@@ -7,6 +7,9 @@ __pycache__/
# Backend static files
backend/public
# Frontend
node_modules/
# Jupyter notebook
notebooks/
.ipynb_checkpoints/
......
......@@ -6,8 +6,8 @@ from metagenedb.apps.catalog.models import Function, KeggOrthology
@admin.register(KeggOrthology)
class KeggOrthologyAdmin(admin.ModelAdmin):
list_display = ('function_id', 'name', 'long_name', 'ec_number', 'source')
search_fields = ('function_id',)
list_display = ('function_id', 'name', 'long_name', 'ec_number')
search_fields = ('function_id', 'name')
@admin.register(Function)
......
......@@ -4,6 +4,6 @@ from . import views
urlpatterns = [
path('', views.index, name='index'),
re_path(r'^api/genes$', views.gene_list, name='genes'),
re_path(r'^api/genes/$', views.gene_list, name='genes'),
re_path(r'^api/genes/(?P<gene_id>.*)$', views.gene_detail),
]
......@@ -103,7 +103,7 @@ REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
# 'rest_framework.authentication.BasicAuthentication',
),
}
......
version: '3.7'
services:
backend:
container_name: backend
build:
context: ./backend
volumes:
- ./backend:/code
- django-static:/backend/public/static
ports:
- "8000:8000"
env_file: .env
environment:
DEBUG: "true"
depends_on:
- db
command: /code/scripts/start.sh
networks:
- main
db:
container_name: db
image: postgres:latest
ports:
- "5433:5432"
volumes:
- db-data:/var/lib/postgresql/data
networks:
- main
frontend:
build:
context: ./frontend
volumes:
- ./frontend:/app:ro
- '/app/node_modules'
ports:
- "8080:8080"
networks:
- main
depends_on:
- backend
- db
environment:
- NODE_ENV=development
nginx:
build:
context: .
dockerfile: nginx/dev/Dockerfile
ports:
- "80:80"
depends_on:
- backend
volumes:
- ./nginx/dev/dev.conf:/etc/nginx/nginx.conf:ro
- django-static:/usr/src/app/static
networks:
- main
volumes:
db-data:
django-static:
networks:
main:
driver: bridge
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
.DS_Store
node_modules
/dist
/tests/e2e/reports/
selenium-debug.log
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
FROM node:10.16.0-alpine
# make the 'app' folder the current working directory
WORKDIR /app/
# copy package.json to the /app/ folder
COPY package.json ./
# https://docs.npmjs.com/cli/cache
RUN npm cache verify
# install project dependencies
RUN npm install
# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
# expose port 8080 to the host
EXPOSE 8080
# run the development server
CMD ["npm", "run", "serve"]
# code
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Run your tests
```
npm run test
```
### Lints and fixes files
```
npm run lint
```
### Run your end-to-end tests
```
npm run test:e2e
```
### Run your unit tests
```
npm run test:unit
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/app',
],
};
This diff is collapsed.
{
"name": "code",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:e2e": "vue-cli-service test:e2e",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"core-js": "^2.6.5",
"register-service-worker": "^1.6.2",
"vue": "^2.6.10",
"vue-router": "^3.0.3",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-e2e-nightwatch": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-plugin-pwa": "^3.8.0",
"@vue/cli-plugin-unit-jest": "^3.8.0",
"@vue/cli-service": "^3.8.0",
"@vue/eslint-config-airbnb": "^4.0.0",
"@vue/test-utils": "1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"sass": "^1.18.0",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"@vue/airbnb"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions"
],
"jest": {
"moduleFileExtensions": [
"js",
"jsx",
"json",
"vue"
],
"transform": {
"^.+\\.vue$": "vue-jest",
".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$": "jest-transform-stub",
"^.+\\.jsx?$": "babel-jest"
},
"transformIgnorePatterns": [
"/node_modules/"
],
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/src/$1"
},
"snapshotSerializers": [
"jest-serializer-vue"
],
"testMatch": [
"**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"
],
"testURL": "http://localhost/",
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
]
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment