diff --git a/.env.template b/.env.template index 49a330e..bc9d170 100644 --- a/.env.template +++ b/.env.template @@ -1,13 +1,6 @@ SECRET_KEY=secret DEBUG=True -POSTGRES_NAME=postgres -POSTGRES_USERNAME=postgres -POSTGRES_PASSWORD=postgres -POSTGRES_SERVICE_HOST=postgres -POSTGRES_SERVICE_PORT=5432 - - # social auth GITHUB_KEY=yourkey GITHUB_SECRET=yoursecret @@ -18,9 +11,6 @@ GOOGLE_OAUTH2_SECRET=abcde-fghij SOCIAL_AUTH_FACEBOOK_KEY = '' SOCIAL_AUTH_FACEBOOK_SECRET = '' -CELERY_BROKER_URL=redis://redis:6379/0 -CELERY_RESULT_BACKEND=redis://redis:6379/1 - DJANGO_EMAIL_HOST=mailhog DJANGO_EMAIL_PORT=1025 diff --git a/.python-version b/.python-version deleted file mode 100644 index 1376a07..0000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -briancaffey \ No newline at end of file diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 0000000..ce79ec5 --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,2 @@ +media +static \ No newline at end of file diff --git a/backend/apps/core/management/commands/watch_celery.py b/backend/apps/core/management/commands/watch_celery.py deleted file mode 100644 index a203256..0000000 --- a/backend/apps/core/management/commands/watch_celery.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -This command allows for celery to be reloaded when project -code is saved. This command is called in -`docker-compose.dev.yml` and is only for use in development - -https://avilpage.com/2017/05/how-to-auto-reload-celery-workers-in-development.html -""" - -import os -import shlex -import subprocess - -from django.core.management.base import BaseCommand -from django.utils import autoreload - - -def restart_celery(queue=None, concurrency=None): - cmd = 'pkill -9 celery' - subprocess.call(shlex.split(cmd)) - cmd = f"celery worker --app=backend.celery_app:app --loglevel=info -Q {queue} -n worker-{queue}@%h --concurrency={os.environ.get('CONCURRENT_WORKERS', 2)} --max-memory-per-child=150000" # noqa - subprocess.call(shlex.split(cmd)) - - -class Command(BaseCommand): - def add_arguments(self, parser): - parser.add_argument( - '-q', '--queue', nargs=1, default='celery', type=str - ) - parser.add_argument('-c', '--concurrency', type=str) - - def handle(self, *args, **options): - queue = options['queue'][0] - concurrency = options['concurrency'] or 1 - print('Starting celery worker with autoreload...') - autoreload.run_with_reloader( - restart_celery, queue=queue, concurrency=concurrency - ) diff --git a/backend/apps/core/management/commands/watch_celery_beat.py b/backend/apps/core/management/commands/watch_celery_beat.py deleted file mode 100644 index 0e2534a..0000000 --- a/backend/apps/core/management/commands/watch_celery_beat.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -This command allows for celery to be reloaded when project -code is saved. This command is called in -`docker-compose.dev.yml` and is only for use in development - -https://avilpage.com/2017/05/how-to-auto-reload-celery-workers-in-development.html -""" - -import os -import shlex -import subprocess - -from django.core.management.base import BaseCommand -from django.utils import autoreload - -PIDFILE = "/code/celerybeat.pid" - - -def restart_celery_beat(): - cmd = "pkill -9 celery" - subprocess.call(shlex.split(cmd)) - cmd = f"celery beat --app=backend.celery_app:app --loglevel=info --pidfile={PIDFILE}" # noqa - subprocess.call(shlex.split(cmd)) - - -class Command(BaseCommand): - def handle(self, *args, **options): - print("Starting celery worker with autoreload...") # noqa - try: - os.remove("celerybeat.pid") - except FileNotFoundError as e: - print(e) # noqa - autoreload.run_with_reloader(restart_celery_beat) diff --git a/backend/backend/settings/base.py b/backend/backend/settings/base.py index 9b5db8d..8fd1d1c 100644 --- a/backend/backend/settings/base.py +++ b/backend/backend/settings/base.py @@ -11,15 +11,13 @@ """ import os +from pathlib import Path from kombu import Queue import redis -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -BASE_DIR = os.path.dirname( - os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -) - +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve(strict=True).parent.parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ @@ -269,7 +267,7 @@ # Assets STATIC_URL = "/static/" -STATIC_ROOT = "/static/" +STATIC_ROOT = os.path.join(BASE_DIR, "static") MEDIA_URL = "/media/" MEDIA_ROOT = os.path.join(BASE_DIR, "media") diff --git a/backend/requirements/base.txt b/backend/requirements/base.txt index 716b1c2..5553cd6 100644 --- a/backend/requirements/base.txt +++ b/backend/requirements/base.txt @@ -11,7 +11,7 @@ daphne==2.5.0 graphene-django==2.10.1 django-graphql-jwt==0.3.1 -Django==3.0.6 +Django==3.0.7 django-filter==2.2.0 djangorestframework==3.11.0 djangorestframework_simplejwt==4.4.0 diff --git a/backend/requirements/dev.txt b/backend/requirements/dev.txt index f6d9e4e..c9cd8ec 100644 --- a/backend/requirements/dev.txt +++ b/backend/requirements/dev.txt @@ -3,4 +3,8 @@ django-extensions==2.2.9 # NOTE: in installed_apps Werkzeug==1.0.1 # used for runserver_plus exception console ipython==7.14.0 jupyter==1.0.0 -gql==2.0.0 \ No newline at end of file +gql==2.0.0 + +watchdog==0.10.3 +pyyaml==5.3.1 +argh==0.26.2 \ No newline at end of file diff --git a/backend/scripts/ci/Dockerfile b/backend/scripts/ci/Dockerfile deleted file mode 100644 index 1c1f2cc..0000000 --- a/backend/scripts/ci/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -# this image is tagged and pushed to the production registry (such as ECR) -FROM python:3.8 as production -ENV PYTHONUNBUFFERED 1 -ENV PYTHONDONTWRITEBYTECODE 1 -RUN mkdir /code -WORKDIR /code -COPY backend/requirements/base.txt /code/requirements/ -RUN python3 -m pip install --upgrade pip -RUN pip install -r requirements/base.txt -COPY backend/scripts/prod/start_prod.sh \ - backend/scripts/dev/start_ci.sh \ - backend/scripts/dev/start_asgi.sh \ - / -ADD backend/ /code/ - -# build stage that generates quasar assets -FROM node:10-alpine as build-stage -ENV FULL_DOMAIN_NAME localhost:9000 -WORKDIR /app/ -COPY quasar/package.json /app/ -RUN npm cache verify -RUN npm install -g @quasar/cli -RUN npm install --progress=false -COPY quasar /app/ -RUN quasar build -m pwa - -# this stage is used for integration testing -FROM production as gitlab-ci -# update and install nodejs -COPY --from=build-stage /app/dist/pwa/index.html /code/templates/ -COPY --from=build-stage /app/dist/pwa /static - -COPY cypress.json /code - -RUN mkdir /code/cypress -COPY cypress/ /code/cypress/ - -RUN apt-get -qq update && apt-get -y install nodejs npm -RUN node -v -RUN npm -v - -# cypress dependencies -RUN apt-get -qq install -y xvfb \ - libgtk-3-dev \ - libnotify-dev \ - libgconf-2-4 \ - libnss3 \ - libxss1 \ - libasound2 diff --git a/docker-compose.yml b/docker-compose.yml index dac58b0..503cfb3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,13 +7,11 @@ services: networks: - main ports: - - "5434:5432" + - "5432:5432" volumes: - - pg-data:/var/lib/postgresql/data + - pgdata:/var/lib/postgresql/data environment: - - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - - POSTGRES_USER=${POSTGRES_USERNAME} - - POSTGRES_DB=${POSTGRES_NAME} + - POSTGRES_PASSWORD=postgres redis: image: redis:alpine @@ -40,8 +38,8 @@ services: nginx: container_name: nginx build: - context: . - dockerfile: nginx/dev/Dockerfile + context: ./nginx + dockerfile: dev/Dockerfile ports: - "80:80" depends_on: @@ -91,18 +89,10 @@ services: networks: - main environment: - - CI_PIPELINE_TRIGGERED=True - SECRET_KEY=secret-key-for-development - DEBUG=True - DJANGO_EMAIL_HOST=${DJANGO_EMAIL_HOST} - DJANGO_EMAIL_PORT=${DJANGO_EMAIL_PORT} - - POSTGRES_NAME=${POSTGRES_NAME} - - POSTGRES_USERNAME=${POSTGRES_USERNAME} - - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - - POSTGRES_SERVICE_HOST=${POSTGRES_SERVICE_HOST} - - POSTGRES_SERVICE_PORT=${POSTGRES_SERVICE_PORT} - - CELERY_BROKER_URL=${CELERY_BROKER_URL} - - CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND} - DJANGO_SETTINGS_MODULE=backend.settings.development - GITHUB_KEY=${GITHUB_KEY} - GITHUB_SECRET=${GITHUB_SECRET} @@ -129,18 +119,42 @@ services: celery: <<: *backend container_name: celery - command: bash -c 'python3 manage.py watch_celery --queue default --concurrency=2' - volumes: - - ./backend:/code + command: + - "watchmedo" + - "auto-restart" + - "--directory=./" + - "--pattern=*.py" + - "--recursive" + - "--" + - "celery" + - "worker" + - "--app=backend.celery_app:app" + - "-Q" + - "default" + - "--concurrency=1" + - "--loglevel=INFO" ports: [] beat: <<: *backend - build: - context: ./backend - dockerfile: scripts/dev/Dockerfile container_name: beat - command: /start_beat.sh + command: + - "sh" + - "-c" + - | + # remove celerybeat.pid and celerybeat-schedule if they exist + rm -f /code/celerybeat*; + watchmedo \ + auto-restart \ + --directory=./ \ + --pattern=*.py \ + --recursive \ + -- \ + celery \ + beat \ + --app=backend.celery_app:app \ + --loglevel=INFO \ + --pidfile=/code/celerybeat.pid volumes: - ./backend:/code ports: [] @@ -150,7 +164,7 @@ services: container_name: flower command: --url_prefix=flower --inspect_timeout=20000 environment: - - CELERY_BROKER_URL=${CELERY_BROKER_URL} + - CELERY_BROKER_URL=redis://redis:6379/0 - FLOWER_PORT=5555 ports: - 5555:5555 @@ -187,7 +201,7 @@ services: restart: unless-stopped volumes: - pg-data: + pgdata: django-static: redis-data: pgadmin: diff --git a/nginx/dev/Dockerfile b/nginx/dev/Dockerfile index 81af1d0..6a04cb0 100644 --- a/nginx/dev/Dockerfile +++ b/nginx/dev/Dockerfile @@ -1,5 +1,4 @@ FROM nginx:1.18.0-alpine -COPY nginx/dev/dev.conf /etc/nginx/nginx.conf -COPY backend/static /usr/src/app/static/ +COPY dev/dev.conf /etc/nginx/nginx.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/quasar/.dockerignore b/quasar/.dockerignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/quasar/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/quasar/Dockerfile b/quasar/Dockerfile index d0b55e8..aa2e542 100644 --- a/quasar/Dockerfile +++ b/quasar/Dockerfile @@ -1,13 +1,7 @@ -FROM node:12.16.3 +FROM node:10-alpine WORKDIR /app/ COPY . . -RUN npm install -g @quasar/cli && \ - npm install -g @vue/cli && \ - npm install -g @vue/cli-init - -COPY start_dev.sh . - CMD ["/app/start_dev.sh"] \ No newline at end of file diff --git a/quasar/package.json b/quasar/package.json index fb80f39..cd70acf 100644 --- a/quasar/package.json +++ b/quasar/package.json @@ -31,13 +31,14 @@ "vue-native-websocket": "2.0.14" }, "devDependencies": { - "@quasar/app": "1.9.0", + "@quasar/app": "^2.0.0", "@vue/eslint-config-prettier": "6.0.0", "babel-eslint": "10.1.0", "eslint": "5.16.0", "eslint-loader": "4.0.2", "eslint-plugin-prettier": "3.1.3", - "eslint-plugin-vue": "6.2.2" + "eslint-plugin-vue": "6.2.2", + "workbox-webpack-plugin": "^5.1.3" }, "engines": { "node": ">= 8.9.0", diff --git a/quasar/quasar.conf.js b/quasar/quasar.conf.js index e4799c7..a06c45a 100644 --- a/quasar/quasar.conf.js +++ b/quasar/quasar.conf.js @@ -84,14 +84,14 @@ module.exports = function (ctx) { env: ctx.dev ? { API_URL: JSON.stringify(`http://${process.env.FULL_DOMAIN_NAME}`), - WS_URL: JSON.stringify(`ws://${process.env.FULL_DOMAIN_NAME}`), + WS_URL: `ws://${process.env.FULL_DOMAIN_NAME}`, GITHUB_KEY: JSON.stringify(process.env.GITHUB_KEY), GOOGLE_OAUTH2_KEY: JSON.stringify(process.env.GOOGLE_OAUTH2_KEY), FACEBOOK_KEY: JSON.stringify(process.env.FACEBOOK_KEY), } : { API_URL: JSON.stringify(`https://${process.env.FULL_DOMAIN_NAME}`), - WS_URL: JSON.stringify(`$wss://${process.env.FULL_DOMAIN_NAME}`), + WS_URL: `wss://${process.env.FULL_DOMAIN_NAME}`, GITHUB_KEY: JSON.stringify(process.env.GITHUB_KEY), GOOGLE_OAUTH2_KEY: JSON.stringify(process.env.GOOGLE_OAUTH2_KEY), FACEBOOK_KEY: JSON.stringify(process.env.FACEBOOK_KEY), @@ -137,11 +137,11 @@ module.exports = function (ctx) { pwa: { // workboxPluginMode: "InjectManifest", + workboxPluginMode: "GenerateSW", // 'GenerateSW' or 'InjectManifest' workboxOptions: { navigateFallback: "/index.html", - navigateFallbackBlacklist: [ - /\/[admin,api,flower]+\/.*/, - /[admin,api,flower]+\/.*/, + navigateFallbackDenylist: [ + /\/[admin,api,flower,pgadmin,rediscommander]+\/.*/, ], }, manifest: { diff --git a/quasar/src/App.vue b/quasar/src/App.vue index 1648a6f..6c5cb0d 100644 --- a/quasar/src/App.vue +++ b/quasar/src/App.vue @@ -10,7 +10,7 @@ export default { name: "App", - created: function() { + created: function () { // if (this.$store.getters.isAuthenticated) { // this.$store.dispatch("USER_REQUEST"); // // refresh the token every 4 minutes while the user is logged in in production @@ -20,7 +20,7 @@ export default { // this.$store.dispatch("AUTH_REFRESH"); // }, 1000 * 60 * refreshFrequency); // } - } + }, // TODO: set this in Vuex // const isDesktop = this.$q.platform.is.desktop; }; diff --git a/quasar/src/boot/i18n.js b/quasar/src/boot/i18n.js index 597560c..68b5b4d 100644 --- a/quasar/src/boot/i18n.js +++ b/quasar/src/boot/i18n.js @@ -7,7 +7,7 @@ Vue.use(VueI18n); const i18n = new VueI18n({ locale: "en-us", fallbackLocale: "en-us", - messages + messages, }); export default ({ app }) => { diff --git a/quasar/src/components/LeftMenuLink.vue b/quasar/src/components/LeftMenuLink.vue index 37e57cc..86a504b 100644 --- a/quasar/src/components/LeftMenuLink.vue +++ b/quasar/src/components/LeftMenuLink.vue @@ -14,7 +14,7 @@ diff --git a/quasar/src/components/MainCarousel.vue b/quasar/src/components/MainCarousel.vue index 0371abb..d53a86d 100644 --- a/quasar/src/components/MainCarousel.vue +++ b/quasar/src/components/MainCarousel.vue @@ -11,11 +11,9 @@ padding arrows height="300px" - :class=" - `text-white shadow-1 rounded-borders ${ - $store.getters.isDark ? 'carousel-dark' : 'carousel-light' - }` - " + :class="`text-white shadow-1 rounded-borders ${ + $store.getters.isDark ? 'carousel-dark' : 'carousel-light' + }`" > @@ -47,9 +45,9 @@ export default { data() { return { lorem: "Abc123", - slide: "style" + slide: "style", }; - } + }, }; diff --git a/quasar/src/components/auth/LoginForm.vue b/quasar/src/components/auth/LoginForm.vue index 74702e6..7ccfa3f 100644 --- a/quasar/src/components/auth/LoginForm.vue +++ b/quasar/src/components/auth/LoginForm.vue @@ -36,7 +36,7 @@ export default { data() { return { email: process.env.NODE_ENV === "production" ? "" : "admin@company.com", - password: process.env.NODE_ENV === "production" ? "" : "password" + password: process.env.NODE_ENV === "production" ? "" : "password", }; }, methods: { @@ -45,7 +45,7 @@ export default { this.$store .dispatch("AUTH_REQUEST", { email: this.email, - password: this.password + password: this.password, }) .then(() => { vm.$router.push("/"); @@ -57,8 +57,8 @@ export default { }); this.email = ""; this.password = ""; - } - } + }, + }, }; diff --git a/quasar/src/components/auth/SignUpForm.vue b/quasar/src/components/auth/SignUpForm.vue index 4bfe06e..443f88b 100644 --- a/quasar/src/components/auth/SignUpForm.vue +++ b/quasar/src/components/auth/SignUpForm.vue @@ -41,7 +41,7 @@ export default { return { email: "", password: "", - visible: false + visible: false, }; }, methods: { @@ -51,7 +51,7 @@ export default { .then(() => { this.$q.notify({ title: "User registered", - message: "Thank you for registering!" + message: "Thank you for registering!", }); this.visible = false; this.$router.push("/"); @@ -60,8 +60,8 @@ export default { this.visible = false; this.$q.notify("There was an error."); }); - } - } + }, + }, }; diff --git a/quasar/src/components/services/ServiceLink.vue b/quasar/src/components/services/ServiceLink.vue index 97519dc..c87e2f8 100644 --- a/quasar/src/components/services/ServiceLink.vue +++ b/quasar/src/components/services/ServiceLink.vue @@ -9,25 +9,25 @@ export default { props: { href: { type: String, - default: "#" + default: "#", }, name: { type: String, - default: "" + default: "", }, icon: { type: String, - default: "" + default: "", }, target: { type: String, - default: "_blank" + default: "_blank", }, type: { type: String, - default: "a" - } - } + default: "a", + }, + }, }; diff --git a/quasar/src/components/ui/BaseBtn.vue b/quasar/src/components/ui/BaseBtn.vue index 5cb2574..fc5fe6e 100644 --- a/quasar/src/components/ui/BaseBtn.vue +++ b/quasar/src/components/ui/BaseBtn.vue @@ -7,13 +7,13 @@ export default { props: { color: { type: String, - default: "white" - } + default: "white", + }, }, textColor: { type: String, - default: "black" - } + default: "black", + }, }; diff --git a/quasar/src/components/ui/BaseInput.vue b/quasar/src/components/ui/BaseInput.vue index 317dbfc..1477c08 100644 --- a/quasar/src/components/ui/BaseInput.vue +++ b/quasar/src/components/ui/BaseInput.vue @@ -1,7 +1,6 @@ diff --git a/quasar/src/components/ui/BasePage.vue b/quasar/src/components/ui/BasePage.vue index 3edf630..32db67d 100644 --- a/quasar/src/components/ui/BasePage.vue +++ b/quasar/src/components/ui/BasePage.vue @@ -13,8 +13,8 @@ export default { methods: { getStyle() { return { color: "white" }; - } - } + }, + }, }; diff --git a/quasar/src/components/ui/DarkMode.vue b/quasar/src/components/ui/DarkMode.vue index 56c8948..3a26e1a 100644 --- a/quasar/src/components/ui/DarkMode.vue +++ b/quasar/src/components/ui/DarkMode.vue @@ -11,9 +11,9 @@ export default { }, set() { this.$store.commit("toggleDarkMode"); - } - } - } + }, + }, + }, }; diff --git a/quasar/src/components/ui/PageText.vue b/quasar/src/components/ui/PageText.vue index 46871f8..27d915f 100644 --- a/quasar/src/components/ui/PageText.vue +++ b/quasar/src/components/ui/PageText.vue @@ -12,8 +12,8 @@ export default { props: { size: { type: Number, - default: 1.25 - } - } + default: 1.25, + }, + }, }; diff --git a/quasar/src/i18n/cn-cn/index.js b/quasar/src/i18n/cn-cn/index.js index f95bd6e..7901ba0 100644 --- a/quasar/src/i18n/cn-cn/index.js +++ b/quasar/src/i18n/cn-cn/index.js @@ -1,5 +1,5 @@ import leftDrawer from "./leftDrawer"; export default { - ...leftDrawer + ...leftDrawer, }; diff --git a/quasar/src/i18n/en-us/index.js b/quasar/src/i18n/en-us/index.js index ac26c04..d4e30f1 100644 --- a/quasar/src/i18n/en-us/index.js +++ b/quasar/src/i18n/en-us/index.js @@ -3,5 +3,5 @@ import leftDrawer from "./leftDrawer"; export default { ...leftDrawer, failed: "Hello", - success: "Action was successful" + success: "Action was successful", }; diff --git a/quasar/src/i18n/index.js b/quasar/src/i18n/index.js index a8a0990..1532427 100644 --- a/quasar/src/i18n/index.js +++ b/quasar/src/i18n/index.js @@ -3,5 +3,5 @@ import cnCN from "./cn-cn"; export default { "en-us": enUS, - "cn-cn": cnCN + "cn-cn": cnCN, }; diff --git a/quasar/src/index.template.html b/quasar/src/index.template.html index 9991c12..de0a359 100644 --- a/quasar/src/index.template.html +++ b/quasar/src/index.template.html @@ -7,7 +7,7 @@ - + diff --git a/quasar/src/layouts/MainLayout.vue b/quasar/src/layouts/MainLayout.vue index db4b705..36e8f1f 100644 --- a/quasar/src/layouts/MainLayout.vue +++ b/quasar/src/layouts/MainLayout.vue @@ -16,7 +16,7 @@ diff --git a/quasar/src/pages/Auth/Callback.vue b/quasar/src/pages/Auth/Callback.vue index 9dfe35c..50487ca 100644 --- a/quasar/src/pages/Auth/Callback.vue +++ b/quasar/src/pages/Auth/Callback.vue @@ -12,12 +12,12 @@ export default { const provider = this.$route.params.provider; this.$axios .post(`/api/social/${provider}/`, { code: this.$route.query.code }) - .then(resp => { + .then((resp) => { Cookies.set("refresh-token", resp.data.refresh); Cookies.set("user-token", resp.data.access); window.location.href = "/"; }); - } + }, }, created() { this.handleOauthCallback(); @@ -25,8 +25,8 @@ export default { computed: { provider() { return this.$route.params.provider; - } - } + }, + }, }; diff --git a/quasar/src/pages/Auth/GitHub.vue b/quasar/src/pages/Auth/GitHub.vue index 3590560..af97e0f 100644 --- a/quasar/src/pages/Auth/GitHub.vue +++ b/quasar/src/pages/Auth/GitHub.vue @@ -9,16 +9,16 @@ export default { githubAuth() { this.$axios .post("/api/social/github/", { code: this.$route.query.code }) - .then(resp => { + .then((resp) => { Cookies.set("refresh-token", resp.data.refresh); Cookies.set("user-token", resp.data.access); window.location.href = "/"; }); - } + }, }, created() { this.githubAuth(); - } + }, }; diff --git a/quasar/src/pages/Auth/Google.vue b/quasar/src/pages/Auth/Google.vue index 3c1095c..2e1948f 100644 --- a/quasar/src/pages/Auth/Google.vue +++ b/quasar/src/pages/Auth/Google.vue @@ -11,18 +11,18 @@ export default { googleAuth() { this.$axios .post("/api/social/google/", { - code: this.$route.query.code + code: this.$route.query.code, }) - .then(resp => { + .then((resp) => { Cookies.set("refresh-token", resp.data.refresh); Cookies.set("user-token", resp.data.access); window.location.href = "/"; }); - } + }, }, created() { this.googleAuth(); - } + }, }; diff --git a/quasar/src/pages/Auth/GqlLoginForm.vue b/quasar/src/pages/Auth/GqlLoginForm.vue index 2f5feae..d72031d 100644 --- a/quasar/src/pages/Auth/GqlLoginForm.vue +++ b/quasar/src/pages/Auth/GqlLoginForm.vue @@ -38,7 +38,7 @@ export default { data() { return { email: process.env.NODE_ENV === "production" ? "" : "admin@company.com", - password: process.env.NODE_ENV === "production" ? "" : "password" + password: process.env.NODE_ENV === "production" ? "" : "password", }; }, methods: { @@ -46,9 +46,9 @@ export default { this.$store.dispatch("gqljwt/authRequest", { email: this.email, password: this.password, - vm: this + vm: this, }); - } + }, // login() { // const vm = this; // this.$store @@ -67,7 +67,7 @@ export default { // this.email = ""; // this.password = ""; // } - } + }, }; diff --git a/quasar/src/pages/Auth/Login.vue b/quasar/src/pages/Auth/Login.vue index 16894a6..335aaae 100644 --- a/quasar/src/pages/Auth/Login.vue +++ b/quasar/src/pages/Auth/Login.vue @@ -35,8 +35,8 @@ import LoginForm from "components/auth/LoginForm.vue"; export default { components: { - LoginForm - } + LoginForm, + }, }; diff --git a/quasar/src/pages/Auth/LoginGQL.vue b/quasar/src/pages/Auth/LoginGQL.vue index 3bde7ad..db229fc 100644 --- a/quasar/src/pages/Auth/LoginGQL.vue +++ b/quasar/src/pages/Auth/LoginGQL.vue @@ -11,8 +11,8 @@ import GqlLoginForm from "./GqlLoginForm.vue"; export default { components: { - GqlLoginForm - } + GqlLoginForm, + }, }; diff --git a/quasar/src/pages/Auth/SignUp.vue b/quasar/src/pages/Auth/SignUp.vue index a4526a2..fe80f3d 100644 --- a/quasar/src/pages/Auth/SignUp.vue +++ b/quasar/src/pages/Auth/SignUp.vue @@ -16,8 +16,8 @@ import SignUpForm from "components/auth/SignUpForm.vue"; export default { components: { - SignUpForm - } + SignUpForm, + }, }; diff --git a/quasar/src/pages/Banking/StatementFileTable.vue b/quasar/src/pages/Banking/StatementFileTable.vue index 76798df..72035df 100644 --- a/quasar/src/pages/Banking/StatementFileTable.vue +++ b/quasar/src/pages/Banking/StatementFileTable.vue @@ -15,7 +15,7 @@ v-model="current" :max=" $store.getters['banking/statements/getCount'] / - $store.getters['banking/statements/getPaginationLimit'] + $store.getters['banking/statements/getPaginationLimit'] " > @@ -34,7 +34,7 @@ export default { }, set(v) { this.$store.commit("banking/statements/setPagination", v); - } + }, }, current: { get() { @@ -42,9 +42,9 @@ export default { }, set(v) { this.$store.dispatch("banking/statements/setCurrentPage", v); - } - } - } + }, + }, + }, }; diff --git a/quasar/src/pages/Banking/StatementUploadForm.vue b/quasar/src/pages/Banking/StatementUploadForm.vue index 990a2c1..c5af11e 100644 --- a/quasar/src/pages/Banking/StatementUploadForm.vue +++ b/quasar/src/pages/Banking/StatementUploadForm.vue @@ -25,7 +25,7 @@ Upload File diff --git a/quasar/src/pages/Banking/StatementUploadWidget.vue b/quasar/src/pages/Banking/StatementUploadWidget.vue index 408e1e3..ecb98d2 100644 --- a/quasar/src/pages/Banking/StatementUploadWidget.vue +++ b/quasar/src/pages/Banking/StatementUploadWidget.vue @@ -13,13 +13,13 @@ import StatementUploadForm from "./StatementUploadForm.vue"; export default { components: { - StatementUploadForm + StatementUploadForm, }, data() { return { - show: false + show: false, }; - } + }, }; diff --git a/quasar/src/pages/Environment.vue b/quasar/src/pages/Environment.vue index 55806ae..6ffc8e9 100644 --- a/quasar/src/pages/Environment.vue +++ b/quasar/src/pages/Environment.vue @@ -19,30 +19,30 @@ export default { data() { return { pagination: { - rowsPerPage: 0 + rowsPerPage: 0, }, columns: [ { name: "key", align: "left", label: "Environment Variable", - field: "key" + field: "key", }, { name: "value", align: "left", label: "Value", - field: "value" - } + field: "value", + }, ], - env: Object.keys(process.env).map(x => { + env: Object.keys(process.env).map((x) => { return { key: x, - value: process.env[x] + value: process.env[x], }; - }) + }), }; - } + }, }; diff --git a/quasar/src/pages/Error404.vue b/quasar/src/pages/Error404.vue index a091bac..6eff7b3 100644 --- a/quasar/src/pages/Error404.vue +++ b/quasar/src/pages/Error404.vue @@ -1,10 +1,10 @@