Skip to content

Commit

Permalink
Merge branch 'main' into co-pilot-chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 21, 2023
2 parents d550608 + 8a5f001 commit 52b2f4a
Show file tree
Hide file tree
Showing 26 changed files with 573 additions and 281 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
'xpack.upgrade_assistant.featureSet.mlSnapshots (boolean)',
'xpack.upgrade_assistant.featureSet.reindexCorrectiveActions (boolean)',
'xpack.upgrade_assistant.ui.enabled (boolean)',
'xpack.observability.coPilot.enabled (boolean)',
'xpack.observability.aiAssistant.enabled (boolean)',
'xpack.observability.unsafe.alertDetails.metrics.enabled (boolean)',
'xpack.observability.unsafe.alertDetails.logs.enabled (boolean)',
'xpack.observability.unsafe.alertDetails.uptime.enabled (boolean)',
Expand Down
17 changes: 15 additions & 2 deletions x-pack/plugins/cloud_security_posture/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,26 @@ export interface GetCspRuleTemplateResponse {

// CNVM DASHBOARD

export interface VulnScoreTrend {
interface AccountVulnStats {
cloudAccountId: string;
cloudAccountName: string;
critical: number;
high: number;
medium: number;
low: number;
}

export interface VulnStatsTrend {
'@timestamp': string;
policy_template: 'vuln_mgmt';
critical: number;
high: number;
medium: number;
low: number;
vulnerabilities_stats_by_cloud_account?: Record<
AccountVulnStats['cloudAccountId'],
AccountVulnStats
>;
}

export interface CnvmStatistics {
Expand All @@ -150,7 +163,7 @@ export interface CnvmStatistics {

export interface CnvmDashboardData {
cnvmStatistics: CnvmStatistics;
vulnTrends: VulnScoreTrend[];
vulnTrends: VulnStatsTrend[];
topVulnerableResources: VulnerableResourceStat[];
topPatchableVulnerabilities: PatchableVulnerabilityStat[];
topVulnerabilities: VulnerabilityStat[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export const ChartPanel: React.FC<ChartPanelProps> = ({
</EuiTitle>
)}
</EuiFlexItem>
<EuiFlexItem grow={false}>{rightSideItems}</EuiFlexItem>
<EuiFlexItem grow={false} style={{ flexDirection: 'row', gap: euiTheme.size.s }}>
{rightSideItems}
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem style={{ height: '100%' }}>{renderChart()}</EuiFlexItem>
Expand Down
Loading

0 comments on commit 52b2f4a

Please sign in to comment.