Skip to content

Commit

Permalink
Merge branch 'main' into fleet/fix-agent-details-for-horde-agents
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 21, 2023
2 parents 493f1fb + 53dc6d2 commit f2589d3
Show file tree
Hide file tree
Showing 13 changed files with 441 additions and 239 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
* 2.0.
*/

import { EuiCallOut, EuiLink, EuiSpacer } from '@elastic/eui';
import { EuiSpacer } from '@elastic/eui';
import { LazyField } from '@kbn/advanced-settings-plugin/public';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import {
apmLabsButton,
apmServiceGroupMaxNumberOfServices,
Expand All @@ -19,8 +18,6 @@ import {
apmAWSLambdaRequestCostPerMillion,
apmEnableServiceMetrics,
apmEnableContinuousRollups,
enableInfrastructureHostsView,
enableAwsLambdaMetrics,
enableAgentExplorerView,
} from '@kbn/observability-plugin/common';
import { isEmpty } from 'lodash';
Expand All @@ -39,13 +36,11 @@ const apmSettingsKeys = [
apmAWSLambdaRequestCostPerMillion,
apmEnableServiceMetrics,
apmEnableContinuousRollups,
enableInfrastructureHostsView,
enableAwsLambdaMetrics,
enableAgentExplorerView,
];

export function GeneralSettings() {
const { docLinks, notifications, application } = useApmPluginContext().core;
const { docLinks, notifications } = useApmPluginContext().core;
const {
handleFieldChange,
settingsEditableConfig,
Expand Down Expand Up @@ -77,33 +72,6 @@ export function GeneralSettings() {

return (
<>
<EuiCallOut
title={i18n.translate('xpack.apm.apmSettings.callOutTitle', {
defaultMessage: 'Looking for all settings?',
})}
iconType="search"
>
<p>
<FormattedMessage
id="xpack.apm.apmSettings.kibanaLink"
defaultMessage="The full list of APM options can be found in {link}"
values={{
link: (
<EuiLink
data-test-subj="apmGeneralSettingsKibanaAdvancedSettingsLink"
href={application.getUrlForApp('management', {
path: `/kibana/settings?query=category:(observability)`,
})}
>
{i18n.translate('xpack.apm.apmSettings.kibanaLink.label', {
defaultMessage: 'Kibana advanced settings.',
})}
</EuiLink>
),
}}
/>
</p>
</EuiCallOut>
<EuiSpacer />
{apmSettingsKeys.map((settingKey) => {
const editableConfig = settingsEditableConfig[settingKey];
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 f2589d3

Please sign in to comment.