[PATCH] [Kimchi] Fixed issue #1074 IP address for the guest under Interfaces tab is blank

From: Rajat Gupta <rajat.triumph@gmail.com> If IP address is not define it will show "unavailable" for the guest under Interfaces tab Signed-off-by: Rajat Gupta <rajat.triumph@gmail.com> --- ui/js/src/kimchi.guest_edit_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index 9669d08..d5e32a1 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -206,7 +206,7 @@ kimchi.guest_edit_main = function() { if (data.id === -1) { data.id = $('#form-guest-edit-interface > .body').children().size(); } - if (data.ips === "" || data.ips === null) { + if (data.ips === "" || data.ips === null || data.ips === undefined) { data.ips = i18n["KCHNET6001M"]; } else { data.ips = data.ips; -- 2.1.0

Reviewed-By: Lucio Correia <luciojhc@linux.vnet.ibm.com> On 02/11/2016 05:29, rajgupta@linux.vnet.ibm.com wrote:
From: Rajat Gupta <rajat.triumph@gmail.com>
If IP address is not define it will show "unavailable" for the guest under Interfaces tab
Signed-off-by: Rajat Gupta <rajat.triumph@gmail.com> --- ui/js/src/kimchi.guest_edit_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index 9669d08..d5e32a1 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -206,7 +206,7 @@ kimchi.guest_edit_main = function() { if (data.id === -1) { data.id = $('#form-guest-edit-interface > .body').children().size(); } - if (data.ips === "" || data.ips === null) { + if (data.ips === "" || data.ips === null || data.ips === undefined) { data.ips = i18n["KCHNET6001M"]; } else { data.ips = data.ips;
-- Lucio Correia Software Engineer IBM LTC Brazil

Hi, This patch only works when adding a new interface. After closing the editing dialog and reopening it, the 'IP Address' column will be displayed in blank. IMO it should also display 'unavailable' in this case. On 11/02/2016 05:29 AM, rajgupta@linux.vnet.ibm.com wrote:
From: Rajat Gupta <rajat.triumph@gmail.com>
If IP address is not define it will show "unavailable" for the guest under Interfaces tab
Signed-off-by: Rajat Gupta <rajat.triumph@gmail.com> --- ui/js/src/kimchi.guest_edit_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index 9669d08..d5e32a1 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -206,7 +206,7 @@ kimchi.guest_edit_main = function() { if (data.id === -1) { data.id = $('#form-guest-edit-interface > .body').children().size(); } - if (data.ips === "" || data.ips === null) { + if (data.ips === "" || data.ips === null || data.ips === undefined) { data.ips = i18n["KCHNET6001M"]; } else { data.ips = data.ips;

Hello Aline, Thanks for your feedback I have sent V2 patch for this issue. Thanks and regards, Rajat Gupta On 11/5/2016 1:07 AM, Aline Manera wrote:
Hi,
This patch only works when adding a new interface. After closing the editing dialog and reopening it, the 'IP Address' column will be displayed in blank.
IMO it should also display 'unavailable' in this case.
On 11/02/2016 05:29 AM, rajgupta@linux.vnet.ibm.com wrote:
From: Rajat Gupta <rajat.triumph@gmail.com>
If IP address is not define it will show "unavailable" for the guest under Interfaces tab
Signed-off-by: Rajat Gupta <rajat.triumph@gmail.com> --- ui/js/src/kimchi.guest_edit_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index 9669d08..d5e32a1 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -206,7 +206,7 @@ kimchi.guest_edit_main = function() { if (data.id === -1) { data.id = $('#form-guest-edit-interface > .body').children().size(); } - if (data.ips === "" || data.ips === null) { + if (data.ips === "" || data.ips === null || data.ips === undefined) { data.ips = i18n["KCHNET6001M"]; } else { data.ips = data.ips;
participants (4)
-
Aline Manera
-
Lucio Correia
-
Rajat Gupta
-
rajgupta@linux.vnet.ibm.com