Bug 1600239

Summary: Import Cluster Page: Cluster Name validation issues
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Ju Lim <julim>
Component: web-admin-tendrl-uiAssignee: Neha Gupta <negupta>
Status: CLOSED WONTFIX QA Contact: sds-qe-bugs
Severity: low Docs Contact:
Priority: unspecified    
Version: rhgs-3.4CC: gshanmug, julim, mbukatov, pcuzner, rhs-bugs, sankarshan
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-08 20:24:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Import Cluster Page none

Description Ju Lim 2018-07-11 19:42:05 UTC
Created attachment 1458210 [details]
Import Cluster Page

Description of problem:

From Paul Cuzner:"the cluster import process needs a cluster name and it must be valid. However, it's not validated dynamically, and the import button remains enabled when the cluster name is invalid."

Currently the WA UI appear to be performing server-side validation (upon page submission) vs. client-side validation.  

Paul is expecting client-side validation, hence also why the Import button would only be enabled under the following conditions:
- When cluster name field is left blank (i.e. WA will provide a default cluster name)
- When cluster name field is not blank, i.e. user plans to specify a cluster name, then the input needs to meet the correct input criteria


Version-Release number of selected component (if applicable):

# rpm -qa | grep tendrl | sort

tendrl-api-1.6.3-20180704T133554.c5e3ec9.noarch
tendrl-api-httpd-1.6.3-20180704T133554.c5e3ec9.noarch
tendrl-commons-1.6.3-20180704T133946.a2e704b.noarch
tendrl-grafana-plugins-1.6.3-20180705T173252.db411a2.noarch
tendrl-grafana-selinux-1.5.4-20180227T085901.984600c.noarch
tendrl-monitoring-integration-1.6.3-20180705T173252.db411a2.noarch
tendrl-node-agent-1.6.3-20180704T133946.0768af2.noarch
tendrl-notifier-1.6.3-4.el7.noarch
tendrl-selinux-1.5.4-20180227T085901.984600c.noarch
tendrl-ui-1.6.3-20180706T125350.cd9dac7.noarch


How reproducible:
100%

Steps to Reproduce:
1. Install WA
2. Import Cluster
3. Put in invalid cluster name

Actual results:
see screenshot

Expected results:
client-side validation (see description above), and Import button only should be enabled when Cluster Name field left blank OR if cluster name input is valid.

Additional info: