Merge pull request #21681 from Devp00l/wip-rbd-form-type-error-fix

mgr/dashboard: Fixes type error in RBD form

Reviewed-by: Volker Theile <vtheile@suse.com>
This commit is contained in:
Lenz Grimmer 2018-04-27 11:35:27 +02:00 committed by GitHub
commit 9360f76410
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import * as _ from 'lodash';
@ -293,7 +293,7 @@ export class RbdFormComponent implements OnInit {
this.pools = newPools;
}
validateRbdForm(formatter: FormatterService) {
validateRbdForm(formatter: FormatterService): ValidatorFn {
return (formGroup: FormGroup) => {
// Data Pool
const useDataPoolControl = formGroup.get('useDataPool');
@ -340,6 +340,7 @@ export class RbdFormComponent implements OnInit {
stripingCountControlErrors = {'min': true};
}
stripingCountControl.setErrors(stripingCountControlErrors);
return null;
};
}