Skip to content
Snippets Groups Projects
Commit cc121007 authored by Kirill Stytsenko's avatar Kirill Stytsenko
Browse files

Lots of stuff...

Former-commit-id: 9e1ab987
parent 77e08c55
No related branches found
No related tags found
1 merge request!23Sprint results
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs # Logs
/logs /logs
*.log *.log
......
###### FIRST STAGE ######
FROM node:lts-alpine as build FROM node:lts-alpine as build
MAINTAINER Martin Weise <martin.weise@tuwien.ac.at> MAINTAINER Kirill Stytsenko <kirill.stytsenko@univie.ac.at>
# python, make, g++ are needed by node-gyp
RUN apk add --no-cache build-base python3 > /dev/null RUN apk add --no-cache build-base python3 > /dev/null
COPY ./package.json ./ COPY ./.env ./
COPY ./yarn.lock ./
RUN yarn install --frozen-lockfile > /dev/null
COPY ./assets ./assets COPY ./assets ./assets
COPY ./ava.config.cjs ./
COPY ./babel.config.js ./
COPY ./components ./components COPY ./components ./components
COPY ./lang ./lang COPY ./lang ./lang
COPY ./layouts ./layouts COPY ./layouts ./layouts
COPY ./middleware ./middleware COPY ./middleware ./middleware
COPY ./server-middleware ./server-middleware COPY ./nuxt.config.js ./
COPY ./package.json ./
COPY ./pages ./pages COPY ./pages ./pages
COPY ./plugins ./plugins COPY ./plugins ./plugins
COPY ./test ./test COPY ./server-middleware ./server-middleware
COPY ./static ./static
COPY ./store ./store COPY ./store ./store
COPY ./nuxt.config.js ./ COPY ./test ./test
COPY ./.babelrc ./ COPY ./yarn.lock ./
RUN yarn install --frozen-lockfile > /dev/null 2>&1
RUN yarn build RUN yarn build
......
...@@ -4,15 +4,20 @@ ...@@ -4,15 +4,20 @@
<v-btn @click="addFirst">Add filter</v-btn> <v-btn @click="addFirst">Add filter</v-btn>
</div> </div>
<div v-for="(clause, idx) in value" :key="idx"> <div v-for="(clause, idx) in value" :key="idx">
<v-row v-if="clause.type === 'and'" class="connector" dense> <v-row v-if="clause.type === 'and'" class="connector pt-2" dense>
and and
</v-row> </v-row>
<v-row v-else-if="clause.type === 'or'" class="connector" dense> <v-row v-else-if="clause.type === 'or'" class="connector pt-2" dense>
or or
</v-row> </v-row>
<v-row v-else dense> <v-row v-else dense>
<v-col cols="2"> <v-col cols="2">
<v-select v-model="clause.type" hide-details disabled :items="types" /> <v-select
v-model="clause.type"
class="pb-2"
hide-details
disabled
:items="types" />
</v-col> </v-col>
<v-col> <v-col>
<v-row dense> <v-row dense>
...@@ -85,9 +90,6 @@ export default { ...@@ -85,9 +90,6 @@ export default {
// remove current and previous // remove current and previous
this.value.splice(idx - 1, 2) this.value.splice(idx - 1, 2)
} }
},
getPrefix (clause) {
return 'FOO'
} }
} }
} }
...@@ -112,6 +114,6 @@ export default { ...@@ -112,6 +114,6 @@ export default {
padding-top: 0; padding-top: 0;
} }
.col { .col {
padding-top: 0; /* padding-top: 0; */
} }
</style> </style>
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<v-col cols="6"> <v-col cols="6">
<v-select <v-select
v-model="table" v-model="table"
autofocus
:items="tables" :items="tables"
item-text="name" item-text="name"
return-object return-object
...@@ -23,7 +22,10 @@ ...@@ -23,7 +22,10 @@
@change="buildQuery" /> @change="buildQuery" />
</v-col> </v-col>
</v-row> </v-row>
<QBFilter v-if="table" v-model="clauses" :columns="selectItems && selectItems.map(s => s.name)" /> <QBFilter
v-if="table"
v-model="clauses"
:columns="columnNames" />
<highlightjs <highlightjs
v-if="query.formatted" v-if="query.formatted"
autodetect autodetect
...@@ -50,7 +52,11 @@ export default { ...@@ -50,7 +52,11 @@ export default {
}, },
computed: { computed: {
selectItems () { selectItems () {
return this.tableDetails && this.tableDetails.columns const columns = this.tableDetails && this.tableDetails.columns
return columns || []
},
columnNames () {
return this.selectItems && this.selectItems.map(s => s.name)
} }
}, },
watch: { watch: {
......
import path from 'path' import path from 'path'
import colors from 'vuetify/es5/util/colors' import colors from 'vuetify/es5/util/colors'
import isDocker from 'is-docker'
// pick env vars from .env file or get them passed through docker-compose // pick env vars from .env file or get them passed through docker-compose
if (!isDocker()) {
require('dotenv').config() require('dotenv').config()
if (!process.env.API_CONTAINER) {
throw new Error(`Environment variable API_CONTAINER not defined.
Have you passed env vars from docker-compose or defined them in your .env file?`)
} }
export default { export default {
// Disable server-side rendering (https://go.nuxtjs.dev/ssr-mode) target: 'server',
// ssr: false,
// Target (https://go.nuxtjs.dev/config-target) telemetry: false,
target: 'static',
// Global page headers (https://go.nuxtjs.dev/config-head)
head: { head: {
titleTemplate: '%s - fda-ui', titleTemplate: '%s - fda-ui',
title: 'fda-ui', title: 'fda-ui',
...@@ -28,32 +28,24 @@ export default { ...@@ -28,32 +28,24 @@ export default {
] ]
}, },
// Global CSS (https://go.nuxtjs.dev/config-css)
css: [ css: [
'@assets/globals.scss' '@assets/globals.scss'
], ],
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
plugins: [ plugins: [
{ src: '~/plugins/toast', ssr: false }, // only client side { src: '~/plugins/toast', ssr: false },
{ src: '~/plugins/vendors', ssr: false } // only client side { src: '~/plugins/vendors', ssr: false }
// { src: '~/plugins/mock' }
], ],
// Auto import components (https://go.nuxtjs.dev/config-components) // Auto import components (https://go.nuxtjs.dev/config-components)
components: true, components: true,
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
buildModules: [ buildModules: [
// https://go.nuxtjs.dev/eslint
'@nuxtjs/eslint-module', '@nuxtjs/eslint-module',
// https://go.nuxtjs.dev/vuetify
'@nuxtjs/vuetify' '@nuxtjs/vuetify'
], ],
// Modules (https://go.nuxtjs.dev/config-modules)
modules: [ modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/proxy', '@nuxtjs/proxy',
'@nuxtjs/axios', '@nuxtjs/axios',
['nuxt-i18n', { ['nuxt-i18n', {
...@@ -63,13 +55,10 @@ export default { ...@@ -63,13 +55,10 @@ export default {
], ],
lazy: true, lazy: true,
langDir: 'lang/', langDir: 'lang/',
// strategy: 'no_prefix',
defaultLocale: 'en' defaultLocale: 'en'
// detectBrowserLanguage: false
}] }]
], ],
// Axios module configuration (https://go.nuxtjs.dev/config-axios)
axios: { axios: {
proxy: true proxy: true
}, },
...@@ -85,7 +74,6 @@ export default { ...@@ -85,7 +74,6 @@ export default {
{ path: '/server-middleware', handler: path.resolve(__dirname, 'server-middleware/index.js') } { path: '/server-middleware', handler: path.resolve(__dirname, 'server-middleware/index.js') }
], ],
// Vuetify module configuration (https://go.nuxtjs.dev/config-vuetify)
vuetify: { vuetify: {
customVariables: ['~/assets/variables.scss'], customVariables: ['~/assets/variables.scss'],
theme: { theme: {
...@@ -104,7 +92,6 @@ export default { ...@@ -104,7 +92,6 @@ export default {
} }
}, },
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: { build: {
babel: { babel: {
presets (env, [preset, options]) { presets (env, [preset, options]) {
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
"@mdi/js": "^5.8.55", "@mdi/js": "^5.8.55",
"@nuxtjs/axios": "^5.12.2", "@nuxtjs/axios": "^5.12.2",
"@nuxtjs/proxy": "^2.1.0", "@nuxtjs/proxy": "^2.1.0",
"axios-mock-adapter": "^1.19.0",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"date-fns": "^2.16.1", "date-fns": "^2.16.1",
"express": "^4.17.1",
"highlight.js": "^10.7.2", "highlight.js": "^10.7.2",
"is-docker": "^2.2.1", "is-docker": "^2.2.1",
"knex": "^0.95.6", "knex": "^0.95.6",
...@@ -33,7 +33,9 @@ ...@@ -33,7 +33,9 @@
"nuxt": "^2.12.2", "nuxt": "^2.12.2",
"nuxt-i18n": "^6.15.4", "nuxt-i18n": "^6.15.4",
"sql-formatter": "^4.0.2", "sql-formatter": "^4.0.2",
"vue": "^2.6.12",
"vue-toast-notification": "^0.5.4", "vue-toast-notification": "^0.5.4",
"vuex": "^3.6.2",
"vuex-persist": "^3.1.3" "vuex-persist": "^3.1.3"
}, },
"devDependencies": { "devDependencies": {
...@@ -50,14 +52,23 @@ ...@@ -50,14 +52,23 @@
"ava": "^3.15.0", "ava": "^3.15.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-plugin-module-resolver": "^4.1.0", "babel-plugin-module-resolver": "^4.1.0",
"consola": "^2.15.3",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^7.10.0", "css-loader": "^5.2.6",
"eslint": "^7.27.0",
"eslint-plugin-nuxt": "^1.0.0", "eslint-plugin-nuxt": "^1.0.0",
"jsdom": "^16.6.0", "jsdom": "^16.6.0",
"jsdom-global": "^3.0.2", "jsdom-global": "^3.0.2",
"nyc": "^15.1.0", "nyc": "^15.1.0",
"require-extension-hooks": "^0.3.3", "require-extension-hooks": "^0.3.3",
"require-extension-hooks-babel": "^1.0.0-beta.1", "require-extension-hooks-babel": "^1.0.0-beta.1",
"require-extension-hooks-vue": "^3.0.0" "require-extension-hooks-vue": "^3.0.0",
"typescript": "^4.3.2",
"vue-loader": "^15.9.7",
"vue-template-compiler": "^2.6.12",
"webpack": "^4.0.0"
},
"resolutions": {
"@nuxtjs/vuetify/**/sass": "1.32.12"
} }
} }
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment