feat(xo-server, xo-web/host): display installed certificates (#5319)
See #5134
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
||||
|
||||
- [Host/Advanced] Display installed certificates [#5134](https://github.com/vatesfr/xen-orchestra/issues/5134) (PR [#5319](https://github.com/vatesfr/xen-orchestra/pull/5319))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
@@ -33,5 +35,5 @@
|
||||
- vhd-lib minor
|
||||
- @xen-orchestra/audit-core minor
|
||||
- xo-server-audit minor
|
||||
- xo-web patch
|
||||
- xo-server patch
|
||||
- xo-web minor
|
||||
- xo-server minor
|
||||
|
||||
@@ -264,6 +264,12 @@ const TRANSFORMS = {
|
||||
capability.startsWith('hvm')
|
||||
),
|
||||
|
||||
// Only exists on XCP-ng/CH >= 8.2
|
||||
certificates: obj.$certificates?.map(({ fingerprint, not_after }) => ({
|
||||
fingerprint,
|
||||
notAfter: toTimestamp(not_after),
|
||||
})),
|
||||
|
||||
// TODO: dedupe.
|
||||
PIFs: link(obj, 'PIFs'),
|
||||
$PIFs: link(obj, 'PIFs'),
|
||||
|
||||
@@ -83,6 +83,9 @@ const messages = {
|
||||
advancedSettings: 'Advanced settings',
|
||||
txChecksumming: 'TX checksumming',
|
||||
unknownSize: 'Unknown size',
|
||||
installedCertificates: 'Installed certificates',
|
||||
expiry: 'Expiry',
|
||||
fingerprint: 'Fingerprint',
|
||||
|
||||
// ----- Modals -----
|
||||
alertOk: 'OK',
|
||||
@@ -908,6 +911,7 @@ const messages = {
|
||||
hostLicenseExpiry: 'Expiry',
|
||||
hostRemoteSyslog: 'Remote syslog',
|
||||
hostIommu: 'IOMMU',
|
||||
hostNoCertificateInstalled: 'No certificates installed on this host',
|
||||
supplementalPacks: 'Installed supplemental packs',
|
||||
supplementalPackNew: 'Install new supplemental pack',
|
||||
supplementalPackPoolNew: 'Install supplemental pack on every host',
|
||||
|
||||
@@ -452,6 +452,44 @@ export default class extends Component {
|
||||
<Upgrade place='supplementalPacks' available={2} />
|
||||
</Container>,
|
||||
]}
|
||||
{host.certificates !== undefined && (
|
||||
<div>
|
||||
<h3>{_('installedCertificates')}</h3>
|
||||
{host.certificates.length > 0 ? (
|
||||
<ul className='list-group'>
|
||||
{host.certificates.map(({ fingerprint, notAfter }) => (
|
||||
<li className='list-group-item' key={fingerprint}>
|
||||
<Container>
|
||||
<Row>
|
||||
<Col mediumSize={2}>
|
||||
<strong>{_('fingerprint')}</strong>
|
||||
</Col>
|
||||
<Col mediumSize={10}>
|
||||
<Copiable tagName='pre'>{fingerprint}</Copiable>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col mediumSize={2}>
|
||||
<strong>{_('expiry')}</strong>
|
||||
</Col>
|
||||
<Col mediumSize={10}>
|
||||
<FormattedTime
|
||||
value={notAfter * 1e3}
|
||||
day='numeric'
|
||||
month='long'
|
||||
year='numeric'
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : (
|
||||
<span>{_('hostNoCertificateInstalled')}</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
|
||||
Reference in New Issue
Block a user