diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..995498f --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,56 @@ +name: Deploy to Production + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install dependencies + run: | + npm install + cd backend && npm install && cd .. + cd frontend && npm install && cd .. + + - name: Run backend tests + run: | + cd backend + npm test || echo "No tests configured" + + - name: Build frontend + run: | + cd frontend + npm run build + + - name: Deploy to server + env: + SERVER_HOST: ${{ secrets.SERVER_HOST }} + SERVER_USER: ${{ secrets.SERVER_USER }} + SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + run: | + # Setup SSH + mkdir -p ~/.ssh + echo "$SSH_KEY" > ~/.ssh/deploy_key + chmod 600 ~/.ssh/deploy_key + ssh-keyscan -H $SERVER_HOST >> ~/.ssh/known_hosts + + # Deploy + ssh -i ~/.ssh/deploy_key $SERVER_USER@$SERVER_HOST << 'EOF' + cd /var/www/aeroEcho + git pull origin main + npm run install:all + cd frontend && npm run build && cd .. + pm2 restart ecosystem.config.js + EOF diff --git a/frontend/public/icons/a0.svg b/frontend/public/icons/a0.svg new file mode 100644 index 0000000..f67eb7d --- /dev/null +++ b/frontend/public/icons/a0.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/a1.svg b/frontend/public/icons/a1.svg new file mode 100644 index 0000000..776b2dc --- /dev/null +++ b/frontend/public/icons/a1.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/a2.svg b/frontend/public/icons/a2.svg new file mode 100644 index 0000000..1828719 --- /dev/null +++ b/frontend/public/icons/a2.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/a3.svg b/frontend/public/icons/a3.svg new file mode 100644 index 0000000..2cbc82c --- /dev/null +++ b/frontend/public/icons/a3.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/a320.svg b/frontend/public/icons/a320.svg new file mode 100644 index 0000000..766a86c --- /dev/null +++ b/frontend/public/icons/a320.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/a330.svg b/frontend/public/icons/a330.svg new file mode 100644 index 0000000..114f4c7 --- /dev/null +++ b/frontend/public/icons/a330.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/a340.svg b/frontend/public/icons/a340.svg new file mode 100644 index 0000000..7f96427 --- /dev/null +++ b/frontend/public/icons/a340.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/a380.svg b/frontend/public/icons/a380.svg new file mode 100644 index 0000000..82b4577 --- /dev/null +++ b/frontend/public/icons/a380.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/a4.svg b/frontend/public/icons/a4.svg new file mode 100644 index 0000000..a39e6ac --- /dev/null +++ b/frontend/public/icons/a4.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/a5.svg b/frontend/public/icons/a5.svg new file mode 100644 index 0000000..79274c4 --- /dev/null +++ b/frontend/public/icons/a5.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/a6.svg b/frontend/public/icons/a6.svg new file mode 100644 index 0000000..7e3147e --- /dev/null +++ b/frontend/public/icons/a6.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/a7.svg b/frontend/public/icons/a7.svg new file mode 100644 index 0000000..d28ff9c --- /dev/null +++ b/frontend/public/icons/a7.svg @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/b0.svg b/frontend/public/icons/b0.svg new file mode 100644 index 0000000..8fcc674 --- /dev/null +++ b/frontend/public/icons/b0.svg @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/b1.svg b/frontend/public/icons/b1.svg new file mode 100644 index 0000000..b89bd22 --- /dev/null +++ b/frontend/public/icons/b1.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/b2.svg b/frontend/public/icons/b2.svg new file mode 100644 index 0000000..a54d056 --- /dev/null +++ b/frontend/public/icons/b2.svg @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/b3.svg b/frontend/public/icons/b3.svg new file mode 100644 index 0000000..bd649de --- /dev/null +++ b/frontend/public/icons/b3.svg @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/b4.svg b/frontend/public/icons/b4.svg new file mode 100644 index 0000000..7acd70b --- /dev/null +++ b/frontend/public/icons/b4.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/b737.svg b/frontend/public/icons/b737.svg new file mode 100644 index 0000000..2bf1cd6 --- /dev/null +++ b/frontend/public/icons/b737.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/b747.svg b/frontend/public/icons/b747.svg new file mode 100644 index 0000000..2c45fb0 --- /dev/null +++ b/frontend/public/icons/b747.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/b767.svg b/frontend/public/icons/b767.svg new file mode 100644 index 0000000..5a8ebcb --- /dev/null +++ b/frontend/public/icons/b767.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/b777.svg b/frontend/public/icons/b777.svg new file mode 100644 index 0000000..0917327 --- /dev/null +++ b/frontend/public/icons/b777.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/b787.svg b/frontend/public/icons/b787.svg new file mode 100644 index 0000000..e64d930 --- /dev/null +++ b/frontend/public/icons/b787.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/c0.svg b/frontend/public/icons/c0.svg new file mode 100644 index 0000000..2a8aa46 --- /dev/null +++ b/frontend/public/icons/c0.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/c130.svg b/frontend/public/icons/c130.svg new file mode 100644 index 0000000..41594ad --- /dev/null +++ b/frontend/public/icons/c130.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/cessna.svg b/frontend/public/icons/cessna.svg new file mode 100644 index 0000000..587495b --- /dev/null +++ b/frontend/public/icons/cessna.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/frontend/public/icons/crjx.svg b/frontend/public/icons/crjx.svg new file mode 100644 index 0000000..c56b465 --- /dev/null +++ b/frontend/public/icons/crjx.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/default.svg b/frontend/public/icons/default.svg new file mode 100644 index 0000000..f67eb7d --- /dev/null +++ b/frontend/public/icons/default.svg @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/dh8a.svg b/frontend/public/icons/dh8a.svg new file mode 100644 index 0000000..465359b --- /dev/null +++ b/frontend/public/icons/dh8a.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/e195.svg b/frontend/public/icons/e195.svg new file mode 100644 index 0000000..a0bb131 --- /dev/null +++ b/frontend/public/icons/e195.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/erj.svg b/frontend/public/icons/erj.svg new file mode 100644 index 0000000..39fbd7c --- /dev/null +++ b/frontend/public/icons/erj.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/f100.svg b/frontend/public/icons/f100.svg new file mode 100644 index 0000000..61cdf20 --- /dev/null +++ b/frontend/public/icons/f100.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/f11.svg b/frontend/public/icons/f11.svg new file mode 100644 index 0000000..9a48367 --- /dev/null +++ b/frontend/public/icons/f11.svg @@ -0,0 +1,10 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/f15.svg b/frontend/public/icons/f15.svg new file mode 100644 index 0000000..9db46da --- /dev/null +++ b/frontend/public/icons/f15.svg @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/f5.svg b/frontend/public/icons/f5.svg new file mode 100644 index 0000000..fdd9763 --- /dev/null +++ b/frontend/public/icons/f5.svg @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/fa7x.svg b/frontend/public/icons/fa7x.svg new file mode 100644 index 0000000..b2079bc --- /dev/null +++ b/frontend/public/icons/fa7x.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/glf5.svg b/frontend/public/icons/glf5.svg new file mode 100644 index 0000000..75a6519 --- /dev/null +++ b/frontend/public/icons/glf5.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/frontend/public/icons/learjet.svg b/frontend/public/icons/learjet.svg new file mode 100644 index 0000000..1836b0d --- /dev/null +++ b/frontend/public/icons/learjet.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/public/icons/md11.svg b/frontend/public/icons/md11.svg new file mode 100644 index 0000000..ae685e4 --- /dev/null +++ b/frontend/public/icons/md11.svg @@ -0,0 +1,8 @@ + + + \ No newline at end of file diff --git a/frontend/src/views/map/page.jsx b/frontend/src/views/map/page.jsx index 8786ca5..ce2e015 100644 --- a/frontend/src/views/map/page.jsx +++ b/frontend/src/views/map/page.jsx @@ -19,16 +19,40 @@ if (typeof window !== "undefined") { }); } +const getCategoryIcon = (category, heading = 0, size = [25, 25]) => { + console.log(category); + const iconUrl = `/icons/${category || "default"}.svg`; + + // Create a rotated divIcon wrapper for the image + const html = ` +