Commit Graph

3 Commits

Author SHA1 Message Date
Self Hosters 60b7f4540a Add frontend display of Trivy database metadata
Backend:
- Add TrivyDBUpdatedAt field to AgentInfo model
- Update handleGetTrivyStatus to populate db_version from:
  - Local scanner via GetTrivyDBMetadata() for unix hosts
  - Agent info API for remote agent hosts
- Both now report actual DB timestamp instead of empty value

Frontend:
- Update TrivyDatabaseModal to format DB timestamp using formatDate()
- Update ScanHostSelectionModal to format DB timestamp
- Add formatDate helper function to ScanHostSelectionModal
- Display shows "18 hours ago" or "2 days ago" instead of "Unknown"

Fixes "DB: Unknown" issue in both Security plugin modals.
Now displays human-readable database freshness (e.g., "18 hours ago").

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 07:52:47 -05:00
Self Hosters 2cf3b7c0d6 Fix module path and add build time display to UI
Backend changes:
- Updated go.mod module path from github.com/container-census to
  github.com/selfhosters-cc to match correct GitHub organization
- Updated all import paths across codebase to use new module name
- This fixes ldflags injection of BuildTime during compilation
- BuildTime now correctly shows in /api/health response

Frontend changes:
- Added build time badge next to version in header
- Shows date and time in compact format (e.g., "🔨 12/11/2025 8:06 PM")
- Hover shows full timestamp
- Only displays if build_time is not "unknown"

The build script already sets BuildTime via ldflags, but it was being
ignored because the module path in go.mod didn't match the ldflags path.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 20:12:10 -05:00
Self Hosters 8f960fbf68 Fix sidebar navigation and plugin routing issues
- Always show "Manage Plugins" link in sidebar even when all plugins disabled
- Restore NPM plugin static page to avoid bundle.js 404 errors
- Remove npm from dynamic route generateStaticParams (uses static route)
- NPM plugin now properly uses its dedicated React component
- Graph and security plugins continue to use dynamic [pluginId] route

This fixes the issue where disabling all plugins made it impossible to
re-enable them, and resolves bundle.js loading errors for NPM plugin.
2025-12-07 20:22:52 -05:00