Better input for volume size
Fixes #377 (closed). I decided to get rid of the slider input, it's silly, now someone can just type their desired volume size.
I implemented a generic NumericTextInput
widget with a few kinds of validation, and associated types. Using it in both the server creation and volume creation views.
A bunch of changed code is just because I put the CreateServerRequest
part of the CreateServer
view into a CreateServerViewParams
record (along with the NumericTextInput
type), this should be mostly contained to commit 1953896b.
How to Test
- Try each of these when creating a standalone volume, and creating a volume-backed server.
- Set a precise volume size (e.g. 453 GB).
- You should see a warning and be prevented from creating the resource when:
- Entered volume size exceeds your available quota
- Entered volume size is not an integer greater than 1 (e.g. alphabetic characters and negative numbers should not be accepted)
Screenshots
Edited by Chris Martin