From: Rajat Gupta <rajat.triumph(a)gmail.com>
V2 :
Added condition to check if IP address array length is zero
V1 :
If IP address is not define it will show "unavailable" for the guest under
Interfaces tab
Signed-off-by: Rajat Gupta <rajat.triumph(a)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..3261075 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.length === 0) {
data.ips = i18n["KCHNET6001M"];
} else {
data.ips = data.ips;
--
2.1.0