Merge branch 'main' into 150-fix-error-response

# Conflicts:
#	backend/service/addSchedule.go
#	backend/service/fetch/v2/fetcher.go
#	frontend/package-lock.json
This commit is contained in:
Elmar Kresse
2024-01-21 17:59:08 +01:00
58 changed files with 6719 additions and 3348 deletions

104
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,104 @@
stages:
- lint
- build
- test
- docker
lint-frontend:
image: node:lts
stage: lint
rules:
- changes:
- frontend/**/*
script:
- cd frontend
- npm i
- npm run lint-no-fix
build-backend:
image: golang:1.21-alpine
stage: build
rules:
- changes:
- backend/**/*
script:
- cd backend
- go build -o htwkalender
artifacts:
paths:
- backend/htwkalender
- backend/go.sum
- backend/go.mod
test-backend:
image: golang:1.21-alpine
stage: test
rules:
- changes:
- backend/**/*
script:
- cd backend
- go test -v ./...
dependencies:
- build-backend
test-frontend:
image: node:lts
stage: test
rules:
- changes:
- frontend/**/*
script:
- cd frontend
- npm i
- npm run test
dependencies:
- lint-frontend
build-backend-image:
stage: docker
image: docker:20.10.16
services:
- name: docker:20.10.16-dind
alias: docker
tags:
- image
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "/certs/client"
script:
- cd backend
- docker login -u $CI_DOCKER_REGISTRY_USER -p $CI_DOCKER_REGISTRY_PASSWORD $CI_DOCKER_REGISTRY
- docker build -t htwkalender-backend$IMAGE_TAG .
- docker tag htwkalender-backend$IMAGE_TAG $CI_DOCKER_REGISTRY_USER/htwkalender:backend
- docker push $CI_DOCKER_REGISTRY_USER/htwkalender:backend
only:
- main
- development
build-frontend-image:
stage: docker
image: docker:20.10.16
services:
- name: docker:20.10.16-dind
alias: docker
tags:
- image
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "/certs/client"
script:
- cd frontend
- docker login -u $CI_DOCKER_REGISTRY_USER -p $CI_DOCKER_REGISTRY_PASSWORD $CI_DOCKER_REGISTRY
- docker build -f Dockerfile_prod -t htwkalender-frontend$IMAGE_TAG .
- docker tag htwkalender-frontend$IMAGE_TAG $CI_DOCKER_REGISTRY_USER/htwkalender:frontend
- docker push $CI_DOCKER_REGISTRY_USER/htwkalender:frontend
only:
- main
- development

View File

@@ -1,4 +1,4 @@
FROM golang:1.21-alpine
FROM golang:1.21.6
# Set the Current Working Directory inside the container
WORKDIR /app
@@ -9,10 +9,10 @@ RUN go mod download
# Copy the source from the current directory to the Working Directory inside the container
COPY *.go ./
COPY .. .
COPY . .
# Build the Go app
RUN CGO_ENABLED=0 GOOS=linux go build -o /htwkalender
RUN CGO_ENABLED=1 GOOS=linux go build -o /htwkalender
# Expose port 8080 to the outside world
EXPOSE 8080

View File

@@ -4,44 +4,44 @@ go 1.21
require (
github.com/PuerkitoBio/goquery v1.8.1
github.com/google/uuid v1.3.1
github.com/google/uuid v1.5.0
github.com/jordic/goics v0.0.0-20210404174824-5a0337b716a0
github.com/labstack/echo/v5 v5.0.0-20230722203903-ec5b858dab61
github.com/pocketbase/dbx v1.10.1
github.com/pocketbase/pocketbase v0.19.0
golang.org/x/net v0.17.0
github.com/pocketbase/pocketbase v0.20.5
golang.org/x/net v0.20.0
)
require (
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.46.3 // indirect
github.com/aws/aws-sdk-go-v2 v1.21.2 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14 // indirect
github.com/aws/aws-sdk-go-v2/config v1.19.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.43 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.92 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 // indirect
github.com/aws/smithy-go v1.15.0 // indirect
github.com/aws/aws-sdk-go v1.49.20 // indirect
github.com/aws/aws-sdk-go-v2 v1.24.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect
github.com/aws/aws-sdk-go-v2/config v1.26.3 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.14 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 // indirect
github.com/aws/smithy-go v1.19.0 // indirect
github.com/disintegration/imaging v1.6.2 // indirect
github.com/domodwyer/mailyak/v3 v3.6.2 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/ganigeorgiev/fexpr v0.3.0 // indirect
github.com/ganigeorgiev/fexpr v0.4.0 // indirect
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
@@ -54,40 +54,40 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/mattn/go-sqlite3 v1.14.19 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
go.opencensus.io v0.24.0 // indirect
gocloud.dev v0.34.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/image v0.13.0 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
gocloud.dev v0.36.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/image v0.14.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/api v0.148.0 // indirect
google.golang.org/api v0.153.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
lukechampine.com/uint128 v1.3.0 // indirect
modernc.org/cc/v3 v3.41.0 // indirect
modernc.org/ccgo/v3 v3.16.15 // indirect
modernc.org/libc v1.28.0 // indirect
modernc.org/libc v1.37.0 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/opt v0.1.3 // indirect
modernc.org/sqlite v1.26.0 // indirect
modernc.org/sqlite v1.27.0 // indirect
modernc.org/strutil v1.2.0 // indirect
modernc.org/token v1.1.0 // indirect
)

View File

@@ -1,14 +1,14 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o=
cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI=
cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY=
cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y=
cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic=
cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk=
cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y=
cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU=
cloud.google.com/go/storage v1.31.0 h1:+S3LjjEN2zZ+L5hOwj4+1OkGCsLVe0NzpXKQ1pSdTCI=
cloud.google.com/go/storage v1.31.0/go.mod h1:81ams1PrhW16L4kF7qg+4mTq7SRs5HsbDTM0bWvrwJ0=
cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI=
cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8=
cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w=
cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8=
github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ=
github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
@@ -16,55 +16,56 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63n
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/aws/aws-sdk-go v1.46.3 h1:zcrCu14ANOji6m38bUTxYdPqne4EXIvJQ2KXZ5oi9k0=
github.com/aws/aws-sdk-go v1.46.3/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go-v2 v1.21.2 h1:+LXZ0sgo8quN9UOKXXzAWRT3FWd4NxeXWOZom9pE7GA=
github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14 h1:Sc82v7tDQ/vdU1WtuSyzZ1I7y/68j//HJ6uozND1IDs=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.14/go.mod h1:9NCTOURS8OpxvoAVHq79LK81/zC78hfRWFn+aL0SPcY=
github.com/aws/aws-sdk-go-v2/config v1.19.1 h1:oe3vqcGftyk40icfLymhhhNysAwk0NfiwkDi2GTPMXs=
github.com/aws/aws-sdk-go-v2/config v1.19.1/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE=
github.com/aws/aws-sdk-go-v2/credentials v1.13.43 h1:LU8vo40zBlo3R7bAvBVy/ku4nxGEyZe9N8MqAeFTzF8=
github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 h1:PIktER+hwIG286DqXyvVENjgLTAwGgoeriLDD5C+YlQ=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.92 h1:nLA7dGFC6v4P6b+hzqt5GqIGmIuN+jTJzojfdOLXWFE=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.92/go.mod h1:h+ei9z19AhoN+Dac92DwkzfbJ4mFUea92xgl5pKSG0Q=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 h1:nFBQlGtkbPzp/NjZLuFxRqmT91rLJkgvsEQs68h962Y=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 h1:JRVhO25+r3ar2mKGP7E0LDl8K9/G36gjlqca5iQbaqc=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 h1:hze8YsjSh8Wl1rYa1CJpRmXP21BvOBuc76YhW0HsuQ4=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45/go.mod h1:lD5M20o09/LCuQ2mE62Mb/iSdSlCNuj6H5ci7tW7OsE=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6 h1:wmGLw2i8ZTlHLw7a9ULGfQbuccw8uIiNr6sol5bFzc8=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.6/go.mod h1:Q0Hq2X/NuL7z8b1Dww8rmOFl+jzusKEcyvkKspwdpyc=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15 h1:7R8uRYyXzdD71KWVCL78lJZltah6VVznXBazvKjfH58=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.15/go.mod h1:26SQUPcTNgV1Tapwdt4a1rOsYRsnBsJHLMPoxK2b0d8=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38 h1:skaFGzv+3kA+v2BPKhuekeb1Hbb105+44r8ASC+q5SE=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.38/go.mod h1:epIZoRSSbRIwLPJU5F+OldHhwZPBdpDeQkRdCeY3+00=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 h1:WWZA/I2K4ptBS1kg0kV1JbBtG/umed0vwHRrmcr9z7k=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37/go.mod h1:vBmDnwWXWxNPFRMmG2m/3MKOe+xEcMDo1tanpaWCcck=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6 h1:9ulSU5ClouoPIYhDQdg9tpl83d5Yb91PXTKK+17q+ow=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.6/go.mod h1:lnc2taBsR9nTlz9meD+lhFZZ9EWY712QHrRflWpTcOA=
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2 h1:Ll5/YVCOzRB+gxPqs2uD0R7/MyATC0w85626glSKmp4=
github.com/aws/aws-sdk-go-v2/service/s3 v1.40.2/go.mod h1:Zjfqt7KhQK+PO1bbOsFNzKgaq7TcxzmEoDWN8lM0qzQ=
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 h1:JuPGc7IkOP4AaqcZSIcyqLpFSqBWK32rM9+a1g6u73k=
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2/go.mod h1:gsL4keucRCgW+xA85ALBpRFfdSLH4kHOVSnLMSuBECo=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 h1:HFiiRkf1SdaAmV3/BHOFZ9DjFynPHj8G/UIO1lQS+fk=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSWKU6PIoBxrjSprdLoM8xPYvzYVg=
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 h1:0BkLfgeDjfZnZ+MhB3ONb01u9pwFYTCZVhlsSSBvlbU=
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ=
github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8=
github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/aws-sdk-go v1.49.20 h1:VgEUq2/ZbUkLbqPyDcxrirfXB+PgiZUUF5XbsgWe2S0=
github.com/aws/aws-sdk-go v1.49.20/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go-v2 v1.24.1 h1:xAojnj+ktS95YZlDf0zxWBkbFtymPeDP+rvUQIH3uAU=
github.com/aws/aws-sdk-go-v2 v1.24.1/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo=
github.com/aws/aws-sdk-go-v2/config v1.26.3 h1:dKuc2jdp10y13dEEvPqWxqLoc0vF3Z9FC45MvuQSxOA=
github.com/aws/aws-sdk-go-v2/config v1.26.3/go.mod h1:Bxgi+DeeswYofcYO0XyGClwlrq3DZEXli0kLf4hkGA0=
github.com/aws/aws-sdk-go-v2/credentials v1.16.14 h1:mMDTwwYO9A0/JbOCOG7EOZHtYM+o7OfGWfu0toa23VE=
github.com/aws/aws-sdk-go-v2/credentials v1.16.14/go.mod h1:cniAUh3ErQPHtCQGPT5ouvSAQ0od8caTO9OOuufZOAE=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 h1:c5I5iH+DZcH3xOIMlz3/tCKJDaHFwYEmxvlh2fAcFo8=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11/go.mod h1:cRrYDYAMUohBJUtUnOhydaMHtiK/1NZ0Otc9lIb6O0Y=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.11 h1:I6lAa3wBWfCz/cKkOpAcumsETRkFAl70sWi8ItcMEsM=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.11/go.mod h1:be1NIO30kJA23ORBLqPo1LttEM6tPNSEcjkd1eKzNW0=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 h1:vF+Zgd9s+H4vOXd5BMaPWykta2a6Ih0AKLq/X6NYKn4=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10/go.mod h1:6BkRjejp/GR4411UGqkX8+wFMbFbqsUIimfK4XjOKR4=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2mqXf9c/7NdiKriOwMvWQHgYztw=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM=
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10 h1:5oE2WzJE56/mVveuDZPJESKlg/00AaS2pY2QZcnxg4M=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10/go.mod h1:FHbKWQtRBYUz4vO5WBWjzMD2by126ny5y/1EoaWoLfI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 h1:L0ai8WICYHozIKK+OtPzVJBugL7culcuM4E4JOpIEm8=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10/go.mod h1:byqfyxJBshFk0fF9YmK0M0ugIO8OWjzH2T3bPG4eGuA=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 h1:DBYTXwIGQSGs9w4jKm60F5dmCQ3EEruxdc0MFh+3EY4=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10/go.mod h1:wohMUQiFdzo0NtxbBg0mSRGZ4vL3n0dKjLTINdcIino=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 h1:KOxnQeWy5sXyS37fdKEvAsGHOr9fa/qvwxfJurR/BzE=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10/go.mod h1:jMx5INQFYFYB3lQD9W0D8Ohgq6Wnl7NYOJ2TQndbulI=
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0 h1:PJTdBMsyvra6FtED7JZtDpQrIAflYDHFoZAu/sKYkwU=
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0/go.mod h1:4qXHrG1Ne3VGIMZPCB8OjH/pLFO94sKABIusjh0KWPU=
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6 h1:dGrs+Q/WzhsiUKh82SfTVN66QzyulXuMDTV/G8ZxOac=
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6/go.mod h1:+mJNDdF+qiUlNKNC3fxn74WWNN+sOiGOEImje+3ScPM=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6 h1:Yf2MIo9x+0tyv76GljxzqA3WtC5mw7NmazD2chwjxE4=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6/go.mod h1:ykf3COxYI0UJmxcfcxcVuz7b6uADi1FkiUz6Eb7AgM8=
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 h1:NzO4Vrau795RkUdSHKEwiR01FaGzGOH1EETJ+5QHnm0=
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7/go.mod h1:6h2YuIoxaMSCFf5fi1EgZAwdfkGMgDY+DVfa61uLe4U=
github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM=
github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -80,14 +81,14 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/ganigeorgiev/fexpr v0.3.0 h1:RwSyJBME+g/XdzlUW0paH/4VXhLHPg+rErtLeC7K8Ew=
github.com/ganigeorgiev/fexpr v0.3.0/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE=
github.com/ganigeorgiev/fexpr v0.4.0 h1:ojitI+VMNZX/odeNL1x3RzTTE8qAIVvnSSYPNAnQFDI=
github.com/ganigeorgiev/fexpr v0.4.0/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE=
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es=
github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
@@ -124,7 +125,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-replayers/grpcreplay v1.1.0 h1:S5+I3zYyZ+GQz68OfbURDdt/+cSMqCK1wrvNx7WBzTE=
@@ -133,18 +133,18 @@ github.com/google/go-replayers/httpreplay v1.2.0 h1:VM1wEyyjaoU53BwrOnaf9VhAyQQE
github.com/google/go-replayers/httpreplay v1.2.0/go.mod h1:WahEFFZZ7a1P4VM1qEeHy+tME4bwyqPcwWbNlUI1Mcg=
github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=
github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8 h1:gpptm606MZYGaMHMsB4Srmb6EbW/IVHnt04rcMXnkBQ=
github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ=
github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o=
github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw=
github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8=
github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU=
github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ=
github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs=
github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
@@ -176,28 +176,27 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI=
github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pocketbase/dbx v1.10.1 h1:cw+vsyfCJD8YObOVeqb93YErnlxwYMkNZ4rwN0G0AaA=
github.com/pocketbase/dbx v1.10.1/go.mod h1:xXRCIAKTHMgUCyCKZm55pUOdvFziJjQfXaWKhu2vhMs=
github.com/pocketbase/pocketbase v0.19.0 h1:PvRsABvNgJhafShpXZNXeF/BdkmiwEIcc/+r9QsONdg=
github.com/pocketbase/pocketbase v0.19.0/go.mod h1:iNGsMmhAtmiH4X9aYPK4nTS56XL1HhQPBkmZaWRyQ8Q=
github.com/pocketbase/pocketbase v0.20.5 h1:unrGe6MG/D2AQDjjdcyh1WrbXI10wWe1gFcGdG/yaNU=
github.com/pocketbase/pocketbase v0.20.5/go.mod h1:uy7WOxXoICrwe8HlyR78vTvK0RdG5REkhDx4SvYi4FY=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -217,23 +216,24 @@ github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
gocloud.dev v0.34.0 h1:LzlQY+4l2cMtuNfwT2ht4+fiXwWf/NmPTnXUlLmGif4=
gocloud.dev v0.34.0/go.mod h1:psKOachbnvY3DAOPbsFVmLIErwsbWPUG2H5i65D38vE=
gocloud.dev v0.36.0 h1:q5zoXux4xkOZP473e1EZbG8Gq9f0vlg1VNH5Du/ybus=
gocloud.dev v0.36.0/go.mod h1:bLxah6JQVKBaIxzsr5BQLYB4IYdWHkMZdzCXlo6F0gg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg=
golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk=
golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4=
golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -245,19 +245,21 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY=
golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0=
golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ=
golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -269,17 +271,17 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
@@ -288,10 +290,11 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -300,14 +303,15 @@ golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM=
golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
google.golang.org/api v0.148.0 h1:HBq4TZlN4/1pNcu0geJZ/Q50vIwIXT532UIMYoo0vOs=
google.golang.org/api v0.148.0/go.mod h1:8/TBgwaKjfqTdacOJrOv2+2Q6fBDU1uHKK06oGSkxzU=
google.golang.org/api v0.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4=
google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
@@ -316,12 +320,12 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a h1:fwgW9j3vHirt4ObdHoYNwuO24BEZjSzbh+zPaNWoiY8=
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE=
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU=
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc=
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg=
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f/go.mod h1:nWSwAFPb+qfNJXsoeO3Io7zf4tMSfN8EA8RlDA04GhY=
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY=
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
@@ -340,8 +344,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
@@ -361,16 +365,16 @@ modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
modernc.org/libc v1.28.0 h1:kHB6LtDBV8DEAK7aZT1vWvP92abW9fb8cjb1P9UTpUE=
modernc.org/libc v1.28.0/go.mod h1:DaG/4Q3LRRdqpiLyP0C2m1B8ZMGkQ+cCgOIjEtQlYhQ=
modernc.org/libc v1.37.0 h1:WerjebcsP6A7Jy+f2lCnHAkiSTLf7IaSftBYUtoswak=
modernc.org/libc v1.37.0/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE=
modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E=
modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E=
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
modernc.org/sqlite v1.26.0 h1:SocQdLRSYlA8W99V8YH0NES75thx19d9sB/aFc4R8Lw=
modernc.org/sqlite v1.26.0/go.mod h1:FL3pVXie73rg3Rii6V/u5BoHlSoyeZeIgKZEgHARyCU=
modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8=
modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY=

View File

@@ -41,36 +41,44 @@ type Event struct {
models.BaseModel
}
func (m *Event) Equals(event Event) bool {
return m.Day == event.Day &&
m.Week == event.Week &&
m.Start == event.Start &&
m.End == event.End &&
m.Name == event.Name &&
m.Course == event.Course &&
m.Prof == event.Prof &&
m.Rooms == event.Rooms &&
m.EventType == event.EventType
func (e *Event) Equals(event Event) bool {
return e.Day == event.Day &&
e.Week == event.Week &&
e.Start == event.Start &&
e.End == event.End &&
e.Name == event.Name &&
e.Course == event.Course &&
e.Prof == event.Prof &&
e.Rooms == event.Rooms &&
e.EventType == event.EventType
}
func (m *Event) TableName() string {
func (e *Event) TableName() string {
return "events"
}
// SetCourse func to set the course and returns the event
func (m *Event) SetCourse(course string) Event {
m.Course = course
return *m
func (e *Event) SetCourse(course string) Event {
e.Course = course
return *e
}
// Creates an AnonymizedEventDTO from an Event hiding all sensitive data
func (m *Event) AnonymizeEvent() AnonymizedEventDTO {
func (e *Event) AnonymizeEvent() AnonymizedEventDTO {
return AnonymizedEventDTO{
Day: m.Day,
Week: m.Week,
Start: m.Start,
End: m.End,
Rooms: m.Rooms,
Free: strings.Contains(strings.ToLower(m.Name), "zur freien verfügung"),
Day: e.Day,
Week: e.Week,
Start: e.Start,
End: e.End,
Rooms: e.Rooms,
Free: strings.Contains(strings.ToLower(e.Name), "zur freien verfügung"),
}
}
func (e *Event) GetName() string {
return e.Name
}
func (e *Event) SetName(name string) {
e.Name = name
}

View File

@@ -9,6 +9,8 @@ import (
)
func TestEvents_Contains(t *testing.T) {
specificTime, _ := types.ParseDateTime("2020-01-01 12:00:00.000Z")
type args struct {
event Event
}
@@ -26,20 +28,20 @@ func TestEvents_Contains(t *testing.T) {
},
{
name: "one event",
m: Events{{Day: "test", Week: "test", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"}},
args: args{event: Event{Day: "test", Week: "test", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"}},
m: Events{{Day: "test", Week: "test", Start: specificTime, End: specificTime, Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"}},
args: args{event: Event{Day: "test", Week: "test", Start: specificTime, End: specificTime, Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"}},
want: true,
},
{
name: "two events",
m: Events{{Day: "test", Week: "test", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"}, {Day: "test2", Week: "test2", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test2", Course: "test2", Prof: "test2", Rooms: "test2", EventType: "test2"}},
args: args{event: Event{Day: "test2", Week: "test2", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test2", Course: "test2", Prof: "test2", Rooms: "test2", EventType: "test2"}},
m: Events{{Day: "test", Week: "test", Start: specificTime, End: specificTime, Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"}, {Day: "test2", Week: "test2", Start: specificTime, End: specificTime, Name: "test2", Course: "test2", Prof: "test2", Rooms: "test2", EventType: "test2"}},
args: args{event: Event{Day: "test2", Week: "test2", Start: specificTime, End: specificTime, Name: "test2", Course: "test2", Prof: "test2", Rooms: "test2", EventType: "test2"}},
want: true,
},
{
name: "two events with different values",
m: Events{{Day: "test", Week: "test", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test", UUID: "439ßu56rf8u9ijn4f4-2345345"}, {Day: "test2", Week: "test2", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test2", Course: "test2", Prof: "test2", Rooms: "test2", EventType: "test2", UUID: "432a39ßu545349ijn4f4-23dsa45"}},
args: args{event: Event{Day: "test3", Week: "test3", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test3", Course: "test3", Prof: "test3", Rooms: "test3", EventType: "test3", UUID: "934mf43r34f-g68h7655tg3"}},
m: Events{{Day: "test", Week: "test", Start: specificTime, End: specificTime, Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test", UUID: "439ßu56rf8u9ijn4f4-2345345"}, {Day: "test2", Week: "test2", Start: specificTime, End: specificTime, Name: "test2", Course: "test2", Prof: "test2", Rooms: "test2", EventType: "test2", UUID: "432a39ßu545349ijn4f4-23dsa45"}},
args: args{event: Event{Day: "test3", Week: "test3", Start: specificTime, End: specificTime, Name: "test3", Course: "test3", Prof: "test3", Rooms: "test3", EventType: "test3", UUID: "934mf43r34f-g68h7655tg3"}},
want: false,
},
}
@@ -53,6 +55,8 @@ func TestEvents_Contains(t *testing.T) {
}
func TestEvent_Equals(t *testing.T) {
specificTime, _ := types.ParseDateTime("2020-01-01 12:00:00.000Z")
type fields struct {
UUID string
Day string
@@ -86,20 +90,20 @@ func TestEvent_Equals(t *testing.T) {
},
{
name: "one empty one not",
fields: fields{Day: "test", Week: "test", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"},
fields: fields{Day: "test", Week: "test", Start: specificTime, End: specificTime, Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"},
args: args{event: Event{}},
want: false,
},
{
name: "one event",
fields: fields{Day: "test", Week: "test", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"},
args: args{event: Event{Day: "test", Week: "test", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"}},
fields: fields{Day: "test", Week: "test", Start: specificTime, End: specificTime, Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"},
args: args{event: Event{Day: "test", Week: "test", Start: specificTime, End: specificTime, Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"}},
want: true,
},
{
name: "two events",
fields: fields{Day: "test", Week: "test", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"},
args: args{event: Event{Day: "test2", Week: "test2", Start: types.NowDateTime(), End: types.NowDateTime(), Name: "test2", Course: "test2", Prof: "test2", Rooms: "test2", EventType: "test2"}},
fields: fields{Day: "test", Week: "test", Start: specificTime, End: specificTime, Name: "test", Course: "test", Prof: "test", Rooms: "test", EventType: "test"},
args: args{event: Event{Day: "test2", Week: "test2", Start: specificTime, End: specificTime, Name: "test2", Course: "test2", Prof: "test2", Rooms: "test2", EventType: "test2"}},
want: false,
},
}

View File

@@ -8,3 +8,24 @@ type Module struct {
Semester string `json:"semester" db:"semester"`
Events Events `json:"events"`
}
func (m *Module) SetName(name string) {
m.Name = name
}
type ModuleDTO struct {
UUID string `json:"uuid" db:"uuid"`
Name string `json:"name" db:"Name"`
Prof string `json:"prof" db:"Prof"`
Course string `json:"course" db:"course"`
Semester string `json:"semester" db:"semester"`
EventType string `db:"EventType" json:"eventType"`
}
func (m *ModuleDTO) GetName() string {
return m.Name
}
func (m *ModuleDTO) SetName(name string) {
m.Name = name
}

View File

@@ -5,9 +5,13 @@ import (
"github.com/pocketbase/pocketbase/core"
"github.com/pocketbase/pocketbase/tools/cron"
"htwkalender/service/course"
"htwkalender/service/events"
"htwkalender/service/feed"
"htwkalender/service/fetch/sport"
v2 "htwkalender/service/fetch/v2"
"htwkalender/service/functions/time"
"log"
"strconv"
"log/slog"
)
@@ -24,19 +28,37 @@ func AddSchedules(app *pocketbase.PocketBase) {
course.UpdateCourse(app)
})
// Every sunday at 3am clean all courses (5 segments - minute, hour, day, month, weekday) "0 3 * * 0"
scheduler.MustAdd("cleanFeeds", "0 3 * * 0", func() {
// Every sunday at 1am clean all courses (5 segments - minute, hour, day, month, weekday) "0 3 * * 0"
scheduler.MustAdd("cleanFeeds", "0 1 * * 0", func() {
// clean feeds older than 6 months
slog.Info("Started cleaning feeds schedule")
feed.ClearFeeds(app.Dao(), 6, time.RealClock{})
})
// Every sunday at 3am fetch all sport events (5 segments - minute, hour, day, month, weekday) "0 2 * * 0"
scheduler.MustAdd("fetchSportEvents", "0 3 * * 0", func() {
// Every sunday at 2am fetch all sport events (5 segments - minute, hour, day, month, weekday) "0 2 * * 0"
scheduler.MustAdd("fetchEvents", "0 2 * * 0", func() {
slog.Info("Started fetching sport events schedule")
sport.FetchAndUpdateSportEvents(app)
})
//delete all events and then fetch all events from remote this should be done every sunday at 2am
scheduler.MustAdd("fetchEvents", "0 2 * * 0", func() {
err := events.DeleteAllEvents(app)
if err != nil {
log.Println(err)
}
err, savedEvents := v2.FetchAllEventsAndSave(app)
if err != nil {
log.Println(err)
} else {
log.Println("Successfully saved: " + strconv.FormatInt(int64(len(savedEvents)), 10) + " events")
}
})
scheduler.Start()
return nil
})

View File

@@ -7,6 +7,8 @@ import (
)
func Test_getDateFromWeekNumber(t *testing.T) {
europeTime, _ := time.LoadLocation("Europe/Berlin")
type args struct {
year int
weekNumber int
@@ -25,7 +27,7 @@ func Test_getDateFromWeekNumber(t *testing.T) {
weekNumber: 1,
dayName: "Montag",
},
want: time.Date(2021, 1, 4, 0, 0, 0, 0, time.UTC),
want: time.Date(2021, 1, 4, 0, 0, 0, 0, europeTime),
wantErr: false,
},
{
@@ -35,7 +37,7 @@ func Test_getDateFromWeekNumber(t *testing.T) {
weekNumber: 57,
dayName: "Montag",
},
want: time.Date(2024, 1, 29, 0, 0, 0, 0, time.UTC),
want: time.Date(2024, 1, 29, 0, 0, 0, 0, europeTime),
wantErr: false,
},
{
@@ -45,7 +47,7 @@ func Test_getDateFromWeekNumber(t *testing.T) {
weekNumber: 1,
dayName: "Montag",
},
want: time.Date(2023, 1, 2, 0, 0, 0, 0, time.UTC),
want: time.Date(2023, 1, 2, 0, 0, 0, 0, europeTime),
wantErr: false,
},
}

View File

@@ -127,20 +127,14 @@ func buildIcalQueryForModules(modules []model.FeedCollection) dbx.Expression {
//second check if modules has only one element
if len(modules) == 1 {
return dbx.And(
dbx.HashExp{"Name": modules[0].Name},
dbx.HashExp{"course": modules[0].Course},
)
return dbx.HashExp{"uuid": modules[0].UUID}
}
//third check if modules has more than one element
var wheres []dbx.Expression
for _, module := range modules {
where := dbx.And(
dbx.HashExp{"Name": module.Name},
dbx.HashExp{"course": module.Course},
)
where := dbx.HashExp{"uuid": module.UUID}
wheres = append(wheres, where)
}
@@ -196,16 +190,16 @@ func GetAllModulesForCourse(app *pocketbase.PocketBase, course string, semester
return events, nil
}
func GetAllModulesDistinctByNameAndCourse(app *pocketbase.PocketBase) (model.Events, error) {
var events model.Events
func GetAllModulesDistinctByNameAndCourse(app *pocketbase.PocketBase) ([]model.ModuleDTO, error) {
var modules []model.ModuleDTO
err := app.Dao().DB().Select("*").From("events").GroupBy("Name").Distinct(true).All(&events)
err := app.Dao().DB().Select("Name", "EventType", "Prof", "course", "semester", "uuid").From("events").GroupBy("Name", "Course").Distinct(true).All(&modules)
if err != nil {
slog.Error("Error while getting events from database: ", err)
return nil, fmt.Errorf("error while getting events distinct by name and course from data")
}
return events, nil
return modules, nil
}
func DeleteAllEventsForCourse(app *pocketbase.PocketBase, course string, semester string) error {

View File

@@ -23,13 +23,13 @@ func Test_buildIcalQueryForModules(t *testing.T) {
},
{
name: "one module",
args: args{modules: []model.FeedCollection{{Name: "test", Course: "test"}}},
want: dbx.And(dbx.HashExp{"Name": "test"}, dbx.HashExp{"course": "test"}),
args: args{modules: []model.FeedCollection{{Name: "test", Course: "test", UUID: "test"}}},
want: dbx.HashExp{"uuid": "test"},
},
{
name: "two modules",
args: args{modules: []model.FeedCollection{{Name: "test", Course: "test"}, {Name: "test2", Course: "test2"}}},
want: dbx.Or(dbx.And(dbx.HashExp{"Name": "test"}, dbx.HashExp{"course": "test"}), dbx.And(dbx.HashExp{"Name": "test2"}, dbx.HashExp{"course": "test2"})),
args: args{modules: []model.FeedCollection{{Name: "test", Course: "test", UUID: "test"}, {Name: "test2", Course: "test2", UUID: "test2"}}},
want: dbx.Or(dbx.HashExp{"uuid": "test"}, dbx.HashExp{"uuid": "test2"}),
},
}
for _, tt := range tests {

View File

@@ -14,24 +14,46 @@ func GetRooms(app *pocketbase.PocketBase) ([]string, error) {
var events []struct {
Rooms string `db:"Rooms" json:"Rooms"`
Course string `db:"course" json:"Course"`
}
// get all rooms from event records in the events collection
err := app.Dao().DB().Select("Rooms").From("events").All(&events)
err := app.Dao().DB().Select("Rooms", "course").From("events").Distinct(true).All(&events)
if err != nil {
return nil, err
}
var roomArray []string
roomArray := clearAndSeparateRooms([]struct {
Rooms string
Course string
}(events))
return roomArray
}
func clearAndSeparateRooms(events []struct {
Rooms string
Course string
}) []string {
var roomArray []string
for _, event := range events {
var room = strings.FieldsFunc(event.Rooms, functions.IsSeparator(
[]rune{',', ' ', '\t', '\n', '\r', '\u00A0'},
))
var room []string
// sport rooms don't have to be separated
if event.Course != "Sport" {
//split rooms by comma, tab, newline, carriage return, semicolon, space and non-breaking space
room = strings.FieldsFunc(event.Rooms, functions.IsSeparator(
[]rune{',', '\t', '\n', '\r', ';', ' ', '\u00A0'}),
)
} else {
room = append(room, event.Rooms)
}
//split functions room by space and add each room to array if it is not already in there
for _, r := range room {
var text = strings.TrimSpace(r)
if !functions.Contains(roomArray, text) && !strings.Contains(text, " ") && len(text) >= 1 {
if !functions.Contains(roomArray, text) && len(text) >= 1 {
roomArray = append(roomArray, text)
}
}

View File

@@ -12,17 +12,28 @@ import (
func GetModulesForCourseDistinct(app *pocketbase.PocketBase, course string, semester string) (model.Events, error) {
modules, err := db.GetAllModulesForCourse(app, course, semester)
replaceEmptyEntry(modules, "Sonderveranstaltungen")
// Convert the []model.Module to []Named
var namedEvents []Named
for _, module := range modules {
namedEvents = append(namedEvents, &module)
}
replaceEmptyEntry(namedEvents, "Sonderveranstaltungen")
return modules, err
}
type Named interface {
GetName() string
SetName(name string)
}
// replaceEmptyEntry replaces an empty entry in a module with a replacement string
// If the module is not empty, nothing happens
func replaceEmptyEntry(modules model.Events, replacement string) {
for i, module := range modules {
if functions.OnlyWhitespace(module.Name) {
modules[i].Name = replacement
func replaceEmptyEntry(namedList []Named, replacement string) {
for i, namedItem := range namedList {
if functions.OnlyWhitespace(namedItem.GetName()) {
namedList[i].SetName(replacement)
}
}
}
@@ -32,7 +43,12 @@ func replaceEmptyEntry(modules model.Events, replacement string) {
func GetAllModulesDistinct(app *pocketbase.PocketBase, c echo.Context) error {
modules, err := db.GetAllModulesDistinctByNameAndCourse(app)
replaceEmptyEntry(modules, "Sonderveranstaltungen")
var namedModules []Named
for _, module := range modules {
namedModules = append(namedModules, &module)
}
replaceEmptyEntry(namedModules, "Sonderveranstaltungen")
if err != nil {
return c.JSON(400, err)

View File

@@ -18,8 +18,9 @@ import (
"github.com/PuerkitoBio/goquery"
)
// @TODO: add tests
// @TODO: make it like a cron job to fetch the sport courses once a week
// FetchAndUpdateSportEvents fetches all sport events from the HTWK sport website
// it deletes them first and then saves them to the database
// It returns all saved events
func FetchAndUpdateSportEvents(app *pocketbase.PocketBase) []model.Event {
var sportCourseLinks = fetchAllAvailableSportCourses()
@@ -56,6 +57,7 @@ func FetchAndUpdateSportEvents(app *pocketbase.PocketBase) []model.Event {
}
}
// @TODO: delete and save events in one transaction and it only should delete events that are not in the new events list and save events that are not in the database
err = db.DeleteAllEventsForCourse(app, "Sport", functions.GetCurrentSemesterString())
if err != nil {
return nil
@@ -89,7 +91,7 @@ func formatEntriesToEvents(entries []model.SportEntry) []model.Event {
Week: strconv.Itoa(23),
Start: start,
End: end,
Name: entry.Title + " " + entry.Details.Type + " (" + entry.ID + ")",
Name: entry.Title + " (" + entry.ID + ")",
EventType: entry.Details.Type,
Prof: entry.Details.CourseLead.Name,
Rooms: entry.Details.Location.Name,

View File

@@ -267,7 +267,6 @@ func Test_generateUUIDs(t *testing.T) {
}
func Test_createTimeFromHourAndMinuteString(t *testing.T) {
europeTime, _ := time.LoadLocation("Europe/Berlin")
type args struct {
tableTime string
}
@@ -281,21 +280,21 @@ func Test_createTimeFromHourAndMinuteString(t *testing.T) {
args: args{
tableTime: "08:00",
},
want: time.Date(0, 0, 0, 8, 0, 0, 0, europeTime),
want: time.Date(0, 0, 0, 8, 0, 0, 0, time.UTC),
},
{
name: "Test 2",
args: args{
tableTime: "08:15",
},
want: time.Date(0, 0, 0, 8, 15, 0, 0, europeTime),
want: time.Date(0, 0, 0, 8, 15, 0, 0, time.UTC),
},
{
name: "Test 3",
args: args{
tableTime: "08:30",
},
want: time.Date(0, 0, 0, 8, 30, 0, 0, europeTime),
want: time.Date(0, 0, 0, 8, 30, 0, 0, time.UTC),
},
}
for _, tt := range tests {

View File

@@ -35,7 +35,7 @@ func toEvents(tables [][]*html.Node, days []string) []model.Event {
Prof: getTextContent(tableData[6]),
Rooms: getTextContent(tableData[8]),
BookedAt: getTextContent(tableData[10]),
Course: course,
Course: strings.TrimSpace(course),
})
}
}

View File

@@ -23,8 +23,33 @@ func ParseEventsFromRemote(app *pocketbase.PocketBase) (model.Events, error) {
func FetchAllEventsAndSave(app *pocketbase.PocketBase, clock localTime.Clock) ([]model.Event, error) {
var savedRecords []model.Event
var stubUrl = [2]string{
"https://stundenplan.htwk-leipzig.de/",
"/Berichte/Text-Listen;Veranstaltungsarten;name;" +
"Vp%0A" +
"Vw%0A" +
"V%0A" +
"Sp%0A" +
"Sw%0A" +
"S%0A" +
"Pp%0A" +
"Pw%0A" +
"P%0A" +
"ZV%0A" +
"Tut%0A" +
"Sperr%0A" +
"pf%0A" +
"wpf%0A" +
"fak%0A" +
"Pruefung%0A" +
"Vertretung%0A" +
"Fremdveranst.%0A" +
"Buchen%0A" +
"%0A?&template=sws_modul&weeks=1-65&combined=yes",
}
if (clock.Now().Month() >= 3) && (clock.Now().Month() <= 10) {
url := "https://stundenplan.htwk-leipzig.de/ss/Berichte/Text-Listen;Veranstaltungsarten;name;Vp%0AVw%0AV%0ASp%0ASw%0AS%0APp%0APw%0AP%0AZV%0ATut%0ASperr%0Apf%0Awpf%0Afak%0A%0A?&template=sws_modul&weeks=1-65&combined=yes"
url := stubUrl[0] + "ss" + stubUrl[1]
events, err := parseEventForOneSemester(url)
if err != nil {
return nil, fmt.Errorf("failed to parse events for summmer semester: %w", err)
@@ -37,7 +62,7 @@ func FetchAllEventsAndSave(app *pocketbase.PocketBase, clock localTime.Clock) ([
}
if (clock.Now().Month() >= 9) || (clock.Now().Month() <= 4) {
url := "https://stundenplan.htwk-leipzig.de/ws/Berichte/Text-Listen;Veranstaltungsarten;name;Vp%0AVw%0AV%0ASp%0ASw%0AS%0APp%0APw%0AP%0AZV%0ATut%0ASperr%0Apf%0Awpf%0Afak%0A%0A?&template=sws_modul&weeks=1-65&combined=yes"
url := stubUrl[0] + "ws" + stubUrl[1]
events, err := parseEventForOneSemester(url)
if err != nil {
return nil, fmt.Errorf("failed to parse events for winter semester: %w", err)
@@ -46,7 +71,7 @@ func FetchAllEventsAndSave(app *pocketbase.PocketBase, clock localTime.Clock) ([
if dbError != nil {
return nil, fmt.Errorf("failed to save events: %w", dbError)
}
savedRecords = append(savedEvents, events...)
savedRecords = append(savedRecords, savedEvents...)
}
return savedRecords, nil
}
@@ -87,21 +112,26 @@ func parseEventForOneSemester(url string) ([]model.Event, error) {
semesterString := findFirstSpanWithClass(table, "header-0-2-0").FirstChild.Data
semester, year := extractSemesterAndYear(semesterString)
events = convertWeeksToDates(events, semester, year)
events = generateUUIDs(events)
events = splitEventType(events)
var seminarGroup = model.SeminarGroup{
University: findFirstSpanWithClass(table, "header-1-0-0").FirstChild.Data,
Events: events,
}
if seminarGroup.Events == nil && seminarGroup.University == "" {
return nil, err
}
events = switchNameAndNotesForExam(events)
events = generateUUIDs(events)
return events, nil
}
// switch name and notes for Pruefung events when Note is not empty and Name starts with "Prüfungen" and contains email
func switchNameAndNotesForExam(events []model.Event) []model.Event {
for i, event := range events {
if event.EventType == "Pruefung" {
if event.Notes != "" && strings.HasPrefix(event.Name, "Prüfungen") && strings.Contains(event.Name, "@") {
events[i].Name = event.Notes
events[i].Notes = event.Name
}
}
}
return events
}
func parseHTML(webpage string, err error) (*html.Node, error) {
doc, err := html.Parse(strings.NewReader(webpage))
if err != nil {

View File

@@ -0,0 +1,83 @@
package v2
import (
"htwkalender/model"
"reflect"
"testing"
)
func Test_switchNameAndNotesForExam(t *testing.T) {
type args struct {
events []model.Event
}
tests := []struct {
name string
args args
want []model.Event
}{
{
name: "switch name and notes for exam",
args: args{
events: []model.Event{
{
EventType: "Pruefung",
Name: "Prüfungen FING/EIT WiSe (pruefungsamt.fing-eit@htwk-leipzig.de)",
Notes: "Computer Vision II - Räume/Zeit unter Vorbehalt- (Raum W111.1)",
},
},
},
want: []model.Event{
{
EventType: "Pruefung",
Name: "Computer Vision II - Räume/Zeit unter Vorbehalt- (Raum W111.1)",
Notes: "Prüfungen FING/EIT WiSe (pruefungsamt.fing-eit@htwk-leipzig.de)",
},
},
},
{
name: "dont switch name and notes for exam",
args: args{
events: []model.Event{
{
EventType: "Pruefung",
Name: "i054 Umweltschutz und Recycling DPB & VNB 7.FS (wpf)",
Notes: "Prüfung",
},
},
},
want: []model.Event{
{
EventType: "Pruefung",
Notes: "Prüfung",
Name: "i054 Umweltschutz und Recycling DPB & VNB 7.FS (wpf)",
},
},
},
{
name: "dont switch name and notes for exam",
args: args{
events: []model.Event{
{
EventType: "Pruefung",
Name: "Prüfungen FING/ME WiSe (pruefungsamt.fing-me@htwk-leipzig.de)",
Notes: "",
},
},
},
want: []model.Event{
{
EventType: "Pruefung",
Notes: "",
Name: "Prüfungen FING/ME WiSe (pruefungsamt.fing-me@htwk-leipzig.de)",
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := switchNameAndNotesForExam(tt.args.events); !reflect.DeepEqual(got, tt.want) {
t.Errorf("switchNameAndNotesForExam() = %v, want %v", got, tt.want)
}
})
}
}

View File

@@ -3,7 +3,11 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/htwk.svg" />
<link id="theme-link" rel="stylesheet" href="themes/lara-light-blue/theme.css">
<link
id="theme-link"
rel="stylesheet"
href="themes/lara-light-blue/theme.css"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HTWKalender</title>
</head>

View File

@@ -8,36 +8,40 @@
"build": "vue-tsc && vite build",
"preview": "vite preview",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
"format": "prettier . --write"
"lint-no-fix": "eslint --ext .js,.vue --ignore-path .gitignore src",
"format": "prettier . --write",
"test": "vitest"
},
"dependencies": {
"@fullcalendar/core": "^6.1.9",
"@fullcalendar/daygrid": "^6.1.9",
"@fullcalendar/interaction": "^6.1.9",
"@fullcalendar/timegrid": "^6.1.9",
"@fullcalendar/vue3": "^6.1.9",
"@vueuse/core": "^10.6.1",
"pinia": "^2.1.6",
"@fullcalendar/core": "^6.1.10",
"@fullcalendar/daygrid": "^6.1.10",
"@fullcalendar/interaction": "^6.1.10",
"@fullcalendar/timegrid": "^6.1.10",
"@fullcalendar/vue3": "^6.1.10",
"@vueuse/core": "^10.7.1",
"pinia": "^2.1.7",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primevue": "^3.32.2",
"vue": "^3.3.4",
"vue-i18n": "^9.4.1",
"vue-router": "^4.2.4"
"primevue": "^3.46.0",
"source-sans-pro": "^3.6.0",
"vue": "^3.4.11",
"vue-i18n": "^9.9.0",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@types/node": "^20.5.9",
"@vitejs/plugin-vue": "^4.2.3",
"@types/node": "^20.11.0",
"@vitejs/plugin-vue": "^5.0.3",
"@vue/eslint-config-typescript": "^12.0.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-vue": "^9.17.0",
"moment-timezone": "^0.5.43",
"prettier": "3.0.2",
"sass": "^1.69.5",
"sass-loader": "^13.3.2",
"typescript": "^5.0.2",
"vite": "^4.4.12",
"vue-tsc": "^1.8.5"
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-vue": "^9.20.0",
"moment-timezone": "^0.5.44",
"prettier": "3.2.1",
"sass": "^1.69.7",
"sass-loader": "^13.3.3",
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vitest": "^1.2.0",
"vue-tsc": "^1.8.27"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +1,25 @@
<script lang="ts" setup>
import MenuBar from "./components/MenuBar.vue";
import {RouteRecordName, RouterView} from "vue-router";
import { RouteRecordName, RouterView } from "vue-router";
import CalendarPreview from "./components/CalendarPreview.vue";
import moduleStore from "./store/moduleStore.ts";
import { provide, ref } from "vue";
const disabledPages = ["room-finder", "faq", "imprint", "privacy-policy", "edit", "edit-calendar"];
const disabledPages = [
"room-finder",
"faq",
"imprint",
"privacy-policy",
"edit",
"edit-calendar",
];
const store = moduleStore();
const mobilePage = ref(true);
provide("mobilePage", mobilePage);
const isDisabled = (routeName: RouteRecordName | null | undefined) => {
return !disabledPages.includes(routeName as string) && store.modules.size > 0
return !disabledPages.includes(routeName as string) && store.modules.size > 0;
};
const updateMobile = () => {
@@ -26,10 +33,31 @@ window.addEventListener("resize", updateMobile);
<template>
<MenuBar />
<RouterView />
<RouterView v-slot="{ Component, route }">
<transition name="scale" mode="out-in">
<div :key="route.name ?? ''" class="origin-near-top">
<component :is="Component" />
</div>
</transition>
</RouterView>
<!-- show CalendarPreview but only on specific router views -->
<CalendarPreview v-if="isDisabled($route.name)"/>
<CalendarPreview v-if="isDisabled($route.name)" />
<Toast />
</template>
<style scoped></style>
<style scoped>
.scale-enter-active,
.scale-leave-active {
transition: all 0.2s ease;
}
.scale-enter-from,
.scale-leave-to {
opacity: 0;
transform: scale(0.95);
}
.origin-near-top {
transform-origin: center 33vh;
}
</style>

View File

@@ -19,6 +19,23 @@ export async function createIndividualFeed(modules: Module[]): Promise<string> {
return token;
}
interface FeedResponse {
modules: FeedModule[];
collectionId: string;
collectionName: string;
id: string;
retrieved: string;
updated: string;
}
interface FeedModule {
course: string;
name: string;
reminder: boolean;
userDefinedName: string;
uuid: string;
}
export async function saveIndividualFeed(
token: string,
modules: Module[],
@@ -30,11 +47,14 @@ export async function saveIndividualFeed(
},
body: '{"modules":' + JSON.stringify(modules) + "}",
})
.then((response) => {
return response.json();
.then(async (response) => {
// parse response.json to FeedResponse
const feedResponse: FeedResponse = await response.json();
return feedResponse;
})
.then((response) => {
token = response;
.then((response: FeedResponse) => {
console.debug("response", response);
token = response.id;
});
return token;
}
@@ -42,14 +62,15 @@ export async function saveIndividualFeed(
export async function deleteIndividualFeed(token: string): Promise<void> {
await fetch("/api/feed?token=" + token, {
method: "DELETE",
}).then ((response) => {
})
.then((response) => {
if (response.ok) {
return Promise.resolve(response);
} else {
return Promise.reject(response);
}
}).catch((error) => {
})
.catch((error) => {
return Promise.reject(error);
});
}

View File

@@ -36,6 +36,7 @@ export async function fetchModulesByCourseAndSemester(
module.uuid,
module.name,
course,
module.eventType,
module.name,
module.prof,
semester,
@@ -61,6 +62,7 @@ export async function fetchAllModules(): Promise<Module[]> {
module.uuid,
module.name,
module.course,
module.eventType,
module.name,
module.prof,
module.semester,

View File

@@ -14,6 +14,7 @@ export async function fetchModule(module: Module): Promise<Module> {
module.uuid,
module.name,
module.course,
module.eventType,
module.name,
module.prof,
module.semester,

View File

@@ -0,0 +1,244 @@
<script lang="ts" setup>
import { defineAsyncComponent, inject, onMounted, ref, Ref } from "vue";
import { Module } from "../model/module.ts";
import { fetchAllModules } from "../api/fetchCourse.ts";
import moduleStore from "../store/moduleStore.ts";
import { FilterMatchMode } from "primevue/api";
import {
DataTableRowSelectEvent,
DataTableRowUnselectEvent,
} from "primevue/datatable";
import { useDialog } from "primevue/usedialog";
import router from "../router";
import { fetchModule } from "../api/fetchModule.ts";
import { useI18n } from "vue-i18n";
const dialog = useDialog();
const { t } = useI18n({ useScope: "global" });
const store = moduleStore();
if (store.isEmpty()) {
router.replace("/");
}
const mobilePage = inject("mobilePage") as Ref<boolean>;
const filters = ref({
course: {
value: null,
matchMode: FilterMatchMode.CONTAINS,
},
name: {
value: null,
matchMode: FilterMatchMode.CONTAINS,
},
eventType: {
value: null,
matchMode: FilterMatchMode.CONTAINS,
},
prof: {
value: null,
matchMode: FilterMatchMode.CONTAINS,
},
});
const loadedModules: Ref<Module[]> = ref(new Array(10));
const loadingData = ref(true);
onMounted(() => {
fetchAllModules()
.then(
(data) =>
(loadedModules.value = data.map((module: Module) => {
return module;
})),
)
.finally(() => {
loadingData.value = false;
});
});
const ModuleInformation = defineAsyncComponent(
() => import("./ModuleInformation.vue"),
);
async function showInfo(module: Module) {
await fetchModule(module).then((data) => {
module = data;
});
dialog.open(ModuleInformation, {
class: "w-full m-0",
props: {
style: {
width: "80vw",
},
breakpoints: {
"992px": "100vw",
"640px": "100vw",
},
modal: true,
},
data: {
module: module,
},
});
}
function selectModule(event: DataTableRowSelectEvent) {
store.addModule(event.data);
}
function unselectModule(event: DataTableRowUnselectEvent) {
store.removeModule(event.data);
}
</script>
<template>
<div class="m-2 lg:w-10 w-full">
<DynamicDialog />
<DataTable
id="dt-responsive-table"
v-model:filters="filters"
:selection="store.getAllModules()"
:value="loadedModules"
data-key="uuid"
paginator
:rows="10"
:rows-per-page-options="[5, 10, 20, 50]"
paginator-template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink RowsPerPageDropdown"
:current-page-report-template="
$t('additionalModules.paginator.from') +
'{first}' +
$t('additionalModules.paginator.to') +
'{last}' +
$t('additionalModules.paginator.of') +
'{totalRecords}'
"
filter-display="row"
:show-gridlines="true"
:striped-rows="true"
:select-all="false"
:size="mobilePage ? 'small' : 'large'"
@row-select="selectModule"
@row-unselect="unselectModule"
>
<Column selection-mode="multiple">
<template v-if="loadingData" #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column
field="course"
:header="$t('additionalModules.course')"
:show-clear-button="false"
:show-filter-menu="false"
>
<template #filter="{ filterModel, filterCallback }">
<InputText
v-model="filterModel.value"
type="text"
class="p-column-filter max-w-10rem"
@input="filterCallback()"
/>
</template>
<template v-if="loadingData" #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column
field="name"
:header="$t('additionalModules.module')"
:show-clear-button="false"
:show-filter-menu="false"
>
<template #filter="{ filterModel, filterCallback }">
<InputText
v-model="filterModel.value"
type="text"
class="p-column-filter"
@input="filterCallback()"
/>
</template>
<template v-if="loadingData" #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column
field="eventType"
:header="$t('additionalModules.eventType')"
:show-clear-button="false"
:show-filter-menu="false"
>
<template #filter="{ filterModel, filterCallback }">
<InputText
v-model="filterModel.value"
type="text"
class="p-column-filter max-w-10rem"
@input="filterCallback()"
/>
</template>
<template v-if="loadingData" #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column
field="prof"
:header="$t('additionalModules.professor')"
:show-clear-button="false"
:show-filter-menu="false"
>
<template v-if="loadingData" #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column :header="$t('additionalModules.info')">
<template #body="slotProps">
<div v-if="loadingData">
<Skeleton></Skeleton>
</div>
<div v-else>
<Button
icon="pi pi-info"
severity="secondary"
rounded
outlined
:aria-label="$t('additionalModules.info-long')"
class="small-button"
@click.stop="showInfo(slotProps.data)"
></Button>
</div>
</template>
</Column>
<template #footer>
<div class="py-2 px-3">
{{
t("additionalModules.footerModulesSelected", {
count: store?.countModules() ?? 0,
})
}}
</div>
</template>
</DataTable>
</div>
</template>
<style scoped>
:deep(.custom-multiselect) {
width: 50rem;
}
:deep(.custom-multiselect li) {
height: unset;
}
.small-button.p-button {
width: 2rem;
height: 2rem;
padding: 0;
}
:deep(.p-filter-column .p-checkbox .p-component) {
display: none !important;
}
</style>

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup>
import tokenStore from "../store/tokenStore.ts";
import { useToast } from "primevue/usetoast";
import {computed, onMounted} from "vue";
import { computed, onMounted } from "vue";
import router from "../router";
import { useI18n } from "vue-i18n";
const { t } = useI18n({ useScope: "global" });
@@ -79,7 +79,6 @@ const actions = computed(() => [
</script>
<template>
<div class="flex flex-column mt-8">
<div class="flex align-items-center justify-content-center m-2">
<h2 class="text-base md:text-2xl">

View File

@@ -25,7 +25,6 @@ const columns = computed(() => [
{ field: "Course", header: t("calendarPreview.course") },
{ field: "Module", header: t("calendarPreview.module") },
]);
</script>
<template>

View File

@@ -1,12 +1,12 @@
<script lang="ts" setup>
import { ref } from "vue";
import { usePrimeVue } from 'primevue/config';
import { usePrimeVue } from "primevue/config";
const PrimeVue = usePrimeVue();
const isDark = ref(true);
const darkTheme = ref('lara-dark-blue'),
lightTheme = ref('lara-light-blue');
const darkTheme = ref("lara-dark-blue"),
lightTheme = ref("lara-light-blue");
function toggleTheme() {
isDark.value = !isDark.value;
@@ -17,29 +17,32 @@ function setTheme(shouldBeDark: boolean) {
isDark.value = shouldBeDark;
const newTheme = isDark.value ? darkTheme.value : lightTheme.value,
oldTheme = isDark.value ? lightTheme.value : darkTheme.value;
PrimeVue.changeTheme(oldTheme, newTheme, 'theme-link', () => {});
PrimeVue.changeTheme(oldTheme, newTheme, "theme-link", () => {});
}
// set theme matching browser preference
setTheme(window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches);
setTheme(
window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches,
);
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
window
.matchMedia("(prefers-color-scheme: dark)")
.addEventListener("change", (e) => {
setTheme(e.matches);
});
});
</script>
<template>
<Button
<Button
id="dark-mode-switcher"
size="small"
class="p-button-rounded w-full md:w-auto"
id="dark-mode-switcher"
style="margin-right: 1rem"
:severity="isDark ? 'warning' : 'info'"
@click="toggleTheme"
>
<i class="pi pi-sun" v-if="isDark"></i>
<i class="pi pi-moon" v-else></i>
</Button>
<i v-if="isDark" class="pi pi-sun"></i>
<i v-else class="pi pi-moon"></i>
</Button>
</template>

View File

@@ -224,5 +224,4 @@
.grid > .col:first-child {
font-weight: bold;
}
</style>

View File

@@ -2,6 +2,7 @@
import { computed } from "vue";
import localeStore from "../store/localeStore.ts";
import { useI18n } from "vue-i18n";
import { DropdownChangeEvent } from "primevue/dropdown";
const { t } = useI18n({ useScope: "global" });
const countries = computed(() => [
@@ -17,8 +18,8 @@ function displayCountry(code: string) {
return countries.value.find((country) => country.code === code)?.name;
}
function updateLocale(locale: string) {
localeStore().setLocale(locale);
function updateLocale(dropdownChangeEvent: DropdownChangeEvent) {
localeStore().setLocale(dropdownChangeEvent.value);
}
</script>
<template>
@@ -28,7 +29,7 @@ function updateLocale(locale: string) {
option-label="name"
placeholder="Select a Language"
class="w-full md:w-14rem"
@change="updateLocale($event.data)"
@change="updateLocale($event)"
>
<template #value="slotProps">
<div v-if="slotProps.value" class="flex align-items-center">

View File

@@ -2,7 +2,7 @@
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import LocaleSwitcher from "./LocaleSwitcher.vue";
import DarkModeSwitcher from "./DarkModeSwitcher.vue"
import DarkModeSwitcher from "./DarkModeSwitcher.vue";
const { t } = useI18n({ useScope: "global" });
const items = computed(() => [
@@ -19,22 +19,22 @@ const items = computed(() => [
{
label: t("roomFinder"),
icon: "pi pi-fw pi-calendar",
route: `rooms`,
route: "/rooms",
},
{
label: t("faq"),
icon: "pi pi-fw pi-book",
route: `faq`,
route: "/faq",
},
{
label: t("imprint"),
icon: "pi pi-fw pi-id-card",
route: `imprint`,
route: "/imprint",
},
{
label: t("privacy"),
icon: "pi pi-fw pi-exclamation-triangle",
route: `privacy-policy`,
route: "/privacy-policy",
},
]);
</script>
@@ -43,16 +43,10 @@ const items = computed(() => [
<Menubar :model="items" class="menubar justify-content-between flex-wrap">
<template #start>
<router-link v-slot="{ navigate }" :to="`/`" custom>
<Button
severity="secondary"
text
class="p-0 mx-2"
@click="navigate"
>
<Button severity="secondary" text class="p-0 mx-2" @click="navigate">
<img
width="50"
height="50"
class="w-full"
src="../../public/htwk.svg"
alt="Logo"
/>
@@ -65,12 +59,13 @@ const items = computed(() => [
:label="String(item.label)"
:icon="item.icon"
text
@click="navigate"
severity="secondary"
:class="item.route === $route.path ? 'active' : ''"
@click="navigate"
/>
</router-link>
</template>
<template #end class="align-items-stretch">
<template #end>
<div class="flex align-items-stretch justify-content-center">
<DarkModeSwitcher></DarkModeSwitcher>
<LocaleSwitcher></LocaleSwitcher>
@@ -84,4 +79,17 @@ const items = computed(() => [
background-color: transparent;
border: none;
}
:deep(.p-button .p-button-label::after) {
content: "";
display: block;
width: 0;
height: 2px;
background: var(--primary-color);
transition: width 0.3s;
}
:deep(.p-button.active .p-button-label::after) {
width: 100%;
}
</style>

View File

@@ -93,20 +93,34 @@ function formatWeekday(weekday: string) {
layout="grid"
>
<template #grid="slotProps">
<div class="col-12 sm:col-6 p-1">
<Card class="border-2 surface-border border-round surface-card">
<div
v-for="(item, index) in slotProps.items"
:key="index"
class="col-12 sm:col-6 p-1"
>
<Card
class="border-2 surface-border border-round surface-card"
>
<template #title>
<Badge
:value="slotProps.data.eventType"
:severity="slotProps.data.eventType === 'V' ? 'success' : 'warning'"
:value="item.eventType"
:severity="
item.eventType === 'V' ? 'success' : 'warning'
"
class="flex-shrink-0 flex-grow-0"
/>
</template>
<template #content>
<div class="flex flex-row gap-4 flex-wrap">
<div class="flex flex-column">
<div class="mr-2">{{ formatWeekday(slotProps.data.day) }}</div>
<div class="mr-2">{{ $t("moduleInformation.nthWeek", {count: slotProps.data.week}) }}</div>
<div class="mr-2">{{ formatWeekday(item.day) }}</div>
<div class="mr-2">
{{
$t("moduleInformation.nthWeek", {
count: item.week,
})
}}
</div>
</div>
<div class="flex flex-column">
<table>
@@ -114,19 +128,19 @@ function formatWeekday(weekday: string) {
<td class="mr-2">
<b>{{ $t("moduleInformation.start") }}:</b>
</td>
<td>{{ formatTimestamp(slotProps.data.start) }}</td>
<td>{{ formatTimestamp(item.start) }}</td>
</tr>
<tr>
<td class="mr-2">
<b>{{ $t("moduleInformation.end") }}:</b>
</td>
<td>{{ formatTimestamp(slotProps.data.end) }}</td>
<td>{{ formatTimestamp(item.end) }}</td>
</tr>
<tr>
<td class="mr-2">
<b>{{ $t("moduleInformation.room") }}:</b>
</td>
<td>{{ slotProps.data.rooms }}</td>
<td>{{ item.rooms }}</td>
</tr>
</table>
</div>

View File

@@ -2,7 +2,6 @@
import { computed, ComputedRef, PropType } from "vue";
import { Module } from "../model/module.ts";
import moduleStore from "../store/moduleStore";
import router from "../router";
const store = moduleStore();
const props = defineProps({
@@ -16,21 +15,23 @@ const props = defineProps({
},
});
const modules : ComputedRef<Module[]> = computed(() => props.modules);
const selectedCourse : ComputedRef<string> = computed(() => props.selectedCourse);
const modules: ComputedRef<Module[]> = computed(() => props.modules);
const selectedCourse: ComputedRef<string> = computed(
() => props.selectedCourse,
);
store.modules.clear();
const allSelected : ComputedRef<boolean> =
computed(() => props.modules.every((module) => store.hasModule(module)));
const allSelected: ComputedRef<boolean> = computed(() =>
props.modules.every((module) => store.hasModule(module)),
);
function toggleAllModules(){
function toggleAllModules() {
if (allSelected.value) {
store.removeAllModules();
} else {
store.overwriteModules(props.modules);
}
console.debug(props.modules);
}
function toggleModule(module: Module) {
@@ -40,39 +41,43 @@ function toggleModule(module: Module) {
store.addModule(module);
}
}
function nextStep() {
router.push("/additional-modules");
}
</script>
<template>
<div class="flex flex-column mx-8 mt-2 w-full">
<Button
:disabled="store.isEmpty()"
class="col-12 md:col-4 mb-3 align-self-end"
@click="nextStep()"
icon="pi pi-arrow-right"
:label="$t('moduleSelection.nextStep')"
/>
<div class="flex flex-column w-full">
<DataView
:value="modules"
data-key="uuid"
:class="
[selectedCourse === ''?
['opacity-0', 'pointer-events-none'] :
['opacity-100', 'transition-all', 'transition-duration-500', 'transition-ease-in-out']
,
'w-full']"
:class="[
selectedCourse === ''
? ['opacity-0', 'pointer-events-none']
: [
'opacity-100',
'transition-all',
'transition-duration-500',
'transition-ease-in-out',
],
'w-full',
]"
>
<template #header>
<div class="flex justify-content-between align-items-center flex-wrap md:mx-4">
<div
class="flex justify-content-between align-items-center flex-wrap md:mx-4"
>
<h3>
{{ $t("moduleSelection.modules") }} -
{{ store.countModules() }}
</h3>
<div class="flex align-items-center justify-content-end white-space-nowrap">
<p>{{ allSelected ? $t('moduleSelection.deselectAll') : $t('moduleSelection.selectAll')}}</p>
<div
class="flex align-items-center justify-content-end white-space-nowrap"
>
<p>
{{
allSelected
? $t("moduleSelection.deselectAll")
: $t("moduleSelection.selectAll")
}}
</p>
<InputSwitch
class="mx-2"
:disabled="modules.length === 0"
@@ -88,20 +93,31 @@ function nextStep() {
</p>
</template>
<template #list="slotProps">
<div class="col-12">
<div class="flex flex-column sm:flex-row justify-content-between align-items-center flex-1 column-gap-4 mx-2 md:mx-4">
<p class="text-lg flex-1 align-self-stretch">{{ slotProps.data.name }}</p>
<ToggleButton
<div class="grid grid-nogutter">
<div
v-for="(item, index) in slotProps.items"
:key="index"
class="col-12"
>
<div
class="flex flex-column sm:flex-row justify-content-between align-items-center flex-1 column-gap-4 mx-2 md:mx-4"
>
<p class="text-lg flex-1 align-self-stretch">{{ item.name }}</p>
<Button
class="w-9rem align-self-end my-2"
off-icon="pi pi-times"
:off-label="$t('moduleSelection.unselected')"
on-icon="pi pi-check"
:on-label="$t('moduleSelection.selected')"
:model-value="store.hasModule(slotProps.data)"
@update:model-value="toggleModule(slotProps.data)"
:icon="store.hasModule(item) ? 'pi pi-times' : 'pi pi-plus'"
:label="
store.hasModule(item)
? $t('moduleSelection.selected')
: $t('moduleSelection.unselected')
"
outlined
:severity="store.hasModule(item) ? '' : 'secondary'"
@click="toggleModule(item)"
/>
</div>
</div>
</div>
</template>
</DataView>
</div>

View File

@@ -3,21 +3,28 @@ import moduleStore from "../store/moduleStore.ts";
import { createIndividualFeed } from "../api/createFeed.ts";
import router from "../router";
import tokenStore from "../store/tokenStore.ts";
import { Ref, computed, inject, ref } from "vue";
import { Ref, computed, inject, ref, onMounted } from "vue";
import ModuleTemplateDialog from "./ModuleTemplateDialog.vue";
import { onlyWhitespace } from "../helpers/strings.ts";
import { useI18n } from "vue-i18n";
import { Module } from "@/model/module.ts";
const { t } = useI18n({ useScope: "global" });
const store = moduleStore();
const tableData = ref(
store.getAllModules().map((module) => {
const tableData: Ref<{ Course: string; Module: Module }[]> = ref([
{ Course: "", Module: {} as Module },
]);
onMounted(
() =>
(tableData.value = store.getAllModules().map((module) => {
return {
Course: module.course,
Module: module,
};
}),
})),
);
const mobilePage = inject("mobilePage") as Ref<boolean>;
const columns = computed(() => [
@@ -37,7 +44,7 @@ async function finalStep() {
<div class="flex flex-column align-items-center mb-7">
<div class="flex align-items-center justify-content-center m-2 gap-2">
<h3>{{ $t("renameModules.subTitle") }}</h3>
<ModuleTemplateDialog class=""/>
<ModuleTemplateDialog />
</div>
<div class="w-full lg:w-8 flex flex-column">
<div class="card flex align-items-center justify-content-center my-2">
@@ -50,7 +57,9 @@ async function finalStep() {
class="w-full"
>
<template #header>
<div class="flex align-items-center justify-content-end flex-wrap gap-2 px-2">
<div
class="flex align-items-center justify-content-end flex-wrap gap-2 px-2"
>
{{ $t("renameModules.enableAllNotifications") }}
<InputSwitch
:model-value="
@@ -60,17 +69,19 @@ async function finalStep() {
)
"
@update:model-value="
tableData.forEach((module) => (module.Module.reminder = $event))
tableData.forEach(
(module) => (module.Module.reminder = $event),
)
"
/>
</div>
</template>
<Column
v-for="col of columns"
:key="col.field"
:field="col.field"
:header="col.header"
:class="col.field === 'Reminder' ? 'text-center' : ''"
v-for="(item, index) in columns"
:key="index"
:field="item.field"
:header="item.header"
:class="item.field === 'Reminder' ? 'text-center' : ''"
>
<!-- Text Body -->
<template #body="{ data, field }">
@@ -125,9 +136,9 @@ async function finalStep() {
<Button
:disabled="store.isEmpty()"
class="col-12 md:col-4 mb-3 align-self-end"
@click="finalStep()"
icon="pi pi-save"
:label="$t('renameModules.nextStep')"
@click="finalStep()"
/>
</div>
</div>

View File

@@ -4,7 +4,7 @@ import dayGridPlugin from "@fullcalendar/daygrid";
import interactionPlugin from "@fullcalendar/interaction";
import timeGridPlugin from "@fullcalendar/timegrid";
import { computed, ComputedRef, inject, ref, Ref, watch } from "vue";
import { CalendarOptions, EventInput } from "@fullcalendar/core";
import { CalendarOptions, DatesSetArg, EventInput } from "@fullcalendar/core";
import { fetchEventsByRoomAndDuration } from "../api/fetchRoom.ts";
import { useI18n } from "vue-i18n";
const { t } = useI18n({ useScope: "global" });
@@ -52,7 +52,7 @@ async function getOccupation() {
id: index,
start: event.start.replace(/\s\+\d{4}\s\w+$/, "").replace(" ", "T"),
end: event.end.replace(/\s\+\d{4}\s\w+$/, "").replace(" ", "T"),
showFree: event.free
showFree: event.free,
};
});
@@ -66,8 +66,7 @@ async function getOccupation() {
import allLocales from "@fullcalendar/core/locales-all";
const calendarOptions: ComputedRef<CalendarOptions> = computed(() =>
({
const calendarOptions: ComputedRef<CalendarOptions> = computed(() => ({
locales: allLocales,
locale: t("languageCode"),
plugins: [dayGridPlugin, interactionPlugin, timeGridPlugin],
@@ -83,7 +82,6 @@ const calendarOptions: ComputedRef<CalendarOptions> = computed(() =>
height: "auto",
views: {
week: {
description: "Wochenansicht",
type: "timeGrid",
slotLabelFormat: {
hour: "numeric",
@@ -124,18 +122,19 @@ const calendarOptions: ComputedRef<CalendarOptions> = computed(() =>
start: "week,Day",
},
datesSet: function (dateInfo: any) {
datesSet: function (dateInfo: DatesSetArg) {
const view = dateInfo.view;
const offset = new Date().getTimezoneOffset();
const startDate = new Date(
view.activeStart.getTime() - offset * 60 * 1000,
);
const startDate = new Date(view.activeStart.getTime() - offset * 60 * 1000);
const endDate = new Date(view.activeEnd.getTime() - offset * 60 * 1000);
currentDateFrom.value = startDate.toISOString().split("T")[0];
currentDateTo.value = endDate.toISOString().split("T")[0];
getOccupation();
},
events: function (_info: any, successCallback: any, _: any) {
events: function (
_info: unknown,
successCallback: (events: EventInput[]) => void,
) {
successCallback(
occupations.value.map((event) => {
return {
@@ -143,14 +142,17 @@ const calendarOptions: ComputedRef<CalendarOptions> = computed(() =>
start: event.start,
end: event.end,
color: event.showFree ? "var(--green-800)" : "var(--primary-color)",
textColor: event.showFree ? "var(--green-50)" : "var(--primary-color-text)",
title: event.showFree ? t("roomFinderPage.available") : t("roomFinderPage.occupied"),
textColor: event.showFree
? "var(--green-50)"
: "var(--primary-color-text)",
title: event.showFree
? t("roomFinderPage.available")
: t("roomFinderPage.occupied"),
} as EventInput;
}),
);
},
})
);
}));
</script>
<template>
<FullCalendar ref="fullCalendar" :options="calendarOptions" />

View File

@@ -1,152 +0,0 @@
<script lang="ts" setup>
import { defineAsyncComponent, ref, Ref } from "vue";
import { Module } from "../../model/module.ts";
import { fetchAllModules } from "../../api/fetchCourse.ts";
import moduleStore from "../../store/moduleStore";
import { MultiSelectAllChangeEvent } from "primevue/multiselect";
import router from "../../router";
import { fetchModule } from "../../api/fetchModule.ts";
import { useDialog } from "primevue/usedialog";
import { useI18n } from "vue-i18n";
const dialog = useDialog();
const { t } = useI18n({ useScope: "global" });
const fetchedModules = async () => {
return await fetchAllModules();
};
const modules: Ref<Module[]> = ref([]);
const selectedModules: Ref<Module[]> = ref([] as Module[]);
fetchedModules().then(
(data) =>
(modules.value = data.map((module: Module) => {
return module;
})),
);
async function nextStep() {
selectedModules.value.forEach((module: Module) => {
moduleStore().addModule(module);
});
await router.push("/edit-calendar");
}
const ModuleInformation = defineAsyncComponent(
() => import("../ModuleInformation.vue"),
);
async function showInfo(module: Module) {
await fetchModule(module).then((data: Module) => {
dialog.open(ModuleInformation, {
props: {
style: {
width: "50vw",
},
breakpoints: {
"960px": "75vw",
"640px": "90vw",
},
modal: true,
},
data: {
module: data,
},
});
});
}
const display = (module: Module) => module.name + " (" + module.course + ")";
const selectAll = ref(false);
const onSelectAllChange = (event: MultiSelectAllChangeEvent) => {
selectedModules.value = event.checked
? modules.value.map((module) => module)
: [];
selectAll.value = event.checked;
};
function selectChange() {
selectAll.value = selectedModules.value.length === modules.value.length;
}
</script>
<template>
<div class="flex flex-column">
<div class="flex align-items-center justify-content-center h-4rem m-2">
<h3>
{{ $t("additionalModules.subTitle") }}
</h3>
</div>
<div class="card flex align-items-center justify-content-center m-2">
<MultiSelect
v-model="selectedModules"
:max-selected-labels="1"
:option-label="display"
:options="modules"
:select-all="selectAll"
:virtual-scroller-options="{ itemSize: 70 }"
class="custom-multiselect"
filter
:placeholder="$t('additionalModules.dropDown')"
:auto-filter-focus="true"
:show-toggle-all="false"
:selected-items-label="$t('additionalModules.footerModulesSelected', { count: selectedModules.length ?? 0 })"
@change="selectChange()"
@selectall-change="onSelectAllChange($event)"
>
<template #option="slotProps">
<div class="flex justify-content-between w-full">
<div class="flex align-items-center justify-content-center">
<p class="text-1xl white-space-normal p-mb-0">
{{ display(slotProps.option) }}
</p>
</div>
<div class="flex align-items-center justify-content-center ml-2">
<Button
class="small-button"
icon="pi pi-info"
severity="secondary"
rounded
outlined
aria-label="Information"
@click.stop="showInfo(slotProps.option)"
></Button>
<DynamicDialog />
</div>
</div>
</template>
<template #footer>
<div class="py-2 px-3">
{{ t('additionalModules.footerModulesSelected', { count: selectedModules.length ?? 0 }) }}
</div>
</template>
</MultiSelect>
</div>
<div class="flex align-items-center justify-content-center h-4rem m-2">
<Button @click="nextStep()">{{
$t("additionalModules.nextStep")
}}</Button>
</div>
</div>
</template>
<style scoped>
:deep(.custom-multiselect) {
width: 50rem;
}
:deep(.custom-multiselect li) {
height: unset;
}
.small-button.p-button {
width: 2rem;
height: 2rem;
padding: 0;
}
</style>

View File

@@ -0,0 +1,14 @@
import { expect, test } from "vitest";
import { onlyWhitespace } from "@/helpers/strings.ts";
test("contains No whitespace", () => {
expect(onlyWhitespace("awdawdawd")).toBe(false);
});
test("contains whitespace", () => {
expect(onlyWhitespace("aw daw dawd")).toBe(false);
});
test("contains only whitespace", () => {
expect(onlyWhitespace(" ")).toBe(true);
});

View File

@@ -13,6 +13,7 @@
"winterSemester": "Wintersemester",
"summerSemester": "Sommersemester",
"subTitle": "Bitte wähle eine Gruppe und das Semester aus.",
"nextStep": "Weiter",
"courseDropDown": "Gruppe",
"noCoursesAvailable": "Keine Gruppen verfügbar",
"semesterDropDown": "Semester"
@@ -26,7 +27,6 @@
"occupied": "belegt"
},
"moduleSelection": {
"nextStep": "Weiter",
"selectAll": "Alle anwählen",
"deselectAll": "Alle abwählen",
"selected": "angewählt",
@@ -93,7 +93,8 @@
"from": "",
"to": " bis ",
"of": " von insgesamt "
}
},
"eventType": "Ereignistyp"
},
"renameModules": {
"reminder": "Erinnerung",

View File

@@ -13,6 +13,7 @@
"winterSemester": "winter semester",
"summerSemester": "summer semester",
"subTitle": "please select a course and semester",
"nextStep": "next step",
"courseDropDown": "please select a course",
"noCoursesAvailable": "no courses listed",
"semesterDropDown": "please select a semester"
@@ -26,7 +27,6 @@
"occupied": "occupied"
},
"moduleSelection": {
"nextStep": "next step",
"selectAll": "select all",
"deselectAll": "deselect all",
"selected": "selected",
@@ -93,7 +93,8 @@
"from": "",
"to": " to ",
"of": " of "
}
},
"eventType": "event type"
},
"renameModules": {
"reminder": "reminder",

View File

@@ -1,3 +1,5 @@
import "source-sans-pro/source-sans-pro.css";
import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
@@ -32,6 +34,7 @@ import DynamicDialog from "primevue/dynamicdialog";
import DialogService from "primevue/dialogservice";
import ProgressSpinner from "primevue/progressspinner";
import Checkbox from "primevue/checkbox";
import Skeleton from "primevue/skeleton";
import i18n from "./i18n";
const app = createApp(App);
@@ -68,5 +71,6 @@ app.component("Column", Column);
app.component("DynamicDialog", DynamicDialog);
app.component("ProgressSpinner", ProgressSpinner);
app.component("Checkbox", Checkbox);
app.component("Skeleton", Skeleton);
app.mount("#app");

View File

@@ -22,6 +22,6 @@ export class AnonymizedEventDTO {
public start: string,
public end: string,
public rooms: string,
public free: boolean
public free: boolean,
) {}
}

View File

@@ -5,6 +5,7 @@ export class Module {
public uuid: string,
public name: string,
public course: string,
public eventType: string,
public userDefinedName: string,
public prof: string,
public semester: string,

View File

@@ -8,8 +8,9 @@ const PrivacyPolicy = () => import("../view/PrivacyPolicy.vue");
const RenameModules = () => import("../components/RenameModules.vue");
const RoomFinder = () => import("../view/RoomFinder.vue");
const EditCalendarView = () => import("../view/EditCalendarView.vue");
const EditAdditionalModules = () => import("../components/editCalendar/EditAdditionalModules.vue");
const EditModules = () => import("../components/editCalendar/EditModules.vue");
const EditAdditionalModules = () =>
import("../view/editCalendar/EditAdditionalModules.vue");
const EditModules = () => import("../view/editCalendar/EditModules.vue");
const CourseSelection = () => import("../view/CourseSelection.vue");
import i18n from "../i18n";

View File

@@ -38,7 +38,7 @@ const moduleStore = defineStore("moduleStore", {
},
containsModule(module: Module): boolean {
return this.modules.has(module.uuid);
}
},
},
});

View File

@@ -1,89 +1,13 @@
<script lang="ts" setup>
import { defineAsyncComponent, inject, ref, Ref} from "vue";
import { Module } from "../model/module.ts";
import { fetchAllModules } from "../api/fetchCourse.ts";
import moduleStore from "../store/moduleStore.ts";
import { FilterMatchMode } from "primevue/api";
import { DataTableRowSelectEvent, DataTableRowUnselectEvent } from "primevue/datatable";
import { useDialog } from "primevue/usedialog";
import moduleStore from "../store/moduleStore";
import router from "../router";
import { fetchModule } from "../api/fetchModule.ts";
import { useI18n } from "vue-i18n";
const dialog = useDialog();
const { t } = useI18n({ useScope: "global" });
const fetchedModules = async () => {
return await fetchAllModules();
};
import AdditionalModuleTable from "../components/AdditionalModuleTable.vue";
const store = moduleStore();
if (store.isEmpty()) {
router.replace("/");
}
const mobilePage = inject("mobilePage") as Ref<boolean>;
const modules: Ref<Module[]> = ref([]);
const filters = ref({
course: {
value: null,
matchMode: FilterMatchMode.CONTAINS,
},
name: {
value: null,
matchMode: FilterMatchMode.CONTAINS,
},
prof: {
value: null,
matchMode: FilterMatchMode.CONTAINS,
},
});
fetchedModules().then(
(data) =>
(modules.value = data.map((module: Module) => {
return module;
})),
);
async function nextStep() {
await router.push("/rename-modules");
}
const ModuleInformation = defineAsyncComponent(
() => import("../components/ModuleInformation.vue"),
);
async function showInfo(module: Module) {
await fetchModule(module).then((data) => {
module = data;
});
dialog.open(ModuleInformation, {
class: "w-full m-0",
props: {
style: {
width: "80vw",
},
breakpoints: {
"992px": "100vw",
"640px": "100vw",
},
modal: true,
},
data: {
module: module,
},
});
}
function selectModule(event: DataTableRowSelectEvent) {
store.addModule(event.data);
}
function unselectModule(event: DataTableRowUnselectEvent) {
store.removeModule(event.data);
}
</script>
<template>
@@ -93,128 +17,17 @@ function unselectModule(event: DataTableRowUnselectEvent) {
{{ $t("additionalModules.subTitle") }}
</h3>
</div>
<div class="m-2 lg:w-10 w-full">
<DynamicDialog />
<DataTable
id="dt-responsive-table"
v-model:filters="filters"
:selection="store.getAllModules()"
:value="modules"
data-key="uuid"
paginator
:rows="10"
:rows-per-page-options="[5, 10, 20, 50]"
paginator-template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink RowsPerPageDropdown"
:current-page-report-template="
$t('additionalModules.paginator.from') +
'{first}' +
$t('additionalModules.paginator.to') +
'{last}' +
$t('additionalModules.paginator.of') +
'{totalRecords}'
"
filter-display="row"
:loading="!modules.length"
loading-icon="pi pi-spinner"
:show-gridlines="true"
:striped-rows="true"
:select-all="false"
:size="mobilePage ? 'small' : 'large'"
@row-select="selectModule"
@row-unselect="unselectModule"
<AdditionalModuleTable />
<div
class="flex align-items-center justify-content-end h-4rem m-2 w-full lg:w-10"
>
<Column selection-mode="multiple">
</Column>
<Column
field="course"
:header="$t('additionalModules.course')"
:show-clear-button="false"
:show-filter-menu="false"
>
<template #filter="{ filterModel, filterCallback }">
<InputText
v-model="filterModel.value"
type="text"
class="p-column-filter max-w-10rem"
@input="filterCallback()"
/>
</template>
</Column>
<Column
field="name"
:header="$t('additionalModules.module')"
:show-clear-button="false"
:show-filter-menu="false"
>
<template #filter="{ filterModel, filterCallback }">
<InputText
v-model="filterModel.value"
type="text"
class="p-column-filter"
@input="filterCallback()"
/>
</template>
</Column>
<Column
field="prof"
:header="$t('additionalModules.professor')"
:show-clear-button="false"
:show-filter-menu="false"
>
</Column>
<Column
:header="$t('additionalModules.info')"
>
<template #body="slotProps">
<Button
icon="pi pi-info"
severity="secondary"
rounded
outlined
:aria-label="$t('additionalModules.info-long')"
class="small-button"
@click.stop="showInfo(slotProps.data)"
></Button>
</template>
</Column>
<template #footer>
<div class="py-2 px-3">
{{
t('additionalModules.footerModulesSelected', { count: store?.countModules() ?? 0 })
}}
</div>
</template>
</DataTable>
</div>
<div class="flex align-items-center justify-content-end h-4rem m-2 w-full lg:w-10">
<Button
:disabled="store.isEmpty()"
@click="nextStep()"
class="col-12 md:col-4 mb-3 align-self-end"
icon="pi pi-arrow-right"
:label="$t('additionalModules.nextStep')"
@click="nextStep()"
/>
</div>
</div>
</template>
<style scoped>
:deep(.custom-multiselect) {
width: 50rem;
}
:deep(.custom-multiselect li) {
height: unset;
}
.small-button.p-button {
width: 2rem;
height: 2rem;
padding: 0;
}
:deep(.p-filter-column .p-checkbox .p-component) {
display: none !important;
}
</style>

View File

@@ -4,9 +4,14 @@ import {
fetchCourse,
fetchModulesByCourseAndSemester,
} from "../api/fetchCourse";
import DynamicPage from "./DynamicPage.vue";
import ModuleSelection from "../components/ModuleSelection.vue";
import { Module } from "../model/module.ts";
import { useI18n } from "vue-i18n";
import moduleStore from "../store/moduleStore";
import router from "../router";
const store = moduleStore();
const { t } = useI18n({ useScope: "global" });
const courses = async () => {
@@ -52,31 +57,23 @@ async function getModules() {
</script>
<template>
<div
class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out mt-0"
:class="{'md:mt-8': selectedCourse.name === ''}"
>
<div class="flex align-items-center justify-content-center gap-2 mx-2">
<h3 class="text-4xl">
{{ $t("courseSelection.headline") }}
</h3>
<i
class="pi pi-calendar"
style="font-size: 2rem"
></i>
</div>
<div
class="flex justify-content-center"
>
<h5 class="text-2xl m-2">{{ $t("courseSelection.subTitle") }}</h5>
</div>
<div
class="flex flex-wrap mx-0 gap-2 my-4 w-full lg:w-8"
<DynamicPage
:hide-content="selectedCourse.name === ''"
:headline="$t('courseSelection.headline')"
:sub-title="$t('courseSelection.subTitle')"
icon="pi pi-calendar"
:button="{
label: $t('courseSelection.nextStep'),
icon: 'pi pi-arrow-right',
disabled: store.isEmpty(),
onClick: () => router.push('/additional-modules'),
}"
>
<template #selection="{ flexSpecs }">
<Dropdown
v-model="selectedCourse"
:options="countries"
class="flex-1 m-0"
:class="flexSpecs"
filter
option-label="name"
:placeholder="$t('courseSelection.courseDropDown')"
@@ -87,16 +84,17 @@ async function getModules() {
<Dropdown
v-model="selectedSemester"
:options="semesters"
class="flex-1 m-0"
:class="flexSpecs"
option-label="name"
:placeholder="$t('courseSelection.semesterDropDown')"
@change="getModules()"
></Dropdown>
</div>
</template>
<template #content>
<ModuleSelection
:modules="modules"
:selected-course="selectedCourse.name"
class="lg:w-8"
/>
</div>
</template>
</DynamicPage>
</template>

View File

@@ -0,0 +1,79 @@
<script lang="ts" setup>
import { computed, useSlots } from "vue";
defineProps<{
hideContent: boolean;
headline: string;
subTitle?: string;
icon?: string;
button?: {
label: string;
icon: string;
disabled: boolean;
onClick: () => void;
};
}>();
const slots = useSlots();
const hasSlot = (name: string) => {
return !!slots[name];
};
const hasContent = computed(() => {
return hasSlot("content");
});
</script>
<template>
<div class="flex flex-column align-items-center mt-0">
<div
class="flex align-items-center justify-content-center gap-3 mx-2 mb-4 transition-rolldown"
:class="{ 'md:mt-8': hideContent }"
>
<h3 class="text-4xl">
{{ headline }}
</h3>
<i v-if="icon" :class="icon" style="font-size: 2rem"></i>
</div>
<div v-if="subTitle" class="flex justify-content-center">
<h5 class="text-2xl m-2">{{ subTitle }}</h5>
</div>
<div class="flex flex-wrap mx-0 gap-2 my-4 w-full lg:w-8">
<slot name="selection" flex-specs="flex-1 m-0"></slot>
</div>
<div
v-if="button"
class="flex flex-wrap m-0 mb-3 gap-2 w-full lg:w-8 align-items-center justify-content-end"
>
<Button
:disabled="button.disabled"
class="col-12 md:col-4"
:icon="button.icon"
:label="button.label"
@click="button.onClick()"
/>
</div>
<div
v-if="hasContent"
:class="[
hideContent
? ['opacity-0', 'pointer-events-none', 'h-1rem', 'overflow-hidden']
: [
'opacity-100',
'transition-all',
'transition-duration-500',
'transition-ease-in-out',
],
'w-full',
'lg:w-8',
]"
>
<slot name="content"></slot>
</div>
</div>
</template>
<style scoped>
.transition-rolldown {
transition: margin-top 0.5s ease-in-out;
}
</style>

View File

@@ -7,6 +7,7 @@ import router from "../router";
import tokenStore from "../store/tokenStore";
import { useToast } from "primevue/usetoast";
import { useI18n } from "vue-i18n";
import DynamicPage from "./DynamicPage.vue";
const { t } = useI18n({ useScope: "global" });
const toast = useToast();
@@ -14,10 +15,14 @@ const toast = useToast();
const token: Ref<string> = ref("");
const modules: Ref<Map<string, Module>> = ref(moduleStore().modules);
function extractToken(token: string): string {
const tokenRegex = /^[a-z0-9]{15}$/;
const tokenUriRegex = /[?&]token=([a-z0-9]{15})(?:&|$)/;
const tokenRegex = /^[a-z0-9]{15}$/;
const tokenUriRegex = /[?&]token=([a-z0-9]{15})(?:&|$)/;
const isToken = (token: string): boolean => {
return tokenRegex.test(token) || tokenUriRegex.test(token);
};
function extractToken(token: string): string {
if (tokenRegex.test(token)) {
return token;
}
@@ -66,43 +71,28 @@ function loadCalendar(): void {
</script>
<template>
<div class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out md:mt-8 mb-7">
<div class="flex align-items-center justify-content-center gap-2 mx-2">
<h3 class="text-4xl">
{{ $t("editCalendarView.headline") }}
</h3>
<i
class="pi pi-pencil"
style="font-size: 2rem"
></i>
</div>
<div
class="flex justify-content-center"
>
<p class="text-2xl m-2">{{ $t("editCalendarView.subTitle") }}</p>
</div>
<div
class="flex align-items-center justify-content-center m-4 w-full lg:w-8"
<DynamicPage
hide-content
:headline="$t('editCalendarView.headline')"
:sub-title="$t('editCalendarView.subTitle')"
icon="pi pi-pencil"
:button="{
label: $t('editCalendarView.loadCalendar'),
icon: 'pi pi-arrow-down',
disabled: !isToken(token),
onClick: loadCalendar,
}"
>
<template #selection="{ flexSpecs }">
<InputText
v-model="token"
type="text"
class="w-full"
:class="flexSpecs"
autofocus
@keyup.enter="loadCalendar"
/>
</div>
<div
class="flex align-items-center justify-content-end m-2 w-full lg:w-8"
>
<Button
:label="$t('editCalendarView.loadCalendar')"
icon="pi pi-arrow-down"
class="col-12 md:col-4 mb-3 align-self-end"
@click="loadCalendar"
/>
</div>
</div>
</template>
</DynamicPage>
</template>
<style scoped></style>

View File

@@ -1,6 +1,7 @@
<script lang="ts" setup>
import { Ref, ref } from "vue";
import { fetchRoom } from "../api/fetchRoom.ts";
import DynamicPage from "./DynamicPage.vue";
import RoomOccupation from "../components/RoomOccupation.vue";
const rooms = async () => {
@@ -19,27 +20,13 @@ rooms().then(
</script>
<template>
<div
class="flex flex-column align-items-center transition-all transition-duration-500 transition-ease-in-out mt-0"
:class="{'md:mt-8': selectedRoom.name === ''}"
>
<div class="flex align-items-center justify-content-center gap-2 mx-2">
<h3 class="text-4xl">
{{ $t("roomFinderPage.headline") }}
</h3>
<i
class="pi pi-search"
style="font-size: 2rem"
></i>
</div>
<div
class="flex justify-content-center"
>
<h5 class="text-2xl m-2">{{ $t("roomFinderPage.detail") }}</h5>
</div>
<div
class="flex flex-wrap mx-0 gap-2 my-4 w-full lg:w-8"
<DynamicPage
:hide-content="selectedRoom.name === ''"
:headline="$t('roomFinderPage.headline')"
:sub-title="$t('roomFinderPage.detail')"
icon="pi pi-search"
>
<template #selection>
<Dropdown
v-model="selectedRoom"
:options="roomsList"
@@ -50,18 +37,9 @@ rooms().then(
:empty-message="$t('roomFinderPage.noRoomsAvailable')"
:auto-filter-focus="true"
/>
</div>
<div
:class="
[selectedRoom.name === ''?
['opacity-0', 'pointer-events-none', 'h-1rem', 'overflow-hidden'] :
['opacity-100', 'transition-all', 'transition-duration-500', 'transition-ease-in-out']
,
'w-full', 'lg:w-8']"
>
<RoomOccupation
:room="selectedRoom.name"
/>
</div>
</div>
</template>
<template #content>
<RoomOccupation :room="selectedRoom.name" />
</template>
</DynamicPage>
</template>

View File

@@ -0,0 +1,36 @@
<script lang="ts" setup>
import { defineAsyncComponent } from "vue";
import moduleStore from "../../store/moduleStore";
import router from "../../router";
const store = moduleStore();
const AdditionalModuleTable = defineAsyncComponent(
() => import("../../components/AdditionalModuleTable.vue"),
);
async function nextStep() {
await router.push("/edit-calendar");
}
</script>
<template>
<div class="flex flex-column align-items-center w-full mb-7">
<div class="flex align-items-center justify-content-center m-2">
<h3>
{{ $t("additionalModules.subTitle") }}
</h3>
</div>
<AdditionalModuleTable />
<div
class="flex align-items-center justify-content-end h-4rem m-2 w-full lg:w-10"
>
<Button
:disabled="store.isEmpty()"
class="col-12 md:col-4 mb-3 align-self-end"
icon="pi pi-arrow-right"
:label="$t('additionalModules.nextStep')"
@click="nextStep()"
/>
</div>
</div>
</template>

View File

@@ -1,13 +1,13 @@
<script lang="ts" setup>
import { computed, inject, Ref, ref } from "vue";
import { Module } from "../../model/module.ts";
import { Module } from "@/model/module.ts";
import moduleStore from "../../store/moduleStore";
import { fetchAllModules } from "../../api/fetchCourse.ts";
import {deleteIndividualFeed, saveIndividualFeed} from "../../api/createFeed.ts";
import { fetchAllModules } from "@/api/fetchCourse.ts";
import { deleteIndividualFeed, saveIndividualFeed } from "@/api/createFeed.ts";
import tokenStore from "../../store/tokenStore";
import router from "../../router";
import ModuleTemplateDialog from "../ModuleTemplateDialog.vue";
import { onlyWhitespace } from "../../helpers/strings.ts";
import router from "@/router";
import ModuleTemplateDialog from "../../components/ModuleTemplateDialog.vue";
import { onlyWhitespace } from "@/helpers/strings.ts";
import { useI18n } from "vue-i18n";
import { useToast } from "primevue/usetoast";
const { t } = useI18n({ useScope: "global" });
@@ -15,6 +15,13 @@ const { t } = useI18n({ useScope: "global" });
const toast = useToast();
const visible = ref(false);
defineProps({
class: {
type: String,
default: "",
},
});
const store = moduleStore();
const tableData = computed(() =>
@@ -61,25 +68,23 @@ async function deleteFeed() {
() => {
toast.add({
severity: "success",
summary: t('editCalendarView.toast.success'),
detail: t('editCalendarView.toast.successDetail'),
summary: t("editCalendarView.toast.success"),
detail: t("editCalendarView.toast.successDetail"),
life: 3000,
});
visible.value = false;
router.push("/");
},
() => {
toast.add({
severity: "error",
summary: t('editCalendarView.toast.error'),
detail: t('editCalendarView.toast.errorDetail'),
summary: t("editCalendarView.toast.error"),
detail: t("editCalendarView.toast.errorDetail"),
life: 3000,
});
},
);
}
</script>
<template>
@@ -89,9 +94,7 @@ async function deleteFeed() {
<ModuleTemplateDialog />
</div>
<div class="w-full lg:w-8 flex flex-column">
<div
class="card flex align-items-center justify-content-center my-2"
>
<div class="card flex align-items-center justify-content-center my-2">
<DataTable
:value="tableData"
edit-mode="cell"
@@ -112,7 +115,9 @@ async function deleteFeed() {
)
"
@update:model-value="
tableData.forEach((module) => (module.Module.reminder = $event))
tableData.forEach(
(module) => (module.Module.reminder = $event),
)
"
/>
</div>
@@ -171,7 +176,7 @@ async function deleteFeed() {
</template>
</template>
</Column>
<Column>
<Column field="module">
<template #body="{ data }">
<Button
icon="pi pi-trash"
@@ -188,9 +193,30 @@ async function deleteFeed() {
<div
class="flex flex-column sm:flex-row flex-wrap justify-content-between gap-2 w-full"
>
<Button type="button" severity="danger" outlined @click="visible = true" icon="pi pi-trash" :label="$t('editCalendarView.delete')"/>
<Button type="button" severity="info" outlined @click="router.push('edit-additional-modules')" icon="pi pi-plus" :label="$t('editCalendarView.addModules')"/>
<Button type="button" severity="success" outlined @click="finalStep()" icon="pi pi-save" :label="$t('editCalendarView.save')"/>
<Button
type="button"
severity="danger"
outlined
icon="pi pi-trash"
:label="$t('editCalendarView.delete')"
@click="visible = true"
/>
<Button
type="button"
severity="info"
outlined
icon="pi pi-plus"
:label="$t('editCalendarView.addModules')"
@click="router.push('edit-additional-modules')"
/>
<Button
type="button"
severity="success"
outlined
icon="pi pi-save"
:label="$t('editCalendarView.save')"
@click="finalStep()"
/>
</div>
</template>
</DataTable>
@@ -198,15 +224,31 @@ async function deleteFeed() {
</div>
</div>
<div class="card flex justify-content-center">
<Dialog v-model:visible="visible" modal header="Header" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }">
<Dialog
v-model:visible="visible"
modal
header="Header"
:style="{ width: '50rem' }"
:breakpoints="{ '1199px': '75vw', '575px': '90vw' }"
>
<template #header>
<div class="inline-flex align-items-center justify-content-center gap-2">
<span class="font-bold white-space-nowrap">{{ $t('editCalendarView.dialog.headline') }}</span>
<div
class="inline-flex align-items-center justify-content-center gap-2"
>
<span class="font-bold white-space-nowrap">{{
$t("editCalendarView.dialog.headline")
}}</span>
</div>
</template>
<p class="m-0">{{ $t('editCalendarView.dialog.subTitle') }}</p>
<p class="m-0">{{ $t("editCalendarView.dialog.subTitle") }}</p>
<template #footer>
<Button :label="$t('editCalendarView.dialog.delete')" severity="danger" icon="pi pi-trash" @click="deleteFeed()" autofocus />
<Button
:label="$t('editCalendarView.dialog.delete')"
severity="danger"
icon="pi pi-trash"
autofocus
@click="deleteFeed()"
/>
</template>
</Dialog>
</div>

View File

@@ -18,10 +18,10 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true
},
"allowSyntheticDefaultImports": true,
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [

6
package-lock.json generated Normal file
View File

@@ -0,0 +1,6 @@
{
"name": "htwkalender",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

View File

@@ -1,37 +1,34 @@
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/proxy_access.log;
error_log /var/log/nginx/proxy_error.log;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 180s;
send_timeout 180s;
#gzip on;
map $request_method $cache_bypass {
default 0;
POST 1;
}
proxy_cache_path /dev/shm levels=1:2 keys_zone=mcache:16m inactive=600s max_size=512m;
proxy_cache_methods GET HEAD;
proxy_cache_min_uses 1;
proxy_cache_key "$request_method$host$request_uri";
proxy_cache_use_stale timeout updating;
proxy_ignore_headers Cache-Control Expires Set-Cookie;
server {
listen 80;
@@ -46,6 +43,24 @@ http {
send_timeout 600s;
}
# Cache only specific URI
location /api/modules {
proxy_pass http://htwkalender-backend:8090;
client_max_body_size 20m;
proxy_connect_timeout 600s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
proxy_cache_bypass 0;
proxy_no_cache 0;
proxy_cache mcache; # mcache=RAM
proxy_cache_valid 200 301 302 30m;
proxy_cache_valid 403 404 5m;
proxy_cache_lock on;
proxy_cache_use_stale timeout updating;
add_header X-Proxy-Cache $upstream_cache_status;
}
location /_ {
proxy_pass http://htwkalender-backend:8090;
}