diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index ee96bf4a4ae..c3b8456daaf 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -7,7 +7,7 @@ > Users must be able to say: “Nice enhancement, I'm eager to test it” -- Grouping of alert icons on the `Home` page for `Pool` and `Host` (PR [#6655](https://github.com/vatesfr/xen-orchestra/pull/6655)) +- [Home/pool, host] Grouping of alert icons on the `Home` page for `Pool` and `Host` (PR [#6655](https://github.com/vatesfr/xen-orchestra/pull/6655)) ### Bug fixes diff --git a/packages/xo-web/src/xo-app/home/host-item.js b/packages/xo-web/src/xo-app/home/host-item.js index 051c49d2ec7..039a04bea5b 100644 --- a/packages/xo-web/src/xo-app/home/host-item.js +++ b/packages/xo-web/src/xo-app/home/host-item.js @@ -33,6 +33,8 @@ import { import MiniStats from './mini-stats' import styles from './index.css' +import { LICENSE_WARNING_BODY } from '../host/license-warning' + import BulkIcons from '../../common/bulk-icons' @addSubscriptions({ @@ -120,25 +122,7 @@ export default class HostItem extends Component { level: 'danger', render: ( - {_('licenseRestrictionsModalTitle')}{' '} - - {_('actionsRestricted')} - - - {_('counterRestrictionsOptions')} - - - - {_('counterRestrictionsOptionsXcp')} - - - {_('counterRestrictionsOptionsXsLicense')} - - + {_('licenseRestrictionsModalTitle')} {LICENSE_WARNING_BODY} ), }) diff --git a/packages/xo-web/src/xo-app/host/license-warning.js b/packages/xo-web/src/xo-app/host/license-warning.js index 78edeb38076..141dc7c7f24 100644 --- a/packages/xo-web/src/xo-app/host/license-warning.js +++ b/packages/xo-web/src/xo-app/host/license-warning.js @@ -4,24 +4,24 @@ import Icon from 'icon' import Tooltip from 'tooltip' import { alert } from 'modal' -const showInfo = () => - alert( - _('licenseRestrictionsModalTitle'), - - - {_('actionsRestricted')} - {' '} - {_('counterRestrictionsOptions')} - - - - {_('counterRestrictionsOptionsXcp')} - - - {_('counterRestrictionsOptionsXsLicense')} - - - ) +export const LICENSE_WARNING_BODY = ( + + + {_('actionsRestricted')} + {' '} + {_('counterRestrictionsOptions')} + + + + {_('counterRestrictionsOptionsXcp')} + + + {_('counterRestrictionsOptionsXsLicense')} + + +) + +const showInfo = () => alert(_('licenseRestrictionsModalTitle'), LICENSE_WARNING_BODY) const LicenseWarning = ({ iconSize = 'sm' }) => (