From: Stephan Müller Date: Wed, 27 Jun 2018 09:33:09 +0000 (+0200) Subject: mgr/dashboard: Use forms in RGW bucket form X-Git-Tag: v14.0.1~954^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aea1c70fcbec57c16baf9df9146b4f79cdedbd8c;p=ceph.git mgr/dashboard: Use forms in RGW bucket form Signed-off-by: Stephan Müller --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html index 1682b433b7f..f0e4d163260 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html @@ -58,7 +58,7 @@
+ [ngClass]="{'has-error': bucketForm.showError('bucket', frm)}">
@@ -95,7 +95,7 @@
+ [ngClass]="{'has-error': bucketForm.showError('owner', frm)}">
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts index 7801f3720d6..e8b812af4e8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts @@ -1,18 +1,13 @@ import { Component, OnInit } from '@angular/core'; -import { - AbstractControl, - AsyncValidatorFn, - FormBuilder, - FormGroup, - ValidationErrors, - Validators -} from '@angular/forms'; +import { AbstractControl, AsyncValidatorFn, ValidationErrors, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import * as _ from 'lodash'; import { RgwBucketService } from '../../../shared/api/rgw-bucket.service'; import { RgwUserService } from '../../../shared/api/rgw-user.service'; +import { CdFormBuilder } from '../../../shared/forms/cd-form-builder'; +import { CdFormGroup } from '../../../shared/forms/cd-form-group'; @Component({ selector: 'cd-rgw-bucket-form', @@ -20,16 +15,16 @@ import { RgwUserService } from '../../../shared/api/rgw-user.service'; styleUrls: ['./rgw-bucket-form.component.scss'] }) export class RgwBucketFormComponent implements OnInit { - bucketForm: FormGroup; + bucketForm: CdFormGroup; editing = false; error = false; loading = false; owners = null; constructor( - private formBuilder: FormBuilder, private route: ActivatedRoute, private router: Router, + private formBuilder: CdFormBuilder, private rgwBucketService: RgwBucketService, private rgwUserService: RgwUserService ) {