-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Revamp integration detail page (#90887)
* Extract integration detail page changes from POC * Remove unneccessary link wrappers * Remove unused import * Fix method name * Fix linting
- Loading branch information
Showing
40 changed files
with
900 additions
and
758 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...ins/fleet/public/applications/fleet/sections/epm/screens/detail/components/icon_panel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import { EuiIcon, EuiPanel } from '@elastic/eui'; | ||
import { usePackageIconType, UsePackageIconType } from '../../../../../hooks'; | ||
import { Loading } from '../../../../../components'; | ||
|
||
const PanelWrapper = styled.div` | ||
// NOTE: changes to the width here will impact navigation tabs page layout under integration package details | ||
width: ${(props) => | ||
parseFloat(props.theme.eui.euiSize) * 6 + parseFloat(props.theme.eui.euiSizeXL) * 2}px; | ||
height: 1px; | ||
z-index: 1; | ||
`; | ||
|
||
const Panel = styled(EuiPanel)` | ||
padding: ${(props) => props.theme.eui.spacerSizes.xl}; | ||
margin-bottom: -100%; | ||
svg, | ||
img { | ||
height: ${(props) => parseFloat(props.theme.eui.euiSize) * 6}px; | ||
width: ${(props) => parseFloat(props.theme.eui.euiSize) * 6}px; | ||
} | ||
.euiFlexItem { | ||
height: ${(props) => parseFloat(props.theme.eui.euiSize) * 6}px; | ||
justify-content: center; | ||
} | ||
`; | ||
|
||
export function IconPanel({ | ||
packageName, | ||
version, | ||
icons, | ||
}: Pick<UsePackageIconType, 'packageName' | 'version' | 'icons'>) { | ||
const iconType = usePackageIconType({ packageName, version, icons }); | ||
|
||
return ( | ||
<PanelWrapper> | ||
<Panel> | ||
<EuiIcon type={iconType} size="original" /> | ||
</Panel> | ||
</PanelWrapper> | ||
); | ||
} | ||
|
||
export function LoadingIconPanel() { | ||
return ( | ||
<PanelWrapper> | ||
<Panel> | ||
<Loading /> | ||
</Panel> | ||
</PanelWrapper> | ||
); | ||
} |
9 changes: 9 additions & 0 deletions
9
.../plugins/fleet/public/applications/fleet/sections/epm/screens/detail/components/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* 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 { UpdateIcon } from './update_icon'; | ||
export { IntegrationAgentPolicyCount } from './integration_agent_policy_count'; | ||
export { IconPanel, LoadingIconPanel } from './icon_panel'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ns/fleet/public/applications/fleet/sections/epm/screens/detail/components/update_icon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiIconTip, EuiIconProps } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const UpdateIcon = ({ size = 'm' }: { size?: EuiIconProps['size'] }) => ( | ||
<EuiIconTip | ||
aria-label={i18n.translate('xpack.fleet.epm.updateAvailableTooltip', { | ||
defaultMessage: 'Update available', | ||
})} | ||
size={size} | ||
type="alert" | ||
color="warning" | ||
content={i18n.translate('xpack.fleet.epm.updateAvailableTooltip', { | ||
defaultMessage: 'Update available', | ||
})} | ||
/> | ||
); |
114 changes: 0 additions & 114 deletions
114
x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/content.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.