From 7114c83b1acde171782fc532bf03c182117bf274 Mon Sep 17 00:00:00 2001 From: vinay sharma Date: Mon, 20 Sep 2021 20:09:47 +0530 Subject: [PATCH] Add changes for the create server slider (#5755) * added some changes for the create server slider Signed-off-by: Vinay Sharma * added some minor changes Signed-off-by: Vinay Sharma --- .../chef-servers-list.component.ts | 3 +- .../create-chef-server-modal.component.html | 31 ++++++++++++++----- .../create-chef-server-modal.component.scss | 5 +-- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/components/automate-ui/src/app/modules/infra-proxy/chef-servers-list/chef-servers-list.component.ts b/components/automate-ui/src/app/modules/infra-proxy/chef-servers-list/chef-servers-list.component.ts index 6c75a7302ea..20eb5f3636a 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/chef-servers-list/chef-servers-list.component.ts +++ b/components/automate-ui/src/app/modules/infra-proxy/chef-servers-list/chef-servers-list.component.ts @@ -137,8 +137,7 @@ export class ChefServersListComponent implements OnInit, OnDestroy { ip_address: this.ipForm.controls['ip_address'].value?.trim() || '' }; this.store.dispatch(new CreateServer(server)); - this.creatingChefServer = false; - this.createChefServerForm.reset(); + this.resetCreateModal(); } private resetCreateModal(): void { diff --git a/components/automate-ui/src/app/modules/infra-proxy/create-chef-server-modal/create-chef-server-modal.component.html b/components/automate-ui/src/app/modules/infra-proxy/create-chef-server-modal/create-chef-server-modal.component.html index 4d364ec5ec6..68f22c98d5a 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/create-chef-server-modal/create-chef-server-modal.component.html +++ b/components/automate-ui/src/app/modules/infra-proxy/create-chef-server-modal/create-chef-server-modal.component.html @@ -70,7 +70,22 @@

Add Chef Infra Server

Edit ID -
+ +
+ + + +
+
+
+ *ngIf="fqdnForm.get('fqdn').hasError('required') && fqdnForm.get('fqdn').dirty"> FQDN is required. + *ngIf="fqdnForm.get('fqdn').hasError('pattern')"> FQDN is invalid.
-
+ +
+
+ *ngIf="ipForm.get('ip_address').hasError('required') && ipForm.get('ip_address').dirty"> IP Address is required. + *ngIf="ipForm.get('ip_address').hasError('pattern')"> IP Address is invalid.
Cancel -