-
Notifications
You must be signed in to change notification settings - Fork 352
Addition of non-TrueNAS Managed App visualization & stats #12775
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
base: master
Are you sure you want to change the base?
Conversation
- Add 'source' field to App TypeScript interface - Source can be 'truenas' or 'external' - Aligns with middleware API schema changes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add isExternalApp computed property to app-row and app-info-card - Disable start/stop/restart buttons for external apps - Disable edit/update/convert/rollback/delete buttons for external apps - Show "Manage by deployment tool" tooltip for disabled buttons - Roll Back button now hidden entirely for external apps External apps (deployed via Portainer, Docker CLI, etc.) can only be monitored in TrueNAS. Management operations must be performed through the original deployment tool. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…d apps 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…e usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
… Apps 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Hide Workloads, Notes, and Metadata tiles for external apps since they are not managed by TrueNAS and these details are not relevant. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…f version info For external apps in Application Info tile: - Replace App Version and Version fields with "Deployment: Deployed via External Tool" - Hide Source and Train fields (not relevant for external apps) - Keep Name field visible 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Hide checkbox in app-row for external apps - Filter external apps from checkedApps, activeCheckedApps, and stoppedCheckedApps - Update allAppsChecked to only consider TrueNAS apps - Update toggleAppsChecked to only select TrueNAS apps - Prevents bulk actions (start/stop/update/delete) on external apps 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Claude finished @alexandrabain's task —— View job Code Review Complete! 🎉Great work on adding external app visualization and statistics! The implementation is solid with comprehensive tests and good architectural decisions. Here's my feedback: ✅ What's Working WellThe PR demonstrates strong adherence to Angular best practices, excellent test coverage for external app filtering logic, and thoughtful UX with collapsible sections and keyboard navigation. Nice work on the shared utility functions! 🔍 Key Findings1. Memory Leak in
|
|
- Add null safety checks (app.source ?? 'truenas') for backward compatibility - Replace manual Observable with of() in totalUtilizationAnalysis getter - Ensures external apps filtering works with existing apps that may not have source field 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add source field to mock app data - Mock AppsStatsService.getStatsForApp() to return valid observable - Prevents "undefined where stream was expected" error in combineLatest 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add optional chaining for app.source in isExternalApp computed - Add source field to app-row test mock data - Ensures backward compatibility with apps that don't have source field 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add source field to mock app data - Mock AppsStatsService.getStatsForApp() to return valid observable - Prevents combineLatest error in tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add null safety checks to incomingTrafficBits and outgoingTrafficBits computed signals - Add keyboard navigation (Enter/Space) to collapsible section headers - Add tabindex="0" for keyboard accessibility on section headers - Prevents runtime errors when stats are null/undefined (e.g., stopped apps) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Fix stats aggregation performance: Convert getter to cached observable with shareReplay - Add ARIA attributes (role, aria-expanded, aria-controls) for screen reader support - Add helper methods (isExternalApp, isTruenasApp) for consistent app type checking - Add defensive null checks to network stats (rx_bytes, tx_bytes) - Improves maintainability and eliminates duplicate null-handling logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add external app (external-nginx) to test data - Test filtering of TrueNAS vs external apps - Test bulk selection excludes external apps - Test active/stopped checked apps exclude external apps - Update bulk update test to verify only TrueNAS apps included - Improves test coverage for the main feature of this PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…ation - Add optional chaining (stats?.cpu_usage, stats?.memory) for top-level properties - Add optional chaining (net?.rx_bytes, net?.tx_bytes) for network stats - Prevents potential runtime errors with null/undefined stats from external apps - All stats properties now gracefully handle missing data 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…leanup - Replace @UntilDestroy() decorator with DestroyRef inject pattern - Replace untilDestroyed(this) with takeUntilDestroyed(this.destroyRef) - Update installed-apps-list.component.ts - Update app-info-card.component.ts - Follows modern Angular standards per CLAUDE.md guidelines 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…ggregation - Add safeAdd() helper to prevent NaN from null/undefined/non-number values - Add safeNetworkSum() helper for safe network stats accumulation - Improve empty check: !apps?.length || !apps.some((app) => !!app) - Add typeof stats !== 'object' check to validate stats shape - All math operations now guaranteed to return valid numbers, never NaN - Handles all edge cases: null apps, undefined stats, missing properties, empty arrays 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Move $event.preventDefault() before signal update - Ensures preventDefault() is called even if signal update throws error - Prevents unwanted page scroll on space key press - Applied to both TrueNAS Apps and Other Apps section headers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…nal app detection utility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Changes:
[Note dependent on https://github.com/truenas/middleware/pull/17514]
Testing:
Tested new and upgraded deployments, with a variety of apps in both categories.
Tested existing controls for TrueNAS Managed apps remain functional
Tested sorting of application names worked in each group
Tested filtering works across each group.
Downstream