Skip to content

Commit

Permalink
chore: Removed user-dashboaord code
Browse files Browse the repository at this point in the history
  • Loading branch information
Knoblauchpilze committed Jan 8, 2025
1 parent c854351 commit d84a7e3
Show file tree
Hide file tree
Showing 42 changed files with 3 additions and 5,774 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ updates:
- package-ecosystem: "npm"
directories:
- "/frontend/galactic-sovereign-frontend"
- "/frontend/user-dashboard"
schedule:
interval: "weekly"
open-pull-requests-limit: 20
Expand Down
32 changes: 1 addition & 31 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- "pkg/**"
- "internal/**"
- "cmd/**"
- "frontend/user-dashboard/**"
- "frontend/galactic-sovereign-frontend/**"

# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs#example-only-cancel-in-progress-jobs-on-specific-branches
Expand All @@ -25,7 +24,6 @@ jobs:
outputs:
ci: ${{ steps.filter.outputs.ci }}
galactic-sovereign-service: ${{ steps.filter.outputs.galactic-sovereign-service }}
user-dashboard: ${{ steps.filter.outputs.user-dashboard }}
galactic-sovereign-frontend: ${{ steps.filter.outputs.galactic-sovereign-frontend }}
steps:
- uses: actions/checkout@v4
Expand All @@ -43,10 +41,6 @@ jobs:
- 'cmd/galactic-sovereign/**'
- '.github/workflows/galactic-sovereign-service**'
- 'build/galactic-sovereign-service/Dockerfile'
user-dashboard:
- 'frontend/user-dashboard/**'
- '.github/workflows/user-dashboard**'
- 'build/user-dashboard/Dockerfile'
galactic-sovereign-frontend:
- 'frontend/galactic-sovereign-frontend/**'
- '.github/workflows/galactic-sovereign-frontend-build-and-push.yml'
Expand All @@ -56,17 +50,12 @@ jobs:
needs: [detect-code-changes]
outputs:
galactic-sovereign-service: ${{ steps.galactic-sovereign-service.outputs.rebuild }}
user-dashboard: ${{ steps.user-dashboard.outputs.rebuild }}
galactic-sovereign-frontend: ${{ steps.galactic-sovereign-frontend.outputs.rebuild }}
steps:
- name: Determine galactic-sovereign-service rebuild status
id: galactic-sovereign-service
run: |
echo 'rebuild=${{ needs.detect-code-changes.outputs.galactic-sovereign-service == 'true' || needs.detect-code-changes.outputs.ci == 'true' }}' >> $GITHUB_OUTPUT
- name: Determine user-dashboard rebuild status
id: user-dashboard
run: |
echo 'rebuild=${{ needs.detect-code-changes.outputs.user-dashboard == 'true' || needs.detect-code-changes.outputs.ci == 'true' }}' >> $GITHUB_OUTPUT
- name: Determine galactic-sovereign-frontend rebuild status
id: galactic-sovereign-frontend
run: |
Expand All @@ -80,7 +69,7 @@ jobs:
- name: Detect if service tags should be persisted
id: persist-tags
run: |
echo 'persist=${{ (github.ref == 'refs/heads/master') && (needs.analyze-code-changes.outputs.galactic-sovereign-service == 'true' || needs.analyze-code-changes.outputs.user-dashboard == 'true' || needs.analyze-code-changes.outputs.galactic-sovereign-frontend == 'true') }}' >> $GITHUB_OUTPUT
echo 'persist=${{ (github.ref == 'refs/heads/master') && (needs.analyze-code-changes.outputs.galactic-sovereign-service == 'true' || needs.analyze-code-changes.outputs.galactic-sovereign-frontend == 'true') }}' >> $GITHUB_OUTPUT
extract-service-tag:
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
Expand Down Expand Up @@ -109,15 +98,6 @@ jobs:
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

build-user-dashboard:
needs: [analyze-code-changes, extract-service-tag]
if: ${{ needs.analyze-code-changes.outputs.user-dashboard == 'true' }}
uses: ./.github/workflows/user-dashboard-build-and-push.yml
with:
service-tag: ${{ needs.extract-service-tag.outputs.version }}
secrets:
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
build-galactic-sovereign-frontend:
needs: [analyze-code-changes, extract-service-tag]
if: ${{ needs.analyze-code-changes.outputs.galactic-sovereign-frontend == 'true' }}
Expand All @@ -135,7 +115,6 @@ jobs:
analyze-code-changes,
analyze-persist-tags-status,
build-galactic-sovereign-service,
build-user-dashboard,
build-galactic-sovereign-frontend,
extract-service-tag,
]
Expand All @@ -157,10 +136,6 @@ jobs:
if: ${{ needs.analyze-code-changes.outputs.galactic-sovereign-service == 'true' }}
run: |
echo "${{ needs.extract-service-tag.outputs.version }}" > ./build/galactic-sovereign-service/version.txt
- name: Save user-dashboard tag
if: ${{ needs.analyze-code-changes.outputs.user-dashboard == 'true' }}
run: |
echo "${{ needs.extract-service-tag.outputs.version }}" > ./build/user-dashboard/version.txt
- name: Save galactic-sovereign-frontend tag
if: ${{ needs.analyze-code-changes.outputs.galactic-sovereign-frontend == 'true' }}
run: |
Expand All @@ -179,7 +154,6 @@ jobs:
[
analyze-code-changes,
build-galactic-sovereign-service,
build-user-dashboard,
build-galactic-sovereign-frontend,
persist-service-tags,
extract-service-tag,
Expand All @@ -194,10 +168,6 @@ jobs:
if: ${{ needs.analyze-code-changes.outputs.galactic-sovereign-service == 'true' }}
run: |
echo "Tag is now ${{ needs.extract-service-tag.outputs.version }}"
- name: user-dashboard tag
if: ${{ needs.analyze-code-changes.outputs.user-dashboard == 'true' }}
run: |
echo "Tag is now ${{ needs.extract-service-tag.outputs.version }}"
- name: galactic-sovereign-frontend tag
if: ${{ needs.analyze-code-changes.outputs.galactic-sovereign-frontend == 'true' }}
run: |
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/user-dashboard-build-and-push.yml

This file was deleted.

10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ galactic-sovereign-service-build:
-f build/galactic-sovereign-service/Dockerfile \
.

user-dashboard-build:
docker build \
--build-arg GIT_COMMIT_HASH=${GIT_COMMIT_HASH} \
--build-arg SERVER_ORIGIN=${SERVER_ORIGIN} \
--build-arg NODE_PORT=${NODE_PORT} \
--build-arg API_BASE_URL=${USER_API_BASE_URL} \
--tag totocorpsoftwareinc/user-dashboard:${GIT_COMMIT_HASH} \
-f build/user-dashboard/Dockerfile \
.

galactic-sovereign-frontend-build:
docker build \
--build-arg GIT_COMMIT_HASH=${GIT_COMMIT_HASH} \
Expand Down
4 changes: 2 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To start the website locally, the [installation instructions](https://kit.svelte
npm run dev -- --open
```

Alternatively a [Makefile](user-dashboard/Makefile) is provided with a `make dev` target.
Alternatively a [Makefile](galactic-sovereign-frontend-dashboard/Makefile) is provided with a `make dev` target.

This usecase is interesting when developing a new feature: svelte handles a local server and opens a tab in the browser to present the website as it will look like for users.

Expand Down Expand Up @@ -58,7 +58,7 @@ ORIGIN=http://localhost:3000 node /path/to/the/build/folder

The first part corresponds to the problem described in this [SO post](https://stackoverflow.com/questions/73790956/cross-site-post-form-submissions-are-forbidden). With this, the website can be accessed locally on the browser by going to `http://localhost:3000/dashboard/login`.

For convenience, the [Makefile](user-dashboard/Makefile) defines a `build` target to handle the build. Most likely though it is better to use the root [Makefile](/Makefile) and build the docker images for the user dashboard: this handles everything and allows to predictably setup the associated web server.
For convenience, the [Makefile](galactic-sovereign-frontend/Makefile) defines a `build` target to handle the build. Most likely though it is better to use the root [Makefile](/Makefile) and build the docker images for the user dashboard: this handles everything and allows to predictably setup the associated web server.

# The website

Expand Down
1 change: 0 additions & 1 deletion frontend/user-dashboard/.env-example.local

This file was deleted.

10 changes: 0 additions & 10 deletions frontend/user-dashboard/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion frontend/user-dashboard/.npmrc

This file was deleted.

12 changes: 0 additions & 12 deletions frontend/user-dashboard/.prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions frontend/user-dashboard/.prettierrc

This file was deleted.

15 changes: 0 additions & 15 deletions frontend/user-dashboard/Makefile

This file was deleted.

34 changes: 0 additions & 34 deletions frontend/user-dashboard/eslint.config.js

This file was deleted.

Loading

0 comments on commit d84a7e3

Please sign in to comment.