Skip to content

Commit

Permalink
feat(xo-web/tag): show current tags in Advanced tag creation (#7434)
Browse files Browse the repository at this point in the history
Fixes #7351
  • Loading branch information
Pizzosaure committed Mar 14, 2024
1 parent 54dc3fe commit 66ee45f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [VM Creation] Automatically create a VTPM if the template requests it (Windows templates starting from XCP-ng 8.3) (PR [#7436](https://github.com/vatesfr/xen-orchestra/pull/7436))
- [OTP] Accepts (ignores) whitespaces in the one-time password (some OTP applications add them for nicer display)
- [VM/General] Show current VM tags without the need to search them in advanced creation tag selector [#7351](https://github.com/vatesfr/xen-orchestra/issues/7351) (PR [#7434](https://github.com/vatesfr/xen-orchestra/pull/7434))

### Bug fixes

Expand Down Expand Up @@ -41,6 +42,6 @@
- @xen-orchestra/xapi patch
- xen-api major
- xo-server minor
- xo-web patch
- xo-web minor

<!--packages-end-->
10 changes: 8 additions & 2 deletions packages/xo-web/src/common/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Fragment = ({ children }) => <div style={INHERIT_STYLE}>{children}</div>

class AdvancedTagCreation extends Component {
state = {
tags: [],
tags: this.props.defaultTags.map(tag => ({ id: tag, value: tag })),
tagConfigurations: this.props.tagConfigurations ?? {},
}

Expand Down Expand Up @@ -184,7 +184,13 @@ export default class Tags extends Component {

_advancedTagCreation = () =>
confirm({
body: <AdvancedTagCreation isAdmin={this.props.isAdmin} tagConfigurations={this.props.configuredTags} />,
body: (
<AdvancedTagCreation
isAdmin={this.props.isAdmin}
tagConfigurations={this.props.configuredTags}
defaultTags={this.props.labels}
/>
),
icon: 'add',
title: _('advancedTagCreation'),
})
Expand Down

0 comments on commit 66ee45f

Please sign in to comment.