-
Notifications
You must be signed in to change notification settings - Fork 2
🎨 GUI Refactor: move the GUI to a React/Typescript stack #91
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7641217
🔥 purge: remove old Go code
95414b3
🎉 init: Add resources, types, entry point, basic CI/CD, Docker config
5d38287
🎨 styling: Add components library and application theme
bd0c1c2
⚙️ setup: Add API endpoints and utilities
0d1b87c
✨ feat: Add main page, login page, not found page and placeholder page
13a07a2
✨ feat: Add monitoring pages
eb4ab4e
✨ feat: Add playbook pages (beta)
5b5b112
🐛 feedback: change playbooks, small changes in ci/cd, restore env.exa…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| node_modules | ||
| dist | ||
| .git | ||
| npm-debug.log | ||
| Dockerfile | ||
| .dockerignore | ||
| .git | ||
| .gitignore | ||
| .env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # These variables are used for development environment | ||
| VITE_SOARCA_URI=http://localhost:8080 # for vite each env var must start with VITE_ otherwise it won't be exposed to the client side | ||
| VITE_SOARCA_GUI_DOMAIN=http://localhost | ||
| VITE_PORT="3000" | ||
| VITE_OIDC_ISSUER="https://localhost:9443/application/u/test/" | ||
| VITE_OIDC_CLIENT_ID="SOME_CLIENT_ID" | ||
| VITE_OIDC_CLIENT_SECRET="SOME_CLIENT_SECRET" | ||
| VITE_OIDC_REDIRECT_URL="http://localhost:3000/auth/soarca_gui/callback" | ||
| VITE_COOKIE_SECRET_KEY="SOME_COOKIE_SECRET" #openssl rand -base64 32 or head -c 32 /dev/urandom | base64 | ||
| VITE_OIDC_SKIP_TLS_VERIFY=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1 @@ | ||
| SOARCA_URI: http://localhost:8080 | ||
| SOARCA_GUI_DOMAIN: http://localhost | ||
| GIN_MODE: "release" | ||
| PORT: "8081" | ||
| OIDC_ISSUER: "https://localhost:9443/application/u/test/" | ||
| OIDC_CLIENT_ID: "SOME_CLIENT_ID" | ||
| OIDC_CLIENT_SECRET: "SOME_CLIENT_SECRET" | ||
| OIDC_REDIRECT_URL: "http://localhost:8081/auth/soarca_gui/callback" | ||
| COOKIE_SECRET_KEY: "SOME_COOKIE_SECRET" #openssl rand -base64 32 or head -c 32 /dev/urandom | base64 | ||
| OIDC_SKIP_TLS_VERIFY: true | ||
| VITE_SOARCA_URI=http://localhost:8080 # for vite each env var must start with VITE_ otherwise it won't be exposed to the client side | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,71 +1,95 @@ | ||
| name: Ci | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ master, development ] | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build binary | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: golangci/golangci-lint:latest | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Make repo safe | ||
| run: git config --global --add safe.directory /__w/SOARCA-GUI/SOARCA-GUI | ||
| - name: Install Templ | ||
| run: go install github.com/a-h/templ/cmd/templ@v0.3.819 | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
| - run: npm ci | ||
|
|
||
| - name: Build with make | ||
| run: make build | ||
|
|
||
| lint: | ||
| name: Lint go code with golangci | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: golangci/golangci-lint:latest | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Install Templ | ||
| run: go install github.com/a-h/templ/cmd/templ@v0.3.819 | ||
|
|
||
| - name: lint | ||
| run: | | ||
| ls -la | ||
| make lint | ||
| shell: bash | ||
|
|
||
|
|
||
| test: | ||
| name: Run ci-tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.22.2' # | ||
| - name: Make repo safe | ||
| run: git config --global --add safe.directory /__w/SOARCA-GUI/SOARCA-GUI | ||
| - name: Install Templ | ||
| run: go install github.com/a-h/templ/cmd/templ@v0.3.819 | ||
| timeout-minutes: 12 | ||
| - name: Run tests | ||
| run: | | ||
| make test | ||
| name: ci | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [master, development] | ||
| workflow_dispatch: {} # Allow manual triggering | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Linter | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Use Node.js 24 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
|
|
||
| - name: Cache node modules | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: | | ||
| ~/.npm | ||
| node_modules | ||
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-node- | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run linter | ||
| run: npm run lint | ||
|
|
||
| test: | ||
| name: Run tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Use Node.js 24 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
|
|
||
| - name: Cache node modules | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: | | ||
| ~/.npm | ||
| node_modules | ||
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-node- | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run tests | ||
| run: npm run test | ||
|
|
||
| docker-build: | ||
| needs: test | ||
| name: Build Docker image | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Get version | ||
| run: | | ||
| export VERSION=$(git describe --tags --dirty) | ||
| echo "describe_version=$(git describe --tags --dirty)" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Build image (no push) | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| file: ./Dockerfile | ||
| push: false | ||
| tags: cossas/soarca-gui:pr-${{ env.describe_version }} | ||
| build-args: | | ||
| VERSION=${{ env.describe_version }} | ||
| builder: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.