feat(xo-web/plugins): show plugin description (#4832)

Fixes #4569
This commit is contained in:
Rajaa.BARHTAOUI 2020-03-04 15:32:36 +01:00 committed by GitHub
parent 956c7728bf
commit ae812806a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,8 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [Plugin] Show plugin description [#4569](https://github.com/vatesfr/xen-orchestra/issues/4569) (PR [#4832](https://github.com/vatesfr/xen-orchestra/pull/4832))
### Bug fixes
> Users must be able to say: “I had this issue, happy to know it's fixed”

View File

@ -17,6 +17,7 @@ import { addSubscriptions } from 'utils'
import { alert } from 'modal'
import { createSelector } from 'reselect'
import { generateUiSchema } from 'xo-json-schema-input'
import { get } from '@xen-orchestra/defined'
import { injectState, provideState } from 'reaclette'
import { Row, Col } from 'grid'
import {
@ -121,6 +122,7 @@ class Plugin extends Component {
const { props, state } = this
const { editedConfig, expanded } = state
const { configurationPresets, configurationSchema, loaded } = props
const description = get(() => props.description.trim())
return (
<div className='card-block'>
@ -134,6 +136,9 @@ class Plugin extends Component {
/>
<span className='text-primary'>{` ${props.name} `}</span>
<span>{`(v${props.version}) `}</span>
{description !== undefined && description !== '' && (
<span className='text-muted small'> - {description}</span>
)}
<div className='checkbox small'>
<label className='text-muted'>
{_('autoloadPlugin')}{' '}