Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP2381-Versioning-Dashboard #51

Open
wants to merge 139 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
0d9569f
init dashboard
naueramant Jun 10, 2024
fa09806
added some files to build further project on top of that
chopachop Jun 24, 2024
8ef93b2
added table row component, small adjustments in different files
chopachop Jun 26, 2024
cbc036b
improved project structure, installed vitest
chopachop Jun 26, 2024
e637137
added files for mocked data
chopachop Jun 26, 2024
df34edc
changed logo to parrot one. Updated gitignore
chopachop Jun 27, 2024
493a0e2
projects overview + small improvements, fixes in different places
chopachop Jul 1, 2024
8a15ac4
PR comments fixes
chopachop Jul 2, 2024
b455b99
some more fixed according to the fixes
chopachop Jul 2, 2024
3c2e1dc
more
chopachop Jul 2, 2024
880fd00
Merge branch 'initial-setup' into MP-2439-Frontend-Projects-overview
chopachop Jul 2, 2024
6f6264c
added editor config file
chopachop Jul 3, 2024
96972ce
Merge pull request #49 from UNIwise/initial-setup
chopachop Jul 3, 2024
f044199
Merge branch 'feature/MP-2381-versioning-dashboard' into MP-2439-Fron…
chopachop Jul 3, 2024
b045ada
prettier + small changes
chopachop Jul 3, 2024
6a73b32
alligned all exports in the components
chopachop Jul 3, 2024
1442e01
made "Table" component a ProjectsOverview view since it contains all …
chopachop Jul 3, 2024
881658a
removed Overview word from ProjectsOverview and VersionsOverview folders
chopachop Jul 3, 2024
0454253
replaced Orders with Projects in App view
chopachop Jul 3, 2024
a523606
implemented mocked axios environment
chopachop Jul 3, 2024
be4e75c
Merge pull request #50 from UNIwise/MP-2439-Frontend-Projects-overview
chopachop Jul 3, 2024
f7c3fd1
prettier
chopachop Jul 4, 2024
95b044a
fixed routing problems, moved some components to global components fo…
chopachop Jul 5, 2024
0b56d50
layout adjustments
chopachop Jul 8, 2024
fc8fd7f
removed unnecessary lines of code and authorization file. Added axios…
chopachop Jul 8, 2024
2c257b5
saving
chopachop Jul 9, 2024
e5de9b3
moved CssVarsProvider, CssBaseline and 2 Boxes to the main.tsx. Delet…
chopachop Jul 9, 2024
f1fc22c
pr coments fixes
chopachop Jul 9, 2024
2c04d11
saving
chopachop Jul 10, 2024
a23c7f5
made corrections to the useEffect in Projects overview
chopachop Jul 10, 2024
439fc03
Merge pull request #52 from UNIwise/MP-2459-Axios-client-Mocked-mode
chopachop Jul 10, 2024
34c20e8
Merge branch 'feature/MP-2381-versioning-dashboard' into MP-2460-API-…
chopachop Jul 10, 2024
aaf1579
added registerAuthorizationInterceptor
chopachop Jul 10, 2024
6cadf37
added useGetProjects hook and made it work with the mocked env
chopachop Jul 11, 2024
76713eb
Merge branch 'feature/MP-2381-versioning-dashboard' into MP-2440-Fron…
chopachop Jul 11, 2024
1cfcef2
deleted missed authorization functionality from axios setup
chopachop Jul 11, 2024
4af12c1
Merge pull request #53 from UNIwise/MP-2440-Frontend-Version-overview
chopachop Jul 11, 2024
10f4347
Merge branch 'feature/MP-2381-versioning-dashboard' into MP-2460-API-…
chopachop Jul 11, 2024
a181736
deleted commented code, added reactQueryProvider to the root, added i…
chopachop Jul 11, 2024
925dc7b
fixed typo
chopachop Jul 11, 2024
2b91138
added more hooks and mocks
chopachop Jul 12, 2024
2b5338a
added type to mocked post data in usePostRequest
chopachop Jul 12, 2024
2ce2faf
styling changes
chopachop Jul 12, 2024
13a1b26
Merge branch 'feature/MP-2381-versioning-dashboard' into MP-2471-pagi…
chopachop Jul 12, 2024
d93b092
deleted copy of the pagination sections
chopachop Jul 12, 2024
8569c4f
Merge branch 'MP-2460-API-Projects-Hooks-and-mocks' into MP-2471-pagi…
chopachop Jul 12, 2024
4bfcfc8
added pagination functionality. Added more mocked projects
chopachop Jul 13, 2024
c18bc95
added vitest/ui, react testing library, jsdom, node types
chopachop Jul 14, 2024
5bb97fd
Added delete and add new version modal. Adjusted hooks, small make up…
chopachop Jul 14, 2024
ff911fd
Merge pull request #56 from UNIwise/feature/MP-2463-Setup-vitest
chopachop Jul 22, 2024
8d73175
Merge branch 'feature/MP-2381-versioning-dashboard' into MP-2460-API-…
chopachop Jul 22, 2024
bf4bb6e
added ProjectTableRow component
chopachop Jul 22, 2024
9810723
added VersionTableRow component
chopachop Jul 22, 2024
e4b9b61
deleted comment
chopachop Jul 22, 2024
c679cac
Merge pull request #54 from UNIwise/MP-2460-API-Projects-Hooks-and-mocks
chopachop Jul 22, 2024
5460dce
Merge branch 'feature/MP-2381-versioning-dashboard' into MP-2471-pagi…
chopachop Jul 22, 2024
bcf04d6
deleted todo comment
chopachop Jul 22, 2024
7542f30
deleted one more comment
chopachop Jul 22, 2024
9c50461
Merge branch 'feature/MP-2381-versioning-dashboard' into feature/dele…
chopachop Jul 22, 2024
327efc5
updated row components
chopachop Jul 22, 2024
beef94c
pr comments fixes
chopachop Jul 23, 2024
6744ddb
changed react.fc to FC
chopachop Jul 23, 2024
effa071
Merge pull request #55 from UNIwise/MP-2471-pagination-section-component
chopachop Jul 24, 2024
4a272b5
Merge branch 'feature/MP-2381-versioning-dashboard' into feature/dele…
chopachop Jul 24, 2024
e7d971a
changed interfaces for types. Moved generatePageNumbers to separate f…
chopachop Jul 25, 2024
6ee997a
added loading placeholder component and loading handlers in projects …
chopachop Jul 25, 2024
dae26de
alligned loading name
chopachop Jul 25, 2024
8408a5b
review stuff
naueramant Jul 25, 2024
126210e
Merge pull request #57 from UNIwise/feature/delete-and-add-version-modal
chopachop Jul 29, 2024
46947be
saving changes before pull
chopachop Jul 29, 2024
8593576
Merge branch 'feature/MP-2381-versioning-dashboard' into feature/MP-2…
chopachop Jul 29, 2024
047cf18
small styling adjustments
chopachop Jul 30, 2024
6e42a69
moved sass to dev dependencies
chopachop Jul 30, 2024
33fa839
changed color on the button
chopachop Jul 30, 2024
5dfca89
small adjustments all over the components
chopachop Jul 30, 2024
aab9c0b
Merge pull request #58 from UNIwise/feature/MP-2539-Add-skeleton-loading
chopachop Jul 31, 2024
69266dc
styling alignments, secret functionality
chopachop Aug 1, 2024
dbfa0d7
more styling adjustments
chopachop Aug 1, 2024
c9f5108
fixed overflowing text in the table
chopachop Aug 5, 2024
537cb51
[MP-2385] initial S3 setup
Aug 15, 2024
615ae27
[MP-2385] S3 storage
Aug 18, 2024
795205f
Merge pull request #59 from UNIwise/feature/MP2381/MP-2385-S3-storage
IslamMonjid Aug 19, 2024
a3029ac
chore: Update styling and dependencies. fixed wrong title in the dele…
chopachop Aug 19, 2024
25531fd
prettified the code
chopachop Aug 19, 2024
d89620b
deleted all React. appearances
chopachop Aug 19, 2024
7720788
[MP-2565] add support for mysql
Aug 19, 2024
4ed3198
fix failing build
Aug 20, 2024
2ee7481
deleted unnecessary code from query client setup
chopachop Aug 20, 2024
6eb7cb5
Merge pull request #61 from UNIwise/feature/MP-2381/MP-2386/MP-2565-a…
IslamMonjid Aug 20, 2024
65a83b6
[MP-2560] get all projects endpoint
Aug 21, 2024
e47c0ac
Merge pull request #62 from UNIwise/feature/MP-2386/MP-2560-get-all-p…
IslamMonjid Aug 22, 2024
62bdb1a
[MP-2561] get project by id endpoint
Aug 22, 2024
ea3fb66
small bug fixes all over the place. deleted env.ts file due to it's r…
chopachop Aug 22, 2024
c921a98
updated readme.md and deleted commands for testing from the package.json
chopachop Aug 22, 2024
064e6cc
prettier + moved event.preventDefault() to the top of the submit …
chopachop Aug 22, 2024
8f871b5
[MP-2562] get project versions endpoint
Aug 22, 2024
09e668a
PR changes
Aug 22, 2024
f28f1ee
Merge pull request #63 from UNIwise/feature/MP-2386/MP-2561-get-proje…
IslamMonjid Aug 25, 2024
f03a3e1
[MP-2564] delete project version endpoint
Aug 25, 2024
3f59fe4
PR changes
Aug 26, 2024
0b37149
Merge pull request #64 from UNIwise/feature/MP-2381/MP-2564-delete-pr…
IslamMonjid Aug 26, 2024
54379fe
[MP-2563] create project version endpoint
Aug 26, 2024
fa4179f
PR changes
Aug 27, 2024
59b94aa
PR changes
Aug 27, 2024
53a77c3
Merge pull request #65 from UNIwise/feature/MP-2386/MP-2563-create-pr…
IslamMonjid Aug 27, 2024
54b355d
[MP-2569] remove mysql and depend on s3 only
Aug 28, 2024
b3b4fc3
Merge pull request #66 from UNIwise/feature/MP-2381/MP-2569-remove-my…
IslamMonjid Aug 29, 2024
c73dd9c
Save all file formats to S3
Sep 1, 2024
e516a1a
Merge branch 'feature/MP-2381-POEditor-cache-versioning' into feature…
chopachop Sep 2, 2024
f618a14
support version query param in language endpoint
Sep 2, 2024
2cb36b1
[MP-2538] extend existing language endpoint to support version query …
Sep 3, 2024
afd7930
PR changes
Sep 3, 2024
d5eab55
Merge pull request #67 from UNIwise/feature/MP-2381/MP-2538-extend-ex…
IslamMonjid Sep 3, 2024
cc339e7
[MP-2386] update api docs
Sep 5, 2024
0d7309e
[MP-2386] update api docs
Sep 5, 2024
2842cde
Merge pull request #68 from UNIwise/feature/MP-2381/MP-2386-update-ap…
IslamMonjid Sep 5, 2024
1adbbf9
fixes from PR comments
chopachop Sep 23, 2024
26c5e77
PR changes
Sep 23, 2024
79fd941
PR changes
Sep 23, 2024
a7cfa9d
PR changes
Sep 24, 2024
b2b44b7
Merge pull request #69 from UNIwise/feature/MP-2381-POEditor-cache-ve…
IslamMonjid Sep 30, 2024
39643d6
update CI
naueramant Oct 14, 2024
bc88c8f
add dockerfile
naueramant Oct 14, 2024
7de91c4
backend fixes
naueramant Oct 14, 2024
07f4b5e
fix validator
naueramant Oct 14, 2024
323829b
remove XLIFF extinsions
Oct 14, 2024
4917c7a
validator updated
naueramant Oct 14, 2024
6c5fa72
frontend header updates
naueramant Oct 14, 2024
bf1ad01
remove XLIFF extension
Oct 14, 2024
773eefb
Check if version already exist in S3
Oct 15, 2024
575c434
frontend fixed
naueramant Oct 15, 2024
87d3d60
backend download worker pool + streaming to storage
naueramant Oct 15, 2024
d31339f
clean up logging
naueramant Oct 15, 2024
fa60d56
add some warnings
naueramant Oct 15, 2024
cef9629
remove some warnings
naueramant Oct 15, 2024
d1f15a2
update CI
naueramant Oct 15, 2024
608c2f9
fix linting
naueramant Oct 15, 2024
34c079e
fix lint
naueramant Oct 15, 2024
b35c8d5
fix unit tests
Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
*

# Backend
!internal
!cmd
!pkg
!main.go
!go.mod
!go.sum
!LICENSE

# Dashboard
!dashboard/*
dashboard/node_modules

# Other
!LICENSE
!docker/*
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[COMMIT_EDITMSG]
max_line_length = 0
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ SERVER_PORT=9000

LOG_LEVEL: debug
LOG_FORMAT: text

AWS_REGION=eu-west-1
AWS_BUCKET_NAME=my-bucket
111 changes: 97 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,122 @@
name: CI

permissions:
contents: read
pull-requests: read

on:
workflow_dispatch: {}
pull_request: {}
release:
types: [published]
push:
branches: [master]
pull_request:
branches: [master]
branches:
- master
- develop
- release/*
- feature/*
- hotfix/*

jobs:
test:
runs-on: self-hosted
runs-on: default
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.23

- name: Cache Go Modules
uses: actions/cache@v3
with:
go-version: 1.19
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-

- name: Test
run: go test -v ./...

lint:
name: lint
runs-on: self-hosted
runs-on: default
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.23

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v6
with:
version: latest
github-token: ${{secrets.GITHUB_TOKEN}}
only-new-issues: true

build:
name: Build 🏗
runs-on: default
needs: [lint, test]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-build
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Generate Docker Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ inputs.image_name }}
tags: |
# Raw sha of the commit
type=raw,value={{sha}}

# Branch name with and without the sha suffix
type=raw,value={{branch}},enable=${{ github.event_name == 'push' }}
type=raw,value={{branch}}-{{sha}},enable=${{ github.event_name == 'push' }}

# Branch name with and without the sha suffix and unix timestamp milliseconds
type=raw,value={{branch}}-{{date 'x'}},enable=${{ github.event_name == 'push' }}
type=raw,value={{branch}}-{{sha}}-{{date 'x'}},enable=${{ github.event_name == 'push' }}

# PR number with and without the sha suffix
type=raw,value=${{github.head_ref}},enable=${{ github.event_name == 'pull_request' }}
type=raw,value=${{github.head_ref}}-{{sha}},enable=${{ github.event_name == 'pull_request' }}

# Release tag
type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
type=raw,value={{tag}},enable=${{ github.event_name == 'release' }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Registry
uses: docker/login-action@v3
with:
registry: docker.wiseflow.io
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_TOKEN }}

- name: Build and Push
uses: docker/build-push-action@v5
with:
provenance: false
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=build
cache-to: type=gha,mode=max,scope=build
platforms: ${{ inputs.platforms }}

- name: Write summary
run: |
echo "# Image tags" >> $GITHUB_STEP_SUMMARY
for tag in ${{ join(fromJSON(steps.meta.outputs.json).tags, ' ') }}
do
echo "- $tag" >> $GITHUB_STEP_SUMMARY
done
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@

.env
.parrot.yaml
.vite/
19 changes: 7 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
linters:
enable-all: true
disable:
- wsl
- gochecknoglobals
- exhaustivestruct
- wrapcheck

# Deprecated
- scopelint
- golint
- maligned
- interfacer
disable: []
run:
tests: false
issues:
exclude-files:
- ".*\\.pb\\.go$"
- ".*\\_mock\\.go$"
1 change: 0 additions & 1 deletion .ship-it

This file was deleted.

45 changes: 28 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
############################
# STEP 1 build base
# Backend build
############################
FROM golang:1.19-alpine3.17 as build-base
RUN apk add --update --no-cache git ca-certificates build-base
FROM golang:1.23-alpine3.20 AS backend-builder
WORKDIR /build
ENV GO111MODULE=on

COPY go.mod .
COPY go.sum .
RUN go mod download -x

COPY . .
RUN GOOS=linux GOARCH=amd64 go build -o /build/bin/parrot main.go

############################
# STEP 2 image base
# Frontend build
############################
FROM alpine:3.17 as image-base
FROM node:20-alpine3.20 AS frotnend-builder
WORKDIR /app
COPY --from=build-base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ENTRYPOINT ["/app/parrot", "serve"]

############################
# STEP 3 build executable
############################
FROM build-base AS builder
COPY . .
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o /build/bin/parrot main.go
RUN npm install -g pnpm

COPY ./dashboard/package.json .
COPY ./dashboard/pnpm-lock.yaml .
RUN pnpm install --frozen-lockfile

COPY ./dashboard /app
RUN pnpm build


############################
# STEP 4 Finalize image
# Finalize image
############################
FROM image-base
FROM nginx:1.27.2-alpine3.20 AS image-base
WORKDIR /
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]

COPY LICENSE .
COPY --from=builder /build/bin/parrot parrot

COPY ./docker/nginx.conf /etc/nginx
COPY ./docker/entrypoint.sh /

COPY --from=backend-builder /build/bin/parrot /usr/local/bin/parrot
COPY --from=frotnend-builder /app/dist /usr/share/nginx/html
39 changes: 0 additions & 39 deletions Jenkinsfile

This file was deleted.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ The server can be configured with a yaml configuration file specified with the `

| key | description | type | default |
| ------------------------------ | ---------------------------------------------------------------------------- | -------- | ---------------------------- |
| server.port | port for the main http server | int | `80` |
| server.port.public | port for the public http server | int | `80` |
| server.port.private | port for the private http server | int | `81` |
| server.gracePeriod | grace period for the http server to shutdown | duration | `10s` |
| log.level | log level | string | `info` |
| log.format | format of the log. Can be "text" or "json" | string | `json` |
Expand All @@ -54,6 +55,9 @@ The server can be configured with a yaml configuration file specified with the `
| prometheus.path | expose prometheus metrics under path | string | `/metrics` |
| prometheus.port | port to expose the prometheus metrics under | int | `9090` |
| api.token | secret token to authenticating against poeditor | string |
| aws.region | AWS Region | string | `eu-west-1` |
| aws.bucket | AWS bucket | string |


# API specification

Expand Down
23 changes: 0 additions & 23 deletions chart/parrot/.helmignore

This file was deleted.

15 changes: 0 additions & 15 deletions chart/parrot/Chart.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions chart/parrot/templates/NOTES.txt

This file was deleted.

Loading
Loading