You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(039): hide scan buttons when no security scanners are enabled
Previously the Servers page, ServerDetail security tab, and Security
"Scan All" button were always visible regardless of whether any scanners
were actually installed. Clicking them just produced an error "no scanners
configured to run", which was a confusing dead end for users who hadn't
opted into security scanning.
Now scan-trigger UI is gated on the new SecurityOverview.ScannersEnabled
field — the count of scanners with status installed or configured (the
same set the engine actually runs).
Backend:
- Add ScannersEnabled int field to SecurityOverview
- Compute it in Service.GetOverview by filtering scanner status
Frontend:
- New composable frontend/src/composables/useSecurityScannerStatus.ts
that fetches /api/v1/security/overview once at app load and exposes
a reactive hasEnabledScanners() helper. Module-scoped cache so all
components share a single network call.
- Servers.vue: gate "Scan All" header button
- ServerDetail.vue: gate the "Security" tab itself and the "Scan Now"
button inside the tab (defense-in-depth in case of deep links)
- ServerCard.vue: gate the per-server "Scan" button
- Security.vue: gate the "Scan All Servers" button using the existing
overview response (which now includes scanners_enabled). Also calls
refreshSecurityScannerStatus() after install/remove so other pages
update immediately without a full reload.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
<divclass="tooltip":data-tip="!dockerAvailable ? 'Docker is required to run security scanners' : ''">
505
+
<divclass="tooltip":data-tip="!dockerAvailable ? 'Docker is required to run security scanners' : (!hasEnabledScanners() ? 'No scanners enabled — install one from Security Scanners' : '')">
505
506
<button
507
+
v-if="hasEnabledScanners()"
506
508
@click="startSecurityScan"
507
509
:disabled="scanLoading || !dockerAvailable"
508
510
class="btn btn-primary"
@@ -750,6 +752,7 @@ import AnnotationBadges from '@/components/AnnotationBadges.vue'
750
752
importtype { Hint } from'@/components/CollapsibleHintsPanel.vue'
0 commit comments