mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-12 19:57:37 +00:00
fix: style Trivy row as badge and link to Security scanner setup
This commit is contained in:
@@ -11,17 +11,17 @@ interface ConfigurationStatusProps {
|
||||
|
||||
function StatusBadge({ value }: { value: string }) {
|
||||
const lower = value.toLowerCase();
|
||||
if (lower === 'on' || lower === 'enabled') {
|
||||
if (lower === 'on' || lower === 'enabled' || lower === 'installed') {
|
||||
return (
|
||||
<span className="inline-flex items-center rounded-sm border border-success/30 bg-success/10 px-1.5 py-0.5 text-[10px] font-mono tracking-wide uppercase text-success">
|
||||
ON
|
||||
{lower === 'installed' ? 'INSTALLED' : 'ON'}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
if (lower === 'off' || lower === 'disabled') {
|
||||
if (lower === 'off' || lower === 'disabled' || lower === 'not installed') {
|
||||
return (
|
||||
<span className="inline-flex items-center rounded-sm border border-card-border bg-card px-1.5 py-0.5 text-[10px] font-mono tracking-wide uppercase text-stat-subtitle">
|
||||
OFF
|
||||
{lower === 'not installed' ? 'NOT INSTALLED' : 'OFF'}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
@@ -195,7 +195,10 @@ export function ConfigurationStatus({ onOpenSection }: ConfigurationStatusProps
|
||||
<Row label="SSO" value={ssoLabel} onClick={open('sso')} />
|
||||
<Row
|
||||
label="Trivy installed"
|
||||
value={security.trivyInstalled ? 'Yes' : 'No'}
|
||||
value={security.trivyInstalled ? 'Installed' : 'Not installed'}
|
||||
onClick={() => window.dispatchEvent(
|
||||
new CustomEvent<SenchoNavigateDetail>(SENCHO_NAVIGATE_EVENT, { detail: { view: 'security', tab: 'scanner' } }),
|
||||
)}
|
||||
/>
|
||||
{!security.scanPolicies.locked && (
|
||||
<Row
|
||||
|
||||
Reference in New Issue
Block a user