feat(xo-web/vm/new disk): generate random name (#5828)
This commit is contained in:
parent
bbd571e311
commit
3d15a73f1b
@ -8,6 +8,7 @@
|
||||
> Users must be able to say: “Nice enhancement, I'm eager to test it”
|
||||
|
||||
- [VM/snapshots] Identify VM's current snapshot with an icon next to the snapshot's name (PR [#5824](https://github.com/vatesfr/xen-orchestra/pull/5824))
|
||||
- [VM/new disk] Auto-fill disk name input with generated unique name (PR [#5828](https://github.com/vatesfr/xen-orchestra/pull/5828))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -30,6 +30,7 @@ import {
|
||||
createCompare,
|
||||
createCompareContainers,
|
||||
formatSize,
|
||||
generateReadableRandomString,
|
||||
noop,
|
||||
resolveResourceSet,
|
||||
} from 'utils'
|
||||
@ -205,6 +206,10 @@ class NewDisk extends Component {
|
||||
vm: PropTypes.object.isRequired,
|
||||
}
|
||||
|
||||
state = {
|
||||
name: `${this.props.vm.name_label}_${generateReadableRandomString(5)}`,
|
||||
}
|
||||
|
||||
_createDisk = () => {
|
||||
const { vm, onClose = noop } = this.props
|
||||
const { bootable, name, readOnly, size, sr } = this.state
|
||||
|
Loading…
Reference in New Issue
Block a user