Add base support for definining the number of backups that can be created for a server

This commit is contained in:
Dane Everitt 2020-04-26 12:12:29 -07:00
parent bed51b5871
commit f1c3762f4d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
10 changed files with 65 additions and 23 deletions

View file

@ -29,6 +29,7 @@ export interface Server {
featureLimits: {
databases: number;
allocations: number;
backups: number;
};
isSuspended: boolean;
isInstalling: boolean;

View file

@ -118,15 +118,21 @@
<div>
<input type="text" id="pDatabaseLimit" name="database_limit" class="form-control" value="{{ old('database_limit', 0) }}"/>
</div>
<p class="text-muted small">The total number of databases a user is allowed to create for this server. Leave blank to allow unlimited.</p>
<p class="text-muted small">The total number of databases a user is allowed to create for this server.</p>
</div>
<div class="form-group col-xs-6">
<label for="pAllocationLimit" class="control-label">Allocation Limit</label>
<div>
<input type="text" id="pAllocationLimit" name="allocation_limit" class="form-control" value="{{ old('allocation_limit', 0) }}"/>
</div>
<p class="text-muted small">The total number of allocations a user is allowed to create for this server. Leave blank to allow unlimited.</p>
<p class="text-muted small">The total number of allocations a user is allowed to create for this server.</p>
</div>
<div class="form-group col-xs-6">
<label for="pBackupLimit" class="control-label">Backup Limit</label>
<div>
<input type="text" id="pBackupLimit" name="backup_limit" class="form-control" value="{{ old('backup_limit', 0) }}"/>
</div>
<p class="text-muted small">The total number of backups that can be created for this server.</p>
</div>
</div>
</div>

View file

@ -104,18 +104,25 @@
<div class="box-body">
<div class="row">
<div class="form-group col-xs-6">
<label for="cpu" class="control-label">Database Limit</label>
<label for="database_limit" class="control-label">Database Limit</label>
<div>
<input type="text" name="database_limit" class="form-control" value="{{ old('database_limit', $server->database_limit) }}"/>
</div>
<p class="text-muted small">The total number of databases a user is allowed to create for this server. Leave blank to allow unlimited.</p>
<p class="text-muted small">The total number of databases a user is allowed to create for this server.</p>
</div>
<div class="form-group col-xs-6">
<label for="cpu" class="control-label">Allocation Limit</label>
<label for="allocation_limit" class="control-label">Allocation Limit</label>
<div>
<input type="text" name="allocation_limit" class="form-control" value="{{ old('allocation_limit', $server->allocation_limit) }}"/>
</div>
<p class="text-muted small"><strong>This feature is not currently implemented.</strong> The total number of allocations a user is allowed to create for this server. Leave blank to allow unlimited.</p>
<p class="text-muted small"><strong>This feature is not currently implemented.</strong> The total number of allocations a user is allowed to create for this server.</p>
</div>
<div class="form-group col-xs-6">
<label for="backup_limit" class="control-label">Backup Limit</label>
<div>
<input type="text" name="backup_limit" class="form-control" value="{{ old('backup_limit', $server->backup_limit) }}"/>
</div>
<p class="text-muted small">The total number of backups that can be created for this server.</p>
</div>
</div>
</div>