mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[UII] Make Fleet & Integrations layouts full width (#186056)
## Summary Resolves https://github.com/elastic/ingest-dev/issues/2602. This PR makes global changes to Fleet and Integrations: 1. Layout expands to 100% of available screen width when screen size is < 1600px wide 2. Layout expands to 80% when screen size is >= 1600px 3. Sets all flyouts to `medium` size with a max width of 800px no matter the screen size Exceptions: - Create/edit integration policy page is restricted to 1200px when screen size is >= 1600px - Agent policy settings page is restricted to 1200px no matter the screen size ### Screenshots <details> <summary>On 1920px screen</summary>       </details> <details> <summary>On smaller screen</summary>       </details> ### Testing Fire up the PR and click around everything :)
This commit is contained in:
parent
ad71568273
commit
5000201d56
39 changed files with 189 additions and 140 deletions
|
@ -155,21 +155,18 @@ There's a bit of setup involved to actually get `react-query` up and running. Fi
|
||||||
|
|
||||||
```tsx
|
```tsx
|
||||||
//...
|
//...
|
||||||
|
<QueryClientProvider client={queryClient}>
|
||||||
<EuiThemeProvider darkMode={isDarkMode}>
|
<ReactQueryDevtools initialIsOpen={true} />
|
||||||
<QueryClientProvider client={queryClient}>
|
<UIExtensionsContext.Provider value={extensions}>
|
||||||
<ReactQueryDevtools initialIsOpen={true} />
|
<FleetStatusProvider>
|
||||||
<UIExtensionsContext.Provider value={extensions}>
|
<Router history={history}>
|
||||||
<FleetStatusProvider>
|
<PackageInstallProvider notifications={startServices.notifications} theme$={theme$}>
|
||||||
<Router history={history}>
|
<FlyoutContextProvider>{children}</FlyoutContextProvider>
|
||||||
<PackageInstallProvider notifications={startServices.notifications} theme$={theme$}>
|
</PackageInstallProvider>
|
||||||
<FlyoutContextProvider>{children}</FlyoutContextProvider>
|
</Router>
|
||||||
</PackageInstallProvider>
|
</FleetStatusProvider>
|
||||||
</Router>
|
</UIExtensionsContext.Provider>
|
||||||
</FleetStatusProvider>
|
</QueryClientProvider>
|
||||||
</UIExtensionsContext.Provider>
|
|
||||||
</QueryClientProvider>
|
|
||||||
</EuiThemeProvider>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
We also set up `react-query`'s [dev tools](https://tanstack.com/query/v4/docs/react/devtools), which provide a useful developer console for debugging query and mutation state across the whole application.
|
We also set up `react-query`'s [dev tools](https://tanstack.com/query/v4/docs/react/devtools), which provide a useful developer console for debugging query and mutation state across the whole application.
|
||||||
|
|
|
@ -18,9 +18,7 @@ import useObservable from 'react-use/lib/useObservable';
|
||||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
|
|
||||||
import type { TopNavMenuData } from '@kbn/navigation-plugin/public';
|
import type { TopNavMenuData } from '@kbn/navigation-plugin/public';
|
||||||
|
|
||||||
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
|
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
|
||||||
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
|
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
|
||||||
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
|
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
|
||||||
|
@ -186,11 +184,20 @@ export const FleetAppContext: React.FC<{
|
||||||
routerHistory: _routerHistory,
|
routerHistory: _routerHistory,
|
||||||
fleetStatus,
|
fleetStatus,
|
||||||
}) => {
|
}) => {
|
||||||
|
const XXL_BREAKPOINT = 1600;
|
||||||
const darkModeObservable = useObservable(startServices.theme.theme$);
|
const darkModeObservable = useObservable(startServices.theme.theme$);
|
||||||
const isDarkMode = darkModeObservable && darkModeObservable.darkMode;
|
const isDarkMode = darkModeObservable && darkModeObservable.darkMode;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<KibanaRenderContextProvider {...startServices}>
|
<KibanaRenderContextProvider
|
||||||
|
{...startServices}
|
||||||
|
theme={startServices.theme}
|
||||||
|
modify={{
|
||||||
|
breakpoint: {
|
||||||
|
xxl: XXL_BREAKPOINT,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
<RedirectAppLinks
|
<RedirectAppLinks
|
||||||
coreStart={{
|
coreStart={{
|
||||||
application: startServices.application,
|
application: startServices.application,
|
||||||
|
@ -199,6 +206,8 @@ export const FleetAppContext: React.FC<{
|
||||||
<KibanaContextProvider services={{ ...startServices }}>
|
<KibanaContextProvider services={{ ...startServices }}>
|
||||||
<ConfigContext.Provider value={config}>
|
<ConfigContext.Provider value={config}>
|
||||||
<KibanaVersionContext.Provider value={kibanaVersion}>
|
<KibanaVersionContext.Provider value={kibanaVersion}>
|
||||||
|
{/* This should be removed since theme is passed to `KibanaRenderContextProvider`,
|
||||||
|
however, removing this breaks usages of `props.theme.eui` in styled components */}
|
||||||
<EuiThemeProvider darkMode={isDarkMode}>
|
<EuiThemeProvider darkMode={isDarkMode}>
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<ReactQueryDevtools initialIsOpen={false} />
|
<ReactQueryDevtools initialIsOpen={false} />
|
||||||
|
|
|
@ -23,6 +23,7 @@ import {
|
||||||
import { FormattedMessage } from '@kbn/i18n-react';
|
import { FormattedMessage } from '@kbn/i18n-react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
import { MAX_FLYOUT_WIDTH } from '../../constants';
|
||||||
import { useStartServices, useFlyoutContext, useCheckPermissions } from '../../hooks';
|
import { useStartServices, useFlyoutContext, useCheckPermissions } from '../../hooks';
|
||||||
import { FleetServerMissingESPrivileges } from '../../sections/agents/components';
|
import { FleetServerMissingESPrivileges } from '../../sections/agents/components';
|
||||||
|
|
||||||
|
@ -133,7 +134,7 @@ export const FleetServerFlyout: React.FunctionComponent<Props> = ({ onClose }) =
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFlyout data-test-subj="fleetServerFlyout" onClose={onClose} size="m">
|
<EuiFlyout data-test-subj="fleetServerFlyout" onClose={onClose} maxWidth={MAX_FLYOUT_WIDTH}>
|
||||||
<EuiFlyoutHeader hasBorder aria-labelledby="FleetAddFleetServerFlyoutTitle">
|
<EuiFlyoutHeader hasBorder aria-labelledby="FleetAddFleetServerFlyoutTitle">
|
||||||
<Header
|
<Header
|
||||||
tabs={tabs}
|
tabs={tabs}
|
||||||
|
|
|
@ -57,6 +57,7 @@ export const CustomFields: React.FunctionComponent<Props> = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
|
|
@ -118,6 +118,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
const AgentTamperProtectionSectionContent = useMemo(
|
const AgentTamperProtectionSectionContent = useMemo(
|
||||||
() => (
|
() => (
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -210,6 +211,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -255,6 +257,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
</EuiFormRow>
|
</EuiFormRow>
|
||||||
</EuiDescribedFormGroup>
|
</EuiDescribedFormGroup>
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3 data-test-subj="defaultNamespaceHeader">
|
<h3 data-test-subj="defaultNamespaceHeader">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -307,6 +310,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
</EuiDescribedFormGroup>
|
</EuiDescribedFormGroup>
|
||||||
<CustomFields updateAgentPolicy={updateAgentPolicy} agentPolicy={agentPolicy} />
|
<CustomFields updateAgentPolicy={updateAgentPolicy} agentPolicy={agentPolicy} />
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -405,6 +409,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
{AgentTamperProtectionSection}
|
{AgentTamperProtectionSection}
|
||||||
|
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -466,6 +471,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
</EuiFormRow>
|
</EuiFormRow>
|
||||||
</EuiDescribedFormGroup>
|
</EuiDescribedFormGroup>
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -506,6 +512,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
</EuiFormRow>
|
</EuiFormRow>
|
||||||
</EuiDescribedFormGroup>
|
</EuiDescribedFormGroup>
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -546,6 +553,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
</EuiFormRow>
|
</EuiFormRow>
|
||||||
</EuiDescribedFormGroup>
|
</EuiDescribedFormGroup>
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -586,6 +594,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
</EuiFormRow>
|
</EuiFormRow>
|
||||||
</EuiDescribedFormGroup>
|
</EuiDescribedFormGroup>
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -628,6 +637,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
</EuiFormRow>
|
</EuiFormRow>
|
||||||
</EuiDescribedFormGroup>
|
</EuiDescribedFormGroup>
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -712,6 +722,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
|
||||||
</EuiFormRow>
|
</EuiFormRow>
|
||||||
</EuiDescribedFormGroup>
|
</EuiDescribedFormGroup>
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
|
|
@ -75,13 +75,14 @@ export const AgentPolicyForm: React.FunctionComponent<Props> = ({
|
||||||
|
|
||||||
const generalSettingsWrapper = (children: JSX.Element[]) => (
|
const generalSettingsWrapper = (children: JSX.Element[]) => (
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h4>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.fleet.policyForm.generalSettingsGroupTitle"
|
id="xpack.fleet.policyForm.generalSettingsGroupTitle"
|
||||||
defaultMessage="General settings"
|
defaultMessage="General settings"
|
||||||
/>
|
/>
|
||||||
</h4>
|
</h3>
|
||||||
}
|
}
|
||||||
description={
|
description={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
|
|
@ -47,6 +47,7 @@ export const AgentPolicyIntegrationForm: React.FunctionComponent<Props> = ({
|
||||||
return (
|
return (
|
||||||
<EuiForm>
|
<EuiForm>
|
||||||
<EuiDescribedFormGroup
|
<EuiDescribedFormGroup
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
|
|
@ -24,6 +24,7 @@ import {
|
||||||
EuiSpacer,
|
EuiSpacer,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
|
|
||||||
|
import { MAX_FLYOUT_WIDTH } from '../../../constants';
|
||||||
import { useGetOneAgentPolicyFull, useGetOneAgentPolicy, useStartServices } from '../../../hooks';
|
import { useGetOneAgentPolicyFull, useGetOneAgentPolicy, useStartServices } from '../../../hooks';
|
||||||
import { Loading } from '../../../components';
|
import { Loading } from '../../../components';
|
||||||
import { fullAgentPolicyToYaml, agentPolicyRouteService } from '../../../services';
|
import { fullAgentPolicyToYaml, agentPolicyRouteService } from '../../../services';
|
||||||
|
@ -71,7 +72,7 @@ export const AgentPolicyYamlFlyout = memo<{ policyId: string; onClose: () => voi
|
||||||
`?apiVersion=${API_VERSIONS.public.v1}`;
|
`?apiVersion=${API_VERSIONS.public.v1}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFlyout onClose={onClose} size="l" maxWidth={640}>
|
<EuiFlyout onClose={onClose} maxWidth={MAX_FLYOUT_WIDTH}>
|
||||||
<EuiFlyoutHeader hasBorder aria-labelledby="IngestManagerAgentPolicyYamlFlyoutTitle">
|
<EuiFlyoutHeader hasBorder aria-labelledby="IngestManagerAgentPolicyYamlFlyoutTitle">
|
||||||
<EuiTitle size="m">
|
<EuiTitle size="m">
|
||||||
<h2 id="IngestManagerAgentPolicyYamlFlyoutTitle">
|
<h2 id="IngestManagerAgentPolicyYamlFlyoutTitle">
|
||||||
|
|
|
@ -14,6 +14,7 @@ import {
|
||||||
EuiText,
|
EuiText,
|
||||||
EuiSpacer,
|
EuiSpacer,
|
||||||
EuiButtonEmpty,
|
EuiButtonEmpty,
|
||||||
|
useIsWithinMinBreakpoint,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
|
|
||||||
import type { NewPackagePolicyInput, RegistryVarsEntry } from '../../../../../../types';
|
import type { NewPackagePolicyInput, RegistryVarsEntry } from '../../../../../../types';
|
||||||
|
@ -68,12 +69,15 @@ export const PackagePolicyInputConfig: React.FunctionComponent<{
|
||||||
[advancedVars, inputVarsValidationResults.vars]
|
[advancedVars, inputVarsValidationResults.vars]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const isBiggerScreen = useIsWithinMinBreakpoint('xxl');
|
||||||
|
const flexWidth = isBiggerScreen ? 7 : 5;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFlexGrid columns={2}>
|
<EuiFlexGrid columns={2}>
|
||||||
<EuiFlexItem>
|
<EuiFlexItem>
|
||||||
<EuiFlexGroup gutterSize="none" alignItems="flexStart">
|
<EuiFlexGroup gutterSize="none" alignItems="flexStart">
|
||||||
<EuiFlexItem grow={1} />
|
<EuiFlexItem grow={1} />
|
||||||
<EuiFlexItem grow={5}>
|
<EuiFlexItem grow={flexWidth}>
|
||||||
<EuiText>
|
<EuiText>
|
||||||
<h4>
|
<h4>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
|
|
@ -18,6 +18,7 @@ import {
|
||||||
EuiText,
|
EuiText,
|
||||||
EuiSpacer,
|
EuiSpacer,
|
||||||
EuiButtonEmpty,
|
EuiButtonEmpty,
|
||||||
|
useIsWithinMinBreakpoint,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
import { useRouteMatch } from 'react-router-dom';
|
import { useRouteMatch } from 'react-router-dom';
|
||||||
|
|
||||||
|
@ -163,6 +164,9 @@ export const PackagePolicyInputStreamConfig = memo<Props>(
|
||||||
showPipelinesAndMappings,
|
showPipelinesAndMappings,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const isBiggerScreen = useIsWithinMinBreakpoint('xxl');
|
||||||
|
const flexWidth = isBiggerScreen ? 7 : 5;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<EuiFlexGrid columns={2} data-test-subj="streamOptions.inputStreams">
|
<EuiFlexGrid columns={2} data-test-subj="streamOptions.inputStreams">
|
||||||
|
@ -170,7 +174,7 @@ export const PackagePolicyInputStreamConfig = memo<Props>(
|
||||||
<EuiFlexItem>
|
<EuiFlexItem>
|
||||||
<EuiFlexGroup gutterSize="none" alignItems="flexStart">
|
<EuiFlexGroup gutterSize="none" alignItems="flexStart">
|
||||||
<EuiFlexItem grow={1} />
|
<EuiFlexItem grow={1} />
|
||||||
<EuiFlexItem grow={5}>
|
<EuiFlexItem grow={flexWidth}>
|
||||||
<EuiFlexGroup
|
<EuiFlexGroup
|
||||||
gutterSize="none"
|
gutterSize="none"
|
||||||
alignItems="flexStart"
|
alignItems="flexStart"
|
||||||
|
|
|
@ -105,6 +105,7 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<FormGroupResponsiveFields
|
<FormGroupResponsiveFields
|
||||||
|
fullWidth
|
||||||
title={
|
title={
|
||||||
<h3>
|
<h3>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
@ -124,6 +125,7 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{
|
||||||
{/* Name */}
|
{/* Name */}
|
||||||
<EuiFlexItem>
|
<EuiFlexItem>
|
||||||
<EuiFormRow
|
<EuiFormRow
|
||||||
|
fullWidth
|
||||||
isInvalid={!!validationResults.name}
|
isInvalid={!!validationResults.name}
|
||||||
error={validationResults.name}
|
error={validationResults.name}
|
||||||
label={
|
label={
|
||||||
|
@ -134,6 +136,7 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<EuiFieldText
|
<EuiFieldText
|
||||||
|
fullWidth
|
||||||
readOnly={isManaged}
|
readOnly={isManaged}
|
||||||
value={packagePolicy.name}
|
value={packagePolicy.name}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
|
@ -149,6 +152,7 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{
|
||||||
{/* Description */}
|
{/* Description */}
|
||||||
<EuiFlexItem>
|
<EuiFlexItem>
|
||||||
<EuiFormRow
|
<EuiFormRow
|
||||||
|
fullWidth
|
||||||
label={
|
label={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.fleet.createPackagePolicy.stepConfigure.packagePolicyDescriptionInputLabel"
|
id="xpack.fleet.createPackagePolicy.stepConfigure.packagePolicyDescriptionInputLabel"
|
||||||
|
@ -167,6 +171,7 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{
|
||||||
error={validationResults.description}
|
error={validationResults.description}
|
||||||
>
|
>
|
||||||
<EuiFieldText
|
<EuiFieldText
|
||||||
|
fullWidth
|
||||||
readOnly={isManaged}
|
readOnly={isManaged}
|
||||||
value={packagePolicy.description}
|
value={packagePolicy.description}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
|
|
|
@ -369,7 +369,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<AgentPolicyFormRow
|
<AgentPolicyFormRow
|
||||||
fullWidth={true}
|
fullWidth
|
||||||
label={
|
label={
|
||||||
<EuiFlexGroup justifyContent="spaceBetween">
|
<EuiFlexGroup justifyContent="spaceBetween">
|
||||||
<EuiFlexItem>
|
<EuiFlexItem>
|
||||||
|
|
|
@ -16,7 +16,7 @@ import { FLEET_KUBERNETES_PACKAGE } from '../../../../../../../../common';
|
||||||
|
|
||||||
const CenteredRoundedBottomBar = styled(EuiBottomBar)`
|
const CenteredRoundedBottomBar = styled(EuiBottomBar)`
|
||||||
max-width: 820px;
|
max-width: 820px;
|
||||||
margin: 0 auto;
|
margin: 0 auto !important; /* !important is needed for serverless */
|
||||||
border-radius: 8px 8px 0px 0px;
|
border-radius: 8px 8px 0px 0px;
|
||||||
`;
|
`;
|
||||||
const NoAnimationCenteredRoundedBottomBar = styled(CenteredRoundedBottomBar)`
|
const NoAnimationCenteredRoundedBottomBar = styled(CenteredRoundedBottomBar)`
|
||||||
|
@ -50,7 +50,7 @@ export const CreatePackagePolicyBottomBar: React.FC<{
|
||||||
}) => {
|
}) => {
|
||||||
const Bar = noAnimation ? NoAnimationCenteredRoundedBottomBar : CenteredRoundedBottomBar;
|
const Bar = noAnimation ? NoAnimationCenteredRoundedBottomBar : CenteredRoundedBottomBar;
|
||||||
return (
|
return (
|
||||||
<Bar position="sticky">
|
<Bar>
|
||||||
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
|
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
|
||||||
<EuiFlexItem grow={false}>
|
<EuiFlexItem grow={false}>
|
||||||
<EuiFlexItem grow={false}>
|
<EuiFlexItem grow={false}>
|
||||||
|
|
|
@ -17,6 +17,7 @@ import {
|
||||||
EuiDescriptionListDescription,
|
EuiDescriptionListDescription,
|
||||||
EuiButtonEmpty,
|
EuiButtonEmpty,
|
||||||
EuiSpacer,
|
EuiSpacer,
|
||||||
|
useIsWithinMinBreakpoint,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
|
|
||||||
import { useAgentless } from '../hooks/setup_technology';
|
import { useAgentless } from '../hooks/setup_technology';
|
||||||
|
@ -251,7 +252,8 @@ export const CreatePackagePolicySinglePageLayout: React.FunctionComponent<{
|
||||||
</EuiDescriptionList>
|
</EuiDescriptionList>
|
||||||
) : undefined;
|
) : undefined;
|
||||||
|
|
||||||
const maxWidth = 770;
|
const isBiggerScreen = useIsWithinMinBreakpoint('xxl');
|
||||||
|
const maxWidth = isBiggerScreen ? 1200 : 800;
|
||||||
return (
|
return (
|
||||||
<WithHeaderLayout
|
<WithHeaderLayout
|
||||||
restrictHeaderWidth={maxWidth}
|
restrictHeaderWidth={maxWidth}
|
||||||
|
|
|
@ -57,7 +57,7 @@ const pickAgentPolicyKeysToSend = (agentPolicy: AgentPolicy) =>
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const FormWrapper = styled.div`
|
const FormWrapper = styled.div`
|
||||||
max-width: 800px;
|
max-width: 1200px;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -36,6 +36,7 @@ import type {
|
||||||
|
|
||||||
import type { UpgradePackagePolicyDryRunResponse } from '../../../../../../../common/types/rest_spec';
|
import type { UpgradePackagePolicyDryRunResponse } from '../../../../../../../common/types/rest_spec';
|
||||||
import { useStartServices } from '../../../../hooks';
|
import { useStartServices } from '../../../../hooks';
|
||||||
|
import { MAX_FLYOUT_WIDTH } from '../../../../constants';
|
||||||
|
|
||||||
const FlyoutBody = styled(EuiFlyoutBody)`
|
const FlyoutBody = styled(EuiFlyoutBody)`
|
||||||
.euiFlyoutBody__overflowContent {
|
.euiFlyoutBody__overflowContent {
|
||||||
|
@ -167,7 +168,10 @@ export const UpgradeStatusCallout: React.FunctionComponent<{
|
||||||
<>
|
<>
|
||||||
{isPreviousVersionFlyoutOpen && currentPackagePolicy && (
|
{isPreviousVersionFlyoutOpen && currentPackagePolicy && (
|
||||||
<EuiPortal>
|
<EuiPortal>
|
||||||
<EuiFlyout onClose={() => setIsPreviousVersionFlyoutOpen(false)} size="l" maxWidth={640}>
|
<EuiFlyout
|
||||||
|
onClose={() => setIsPreviousVersionFlyoutOpen(false)}
|
||||||
|
maxWidth={MAX_FLYOUT_WIDTH}
|
||||||
|
>
|
||||||
<EuiFlyoutHeader hasBorder>
|
<EuiFlyoutHeader hasBorder>
|
||||||
<EuiTitle size="m">
|
<EuiTitle size="m">
|
||||||
<h2 id="FleetPackagePolicyPreviousVersionFlyoutTitle">
|
<h2 id="FleetPackagePolicyPreviousVersionFlyoutTitle">
|
||||||
|
|
|
@ -25,6 +25,7 @@ import {
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
|
|
||||||
import type { NewAgentPolicy, AgentPolicy } from '../../../../types';
|
import type { NewAgentPolicy, AgentPolicy } from '../../../../types';
|
||||||
|
import { MAX_FLYOUT_WIDTH } from '../../../../constants';
|
||||||
import { useAuthz, useStartServices, sendCreateAgentPolicy } from '../../../../hooks';
|
import { useAuthz, useStartServices, sendCreateAgentPolicy } from '../../../../hooks';
|
||||||
import { AgentPolicyForm, agentPolicyFormValidation } from '../../components';
|
import { AgentPolicyForm, agentPolicyFormValidation } from '../../components';
|
||||||
import { DevtoolsRequestFlyoutButton } from '../../../../components';
|
import { DevtoolsRequestFlyoutButton } from '../../../../components';
|
||||||
|
@ -191,7 +192,7 @@ export const CreateAgentPolicyFlyout: React.FunctionComponent<Props> = ({
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FlyoutWithHigherZIndex onClose={() => onClose()} size="l" maxWidth={400} {...restOfProps}>
|
<FlyoutWithHigherZIndex onClose={() => onClose()} {...restOfProps} maxWidth={MAX_FLYOUT_WIDTH}>
|
||||||
{header}
|
{header}
|
||||||
{body}
|
{body}
|
||||||
{footer}
|
{footer}
|
||||||
|
|
|
@ -25,6 +25,7 @@ import {
|
||||||
|
|
||||||
import type { Agent } from '../../../../types';
|
import type { Agent } from '../../../../types';
|
||||||
import { useStartServices } from '../../../../hooks';
|
import { useStartServices } from '../../../../hooks';
|
||||||
|
import { MAX_FLYOUT_WIDTH } from '../../../../constants';
|
||||||
|
|
||||||
export const AgentDetailsJsonFlyout = memo<{ agent: Agent; onClose: () => void }>(
|
export const AgentDetailsJsonFlyout = memo<{ agent: Agent; onClose: () => void }>(
|
||||||
({ agent, onClose }) => {
|
({ agent, onClose }) => {
|
||||||
|
@ -44,7 +45,7 @@ export const AgentDetailsJsonFlyout = memo<{ agent: Agent; onClose: () => void }
|
||||||
const { docLinks } = useStartServices();
|
const { docLinks } = useStartServices();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFlyout onClose={onClose} size="l" maxWidth={640}>
|
<EuiFlyout onClose={onClose} maxWidth={MAX_FLYOUT_WIDTH}>
|
||||||
<EuiFlyoutHeader hasBorder>
|
<EuiFlyoutHeader hasBorder>
|
||||||
<EuiTitle size="m">
|
<EuiTitle size="m">
|
||||||
<h2>
|
<h2>
|
||||||
|
|
|
@ -28,7 +28,7 @@ import {
|
||||||
useStartServices,
|
useStartServices,
|
||||||
sendPostRetrieveAgentsByActions,
|
sendPostRetrieveAgentsByActions,
|
||||||
} from '../../../../../hooks';
|
} from '../../../../../hooks';
|
||||||
import { SO_SEARCH_LIMIT } from '../../../../../constants';
|
import { SO_SEARCH_LIMIT, MAX_FLYOUT_WIDTH } from '../../../../../constants';
|
||||||
|
|
||||||
import { getKuery } from '../../utils/get_kuery';
|
import { getKuery } from '../../utils/get_kuery';
|
||||||
|
|
||||||
|
@ -129,8 +129,8 @@ export const AgentActivityFlyout: React.FunctionComponent<{
|
||||||
refreshAgentActivity = false;
|
refreshAgentActivity = false;
|
||||||
onClose();
|
onClose();
|
||||||
}}
|
}}
|
||||||
size="m"
|
|
||||||
paddingSize="none"
|
paddingSize="none"
|
||||||
|
maxWidth={MAX_FLYOUT_WIDTH}
|
||||||
>
|
>
|
||||||
<EuiFlyoutHeader aria-labelledby="FleetAgentActivityFlyoutTitle">
|
<EuiFlyoutHeader aria-labelledby="FleetAgentActivityFlyoutTitle">
|
||||||
<EuiPanel borderRadius="none" hasShadow={false} hasBorder={true}>
|
<EuiPanel borderRadius="none" hasShadow={false} hasBorder={true}>
|
||||||
|
|
|
@ -28,7 +28,7 @@ import {
|
||||||
import { i18n } from '@kbn/i18n';
|
import { i18n } from '@kbn/i18n';
|
||||||
|
|
||||||
import type { DownloadSource, FleetProxy } from '../../../../types';
|
import type { DownloadSource, FleetProxy } from '../../../../types';
|
||||||
import { FLYOUT_MAX_WIDTH } from '../../constants';
|
import { MAX_FLYOUT_WIDTH } from '../../../../constants';
|
||||||
import { useBreadcrumbs, useStartServices } from '../../../../hooks';
|
import { useBreadcrumbs, useStartServices } from '../../../../hooks';
|
||||||
import { ProxyWarning } from '../fleet_proxies_table/proxy_warning';
|
import { ProxyWarning } from '../fleet_proxies_table/proxy_warning';
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ export const EditDownloadSourceFlyout: React.FunctionComponent<EditDownloadSourc
|
||||||
[proxies]
|
[proxies]
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<EuiFlyout maxWidth={FLYOUT_MAX_WIDTH} onClose={onClose}>
|
<EuiFlyout onClose={onClose} maxWidth={MAX_FLYOUT_WIDTH}>
|
||||||
<EuiFlyoutHeader hasBorder={true}>
|
<EuiFlyoutHeader hasBorder={true}>
|
||||||
<EuiTitle size="m">
|
<EuiTitle size="m">
|
||||||
<h2 id="FleetEditDownloadSourcesFlyoutTitle">
|
<h2 id="FleetEditDownloadSourcesFlyoutTitle">
|
||||||
|
|
|
@ -22,8 +22,8 @@ import {
|
||||||
EuiSpacer,
|
EuiSpacer,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
|
|
||||||
import { FLYOUT_MAX_WIDTH } from '../../constants';
|
|
||||||
import type { FleetProxy } from '../../../../types';
|
import type { FleetProxy } from '../../../../types';
|
||||||
|
import { MAX_FLYOUT_WIDTH } from '../../../../constants';
|
||||||
import { TextInput, TextAreaInput } from '../form';
|
import { TextInput, TextAreaInput } from '../form';
|
||||||
|
|
||||||
import { ProxyWarning } from '../fleet_proxies_table/proxy_warning';
|
import { ProxyWarning } from '../fleet_proxies_table/proxy_warning';
|
||||||
|
@ -43,7 +43,7 @@ export const FleetProxyFlyout: React.FunctionComponent<FleetProxyFlyoutProps> =
|
||||||
const { inputs } = form;
|
const { inputs } = form;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFlyout maxWidth={FLYOUT_MAX_WIDTH} onClose={onClose}>
|
<EuiFlyout onClose={onClose} maxWidth={MAX_FLYOUT_WIDTH}>
|
||||||
<EuiFlyoutHeader hasBorder={true}>
|
<EuiFlyoutHeader hasBorder={true}>
|
||||||
<EuiTitle size="m">
|
<EuiTitle size="m">
|
||||||
<h2>
|
<h2>
|
||||||
|
|
|
@ -45,8 +45,9 @@ import { ExperimentalFeaturesService } from '../../../../../../services';
|
||||||
|
|
||||||
import { outputType, RESERVED_CONFIG_YML_KEYS } from '../../../../../../../common/constants';
|
import { outputType, RESERVED_CONFIG_YML_KEYS } from '../../../../../../../common/constants';
|
||||||
|
|
||||||
|
import { MAX_FLYOUT_WIDTH } from '../../../../constants';
|
||||||
|
|
||||||
import type { Output, FleetProxy } from '../../../../types';
|
import type { Output, FleetProxy } from '../../../../types';
|
||||||
import { FLYOUT_MAX_WIDTH } from '../../constants';
|
|
||||||
|
|
||||||
import { useBreadcrumbs, useFleetStatus, useStartServices } from '../../../../hooks';
|
import { useBreadcrumbs, useFleetStatus, useStartServices } from '../../../../hooks';
|
||||||
|
|
||||||
|
@ -230,7 +231,7 @@ export const EditOutputFlyout: React.FunctionComponent<EditOutputFlyoutProps> =
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFlyout maxWidth={FLYOUT_MAX_WIDTH} onClose={onClose}>
|
<EuiFlyout onClose={onClose} maxWidth={MAX_FLYOUT_WIDTH}>
|
||||||
<EuiFlyoutHeader hasBorder={true}>
|
<EuiFlyoutHeader hasBorder={true}>
|
||||||
<EuiTitle size="m">
|
<EuiTitle size="m">
|
||||||
<h2 id="FleetEditOutputFlyoutTitle">
|
<h2 id="FleetEditOutputFlyoutTitle">
|
||||||
|
@ -437,6 +438,7 @@ export const EditOutputFlyout: React.FunctionComponent<EditOutputFlyoutProps> =
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<EuiSelect
|
<EuiSelect
|
||||||
|
fullWidth
|
||||||
data-test-subj="settingsOutputsFlyout.presetInput"
|
data-test-subj="settingsOutputsFlyout.presetInput"
|
||||||
{...inputs.presetInput.props}
|
{...inputs.presetInput.props}
|
||||||
onChange={(e) => inputs.presetInput.setValue(e.target.value)}
|
onChange={(e) => inputs.presetInput.setValue(e.target.value)}
|
||||||
|
|
|
@ -29,8 +29,8 @@ import {
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
|
|
||||||
import { MultiRowInput } from '../multi_row_input';
|
import { MultiRowInput } from '../multi_row_input';
|
||||||
|
import { MAX_FLYOUT_WIDTH } from '../../../../constants';
|
||||||
import { useStartServices } from '../../../../hooks';
|
import { useStartServices } from '../../../../hooks';
|
||||||
import { FLYOUT_MAX_WIDTH } from '../../constants';
|
|
||||||
import type { FleetServerHost, FleetProxy } from '../../../../types';
|
import type { FleetServerHost, FleetProxy } from '../../../../types';
|
||||||
import { TextInput } from '../form';
|
import { TextInput } from '../form';
|
||||||
import { ProxyWarning } from '../fleet_proxies_table/proxy_warning';
|
import { ProxyWarning } from '../fleet_proxies_table/proxy_warning';
|
||||||
|
@ -61,7 +61,7 @@ export const FleetServerHostsFlyout: React.FunctionComponent<FleetServerHostsFly
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFlyout maxWidth={FLYOUT_MAX_WIDTH} onClose={onClose}>
|
<EuiFlyout onClose={onClose} maxWidth={MAX_FLYOUT_WIDTH}>
|
||||||
<EuiFlyoutHeader hasBorder={true}>
|
<EuiFlyoutHeader hasBorder={true}>
|
||||||
<>
|
<>
|
||||||
<EuiTitle size="m">
|
<EuiTitle size="m">
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const FLYOUT_MAX_WIDTH = 670;
|
|
|
@ -11,14 +11,13 @@ import { EuiPortal } from '@elastic/eui';
|
||||||
import type { History } from 'history';
|
import type { History } from 'history';
|
||||||
import { Redirect } from 'react-router-dom';
|
import { Redirect } from 'react-router-dom';
|
||||||
import { Router, Routes, Route } from '@kbn/shared-ux-router';
|
import { Router, Routes, Route } from '@kbn/shared-ux-router';
|
||||||
import useObservable from 'react-use/lib/useObservable';
|
|
||||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
||||||
|
import useObservable from 'react-use/lib/useObservable';
|
||||||
|
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
|
||||||
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
|
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
|
||||||
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
|
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
|
||||||
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
|
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
|
||||||
import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
|
|
||||||
|
|
||||||
import type { FleetConfigType, FleetStartServices } from '../../plugin';
|
import type { FleetConfigType, FleetStartServices } from '../../plugin';
|
||||||
|
|
||||||
|
@ -73,13 +72,22 @@ export const IntegrationsAppContext: React.FC<{
|
||||||
setHeaderActionMenu,
|
setHeaderActionMenu,
|
||||||
fleetStatus,
|
fleetStatus,
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useObservable(startServices.theme.theme$);
|
const XXL_BREAKPOINT = 1600;
|
||||||
const isDarkMode = theme && theme.darkMode;
|
const darkModeObservable = useObservable(startServices.theme.theme$);
|
||||||
|
const isDarkMode = darkModeObservable && darkModeObservable.darkMode;
|
||||||
|
|
||||||
const CloudContext = startServices.cloud?.CloudContextProvider || EmptyContext;
|
const CloudContext = startServices.cloud?.CloudContextProvider || EmptyContext;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<KibanaRenderContextProvider {...startServices}>
|
<KibanaRenderContextProvider
|
||||||
|
{...startServices}
|
||||||
|
theme={startServices.theme}
|
||||||
|
modify={{
|
||||||
|
breakpoint: {
|
||||||
|
xxl: XXL_BREAKPOINT,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
<RedirectAppLinks
|
<RedirectAppLinks
|
||||||
coreStart={{
|
coreStart={{
|
||||||
application: startServices.application,
|
application: startServices.application,
|
||||||
|
@ -88,6 +96,8 @@ export const IntegrationsAppContext: React.FC<{
|
||||||
<KibanaContextProvider services={{ ...startServices }}>
|
<KibanaContextProvider services={{ ...startServices }}>
|
||||||
<ConfigContext.Provider value={config}>
|
<ConfigContext.Provider value={config}>
|
||||||
<KibanaVersionContext.Provider value={kibanaVersion}>
|
<KibanaVersionContext.Provider value={kibanaVersion}>
|
||||||
|
{/* This should be removed since theme is passed to `KibanaRenderContextProvider`,
|
||||||
|
however, removing this breaks usages of `props.theme.eui` in styled components */}
|
||||||
<EuiThemeProvider darkMode={isDarkMode}>
|
<EuiThemeProvider darkMode={isDarkMode}>
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<ReactQueryDevtools initialIsOpen={false} />
|
<ReactQueryDevtools initialIsOpen={false} />
|
||||||
|
|
|
@ -99,7 +99,7 @@ export const SearchBox: FunctionComponent<Props> = ({
|
||||||
onChange={(e) => onQueryChange(e)}
|
onChange={(e) => onQueryChange(e)}
|
||||||
isClearable={true}
|
isClearable={true}
|
||||||
incremental={true}
|
incremental={true}
|
||||||
fullWidth={true}
|
fullWidth
|
||||||
prepend={
|
prepend={
|
||||||
selectedCategoryTitle ? (
|
selectedCategoryTitle ? (
|
||||||
<EuiText
|
<EuiText
|
||||||
|
|
|
@ -283,7 +283,7 @@ export const AssetsPage = ({ packageInfo, refetchPackageInfo }: AssetsPanelProps
|
||||||
return (
|
return (
|
||||||
<EuiFlexGroup alignItems="flexStart">
|
<EuiFlexGroup alignItems="flexStart">
|
||||||
<EuiFlexItem grow={1} />
|
<EuiFlexItem grow={1} />
|
||||||
<EuiFlexItem grow={6}>
|
<EuiFlexItem grow={7}>
|
||||||
{fetchError && (
|
{fetchError && (
|
||||||
<>
|
<>
|
||||||
<Error
|
<Error
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
|
||||||
import {
|
import {
|
||||||
EuiFlexGroup,
|
EuiFlexGroup,
|
||||||
EuiFlexItem,
|
EuiFlexItem,
|
||||||
|
@ -28,10 +27,6 @@ import { PrereleaseCallout } from '../overview/overview';
|
||||||
|
|
||||||
import { isPackagePrerelease } from '../../../../../../../../common/services';
|
import { isPackagePrerelease } from '../../../../../../../../common/services';
|
||||||
|
|
||||||
const FlexItemWithMaxWidth = styled(EuiFlexItem)`
|
|
||||||
max-width: 1000px;
|
|
||||||
`;
|
|
||||||
|
|
||||||
interface ConfigsProps {
|
interface ConfigsProps {
|
||||||
packageInfo: PackageInfo;
|
packageInfo: PackageInfo;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +57,7 @@ export const Configs: React.FC<ConfigsProps> = ({ packageInfo }) => {
|
||||||
return (
|
return (
|
||||||
<EuiFlexGroup data-test-subj="epm.Configs" alignItems="flexStart">
|
<EuiFlexGroup data-test-subj="epm.Configs" alignItems="flexStart">
|
||||||
<EuiFlexItem grow={1} />
|
<EuiFlexItem grow={1} />
|
||||||
<FlexItemWithMaxWidth grow={6}>
|
<EuiFlexItem grow={7}>
|
||||||
{isLoading && !configs ? (
|
{isLoading && !configs ? (
|
||||||
<EuiSkeletonText lines={10} />
|
<EuiSkeletonText lines={10} />
|
||||||
) : (
|
) : (
|
||||||
|
@ -122,7 +117,7 @@ export const Configs: React.FC<ConfigsProps> = ({ packageInfo }) => {
|
||||||
</EuiCodeBlock>
|
</EuiCodeBlock>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</FlexItemWithMaxWidth>
|
</EuiFlexItem>
|
||||||
</EuiFlexGroup>
|
</EuiFlexGroup>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,7 +25,7 @@ export const CustomViewPage: React.FC<Props> = memo(({ packageInfo }) => {
|
||||||
return customViewExtension ? (
|
return customViewExtension ? (
|
||||||
<EuiFlexGroup alignItems="flexStart">
|
<EuiFlexGroup alignItems="flexStart">
|
||||||
<EuiFlexItem grow={1} />
|
<EuiFlexItem grow={1} />
|
||||||
<EuiFlexItem grow={6}>
|
<EuiFlexItem grow={7}>
|
||||||
<ExtensionWrapper>
|
<ExtensionWrapper>
|
||||||
<customViewExtension.Component pkgkey={pkgkey} packageInfo={packageInfo} />
|
<customViewExtension.Component pkgkey={pkgkey} packageInfo={packageInfo} />
|
||||||
</ExtensionWrapper>
|
</ExtensionWrapper>
|
||||||
|
|
|
@ -68,52 +68,44 @@ export const DocumentationPage: React.FunctionComponent<Props> = ({ packageInfo,
|
||||||
const { docLinks } = useStartServices();
|
const { docLinks } = useStartServices();
|
||||||
const showDocumentation = hasDocumentation({ packageInfo, integration });
|
const showDocumentation = hasDocumentation({ packageInfo, integration });
|
||||||
|
|
||||||
const content = (
|
|
||||||
<>
|
|
||||||
<EuiFlexGroup gutterSize="m" justifyContent="spaceBetween">
|
|
||||||
<EuiFlexItem grow={6}>
|
|
||||||
<EuiText>
|
|
||||||
<FormattedMessage
|
|
||||||
id="xpack.fleet.epm.packageDetails.apiReference.description"
|
|
||||||
defaultMessage="This documents all the inputs, streams, and variables available to use this integration programmatically via the Fleet Kibana API. {learnMore}"
|
|
||||||
values={{
|
|
||||||
learnMore: (
|
|
||||||
<EuiLink href={docLinks.links.fleet.api} external={true}>
|
|
||||||
<FormattedMessage
|
|
||||||
id="xpack.fleet.epm.packageDetails.apiReference.learnMoreLink"
|
|
||||||
defaultMessage="Learn more"
|
|
||||||
/>
|
|
||||||
</EuiLink>
|
|
||||||
),
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</EuiText>
|
|
||||||
</EuiFlexItem>
|
|
||||||
</EuiFlexGroup>
|
|
||||||
<EuiSpacer size="m" />
|
|
||||||
{showDocumentation ? (
|
|
||||||
<>
|
|
||||||
<PackageVars vars={packageInfo.vars} />
|
|
||||||
<Inputs packageInfo={packageInfo} integration={integration} />
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<EuiCallOut
|
|
||||||
title={
|
|
||||||
<FormattedMessage
|
|
||||||
id="xpack.fleet.epm.packageDetails.apiReference.noDocumentationMessage"
|
|
||||||
defaultMessage="This integration has no references available."
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<EuiSpacer size="m" />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFlexGroup alignItems="flexStart">
|
<EuiFlexGroup alignItems="flexStart">
|
||||||
<EuiFlexItem grow={1} />
|
<EuiFlexItem grow={1} />
|
||||||
<EuiFlexItem grow={6}>{content}</EuiFlexItem>
|
<EuiFlexItem grow={7}>
|
||||||
|
<EuiText>
|
||||||
|
<FormattedMessage
|
||||||
|
id="xpack.fleet.epm.packageDetails.apiReference.description"
|
||||||
|
defaultMessage="This documents all the inputs, streams, and variables available to use this integration programmatically via the Fleet Kibana API. {learnMore}"
|
||||||
|
values={{
|
||||||
|
learnMore: (
|
||||||
|
<EuiLink href={docLinks.links.fleet.api} external={true}>
|
||||||
|
<FormattedMessage
|
||||||
|
id="xpack.fleet.epm.packageDetails.apiReference.learnMoreLink"
|
||||||
|
defaultMessage="Learn more"
|
||||||
|
/>
|
||||||
|
</EuiLink>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</EuiText>
|
||||||
|
<EuiSpacer size="m" />
|
||||||
|
{showDocumentation ? (
|
||||||
|
<>
|
||||||
|
<PackageVars vars={packageInfo.vars} />
|
||||||
|
<Inputs packageInfo={packageInfo} integration={integration} />
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<EuiCallOut
|
||||||
|
title={
|
||||||
|
<FormattedMessage
|
||||||
|
id="xpack.fleet.epm.packageDetails.apiReference.noDocumentationMessage"
|
||||||
|
defaultMessage="This integration has no references available."
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<EuiSpacer size="m" />
|
||||||
|
</EuiFlexItem>
|
||||||
</EuiFlexGroup>
|
</EuiFlexGroup>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -355,7 +355,7 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps
|
||||||
<AgentPolicyRefreshContext.Provider value={{ refresh: refreshPolicies }}>
|
<AgentPolicyRefreshContext.Provider value={{ refresh: refreshPolicies }}>
|
||||||
<EuiFlexGroup alignItems="flexStart">
|
<EuiFlexGroup alignItems="flexStart">
|
||||||
<EuiFlexItem grow={1} />
|
<EuiFlexItem grow={1} />
|
||||||
<EuiFlexItem grow={6}>
|
<EuiFlexItem grow={7}>
|
||||||
<EuiBasicTable
|
<EuiBasicTable
|
||||||
items={packageAndAgentPolicies || []}
|
items={packageAndAgentPolicies || []}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|
|
@ -256,7 +256,7 @@ export const SettingsPage: React.FC<Props> = memo(({ packageInfo, startServices
|
||||||
<>
|
<>
|
||||||
<EuiFlexGroup alignItems="flexStart">
|
<EuiFlexGroup alignItems="flexStart">
|
||||||
<EuiFlexItem grow={1} />
|
<EuiFlexItem grow={1} />
|
||||||
<EuiFlexItem grow={6}>
|
<EuiFlexItem grow={7}>
|
||||||
<EuiText>
|
<EuiText>
|
||||||
<EuiTitle>
|
<EuiTitle>
|
||||||
<h3>
|
<h3>
|
||||||
|
|
|
@ -96,7 +96,7 @@ export const AgentPolicySelection: React.FC<Props> = (props) => {
|
||||||
</EuiText>
|
</EuiText>
|
||||||
<EuiSpacer size="m" />
|
<EuiSpacer size="m" />
|
||||||
<AgentPolicyFormRow
|
<AgentPolicyFormRow
|
||||||
fullWidth={true}
|
fullWidth
|
||||||
label={
|
label={
|
||||||
authz.fleet.allAgentPolicies && (
|
authz.fleet.allAgentPolicies && (
|
||||||
<EuiFlexGroup justifyContent="flexEnd">
|
<EuiFlexGroup justifyContent="flexEnd">
|
||||||
|
|
|
@ -29,7 +29,7 @@ import {
|
||||||
useAgentEnrollmentFlyoutData,
|
useAgentEnrollmentFlyoutData,
|
||||||
useFleetServerHostsForPolicy,
|
useFleetServerHostsForPolicy,
|
||||||
} from '../../hooks';
|
} from '../../hooks';
|
||||||
import { FLEET_SERVER_PACKAGE } from '../../constants';
|
import { FLEET_SERVER_PACKAGE, MAX_FLYOUT_WIDTH } from '../../constants';
|
||||||
import type { PackagePolicy, AgentPolicy } from '../../types';
|
import type { PackagePolicy, AgentPolicy } from '../../types';
|
||||||
|
|
||||||
import { Loading } from '..';
|
import { Loading } from '..';
|
||||||
|
@ -106,7 +106,7 @@ export const AgentEnrollmentFlyout: React.FunctionComponent<FlyOutProps> = ({
|
||||||
const { cloudSecurityIntegration } = useCloudSecurityIntegration(selectedPolicy ?? undefined);
|
const { cloudSecurityIntegration } = useCloudSecurityIntegration(selectedPolicy ?? undefined);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EuiFlyout data-test-subj="agentEnrollmentFlyout" onClose={onClose} size="m">
|
<EuiFlyout data-test-subj="agentEnrollmentFlyout" onClose={onClose} maxWidth={MAX_FLYOUT_WIDTH}>
|
||||||
<EuiFlyoutHeader hasBorder aria-labelledby="FleetAgentEnrollmentFlyoutTitle">
|
<EuiFlyoutHeader hasBorder aria-labelledby="FleetAgentEnrollmentFlyoutTitle">
|
||||||
<EuiTitle size="m">
|
<EuiTitle size="m">
|
||||||
<h2 id="FleetAgentEnrollmentFlyoutTitle">
|
<h2 id="FleetAgentEnrollmentFlyoutTitle">
|
||||||
|
|
|
@ -22,8 +22,12 @@ const Container = styled.div`
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Wrapper = styled.div<{ maxWidth?: number }>`
|
const Wrapper = styled.div<{ maxWidth?: number | string }>`
|
||||||
max-width: ${(props) => props.maxWidth || 1200}px;
|
max-width: ${(props) =>
|
||||||
|
typeof props.maxWidth === 'number'
|
||||||
|
? `${props.maxWidth || 1200}px` || props.maxWidth
|
||||||
|
: props.maxWidth};
|
||||||
|
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
padding-top: ${(props) => props.theme.eui.euiSizeXL};
|
padding-top: ${(props) => props.theme.eui.euiSizeXL};
|
||||||
|
@ -39,7 +43,7 @@ const Tabs = styled(EuiTabs)`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export interface HeaderProps {
|
export interface HeaderProps {
|
||||||
maxWidth?: number;
|
maxWidth?: number | string;
|
||||||
leftColumn?: JSX.Element;
|
leftColumn?: JSX.Element;
|
||||||
rightColumn?: JSX.Element;
|
rightColumn?: JSX.Element;
|
||||||
rightColumnGrow?: EuiFlexItemProps['grow'];
|
rightColumnGrow?: EuiFlexItemProps['grow'];
|
||||||
|
|
|
@ -16,7 +16,6 @@ export { Header } from './header';
|
||||||
export { NewEnrollmentTokenModal } from './new_enrollment_key_modal';
|
export { NewEnrollmentTokenModal } from './new_enrollment_key_modal';
|
||||||
export { AgentPolicyPackageBadge } from './agent_policy_package_badge';
|
export { AgentPolicyPackageBadge } from './agent_policy_package_badge';
|
||||||
export { AgentPolicyPackageBadges } from './agent_policy_package_badges';
|
export { AgentPolicyPackageBadges } from './agent_policy_package_badges';
|
||||||
export { DangerEuiContextMenuItem } from './danger_eui_context_menu_item';
|
|
||||||
export { PackagePolicyDeleteProvider } from './package_policy_delete_provider';
|
export { PackagePolicyDeleteProvider } from './package_policy_delete_provider';
|
||||||
export { PackagePolicyActionsMenu } from './package_policy_actions_menu';
|
export { PackagePolicyActionsMenu } from './package_policy_actions_menu';
|
||||||
export { AddAgentHelpPopover } from './add_agent_help_popover';
|
export { AddAgentHelpPopover } from './add_agent_help_popover';
|
||||||
|
|
|
@ -31,6 +31,7 @@ import {
|
||||||
useGetUninstallToken,
|
useGetUninstallToken,
|
||||||
useGetUninstallTokens,
|
useGetUninstallTokens,
|
||||||
} from '../../hooks/use_request/uninstall_tokens';
|
} from '../../hooks/use_request/uninstall_tokens';
|
||||||
|
import { MAX_FLYOUT_WIDTH } from '../../constants';
|
||||||
|
|
||||||
import { UninstallCommandsPerPlatform } from './uninstall_commands_per_platform';
|
import { UninstallCommandsPerPlatform } from './uninstall_commands_per_platform';
|
||||||
import type { UninstallCommandTarget } from './types';
|
import type { UninstallCommandTarget } from './types';
|
||||||
|
@ -185,7 +186,11 @@ export const UninstallCommandFlyout: React.FunctionComponent<UninstallCommandFly
|
||||||
target,
|
target,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<EuiFlyout onClose={onClose} data-test-subj="uninstall-command-flyout">
|
<EuiFlyout
|
||||||
|
onClose={onClose}
|
||||||
|
data-test-subj="uninstall-command-flyout"
|
||||||
|
maxWidth={MAX_FLYOUT_WIDTH}
|
||||||
|
>
|
||||||
<EuiFlyoutHeader hasBorder>
|
<EuiFlyoutHeader hasBorder>
|
||||||
<EuiTitle size="m">
|
<EuiTitle size="m">
|
||||||
<h2>
|
<h2>
|
||||||
|
|
|
@ -60,3 +60,5 @@ export type TourKey = keyof typeof TOUR_STORAGE_KEYS;
|
||||||
export type TOUR_STORAGE_CONFIG = {
|
export type TOUR_STORAGE_CONFIG = {
|
||||||
[k in TourKey]: TourConfig;
|
[k in TourKey]: TourConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const MAX_FLYOUT_WIDTH = 800;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { EuiPageBody, EuiSpacer } from '@elastic/eui';
|
import { EuiPageBody, EuiSpacer, useIsWithinMinBreakpoint } from '@elastic/eui';
|
||||||
|
|
||||||
import type { HeaderProps } from '../components';
|
import type { HeaderProps } from '../components';
|
||||||
import { Header } from '../components';
|
import { Header } from '../components';
|
||||||
|
@ -26,23 +26,28 @@ export const WithHeaderLayout: React.FC<WithHeaderLayoutProps> = ({
|
||||||
children,
|
children,
|
||||||
'data-test-subj': dataTestSubj,
|
'data-test-subj': dataTestSubj,
|
||||||
...rest
|
...rest
|
||||||
}) => (
|
}) => {
|
||||||
<Wrapper>
|
const isBiggerScreen = useIsWithinMinBreakpoint('xxl');
|
||||||
<Header
|
const fullWidthSize = isBiggerScreen ? '80%' : '100%';
|
||||||
maxWidth={restrictHeaderWidth}
|
|
||||||
data-test-subj={dataTestSubj ? `${dataTestSubj}_header` : undefined}
|
return (
|
||||||
{...rest}
|
<Wrapper>
|
||||||
/>
|
<Header
|
||||||
<Page
|
maxWidth={restrictHeaderWidth || fullWidthSize}
|
||||||
restrictWidth={restrictWidth || 1200}
|
data-test-subj={dataTestSubj ? `${dataTestSubj}_header` : undefined}
|
||||||
data-test-subj={dataTestSubj ? `${dataTestSubj}_page` : undefined}
|
{...rest}
|
||||||
>
|
/>
|
||||||
<EuiPageBody>
|
<Page
|
||||||
<ContentWrapper>
|
restrictWidth={restrictWidth || fullWidthSize}
|
||||||
<EuiSpacer size="m" />
|
data-test-subj={dataTestSubj ? `${dataTestSubj}_page` : undefined}
|
||||||
{children}
|
>
|
||||||
</ContentWrapper>
|
<EuiPageBody>
|
||||||
</EuiPageBody>
|
<ContentWrapper>
|
||||||
</Page>
|
<EuiSpacer size="m" />
|
||||||
</Wrapper>
|
{children}
|
||||||
);
|
</ContentWrapper>
|
||||||
|
</EuiPageBody>
|
||||||
|
</Page>
|
||||||
|
</Wrapper>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue