From 275785404ce18eb30d3b03bd45a8b57d0e759c7d Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 18 Aug 2010 11:30:01 -0700 Subject: [PATCH] Add Host - vlidate cluster section only if xenserver is xenserver --- ui/scripts/cloud.core.hosts.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/scripts/cloud.core.hosts.js b/ui/scripts/cloud.core.hosts.js index 9d32c417c07..3316b5b19b8 100644 --- a/ui/scripts/cloud.core.hosts.js +++ b/ui/scripts/cloud.core.hosts.js @@ -594,8 +594,11 @@ function showHostsTab() { isValid &= validateString("Host name", dialogBox.find("#host_hostname"), dialogBox.find("#host_hostname_errormsg")); isValid &= validateString("User name", dialogBox.find("#host_username"), dialogBox.find("#host_username_errormsg")); isValid &= validateString("Password", dialogBox.find("#host_password"), dialogBox.find("#host_password_errormsg")); - if(clusterRadio == "new_cluster_radio") - isValid &= validateString("Cluster name", dialogBox.find("#new_cluster_name"), dialogBox.find("#new_cluster_name_errormsg")); + //xenserver supports cluster. kvm doesn't support cluster. + if (getHypervisorType() != "kvm") { + if(clusterRadio == "new_cluster_radio") + isValid &= validateString("Cluster name", dialogBox.find("#new_cluster_name"), dialogBox.find("#new_cluster_name_errormsg")); + } if (!isValid) return; var array1 = [];