From 8a0e5d28f2cc74ef91cc56c381f2397b371ea7a2 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 5 Mar 2012 16:11:48 -0800 Subject: [PATCH] bug 13386: System page - Virtual Router page - hide Public IP field when its zone's network type is Basic. [reviewed-by: Brian] --- ui/scripts/system.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index b1b3b9f9093..1b05e7889a4 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -2185,10 +2185,15 @@ details: { title: 'label.details', preFilter: function(args) { - if (!args.context.routers[0].project) - return ['project', 'projectid']; - - return []; + var hiddenFields = []; + if (!args.context.routers[0].project) { + hiddenFields.push('project'); + hiddenFields.push('projectid'); + } + if(selectedZoneObj.networktype == 'Basic') { + hiddenFields.push('publicip'); //In Basic zone, guest IP is public IP. So, publicip is not returned by listRouters API. Only guestipaddress is returned by listRouters API. + } + return hiddenFields; }, fields: [ {