[pull] master from Ehco1996:master#318
Merged
Merged
Conversation
published_at is always slightly later than BuildTime for the same
artifact (goreleaser publishes the release seconds after building),
so the time-based comparison always fired -> false "update available"
for the very release the user just installed.
Switch to comparing constant.GitRevision against the commit SHA the
release tag points at (GET /commits/{tag}). Bare `go build` (no
revision injected) and GitHub fetch failures stay conservative -> no
spurious prompts; user can --force.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The home page previously only surfaced instantaneous rates, so there was no way to answer "how much has this node moved in the last N hours". Add two new KPI strips driven by the existing time-window selector: - windowed: total in/out (trapezoidal integration of the rate series already fetched for the throughput chart) + peak in/out - lifetime: in/out from XraySnapshot + last config reload (relative) Also add a lifetime-total column to the top-users list (already available on XrayUser as upload_total + download_total). Backend: OverviewResp gains last_reload_at (sourced from a new Config.LastLoadTime accessor over the existing lastLoadTime field). Boot time is intentionally not duplicated here — settings page already shows it. Note on accuracy: windowed totals are computed from bucketed average rates, so they slightly under-count short bursts; peaks at long windows (30d → 4h step) are bucket-averaged peaks, not instantaneous. Good enough for v1; a monotonic cum_in/cum_out column on node_metrics would make this exact.
The systemd restart kills this process before any "restarting/done" state can be polled, so the 5-state machine produced UIs stuck on "Downloading" while the update actually succeeded. Drop the state tracking entirely: - updater.Apply no longer takes onState; runs to completion or returns error. - /api/v1/update/apply is fire-and-forget (HTTP 202); /update/status is removed along with JobStatus and updateJob. - Dashboard polls /api/v1/version every 2s after click; success when git_revision changes; 60s timeout surfaces "check journalctl" hint. - Failure path stays in s.l logger -> journalctl, same as before. Net -193 lines. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )