[PR #14] [MERGED] fix(platform): proxy log retention, service UX improvements, vulnerability scanner filtering, and resource monitoring #18

Closed
opened 2026-03-02 05:12:33 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/gotempsh/temps/pull/14
Author: @dviejokfs
Created: 2/25/2026
Status: Merged
Merged: 2/26/2026
Merged by: @dviejokfs

Base: mainHead: fix/project-services-improvements


📝 Commits (10+)

  • 94194f7 fix(services): proxy log retention, service header layout, and browse data for linked services
  • 03f3451 fix(migrations): enable compression on proxy_logs before adding compression policy
  • f7d6991 fix(scanner): only report project dependency vulnerabilities, skip OS packages and embedded binaries
  • b93c30f chore(ci): enable cargo clippy in pre-commit hooks
  • ea5cdc7 feat(monitoring): add resource monitoring, status code class filter, and fix CPU stats calculation
  • 622dbb0 chore(gitignore): add .env.local to ignore list
  • 2889efc docs(changelog): add entries for proxy log retention, service UX, scanner filtering, and resource monitoring
  • 744a40e fix(docs): update installation commands in README and related files to use bash instead of sh for compatibility with Ubuntu 24
  • 1961472 fix(web): consolidate service detail header actions into dropdown menu
  • 18c0bb6 fix(web): move stop/start into dropdown danger section with confirmation dialog

📊 Changes

24 files changed (+2385 additions, -101 deletions)

View changed files

📝 .gitignore (+4 -0)
📝 .pre-commit-config.yaml (+6 -6)
📝 CHANGELOG.md (+9 -0)
📝 crates/temps-captcha-wasm/Cargo.toml (+3 -0)
📝 crates/temps-captcha-wasm/pkg/temps_captcha_wasm.js (+322 -1)
📝 crates/temps-captcha-wasm/pkg/temps_captcha_wasm_bg.wasm (+0 -0)
📝 crates/temps-deployer/src/docker.rs (+33 -21)
crates/temps-migrations/src/migration/m20260225_000001_add_proxy_logs_retention.rs (+47 -0)
📝 crates/temps-migrations/src/migration/mod.rs (+2 -0)
📝 crates/temps-proxy/src/handler/proxy_logs.rs (+8 -0)
📝 crates/temps-proxy/src/service/proxy_log_service.rs (+42 -1)
📝 crates/temps-vulnerability-scanner/src/trivy.rs (+22 -0)
📝 web/src/App.tsx (+1 -1)
📝 web/src/api/client/types.gen.ts (+4 -0)
web/src/components/monitoring/EnvironmentMetricsCard.tsx (+526 -0)
📝 web/src/components/monitoring/MonitoringSettings.tsx (+12 -1)
web/src/components/monitoring/ResourceMonitoring.tsx (+597 -0)
📝 web/src/components/project/ProjectDetailSidebar.tsx (+6 -0)
web/src/components/project/ProjectMonitoring.tsx (+581 -0)
📝 web/src/components/project/ProjectStorage.tsx (+38 -8)

...and 4 more files

📄 Description

Summary

  • Add 30-day retention policy for proxy logs to prevent unbounded table growth
  • Fix service detail header layout to separate destructive actions from data actions
  • Add Browse Data button to linked services on the project storage page
  • Filter vulnerability scanner to only report project dependency CVEs, not OS packages or embedded binaries
  • Enable clippy in pre-commit hooks to catch lint issues before CI
  • Add resource monitoring tab, status code class filtering, and fix CPU stats calculation

Changes

Proxy Log Retention

  • New migration adds TimescaleDB compression (7 days) and retention (30 days) policies for the proxy_logs hypertable
  • Enables columnstore compression with compress_segmentby = 'project_id' before adding the compression policy

Service Detail Header

  • Reorganized action buttons: data actions (Browse Data, Backup, Edit, Upgrade) are grouped separately from destructive actions (Stop/Start, Delete) with a visual divider
  • Previously the Delete (trash) icon sat directly next to Backup, risking accidental clicks

Browse Data for Linked Services

  • Added a "Browse Data" button to each linked service card on the project storage page (ProjectStorage.tsx)
  • Previously only "View Details" was shown (and only when the card was expanded)

Vulnerability Scanner Filtering

  • Added --pkg-types library to Trivy image scans to exclude OS-level package vulnerabilities
  • Filter out gobinary and rustbinary result types during parsing to skip CVEs from compiled binaries baked into Docker images (e.g., Go stdlib CVEs from a Hugo binary in a static site image)

CI / Pre-commit

  • Uncommented cargo-clippy hook in .pre-commit-config.yaml — clippy now runs on every commit touching Rust files

Resource Monitoring & Proxy Stats

  • Added resource monitoring tab to project sidebar and monitoring settings page
  • New ResourceMonitoring, EnvironmentMetricsCard, and ProjectMonitoring components
  • Added status_code_class filter (1xx/2xx/3xx/4xx/5xx) to proxy log stats endpoints
  • Fixed CPU percentage calculation to use delta between cpu_stats and precpu_stats instead of absolute values
  • Cast avg_response_time to float8 for correct type handling in time bucket stats

Crates Modified

temps-migrations, temps-vulnerability-scanner, temps-deployer, temps-proxy, temps-providers, temps-backup


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/gotempsh/temps/pull/14 **Author:** [@dviejokfs](https://github.com/dviejokfs) **Created:** 2/25/2026 **Status:** ✅ Merged **Merged:** 2/26/2026 **Merged by:** [@dviejokfs](https://github.com/dviejokfs) **Base:** `main` ← **Head:** `fix/project-services-improvements` --- ### 📝 Commits (10+) - [`94194f7`](https://github.com/gotempsh/temps/commit/94194f70af00afd76d1353ffff5399d9cf1722a9) fix(services): proxy log retention, service header layout, and browse data for linked services - [`03f3451`](https://github.com/gotempsh/temps/commit/03f34514df6a2e0de018aa4e4d49eea20009b68a) fix(migrations): enable compression on proxy_logs before adding compression policy - [`f7d6991`](https://github.com/gotempsh/temps/commit/f7d6991ea86270f11b7a55f6380aa985e6d4c594) fix(scanner): only report project dependency vulnerabilities, skip OS packages and embedded binaries - [`b93c30f`](https://github.com/gotempsh/temps/commit/b93c30ff243a2a620161626cf66e478ca686c73d) chore(ci): enable cargo clippy in pre-commit hooks - [`ea5cdc7`](https://github.com/gotempsh/temps/commit/ea5cdc76330068b5c4e37814b127e463d85198b4) feat(monitoring): add resource monitoring, status code class filter, and fix CPU stats calculation - [`622dbb0`](https://github.com/gotempsh/temps/commit/622dbb0b79f6bb18d9da545d9d3834ac77f82575) chore(gitignore): add .env.local to ignore list - [`2889efc`](https://github.com/gotempsh/temps/commit/2889efcfe791f67a8d6d87fdfbd0bba24ddaca6c) docs(changelog): add entries for proxy log retention, service UX, scanner filtering, and resource monitoring - [`744a40e`](https://github.com/gotempsh/temps/commit/744a40ed76184bd56af24d4b15d4be4f3f964e1d) fix(docs): update installation commands in README and related files to use bash instead of sh for compatibility with Ubuntu 24 - [`1961472`](https://github.com/gotempsh/temps/commit/196147235be1417f72f9341e85746777edc7a3e2) fix(web): consolidate service detail header actions into dropdown menu - [`18c0bb6`](https://github.com/gotempsh/temps/commit/18c0bb6308fd14cabbec8a214808673080786933) fix(web): move stop/start into dropdown danger section with confirmation dialog ### 📊 Changes **24 files changed** (+2385 additions, -101 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+4 -0) 📝 `.pre-commit-config.yaml` (+6 -6) 📝 `CHANGELOG.md` (+9 -0) 📝 `crates/temps-captcha-wasm/Cargo.toml` (+3 -0) 📝 `crates/temps-captcha-wasm/pkg/temps_captcha_wasm.js` (+322 -1) 📝 `crates/temps-captcha-wasm/pkg/temps_captcha_wasm_bg.wasm` (+0 -0) 📝 `crates/temps-deployer/src/docker.rs` (+33 -21) ➕ `crates/temps-migrations/src/migration/m20260225_000001_add_proxy_logs_retention.rs` (+47 -0) 📝 `crates/temps-migrations/src/migration/mod.rs` (+2 -0) 📝 `crates/temps-proxy/src/handler/proxy_logs.rs` (+8 -0) 📝 `crates/temps-proxy/src/service/proxy_log_service.rs` (+42 -1) 📝 `crates/temps-vulnerability-scanner/src/trivy.rs` (+22 -0) 📝 `web/src/App.tsx` (+1 -1) 📝 `web/src/api/client/types.gen.ts` (+4 -0) ➕ `web/src/components/monitoring/EnvironmentMetricsCard.tsx` (+526 -0) 📝 `web/src/components/monitoring/MonitoringSettings.tsx` (+12 -1) ➕ `web/src/components/monitoring/ResourceMonitoring.tsx` (+597 -0) 📝 `web/src/components/project/ProjectDetailSidebar.tsx` (+6 -0) ➕ `web/src/components/project/ProjectMonitoring.tsx` (+581 -0) 📝 `web/src/components/project/ProjectStorage.tsx` (+38 -8) _...and 4 more files_ </details> ### 📄 Description ## Summary - Add 30-day retention policy for proxy logs to prevent unbounded table growth - Fix service detail header layout to separate destructive actions from data actions - Add Browse Data button to linked services on the project storage page - Filter vulnerability scanner to only report project dependency CVEs, not OS packages or embedded binaries - Enable clippy in pre-commit hooks to catch lint issues before CI - Add resource monitoring tab, status code class filtering, and fix CPU stats calculation ## Changes ### Proxy Log Retention - New migration adds TimescaleDB compression (7 days) and retention (30 days) policies for the `proxy_logs` hypertable - Enables columnstore compression with `compress_segmentby = 'project_id'` before adding the compression policy ### Service Detail Header - Reorganized action buttons: data actions (Browse Data, Backup, Edit, Upgrade) are grouped separately from destructive actions (Stop/Start, Delete) with a visual divider - Previously the Delete (trash) icon sat directly next to Backup, risking accidental clicks ### Browse Data for Linked Services - Added a "Browse Data" button to each linked service card on the project storage page (`ProjectStorage.tsx`) - Previously only "View Details" was shown (and only when the card was expanded) ### Vulnerability Scanner Filtering - Added `--pkg-types library` to Trivy image scans to exclude OS-level package vulnerabilities - Filter out `gobinary` and `rustbinary` result types during parsing to skip CVEs from compiled binaries baked into Docker images (e.g., Go stdlib CVEs from a Hugo binary in a static site image) ### CI / Pre-commit - Uncommented `cargo-clippy` hook in `.pre-commit-config.yaml` — clippy now runs on every commit touching Rust files ### Resource Monitoring & Proxy Stats - Added resource monitoring tab to project sidebar and monitoring settings page - New `ResourceMonitoring`, `EnvironmentMetricsCard`, and `ProjectMonitoring` components - Added `status_code_class` filter (1xx/2xx/3xx/4xx/5xx) to proxy log stats endpoints - Fixed CPU percentage calculation to use delta between `cpu_stats` and `precpu_stats` instead of absolute values - Cast `avg_response_time` to `float8` for correct type handling in time bucket stats ## Crates Modified `temps-migrations`, `temps-vulnerability-scanner`, `temps-deployer`, `temps-proxy`, `temps-providers`, `temps-backup` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 05:12:33 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/temps#18
No description provided.