mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-09-03 22:25:30 +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 }) {
|
function StatusBadge({ value }: { value: string }) {
|
||||||
const lower = value.toLowerCase();
|
const lower = value.toLowerCase();
|
||||||
if (lower === 'on' || lower === 'enabled') {
|
if (lower === 'on' || lower === 'enabled' || lower === 'installed') {
|
||||||
return (
|
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">
|
<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>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (lower === 'off' || lower === 'disabled') {
|
if (lower === 'off' || lower === 'disabled' || lower === 'not installed') {
|
||||||
return (
|
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">
|
<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>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,10 @@ export function ConfigurationStatus({ onOpenSection }: ConfigurationStatusProps
|
|||||||
<Row label="SSO" value={ssoLabel} onClick={open('sso')} />
|
<Row label="SSO" value={ssoLabel} onClick={open('sso')} />
|
||||||
<Row
|
<Row
|
||||||
label="Trivy installed"
|
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 && (
|
{!security.scanPolicies.locked && (
|
||||||
<Row
|
<Row
|
||||||
|
|||||||
Reference in New Issue
Block a user