Skip to content

Commit

Permalink
edit app: fixed validation for mem and disk quota (#4070)
Browse files Browse the repository at this point in the history
Signed-off-by: Vítor Avelino <vavelino@suse.com>
  • Loading branch information
vitoravelino authored and nwmac committed Jan 3, 2020
1 parent 5ac7fa4 commit bd91865
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ <h1>Edit Application: {{ (applicationService.application$ | async)?.app.entity.n
<input matInput placeholder="Number of Instances" formControlName="instances" type="number">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Disk Quota (MB)" formControlName="disk_quota" type="number">
<input matInput placeholder="Disk Quota (MB)" formControlName="disk_quota" type="number" min="1">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Memory Quota (MB)" formControlName="memory" type="number">
<input matInput placeholder="Memory Quota (MB)" formControlName="memory" type="number" min="1">
</mat-form-field>
<mat-slide-toggle class="edit-app__toggler" formControlName="enable_ssh">Enable SSH to Application Instances</mat-slide-toggle>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ export class EditApplicationComponent implements OnInit, OnDestroy {
]],
disk_quota: [0, [
Validators.required,
Validators.min(0)
Validators.min(1)
]],
memory: [0, [
Validators.required,
Validators.min(0)
Validators.min(1)
]],
enable_ssh: false
});
Expand Down

0 comments on commit bd91865

Please sign in to comment.