feat(xo-web/jobs): add button to copy jobs IDs (#5951)

Useful to create a `job.runSequence` job. Follow-up of #5944.
This commit is contained in:
Mathieu 2021-10-15 14:25:02 +02:00 committed by GitHub
parent e2e453985f
commit 9ceba1d6e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [Tasks] Filter out short tasks using a default filter (PR [#5921](https://github.com/vatesfr/xen-orchestra/pull/5921))
- [Jobs] Ability to copy a job ID (PR [#5951](https://github.com/vatesfr/xen-orchestra/pull/5951))
### Bug fixes

View File

@ -2,6 +2,7 @@ import _, { messages } from 'intl'
import ActionButton from 'action-button'
import Button from 'button'
import Component from 'base-component'
import copy from 'copy-to-clipboard'
import defined from '@xen-orchestra/defined'
import GenericInput from 'json-schema-input'
import Icon from 'icon'
@ -408,6 +409,12 @@ export default class Jobs extends Component {
label: _('jobEdit'),
level: 'primary',
},
{
handler: ({ id }) => copy(id),
icon: 'clipboard',
label: _('copyToClipboard'),
level: 'secondary',
},
]
render() {