Add multiplicators to certain inputs, closes #154
Allows for users to enter `10g` into a memory field and have it converted to 10GB equivalent in MB.
This commit is contained in:
parent
90cd2b677e
commit
e47bb6ef0f
5 changed files with 29 additions and 9 deletions
|
@ -92,14 +92,14 @@
|
|||
<div class="form-group col-md-6 col-xs-6">
|
||||
<label for="memory" class="control-label">Total Memory</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="memory" class="form-control" value="{{ old('memory') }}"/>
|
||||
<input type="text" name="memory" data-multiplicator="true" class="form-control" value="{{ old('memory') }}"/>
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-xs-6">
|
||||
<label for="memory_overallocate" class="control-label">Overallocate</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="memory_overallocate" class="form-control" value="{{ old('memory_overallocate', 0) }}"/>
|
||||
<input type="text" name="memory_overallocate" data-multiplicator="true" class="form-control" value="{{ old('memory_overallocate', 0) }}"/>
|
||||
<span class="input-group-addon">%</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
<div class="form-group col-md-3 col-xs-6">
|
||||
<label for="memory" class="control-label">Total Memory</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="memory" class="form-control" value="{{ old('memory', $node->memory) }}"/>
|
||||
<input type="text" name="memory" class="form-control" data-multiplicator="true" value="{{ old('memory', $node->memory) }}"/>
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -197,7 +197,7 @@
|
|||
<div class="form-group col-md-3 col-xs-6">
|
||||
<label for="disk" class="control-label">Disk Space</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="disk" class="form-control" value="{{ old('disk', $node->disk) }}"/>
|
||||
<input type="text" name="disk" class="form-control" data-multiplicator="true" value="{{ old('disk', $node->disk) }}"/>
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -118,14 +118,14 @@
|
|||
<div class="form-group col-md-4 col-xs-4">
|
||||
<label for="memory" class="control-label">Memory</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="memory" class="form-control" value="{{ old('memory') }}"/>
|
||||
<input type="text" name="memory" data-multiplicator="true" class="form-control" value="{{ old('memory') }}"/>
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4 col-xs-4">
|
||||
<label for="memory" class="control-label">Swap</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="swap" class="form-control" value="{{ old('swap', 0) }}"/>
|
||||
<input type="text" name="swap" data-multiplicator="true" class="form-control" value="{{ old('swap', 0) }}"/>
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<div class="form-group col-md-4 col-xs-4">
|
||||
<label for="disk" class="control-label">Disk Space</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="disk" class="form-control" value="{{ old('disk') }}"/>
|
||||
<input type="text" name="disk" data-multiplicator="true" class="form-control" value="{{ old('disk') }}"/>
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -228,14 +228,14 @@
|
|||
<div class="col-md-6 form-group {{ $errors->has('memory') ? 'has-error' : '' }}">
|
||||
<label for="memory" class="control-label">Allocated Memory</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="memory" class="form-control" value="{{ old('memory', $server->memory) }}"/>
|
||||
<input type="text" name="memory" data-multiplicator="true" class="form-control" value="{{ old('memory', $server->memory) }}"/>
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 form-group {{ $errors->has('swap') ? 'has-error' : '' }}">
|
||||
<label for="swap" class="control-label">Allocated Swap</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="swap" class="form-control" value="{{ old('swap', $server->swap) }}"/>
|
||||
<input type="text" name="swap" data-multiplicator="true" class="form-control" value="{{ old('swap', $server->swap) }}"/>
|
||||
<span class="input-group-addon">MB</span>
|
||||
</div>
|
||||
<p class="text-muted"><small>Setting this to <code>0</code> will disable swap space on this server.</small></p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue