From 956b691878c4bfcd8d8be1c717645ad61ffeb633 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Thu, 25 Sep 2014 12:22:51 +0200 Subject: [PATCH] feature #2911: Add vCenter host type --- src/sunstone/public/js/plugins/hosts-tab.js | 49 ++++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 698f923f4b..a5f61fd886 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -31,19 +31,13 @@ var create_host_tmpl = \ \ \ -
\ - \ -
\ -
\ -
\ - \ -
\
\ \ \
\ +
\ +
\ +
\ + \ +
\ +
\ +
\
\
\
\ @@ -84,6 +85,7 @@ var create_host_tmpl = \ \ \ + \ \ \ \ @@ -105,6 +107,7 @@ var create_host_tmpl = \ \ \ + \ \ \ \ @@ -121,6 +124,27 @@ var create_host_tmpl =
\ \
\ + \
\
\ \ @@ -938,8 +962,19 @@ function setupCreateHostDialog(){ $("#im_mad", $create_host_dialog).val(this.value).change(); if (this.value == "custom") { + $(".vcenter_credentials", $create_host_dialog).hide(); + $("#vnm_mads", $create_host_dialog).show(); + $("#create_host_submit", $create_host_dialog).removeAttr("disabled"); $(".drivers", $create_host_dialog).show(); + } else if (this.value == "vcenter") { + $("#vnm_mads", $create_host_dialog).hide(); + $(".vcenter_credentials", $create_host_dialog).show(); + $("#create_host_submit", $create_host_dialog).attr("disabled", "disabled"); + $(".drivers", $create_host_dialog).hide(); } else { + $(".vcenter_credentials", $create_host_dialog).hide(); + $("#vnm_mads", $create_host_dialog).show(); + $("#create_host_submit", $create_host_dialog).removeAttr("disabled"); $(".drivers", $create_host_dialog).hide(); } })