mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Turn on monitoring for cloud user first policy (#135607)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
b20fe6d74f
commit
34d0a4bf56
2 changed files with 11 additions and 7 deletions
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import {
|
||||
sendCreateAgentPolicy,
|
||||
|
@ -25,8 +26,11 @@ interface UseGetAgentPolicyOrDefaultResponse {
|
|||
export const DEFAULT_AGENT_POLICY_ID: string = 'fleet-first-agent-policy';
|
||||
export const DEFAULT_AGENT_POLICY: NewAgentPolicy = Object.freeze({
|
||||
id: DEFAULT_AGENT_POLICY_ID,
|
||||
name: 'My first agent policy',
|
||||
name: i18n.translate('xpack.fleet.createPackagePolicy.firstAgentPolicyNameText', {
|
||||
defaultMessage: 'My first agent policy',
|
||||
}),
|
||||
namespace: 'default',
|
||||
monitoring_enabled: ['logs', 'metrics'],
|
||||
});
|
||||
|
||||
const sendGetAgentPolicy = async (agentPolicyId: string) => {
|
||||
|
|
|
@ -142,7 +142,8 @@ export const AgentDetailsOverviewSection: React.FunctionComponent<{
|
|||
title: i18n.translate('xpack.fleet.agentDetails.monitorLogsLabel', {
|
||||
defaultMessage: 'Monitor logs',
|
||||
}),
|
||||
description: Array.isArray(agentPolicy?.monitoring_enabled) ? (
|
||||
description:
|
||||
Array.isArray(agentPolicy?.monitoring_enabled) &&
|
||||
agentPolicy?.monitoring_enabled?.includes('logs') ? (
|
||||
<FormattedMessage
|
||||
id="xpack.fleet.agentList.monitorLogsEnabledText"
|
||||
|
@ -153,14 +154,14 @@ export const AgentDetailsOverviewSection: React.FunctionComponent<{
|
|||
id="xpack.fleet.agentList.monitorLogsDisabledText"
|
||||
defaultMessage="Disabled"
|
||||
/>
|
||||
)
|
||||
) : null,
|
||||
),
|
||||
},
|
||||
{
|
||||
title: i18n.translate('xpack.fleet.agentDetails.monitorMetricsLabel', {
|
||||
defaultMessage: 'Monitor metrics',
|
||||
}),
|
||||
description: Array.isArray(agentPolicy?.monitoring_enabled) ? (
|
||||
description:
|
||||
Array.isArray(agentPolicy?.monitoring_enabled) &&
|
||||
agentPolicy?.monitoring_enabled?.includes('metrics') ? (
|
||||
<FormattedMessage
|
||||
id="xpack.fleet.agentList.monitorMetricsEnabledText"
|
||||
|
@ -171,8 +172,7 @@ export const AgentDetailsOverviewSection: React.FunctionComponent<{
|
|||
id="xpack.fleet.agentList.monitorMetricsDisabledText"
|
||||
defaultMessage="Disabled"
|
||||
/>
|
||||
)
|
||||
) : null,
|
||||
),
|
||||
},
|
||||
].map(({ title, description }) => {
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue