Compare commits

...

7 commits

Author SHA1 Message Date
94f3065046
new release
All checks were successful
Lint / lint (push) Successful in 9s
2026-06-03 19:48:10 -07:00
8ce81de224
Remove color coding from success rate metric 2026-06-03 19:34:25 -07:00
61cf83ad7a
new docker image location
All checks were successful
Lint / lint (push) Successful in 12s
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 23:33:49 -07:00
859635b45a
update release script
All checks were successful
Lint / lint (push) Successful in 11s
2026-04-23 23:23:34 -07:00
150e914ed4
fix lint
All checks were successful
Lint / lint (push) Successful in 15s
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 23:16:01 -07:00
80012a7b6a
update action versions to latest
Some checks failed
Lint / lint (push) Failing after 24s
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 23:00:49 -07:00
d96dfc24f2
ci: migrate workflows from GitHub Actions to Forgejo 2026-04-23 20:25:44 -07:00
8 changed files with 89 additions and 21 deletions

View file

@ -0,0 +1,24 @@
name: Lint
on:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
- name: Run Biome
run: npx @biomejs/biome@latest check .

View file

@ -0,0 +1,56 @@
name: Build and Push Docker Image
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v6
- name: Get version from VERSION file
id: version
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Create tag
run: |
git config user.name forgejo-actions
git config user.email forgejo-actions@lonecloud.dev
git tag -a v${{ steps.version.outputs.VERSION }} -m "Release v${{ steps.version.outputs.VERSION }}"
git push origin v${{ steps.version.outputs.VERSION }}
- name: Create Forgejo Release
run: |
curl -s -X POST "https://git.lonecloud.dev/api/v1/repos/${{ github.repository }}/releases" \
-H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"v${{ steps.version.outputs.VERSION }}\",\"name\":\"v${{ steps.version.outputs.VERSION }}\",\"generate_release_notes\":true}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to Forgejo Container Registry
uses: docker/login-action@v4
with:
registry: git.lonecloud.dev
username: ${{ secrets.FORGEJO_USERNAME }}
password: ${{ secrets.FORGEJO_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
no-cache: true
tags: |
git.lonecloud.dev/lone-cloud/snowflake-dashboard:latest
git.lonecloud.dev/lone-cloud/snowflake-dashboard:v${{ steps.version.outputs.VERSION }}

View file

@ -20,6 +20,9 @@ test:
go test -v ./... go test -v ./...
release: release:
gh workflow run release.yml curl -s -X POST "https://git.lonecloud.dev/api/v1/repos/lone-cloud/snowflake-dashboard/actions/workflows/release.yml/dispatches" \
-H "Authorization: token $$(cat ~/.config/forgejo-token)" \
-H "Content-Type: application/json" \
-d '{"ref":"master"}'
.PHONY: lint fix check dev build docker test release .PHONY: lint fix check dev build docker test release

View file

@ -1 +1 @@
1.10.1 1.10.3

View file

@ -223,15 +223,8 @@ async function fetchStats() {
document.getElementById("total").textContent = total; document.getElementById("total").textContent = total;
document.getElementById("timeouts").textContent = timeouts; document.getElementById("timeouts").textContent = timeouts;
const rateEl = document.getElementById("success-rate-small"); const rateEl = document.getElementById("success-rate-small");
const statusLabel = rateEl.textContent = `${successRate.toFixed(1)}%`;
successRate >= 70 ? "Good" : successRate >= 40 ? "Warning" : "Critical"; rateEl.className = "";
rateEl.innerHTML = `${successRate.toFixed(1)}% <span class="sr-only">(${statusLabel})</span>`;
rateEl.className =
successRate >= 70
? "success-rate"
: successRate >= 40
? "warn-rate"
: "error";
document.getElementById("tor-traffic").textContent = document.getElementById("tor-traffic").textContent =
`${formatBytes(torInbound)} / ${formatBytes(torOutbound)}`; `${formatBytes(torInbound)} / ${formatBytes(torOutbound)}`;
document.getElementById("memory").textContent = formatBytes(memory); document.getElementById("memory").textContent = formatBytes(memory);

View file

@ -1,7 +1,7 @@
services: services:
snowflake-dashboard: snowflake-dashboard:
container_name: snowflake-dashboard container_name: snowflake-dashboard
image: ghcr.io/lone-cloud/snowflake-dashboard:latest image: git.lonecloud.dev/lone-cloud/snowflake-dashboard:latest
restart: unless-stopped restart: unless-stopped
network_mode: host network_mode: host
volumes: volumes:

View file

@ -21,7 +21,7 @@
Rate</span> Rate</span>
<span id="tip-success-rate" class="sr-only">Percentage of successful connections vs total <span id="tip-success-rate" class="sr-only">Percentage of successful connections vs total
attempts</span> attempts</span>
<span role="definition" class="success-rate" id="success-rate-small">-</span> <span role="definition" id="success-rate-small">-</span>
</div> </div>
<div class="metric-row"> <div class="metric-row">
<span tabindex="0" role="term" class="metric-label" aria-describedby="tip-uptime" title="How long the Snowflake proxy has been running">Uptime</span> <span tabindex="0" role="term" class="metric-label" aria-describedby="tip-uptime" title="How long the Snowflake proxy has been running">Uptime</span>

View file

@ -231,14 +231,6 @@ tr:last-child td {
color: var(--error-color); color: var(--error-color);
} }
.success-rate {
color: var(--success-color);
}
.warn-rate {
color: var(--warn-color);
}
.flag { .flag {
font-size: 1.25rem; font-size: 1.25rem;
margin-right: var(--space-2); margin-right: var(--space-2);