Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu committed May 24, 2023
1 parent e60abef commit 7ca5041
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [Home/Host] Displays a warning for hosts with HVM disabled [#6823](https://github.com/vatesfr/xen-orchestra/issues/6823) (PR [#6834](https://github.com/vatesfr/xen-orchestra/pull/6834))
- [OVA import] Workaround for OVA generated by Oracle VM with faulty size in metadata [#6824](https://github.com/vatesfr/xen-orchestra/issues/6824)
- [REST API] _Rolling Pool Update_ action available `pools/<uuid>/actions/rolling_update`
- [Self service] Add default tags to all VM that will be created by a self service (PRs [#6810](https://github.com/vatesfr/xen-orchestra/pull/6810), [#6812](https://github.com/vatesfr/xen-orchestra/pull/6812))
- [Self service] Add default tags to all VMs that will be created by a Self Service (PRs [#6810](https://github.com/vatesfr/xen-orchestra/pull/6810), [#6812](https://github.com/vatesfr/xen-orchestra/pull/6812))

### Bug fixes

Expand Down
24 changes: 9 additions & 15 deletions packages/xo-web/src/xo-app/self/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ import Page from '../page'

// ===================================================================

const TAGS_WRAPPER_STYLES = { fontSize: '1.4em' }

// ===================================================================

const HEADER = (
<Container>
<Row>
Expand Down Expand Up @@ -314,13 +318,9 @@ export class Edit extends Component {
// -----------------------------------------------------------------------------

_onRemoveTag = tag =>
this.setState(prevState => {
const tags = [...prevState.tags]
remove(tags, _tag => tag === _tag)
return {
tags,
}
})
this.setState(prevState => ({
tags: prevState.tags.filter(_tag => tag === _tag),
}))

_onAddTag = tag =>
this.setState(prevState => ({
Expand Down Expand Up @@ -521,7 +521,7 @@ export class Edit extends Component {
</Row>
<Row>
<Col>
<span style={{ fontSize: '1.4em' }}>
<span style={TAGS_WRAPPER_STYLES}>
<Tags labels={state.tags} onAdd={this._onAddTag} onDelete={this._onRemoveTag} />
</span>
</Col>
Expand Down Expand Up @@ -600,13 +600,7 @@ class ResourceSet extends Component {
</li>
),
<li key='tags' className='list-group-item'>
<Icon icon='tags' />{' '}
{tags.map((tag, i) => (
<span key={tag}>
{i !== 0 && ', '}
{tag}
</span>
))}
<Icon icon='tags' /> {tags.join(', ')}
</li>,
<li key='graphs' className='list-group-item'>
<ResourceSetQuotas limits={limits} />
Expand Down

0 comments on commit 7ca5041

Please sign in to comment.